This repository has been archived by the owner on May 9, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
dota-modifier-properties.d.ts
447 lines (437 loc) · 16.3 KB
/
dota-modifier-properties.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
interface ModifierAttackEvent {
attacker: CDOTA_BaseNPC;
damage: number;
damage_type: DAMAGE_TYPES;
damage_category: DamageCategory_t;
damage_flags: DOTADamageFlag_t;
inflictor?: CDOTABaseAbility;
original_damage: number;
ranged_attack: boolean;
target: CDOTA_BaseNPC;
}
interface ModifierEvent {
new_pos: Vector;
order_type: DotaUnitOrder_t;
unit: CDOTA_BaseNPC;
}
interface ModifierAbilityEvent extends ModifierEvent {
ability: CDOTABaseAbility;
target?: CDOTA_BaseNPC;
}
/** @noClassOr */
/** @pureAbstract */
declare abstract class CDOTA_Modifier_Lua extends CDOTA_Buff {
/**
* Return a list of modifier functions this modifier implements.
*/
DeclareFunctions(): modifierfunction[];
/**
* Return a map of enabled/disabled states.
*/
CheckState(): {[state: number]: boolean};
/**
* True/false if this modifier is active on illusions.
*/
AllowIllusionDuplicate(): boolean;
/**
* True/false if the parent of this modifier can be autoattacked.
*/
CanParentBeAutoAttacked(): boolean;
/**
* True/false if this buff is removed when the duration expires.
*/
DestroyOnExpire(): boolean;
/**
* Return the types of attributes applied to this modifier (enum value from DOTAModifierAttribute_t
*/
GetAttributes(): DOTAModifierAttribute_t;
/**
* Returns aura stickiness
*/
GetAuraDuration(): number;
/**
* Return true/false if this entity should receive the aura under specific conditions
*/
GetAuraEntityReject(hEntity: CDOTA_BaseNPC): boolean;
/**
* Return the range around the parent this aura tries to apply its buff.
*/
GetAuraRadius(): number;
/**
* Return the unit flags this aura respects when placing buffs.
*/
GetAuraSearchFlags(): DOTA_UNIT_TARGET_FLAGS;
/**
* Return the teams this aura applies its buff to.
*/
GetAuraSearchTeam(): DOTA_UNIT_TARGET_TEAM;
/**
* Return the unit classifications this aura applies its buff to.
*/
GetAuraSearchType(): DOTA_UNIT_TARGET_TYPE;
/**
* Return the attach type of the particle system from GetEffectName.
*/
GetEffectAttachType(): ParticleAttachment_t;
/**
* Return the name of the particle system that is created while this modifier is active.
*/
GetEffectName(): string;
/**
* Return the name of the hero effect particle system that is created while this modifier is active.
*/
GetHeroEffectName(): string;
/**
* The name of the secondary modifier that will be applied by this modifier (if it is an aura).
*/
GetModifierAura(): string;
/**
* Return the priority order this modifier will be applied over others.
*/
GetPriority(): modifierpriority;
/**
* Return the name of the status effect particle system that is created while this modifier is active.
*/
GetStatusEffectName(): string;
/**
* Return the name of the buff icon to be shown for this modifier.
*/
GetTexture(): string;
/**
* Relationship of this hero effect with those from other buffs (higher is more likely to be shown).
*/
HeroEffectPriority(): modifierpriority;
/**
* True/false if this modifier is an aura.
*/
IsAura(): boolean;
/**
* True/false if this aura provides buffs when the parent is dead.
*/
IsAuraActiveOnDeath(): boolean;
/**
* True/false if this modifier should be displayed as a debuff.
*/
IsDebuff(): boolean;
/**
* True/false if this modifier should be displayed on the buff bar.
*/
IsHidden(): boolean;
IsPermanent(): boolean;
/**
* True/false if this modifier can be purged.
*/
IsPurgable(): boolean;
/**
* True/false if this modifier can be purged by strong dispels.
*/
IsPurgeException(): boolean;
/**
* True/false if this modifier is considered a stun for purge reasons.
*/
IsStunDebuff(): boolean;
/**
* Runs when the modifier is created.
*/
OnCreated(params: table): void;
/**
* Runs when the modifier is destroyed (after unit loses modifier).
*/
OnDestroy(): void;
/**
* Runs when the think interval occurs.
*/
OnIntervalThink(): void;
/**
* Runs when the modifier is refreshed.
*/
OnRefresh(params: table): void;
/**
* Runs when the modifier is destroyed (before unit loses modifier).
*/
OnRemoved(): void;
/**
* Runs when stack count changes (param is old count).
*/
OnStackCountChanged(iStackCount: number): void;
/**
* True/false if this modifier is removed when the parent dies.
*/
RemoveOnDeath(): boolean;
/**
* [BP2020] No clue what this does.
*/
SetHasCustomTransmitterData(hasCustomData: boolean): void;
/**
* Apply the overhead offset to the attached effect.
*/
ShouldUseOverheadOffset(): boolean;
/**
* Relationship of this status effect with those from other buffs (higher is more likely to be shown).
*/
StatusEffectPriority(): modifierpriority;
// ========== Modifier properties =================
/**
* Bonus damag (Green numbers)
*/
GetModifierPreAttack_BonusDamage(): number;
/**
*
*/
GetModifierPreAttack_BonusDamage_Proc(): number;
/**
* Bonus damage not factoring in with crit
*/
GetModifierPreAttack_BonusDamagePostCrit(event: ModifierAttackEvent): number;
/**
* Changes base damage
*/
GetModifierBaseAttack_BonusDamage(): number;
/**
* Add bonus physical damage
*/
GetModifierProcAttack_BonusDamage_Physical(event: ModifierAttackEvent): number;
/**
* Add bonus magical damage
*/
GetModifierProcAttack_BonusDamage_Magical(event: ModifierAttackEvent): number;
/**
* Add bonus pure damage
*/
GetModifierProcAttack_BonusDamage_Pure(event: ModifierAttackEvent): number;
GetModifierProcAttack_Feedback(event: ModifierAttackEvent): number;
// Not working
// GetModifierOverrideAttackDamage(): number;
GetModifierPreAttack(event: ModifierAttackEvent): number;
/**
* Makes the hero transparent( Use a value from 0 to 1)
*/
GetModifierInvisibilityLevel(): number;
GetModifierPersistentInvisibility(): number;
GetModifierMoveSpeedBonus_Constant(): number;
GetModifierMoveSpeedOverride(): number;
GetModifierMoveSpeedBonus_Percentage(): number;
GetModifierMoveSpeedBonus_Percentage_Unique(): number;
GetModifierMoveSpeedBonus_Percentage_Unique_2(): number;
GetModifierMoveSpeedBonus_Special_Boots(): number;
GetModifierMoveSpeedBonus_Special_Boots_2(): number;
GetModifierMoveSpeed_Absolute(): number;
GetModifierMoveSpeed_AbsoluteMin(): number;
GetModifierMoveSpeed_Limit(): number;
GetModifierMoveSpeed_Max(): number;
GetModifierAttackSpeedBaseOverride(): number;
GetModifierFixedAttackRate(): number;
GetModifierAttackSpeedBonus_Constant(): number;
GetModifierCooldownReduction_Constant(event: ModifierAbilityEvent): number;
GetModifierBaseAttackTimeConstant(): number;
GetModifierAttackPointConstant(): number;
GetModifierDamageOutgoing_Percentage(event: ModifierAttackEvent): number;
GetModifierDamageOutgoing_Percentage_Illusion(event: ModifierAttackEvent): number;
GetModifierTotalDamageOutgoing_Percentage(event: ModifierAttackEvent): number;
GetModifierSpellAmplify_Percentage(event: ModifierAttackEvent): number;
// Not working
GetModifierSpellAmplify_PercentageUnique(): number;
GetModifierHPRegenAmplify_Percentage(): number;
GetModifierMPRegenAmplify_Percentage(): number;
// Not working
GetModifierMagicDamageOutgoing_Percentage(event: ModifierAttackEvent): number;
GetModifierBaseDamageOutgoing_Percentage(event: ModifierAttackEvent): number;
// Not working
GetModifierBaseDamageOutgoing_PercentageUnique(event: ModifierAttackEvent): number;
GetModifierIncomingDamage_Percentage(event: ModifierAttackEvent): number;
GetModifierIncomingPhysicalDamage_Percentage(event: ModifierAttackEvent): number;
// Not working
GetModifierIncomingPhysicalDamageConstant(event: ModifierAttackEvent): number;
GetModifierIncomingSpellDamageConstant(event: ModifierAttackEvent): number;
GetModifierEvasion_Constant(event: ModifierAttackEvent): number;
// Not working
GetModifierNegativeEvasion_Constant(): number;
// Not working
GetModifierStatusResistance(): number;
// Not working
GetModifierStatusResistanceStacking(): number;
GetModifierAvoidDamage(event: ModifierAttackEvent): number;
GetModifierAvoidSpell(event: ModifierAttackEvent): 0|1;
GetModifierMiss_Percentage(): number;
GetModifierPhysicalArmorBonus(event: ModifierAttackEvent): number;
GetModifierPhysicalArmorBonusUnique(event: ModifierAttackEvent): number;
GetModifierPhysicalArmorBonusUniqueActive(event: ModifierAttackEvent): number;
// Not working
GetModifierIgnorePhysicalArmor(event: ModifierAttackEvent): number;
// Not working
GetModifierMagicalResistanceDirectModification(event: ModifierAttackEvent): number;
GetModifierMagicalResistanceBonus(event: ModifierAttackEvent): number;
GetModifierMagicalResistanceDecrepifyUnique(event: ModifierAttackEvent): number;
GetModifierBaseRegen(): number;
GetModifierConstantManaRegen(): number;
GetModifierConstantManaRegenUnique(): number;
GetModifierTotalPercentageManaRegen(): number;
GetModifierConstantHealthRegen(): number;
GetModifierHealthRegenPercentage(): number;
// Not working
GetModifierHealthRegenPercentageUnique(): number;
GetModifierHealthBonus(): number;
GetModifierManaBonus(): number;
GetModifierExtraStrengthBonus(): number;
GetModifierExtraHealthBonus(): number;
GetModifierExtraManaBonus(): number;
GetModifierExtraHealthPercentage(): number;
GetModifierBonusStats_Strength(): number;
GetModifierBonusStats_Agility(): number;
GetModifierBonusStats_Intellect(): number;
GetModifierCastRangeBonus(event: ModifierAbilityEvent): number;
// Not working
GetModifierCastRangeBonusTarget(event: ModifierAbilityEvent): number;
GetModifierCastRangeBonusStacking(event: ModifierAbilityEvent): number;
// Not working
GetModifierAttackRangeOverride(): number;
GetModifierAttackRangeBonus(): number;
// Not working
GetModifierAttackRangeBonusUnique(): number;
// Not working
GetModifierMaxAttackRange(): number;
GetModifierProjectileSpeedBonus(): number;
GetModifierProjectileName(): string;
ReincarnateTime(): number;
GetModifierConstantRespawnTime(): number;
GetModifierPercentageRespawnTime(): number;
GetModifierStackingRespawnTime(): number;
GetModifierPercentageCooldown(event: ModifierAbilityEvent): number;
GetModifierPercentageCooldownStacking(event: ModifierAbilityEvent): number;
GetModifierPercentageCasttime(event: ModifierAbilityEvent): number;
GetModifierPercentageManacost(event: ModifierAbilityEvent): number;
// Not working
GetModifierPercentageManacostStacking(): number;
GetModifierConstantDeathGoldCost(): number;
GetModifierPercentageExpRateBoost(): number;
GetModifierPreAttack_CriticalStrike(event: ModifierAttackEvent): number;
// Not working
GetModifierPreAttack_Target_CriticalStrike(): number;
// Not working
GetModifierMagical_ConstantBlock(event: ModifierAttackEvent): number;
GetModifierPhysical_ConstantBlock(event: ModifierAttackEvent): number;
// Not working
GetModifierPhysical_ConstantBlockSpecial(): number;
GetModifierPhysical_ConstantBlockUnavoidablePreArmor(event: ModifierAttackEvent): number;
GetModifierTotal_ConstantBlock(event: ModifierAttackEvent): number;
GetOverrideAnimation(): GameActivity_t;
GetOverrideAnimationWeight(): number;
GetOverrideAnimationRate(): number;
GetAbsorbSpell(event: ModifierAbilityEvent): 0|1;
GetReflectSpell(event: ModifierAbilityEvent): 0|1;
GetDisableAutoAttack(): 0|1;
GetBonusDayVision(): number;
GetBonusNightVision(): number;
// Not working
GetBonusNightVisionUnique(): number;
GetBonusVisionPercentage(): number;
GetFixedDayVision(): number;
GetFixedNightVision(): number;
GetMinHealth(): number;
GetAbsoluteNoDamagePhysical(event: ModifierAttackEvent): 0|1;
GetAbsoluteNoDamageMagical(event: ModifierAttackEvent): 0|1;
GetAbsoluteNoDamagePure(event: ModifierAttackEvent): 0|1;
GetIsIllusion(): 0|1;
GetModifierIllusionLabel(): 0|1;
GetModifierSuperIllusion(): 0|1;
GetModifierSuperIllusionWithUltimate(): 0|1;
GetModifierTurnRate_Percentage(): number;
GetDisableHealing(): 0|1;
// Not working
GetAlwaysAllowAttack(): 0|1;
/**
* 0 deal damage like usual; 1 no damage at all
*/
GetOverrideAttackMagical(): 0|1;
// Not working
GetModifierUnitStatsNeedsRefresh(): 0|1;
/**
* Untested on lane creeps; did not work on beastmaster creeps
*/
GetModifierBountyCreepMultiplier(): number;
// Not working
GetModifierBountyOtherMultiplier(): number;
// Next block added with battle pass 2020
GetModifierManacostReduction_Constant(): number;
/**
* Return the name of the ability special value to override.
*/
GetModifierOverrideAbilitySpecial(): string;
/**
* Return the value of the overridden ability special value.
*/
GetModifierOverrideAbilitySpecialValue(): number;
GetVisualZDelta(): number;
/**
* Untested
*/
GetModifierUnitDisllowUpgrading(): 0|1;
// Not working
GetModifierDodgeProjectile(): 0|1;
// Not working
OnSpellTargetReady(): void;
OnAttackRecord(event: ModifierAttackEvent): void;
OnAttackStart(event: ModifierAttackEvent): void;
OnAttack(event: ModifierAttackEvent): void;
OnAttackLanded(event: ModifierAttackEvent): void;
OnAttackFail(event: ModifierAttackEvent): void;
OnProjectileDodge(event: ModifierAttackEvent): void;
OnOrder(event: ModifierEvent): void;
OnUnitMoved(event: ModifierEvent): void;
OnAbilityStart(event: ModifierAbilityEvent): void;
OnAbilityExecuted(event: ModifierAbilityEvent): void;
OnAbilityFullyCast(event: ModifierAbilityEvent): void;
// Not working
OnBreakInvisibility(): void;
OnAbilityEndChannel(event: ModifierAbilityEvent): void;
OnTakeDamage(event: ModifierAttackEvent): void;
OnStateChanged(event: ModifierEvent): void;
OnAttacked(event: ModifierAttackEvent): void;
OnDeath(event: ModifierAttackEvent): void;
OnRespawn(event: ModifierEvent): void;
OnSpentMana(event: ModifierAbilityEvent): void;
OnTeleporting(event: ModifierEvent): void;
OnTeleported(event: ModifierEvent): void;
OnSetLocation(event: ModifierEvent): void;
OnHealthGained(event: ModifierEvent): void;
OnManaGained(event: ModifierEvent): void;
OnTakeDamageKillCredit(event: ModifierAttackEvent): void;
OnHeroKilled(event: ModifierAttackEvent): void;
OnHealReceived(event: ModifierEvent): void;
OnBuildingKilled(event: ModifierAttackEvent): void;
OnModelChanged(event: ModifierEvent): void;
// Not working
OnModifierAdded(): void;
GetModifierModelChange(): string;
GetModifierModelScale(): number;
/**
* Always applies scepter when this property is active
*/
GetModifierScepter(): void;
GetActivityTranslationModifiers(): string;
GetAttackSound(): string;
GetUnitLifetimeFraction(): number;
GetModifierProvidesFOWVision(): 0|1;
GetModifierSpellsRequireHP(): number;
// ??
GetForceDrawOnMinimap(): 0|1;
GetModifierDisableTurning(): 0|1;
// Not working
GetModifierIgnoreCastAngle(): 0|1;
// ??
GetModifierChangeAbilityValue(): void;
GetModifierAbilityLayout(): number;
// Not working
OnDominated(event: ModifierEvent): void;
OnAttackFinished(event: ModifierAttackEvent): void;
// Not working
GetModifierIgnoreCooldown(): 0|1;
// Not working
GetModifierCanAttackTrees(): 0|1;
GetModifierIgnoreMovespeedLimit(): 0|1;
GetModifierSpellLifestealRegenAmplify_Percentage(): number;
GetModifierManaDrainAmplify_Percentage(): number;
GetModifierAttackSpeedReductionPercentage(): number;
GetModifierMoveSpeedReductionPercentage(): number;
GetModifierBonusDamageOutgoing_Percentage(): number;
}