-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added typed abilities - Added new abilities - Added new modifiers - Added EventsSDK#UnitLevelChanged - Fixed Ability#flags - Fixed modifiers - Fixed Ability#TexturePath
- Loading branch information
Showing
90 changed files
with
1,189 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,27 @@ | ||
export enum DOTA_UNIT_TARGET_FLAGS { | ||
DOTA_UNIT_TARGET_FLAG_NONE = 0, | ||
DOTA_UNIT_TARGET_FLAG_RANGED_ONLY = 2, | ||
DOTA_UNIT_TARGET_FLAG_MELEE_ONLY = 4, | ||
DOTA_UNIT_TARGET_FLAG_DEAD = 8, | ||
DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES = 16, | ||
DOTA_UNIT_TARGET_FLAG_NOT_MAGIC_IMMUNE_ALLIES = 32, | ||
DOTA_UNIT_TARGET_FLAG_INVULNERABLE = 64, | ||
DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE = 128, | ||
DOTA_UNIT_TARGET_FLAG_NO_INVIS = 256, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS = 512, | ||
DOTA_UNIT_TARGET_FLAG_PLAYER_CONTROLLED = 1024, | ||
DOTA_UNIT_TARGET_FLAG_NOT_DOMINATED = 2048, | ||
DOTA_UNIT_TARGET_FLAG_NOT_SUMMONED = 4096, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ILLUSIONS = 8192, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ATTACK_IMMUNE = 16384, | ||
DOTA_UNIT_TARGET_FLAG_MANA_ONLY = 32768, | ||
DOTA_UNIT_TARGET_FLAG_CHECK_DISABLE_HELP = 65536, | ||
DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO = 131072, | ||
DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD = 262144, | ||
DOTA_UNIT_TARGET_FLAG_NOT_NIGHTMARED = 524288, | ||
DOTA_UNIT_TARGET_FLAG_PREFER_ENEMIES = 1048576, | ||
DOTA_UNIT_TARGET_FLAG_RESPECT_OBSTRUCTIONS = 2097152 | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
export const DOTA_UNIT_TARGET_FLAGS = { | ||
DOTA_UNIT_TARGET_FLAG_NONE: 0n, | ||
DOTA_UNIT_TARGET_FLAG_RANGED_ONLY: 2n, | ||
DOTA_UNIT_TARGET_FLAG_MELEE_ONLY: 4n, | ||
DOTA_UNIT_TARGET_FLAG_DEAD: 8n, | ||
DOTA_UNIT_TARGET_FLAG_MAGIC_IMMUNE_ENEMIES: 16n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_MAGIC_IMMUNE_ALLIES: 32n, | ||
DOTA_UNIT_TARGET_FLAG_INVULNERABLE: 64n, | ||
DOTA_UNIT_TARGET_FLAG_FOW_VISIBLE: 128n, | ||
DOTA_UNIT_TARGET_FLAG_NO_INVIS: 256n, | ||
DOTA_UNIT_TARGET_FLAG_CAN_BE_SEEN: 384n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ANCIENTS: 512n, | ||
DOTA_UNIT_TARGET_FLAG_PLAYER_CONTROLLED: 1024n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_DOMINATED: 2048n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_SUMMONED: 4096n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ILLUSIONS: 8192n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_ATTACK_IMMUNE: 16384n, | ||
DOTA_UNIT_TARGET_FLAG_MANA_ONLY: 32768n, | ||
DOTA_UNIT_TARGET_FLAG_CHECK_DISABLE_HELP: 65536n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_CREEP_HERO: 131072n, | ||
DOTA_UNIT_TARGET_FLAG_OUT_OF_WORLD: 262144n, | ||
DOTA_UNIT_TARGET_FLAG_NOT_NIGHTMARED: 524288n, | ||
DOTA_UNIT_TARGET_FLAG_PREFER_ENEMIES: 1048576n, | ||
DOTA_UNIT_TARGET_FLAG_RESPECT_OBSTRUCTIONS: 2097152n | ||
} | ||
export type DOTA_UNIT_TARGET_FLAGS = bigint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
export enum DOTA_UNIT_TARGET_TEAM { | ||
DOTA_UNIT_TARGET_TEAM_NONE = 0, | ||
DOTA_UNIT_TARGET_TEAM_FRIENDLY = 1, | ||
DOTA_UNIT_TARGET_TEAM_ENEMY = 2, | ||
DOTA_UNIT_TARGET_TEAM_CUSTOM = 4, | ||
DOTA_UNIT_TARGET_TEAM_BOTH = 3 | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
export const DOTA_UNIT_TARGET_TEAM = { | ||
DOTA_UNIT_TARGET_TEAM_NONE: 0n, | ||
DOTA_UNIT_TARGET_TEAM_FRIENDLY: 1n, | ||
DOTA_UNIT_TARGET_TEAM_ENEMY: 2n, | ||
DOTA_UNIT_TARGET_TEAM_BOTH: 3n, | ||
DOTA_UNIT_TARGET_TEAM_CUSTOM: 4n | ||
} | ||
export type DOTA_UNIT_TARGET_TEAM = bigint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
export enum DOTA_UNIT_TARGET_TYPE { | ||
DOTA_UNIT_TARGET_NONE = 0, | ||
DOTA_UNIT_TARGET_HERO = 1, | ||
DOTA_UNIT_TARGET_CREEP = 2, | ||
DOTA_UNIT_TARGET_BUILDING = 4, | ||
DOTA_UNIT_TARGET_COURIER = 16, | ||
DOTA_UNIT_TARGET_OTHER = 32, | ||
DOTA_UNIT_TARGET_TREE = 64, | ||
DOTA_UNIT_TARGET_CUSTOM = 128, | ||
DOTA_UNIT_TARGET_SELF = 256, | ||
DOTA_UNIT_TARGET_BASIC = 18, | ||
DOTA_UNIT_TARGET_ALL = 55, | ||
DOTA_UNIT_TARGET_HEROES_AND_CREEPS = 19 | ||
/* eslint-disable @typescript-eslint/naming-convention */ | ||
export const DOTA_UNIT_TARGET_TYPE = { | ||
DOTA_UNIT_TARGET_NONE: 0n, | ||
DOTA_UNIT_TARGET_HERO: 1n, | ||
DOTA_UNIT_TARGET_CREEP: 2n, | ||
DOTA_UNIT_TARGET_BUILDING: 4n, | ||
DOTA_UNIT_TARGET_COURIER: 16n, | ||
DOTA_UNIT_TARGET_HEROES_AND_CREEPS: 19n, | ||
DOTA_UNIT_TARGET_OTHER: 32n, | ||
DOTA_UNIT_TARGET_ALL: 55n, | ||
DOTA_UNIT_TARGET_TREE: 64n, | ||
DOTA_UNIT_TARGET_CUSTOM: 128n, | ||
DOTA_UNIT_TARGET_SELF: 256n, | ||
DOTA_UNIT_TARGET_BASIC: 18n | ||
} | ||
export type DOTA_UNIT_TARGET_TYPE = bigint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// eslint-disable-next-line @typescript-eslint/naming-convention | ||
export const SPELL_DISPELLABLE_TYPES = { | ||
SPELL_DISPELLABLE_NONE: 0n, | ||
SPELL_DISPELLABLE_YES_STRONG: 1n, | ||
SPELL_DISPELLABLE_YES: 2n, | ||
SPELL_DISPELLABLE_NO: 3n | ||
} | ||
|
||
export type SPELL_DISPELLABLE_TYPES = bigint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
declare interface IHealthCost { | ||
get HealthCost(): number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare interface IHealthRestore<Unit> extends IRestore { | ||
readonly HealthRestoreModifierName?: Nullable<string> | ||
GetHealthRestore(target: Unit): number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
declare interface IManaRestore<Unit> extends IRestore { | ||
readonly ManaRestoreModifierName?: Nullable<string> | ||
GetManaRestore(target: Unit): number | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
declare interface IRestore { | ||
readonly RestoresAlly: boolean | ||
readonly RestoresSelf: boolean | ||
readonly InstantRestore: boolean | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,37 @@ | ||
import { WrapperClass } from "../../../Decorators" | ||
import { Ability } from "../../Base/Ability" | ||
import { Unit } from "../../Base/Unit" | ||
|
||
@WrapperClass("abaddon_death_coil") | ||
export class abaddon_death_coil extends Ability { | ||
export class abaddon_death_coil | ||
extends Ability | ||
implements IHealthRestore<Unit>, IHealthCost | ||
{ | ||
public readonly RestoresAlly = true | ||
public readonly RestoresSelf = false | ||
public readonly InstantRestore = true | ||
|
||
public get ProjectileAttachment(): string { | ||
return "attach_attack1" | ||
} | ||
public get HealthCost() { | ||
const owner = this.Owner | ||
if (owner === undefined) { | ||
return 0 | ||
} | ||
const selfDamage = this.GetSpecialValue("self_damage") | ||
return owner.HP * (selfDamage / 100) | ||
} | ||
public GetHealthRestore(_target: Unit): number { | ||
return this.GetSpecialValue("heal_amount") | ||
} | ||
public GetBaseSpeedForLevel(level: number): number { | ||
return this.GetSpecialValue("missile_speed", level) | ||
} | ||
public IsHealthCost(): this is IHealthCost { | ||
return true | ||
} | ||
public IsHealthRestore(): this is IHealthRestore<Unit> { | ||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { WrapperClass } from "../../../Decorators" | ||
import { Ability } from "../../Base/Ability" | ||
import { Unit } from "../../Base/Unit" | ||
|
||
@WrapperClass("chen_hand_of_god") | ||
export class chen_hand_of_god extends Ability { | ||
export class chen_hand_of_god extends Ability implements IHealthRestore<Unit> { | ||
public readonly RestoresAlly = true | ||
public readonly RestoresSelf = true | ||
public readonly InstantRestore = true | ||
|
||
public GetHealthRestore(_target: Unit): number { | ||
return this.GetSpecialValue("heal_amount") | ||
} | ||
public GetBaseAOERadiusForLevel(_level: number): number { | ||
return Number.MAX_SAFE_INTEGER | ||
return 99999 | ||
} | ||
public IsHealthRestore(): this is IHealthRestore<Unit> { | ||
return true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,29 @@ | ||
import { WrapperClass } from "../../../Decorators" | ||
import { Ability } from "../../Base/Ability" | ||
import { Unit } from "../../Base/Unit" | ||
|
||
@WrapperClass("dazzle_shadow_wave") | ||
export class dazzle_shadow_wave extends Ability { | ||
public GetBaseAOERadiusForLevel(level: number): number { | ||
return this.GetSpecialValue("damage_radius", level) | ||
} | ||
export class dazzle_shadow_wave extends Ability implements IHealthRestore<Unit> { | ||
public readonly RestoresAlly = true | ||
public readonly RestoresSelf = true | ||
public readonly InstantRestore = true | ||
|
||
public GetBaseDamageForLevel(level: number): number { | ||
return this.GetSpecialValue("damage", level) | ||
} | ||
public GetBaseAOERadiusForLevel(level: number): number { | ||
return this.GetSpecialValue("damage_radius", level) | ||
} | ||
public GetHealthRestore(_target: Unit): number { | ||
const owner = this.Owner | ||
if (owner === undefined) { | ||
return 0 | ||
} | ||
const restoreVal = this.AbilityDamage | ||
const scepterPct = this.GetSpecialValue("scepter_heal_pct") // 150% | ||
return !owner.HasScepter ? restoreVal : restoreVal * (scepterPct / 100) | ||
} | ||
public IsHealthRestore(): this is IHealthRestore<Unit> { | ||
return true | ||
} | ||
} |
24 changes: 23 additions & 1 deletion
24
wrapper/Objects/Abilities/Enchantress/enchantress_natures_attendants.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,31 @@ | ||
import { WrapperClass } from "../../../Decorators" | ||
import { Ability } from "../../Base/Ability" | ||
import { Unit } from "../../Base/Unit" | ||
|
||
@WrapperClass("enchantress_natures_attendants") | ||
export class enchantress_natures_attendants extends Ability { | ||
export class enchantress_natures_attendants | ||
extends Ability | ||
implements IHealthRestore<Unit> | ||
{ | ||
public readonly RestoresAlly = true | ||
public readonly RestoresSelf = true | ||
public readonly InstantRestore = false | ||
public readonly HealthRestoreModifierName = "modifier_enchantress_natures_attendants" | ||
|
||
public GetHealthRestore(_target: Unit): number { | ||
return ( | ||
this.GetSpecialValue("heal") * | ||
this.GetSpecialValue("wisp_count") * | ||
this.MaxDuration | ||
) | ||
} | ||
public GetMaxDurationForLevel(level: number): number { | ||
return this.GetSpecialValue("heal_duration", level) | ||
} | ||
public GetBaseAOERadiusForLevel(level: number): number { | ||
return this.GetSpecialValue("radius", level) | ||
} | ||
public IsHealthRestore(): this is IHealthRestore<Unit> { | ||
return true | ||
} | ||
} |
18 changes: 17 additions & 1 deletion
18
wrapper/Objects/Abilities/Juggernaut/juggernaut_healing_ward.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
import { WrapperClass } from "../../../Decorators" | ||
import { Ability } from "../../Base/Ability" | ||
import { Unit } from "../../Base/Unit" | ||
|
||
@WrapperClass("juggernaut_healing_ward") | ||
export class juggernaut_healing_ward extends Ability { | ||
export class juggernaut_healing_ward extends Ability implements IHealthRestore<Unit> { | ||
public RestoresAlly = false | ||
public RestoresSelf = false | ||
public InstantRestore = false | ||
public readonly HealthRestoreModifierName = "modifier_juggernaut_healing_ward_heal" | ||
|
||
public GetHealthRestore(target: Unit): number { | ||
return ( | ||
target.MaxHP * | ||
this.MaxDuration * | ||
(this.GetSpecialValue("healing_ward_heal_amount") / 100) | ||
) | ||
} | ||
public GetBaseAOERadiusForLevel(level: number): number { | ||
return this.GetSpecialValue("healing_ward_aura_radius", level) | ||
} | ||
public IsHealthRestore(): this is IHealthRestore<Unit> { | ||
return true | ||
} | ||
} |
Oops, something went wrong.