warscript 0.0.1-dev.ea69747 → 0.0.1-dev.ebee5b2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.d.ts +12 -0
- package/attributes.lua +16 -0
- package/binaryreader.d.ts +1 -0
- package/binaryreader.lua +3 -0
- package/core/types/frame.d.ts +4 -1
- package/core/types/frame.lua +22 -1
- package/core/types/group.d.ts +0 -1
- package/core/types/handle.d.ts +2 -1
- package/core/types/handle.lua +5 -0
- package/core/types/image.d.ts +0 -1
- package/core/types/missile.d.ts +2 -2
- package/core/types/missile.lua +8 -2
- package/core/types/unit.lua +8 -0
- package/decl/index.d.ts +1 -0
- package/engine/ability.d.ts +1 -1
- package/engine/behavior.d.ts +10 -10
- package/engine/behaviour/ability/apply-buff.d.ts +3 -5
- package/engine/behaviour/ability/apply-unit-behavior.d.ts +13 -4
- package/engine/behaviour/ability/apply-unit-behavior.lua +31 -9
- package/engine/behaviour/ability/damage.d.ts +33 -11
- package/engine/behaviour/ability/damage.lua +89 -31
- package/engine/behaviour/ability/heal.d.ts +33 -6
- package/engine/behaviour/ability/heal.lua +89 -10
- package/engine/behaviour/ability/instant-impact.lua +4 -0
- package/engine/behaviour/ability/restore-mana.d.ts +15 -0
- package/engine/behaviour/ability/restore-mana.lua +29 -0
- package/engine/behaviour/ability.d.ts +8 -1
- package/engine/behaviour/ability.lua +62 -0
- package/engine/behaviour/unit/stun-immunity.d.ts +0 -1
- package/engine/behaviour/unit.d.ts +8 -2
- package/engine/behaviour/unit.lua +27 -0
- package/engine/buff.d.ts +62 -20
- package/engine/buff.lua +247 -72
- package/engine/game-map.d.ts +7 -0
- package/engine/game-map.lua +32 -0
- package/engine/internal/ability.d.ts +1 -1
- package/engine/internal/item+owner.lua +2 -2
- package/engine/internal/mechanics/ability-duration.d.ts +1 -3
- package/engine/internal/mechanics/ability-duration.lua +2 -0
- package/engine/internal/mechanics/cast-ability.d.ts +2 -0
- package/engine/internal/mechanics/cast-ability.lua +86 -0
- package/engine/internal/unit/bonus.d.ts +9 -8
- package/engine/internal/unit/bonus.lua +6 -1
- package/engine/internal/unit/detach-missiles.d.ts +7 -0
- package/engine/internal/unit/detach-missiles.lua +30 -0
- package/engine/internal/unit+ability.lua +2 -2
- package/engine/internal/unit+transport.lua +4 -10
- package/engine/internal/unit-missile-launch.lua +1 -1
- package/engine/internal/unit.d.ts +59 -13
- package/engine/internal/unit.lua +306 -93
- package/engine/object-data/auxiliary/attachment-preset.d.ts +0 -1
- package/engine/object-data/auxiliary/combat-classification.d.ts +0 -2
- package/engine/object-data/entry/ability-type/blank-configurable.d.ts +0 -1
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +0 -1
- package/engine/object-data/entry/ability-type/blink.d.ts +10 -0
- package/engine/object-data/entry/ability-type/blink.lua +39 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +0 -1
- package/engine/object-data/entry/ability-type/engineering-upgrade.lua +2 -2
- package/engine/object-data/entry/ability-type/mine.d.ts +10 -0
- package/engine/object-data/entry/ability-type/mine.lua +39 -0
- package/engine/object-data/entry/ability-type/spirit-touch.d.ts +2 -2
- package/engine/object-data/entry/ability-type/spirit-touch.lua +6 -6
- package/engine/object-data/entry/ability-type.d.ts +1 -1
- package/engine/object-data/entry/ability-type.lua +1 -0
- package/engine/object-data/entry/buff-type/applicable.d.ts +0 -1
- package/engine/object-data/entry/buff-type/applicable.lua +27 -71
- package/engine/object-data/entry/buff-type/blank.d.ts +0 -1
- package/engine/object-data/entry/buff-type.d.ts +0 -1
- package/engine/object-data/entry/destructible-type.d.ts +0 -1
- package/engine/object-data/entry/item-type/blank.d.ts +0 -1
- package/engine/object-data/entry/item-type.d.ts +0 -1
- package/engine/object-data/entry/lightning-type.d.ts +0 -1
- package/engine/object-data/entry/unit-type.d.ts +42 -2
- package/engine/object-data/entry/unit-type.lua +378 -50
- package/engine/object-data/entry/upgrade/blank.d.ts +0 -1
- package/engine/object-data/entry/upgrade.d.ts +0 -1
- package/engine/object-data/entry.d.ts +2 -3
- package/engine/object-field/ability.d.ts +25 -6
- package/engine/object-field/ability.lua +56 -0
- package/engine/object-field/unit.d.ts +1 -0
- package/engine/object-field/unit.lua +3 -0
- package/engine/object-field.d.ts +6 -4
- package/engine/object-field.lua +38 -12
- package/engine/random.d.ts +1 -0
- package/engine/random.lua +9 -0
- package/engine/standard/entries/unit-type.d.ts +42 -1
- package/engine/standard/entries/unit-type.lua +42 -1
- package/engine/standard/fields/ability.d.ts +1 -1
- package/engine/standard/fields/ability.lua +1 -1
- package/engine/unit.d.ts +1 -0
- package/engine/unit.lua +10 -2
- package/event.d.ts +2 -3
- package/event.lua +9 -5
- package/exception.d.ts +2 -0
- package/exception.lua +4 -0
- package/global/vec2.lua +1 -0
- package/lualib_bundle.lua +146 -42
- package/math/vec2.d.ts +2 -9
- package/math.d.ts +0 -2
- package/net/socket.d.ts +7 -1
- package/net/socket.lua +45 -4
- package/network.d.ts +1 -0
- package/network.lua +3 -2
- package/objutil/ability.d.ts +0 -1
- package/objutil/buff.d.ts +0 -1
- package/objutil/buff.lua +1 -1
- package/objutil/object.d.ts +0 -1
- package/objutil/unit.d.ts +0 -1
- package/package.json +13 -14
- package/property.d.ts +55 -0
- package/property.lua +374 -0
- package/string.d.ts +30 -0
- package/string.lua +14 -0
- package/util/stream.d.ts +0 -1
- package/utility/arrays.d.ts +4 -5
- package/utility/arrays.lua +4 -1
- package/utility/bit-set.d.ts +0 -2
- package/utility/linked-set.d.ts +31 -9
- package/utility/linked-set.lua +21 -2
- package/utility/lua-maps.d.ts +1 -2
- package/utility/lua-sets.d.ts +1 -2
- package/utility/types.d.ts +3 -2
- package/core/mapbounds.d.ts +0 -8
- package/core/mapbounds.lua +0 -12
|
@@ -4,13 +4,40 @@ import { Ability } from "../../internal/ability";
|
|
|
4
4
|
import { Unit } from "../../internal/unit";
|
|
5
5
|
import { AbilityDependentValue } from "../../object-field/ability";
|
|
6
6
|
import { AbilityBehavior } from "../ability";
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
export type HealAbilityBehaviorParameters = {
|
|
8
|
+
healingPerStrength?: AbilityDependentValue<number>;
|
|
9
|
+
healingPerAgility?: AbilityDependentValue<number>;
|
|
10
|
+
healingPerIntelligence?: AbilityDependentValue<number>;
|
|
11
|
+
};
|
|
12
|
+
export type HealAreaAbilityBehaviorParameters = HealAbilityBehaviorParameters & {
|
|
13
|
+
maximumHealing?: AbilityDependentValue<number>;
|
|
14
|
+
};
|
|
15
|
+
declare abstract class HealAbilityBehavior<T extends HealAbilityBehaviorParameters = HealAbilityBehaviorParameters> extends AbilityBehavior {
|
|
16
|
+
protected readonly healing: AbilityDependentValue<number>;
|
|
17
|
+
protected readonly parameters?: T | undefined;
|
|
18
|
+
protected constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: T | undefined);
|
|
19
|
+
protected calculateHealing(caster: Unit): number;
|
|
20
|
+
}
|
|
21
|
+
export declare class HealSelfAbilityBehavior extends HealAbilityBehavior {
|
|
22
|
+
constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: HealAbilityBehaviorParameters);
|
|
23
|
+
onImpact(caster: Unit): void;
|
|
24
|
+
}
|
|
25
|
+
export declare class HealTargetAbilityBehavior extends HealAbilityBehavior {
|
|
26
|
+
constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: HealAbilityBehaviorParameters);
|
|
27
|
+
onWidgetTargetImpact(caster: Unit, target: Widget): void;
|
|
28
|
+
}
|
|
29
|
+
declare abstract class HealAreaAbilityBehavior extends HealAbilityBehavior<HealAreaAbilityBehaviorParameters> {
|
|
30
|
+
protected constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: HealAreaAbilityBehaviorParameters);
|
|
31
|
+
protected healArea(caster: Unit, x: number, y: number): void;
|
|
32
|
+
}
|
|
33
|
+
export declare class HealSelfAreaAbilityBehavior extends HealAreaAbilityBehavior {
|
|
34
|
+
constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: HealAreaAbilityBehaviorParameters);
|
|
10
35
|
onImpact(caster: Unit): void;
|
|
11
36
|
}
|
|
12
|
-
export declare class
|
|
13
|
-
|
|
14
|
-
|
|
37
|
+
export declare class HealTargetAreaAbilityBehavior extends HealAreaAbilityBehavior {
|
|
38
|
+
constructor(ability: Ability, healing: AbilityDependentValue<number>, parameters?: HealAreaAbilityBehaviorParameters);
|
|
39
|
+
onNoTargetImpact(caster: Unit): void;
|
|
15
40
|
onWidgetTargetImpact(caster: Unit, target: Widget): void;
|
|
41
|
+
onPointTargetImpact(caster: Unit, x: number, y: number): void;
|
|
16
42
|
}
|
|
43
|
+
export {};
|
|
@@ -2,34 +2,113 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__Class = ____lualib.__TS__Class
|
|
3
3
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
4
|
local ____exports = {}
|
|
5
|
+
local ____unit = require("engine.internal.unit")
|
|
6
|
+
local Unit = ____unit.Unit
|
|
5
7
|
local ____ability = require("engine.behaviour.ability")
|
|
6
8
|
local AbilityBehavior = ____ability.AbilityBehavior
|
|
9
|
+
local ____ability = require("engine.standard.fields.ability")
|
|
10
|
+
local ALLOWED_TARGETS_ABILITY_COMBAT_CLASSIFICATIONS_LEVEL_FIELD = ____ability.ALLOWED_TARGETS_ABILITY_COMBAT_CLASSIFICATIONS_LEVEL_FIELD
|
|
11
|
+
local AREA_OF_EFFECT_ABILITY_FLOAT_LEVEL_FIELD = ____ability.AREA_OF_EFFECT_ABILITY_FLOAT_LEVEL_FIELD
|
|
12
|
+
local HealAbilityBehavior = __TS__Class()
|
|
13
|
+
HealAbilityBehavior.name = "HealAbilityBehavior"
|
|
14
|
+
__TS__ClassExtends(HealAbilityBehavior, AbilityBehavior)
|
|
15
|
+
function HealAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
16
|
+
AbilityBehavior.prototype.____constructor(self, ability)
|
|
17
|
+
self.healing = healing
|
|
18
|
+
self.parameters = parameters
|
|
19
|
+
end
|
|
20
|
+
function HealAbilityBehavior.prototype.calculateHealing(self, caster)
|
|
21
|
+
local parameters = self.parameters
|
|
22
|
+
local healing = self:resolveCurrentAbilityDependentValue(self.healing)
|
|
23
|
+
local healingPerStrength = self:resolveCurrentAbilityDependentValue(parameters and parameters.healingPerStrength or 0)
|
|
24
|
+
if healingPerStrength ~= 0 then
|
|
25
|
+
healing = healing + healingPerStrength * caster.strength
|
|
26
|
+
end
|
|
27
|
+
local healingPerAgility = self:resolveCurrentAbilityDependentValue(parameters and parameters.healingPerAgility or 0)
|
|
28
|
+
if healingPerAgility ~= 0 then
|
|
29
|
+
healing = healing + healingPerAgility * caster.agility
|
|
30
|
+
end
|
|
31
|
+
local healingPerIntelligence = self:resolveCurrentAbilityDependentValue(parameters and parameters.healingPerIntelligence or 0)
|
|
32
|
+
if healingPerIntelligence ~= 0 then
|
|
33
|
+
healing = healing + healingPerIntelligence * caster.intelligence
|
|
34
|
+
end
|
|
35
|
+
return healing
|
|
36
|
+
end
|
|
7
37
|
____exports.HealSelfAbilityBehavior = __TS__Class()
|
|
8
38
|
local HealSelfAbilityBehavior = ____exports.HealSelfAbilityBehavior
|
|
9
39
|
HealSelfAbilityBehavior.name = "HealSelfAbilityBehavior"
|
|
10
|
-
__TS__ClassExtends(HealSelfAbilityBehavior,
|
|
11
|
-
function HealSelfAbilityBehavior.prototype.____constructor(self, ability, healing)
|
|
12
|
-
|
|
13
|
-
self.healing = healing
|
|
40
|
+
__TS__ClassExtends(HealSelfAbilityBehavior, HealAbilityBehavior)
|
|
41
|
+
function HealSelfAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
42
|
+
HealAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
14
43
|
end
|
|
15
44
|
function HealSelfAbilityBehavior.prototype.onImpact(self, caster)
|
|
16
45
|
caster:healTarget(
|
|
17
46
|
caster,
|
|
18
|
-
self:
|
|
47
|
+
self:calculateHealing(caster)
|
|
19
48
|
)
|
|
20
49
|
end
|
|
21
50
|
____exports.HealTargetAbilityBehavior = __TS__Class()
|
|
22
51
|
local HealTargetAbilityBehavior = ____exports.HealTargetAbilityBehavior
|
|
23
52
|
HealTargetAbilityBehavior.name = "HealTargetAbilityBehavior"
|
|
24
|
-
__TS__ClassExtends(HealTargetAbilityBehavior,
|
|
25
|
-
function HealTargetAbilityBehavior.prototype.____constructor(self, ability, healing)
|
|
26
|
-
|
|
27
|
-
self.healing = healing
|
|
53
|
+
__TS__ClassExtends(HealTargetAbilityBehavior, HealAbilityBehavior)
|
|
54
|
+
function HealTargetAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
55
|
+
HealAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
28
56
|
end
|
|
29
57
|
function HealTargetAbilityBehavior.prototype.onWidgetTargetImpact(self, caster, target)
|
|
30
58
|
caster:healTarget(
|
|
31
59
|
target,
|
|
32
|
-
self:
|
|
60
|
+
self:calculateHealing(caster)
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
local HealAreaAbilityBehavior = __TS__Class()
|
|
64
|
+
HealAreaAbilityBehavior.name = "HealAreaAbilityBehavior"
|
|
65
|
+
__TS__ClassExtends(HealAreaAbilityBehavior, HealAbilityBehavior)
|
|
66
|
+
function HealAreaAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
67
|
+
HealAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
68
|
+
end
|
|
69
|
+
function HealAreaAbilityBehavior.prototype.healArea(self, caster, x, y)
|
|
70
|
+
local targets = Unit.getAllowedTargetsInCollisionRange(
|
|
71
|
+
caster,
|
|
72
|
+
self:resolveCurrentAbilityDependentValue(ALLOWED_TARGETS_ABILITY_COMBAT_CLASSIFICATIONS_LEVEL_FIELD),
|
|
73
|
+
x,
|
|
74
|
+
y,
|
|
75
|
+
self:resolveCurrentAbilityDependentValue(AREA_OF_EFFECT_ABILITY_FLOAT_LEVEL_FIELD)
|
|
33
76
|
)
|
|
77
|
+
local healing = self:calculateHealing(caster)
|
|
78
|
+
local ____self_resolveCurrentAbilityDependentValue_8 = self.resolveCurrentAbilityDependentValue
|
|
79
|
+
local ____opt_6 = self.parameters
|
|
80
|
+
local maximumHealing = ____self_resolveCurrentAbilityDependentValue_8(self, ____opt_6 and ____opt_6.maximumHealing or 0)
|
|
81
|
+
if maximumHealing ~= 0 and healing > maximumHealing then
|
|
82
|
+
healing = maximumHealing / #targets
|
|
83
|
+
end
|
|
84
|
+
for ____, target in ipairs(targets) do
|
|
85
|
+
caster:healTarget(target, healing)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
____exports.HealSelfAreaAbilityBehavior = __TS__Class()
|
|
89
|
+
local HealSelfAreaAbilityBehavior = ____exports.HealSelfAreaAbilityBehavior
|
|
90
|
+
HealSelfAreaAbilityBehavior.name = "HealSelfAreaAbilityBehavior"
|
|
91
|
+
__TS__ClassExtends(HealSelfAreaAbilityBehavior, HealAreaAbilityBehavior)
|
|
92
|
+
function HealSelfAreaAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
93
|
+
HealAreaAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
94
|
+
end
|
|
95
|
+
function HealSelfAreaAbilityBehavior.prototype.onImpact(self, caster)
|
|
96
|
+
self:healArea(caster, caster.x, caster.y)
|
|
97
|
+
end
|
|
98
|
+
____exports.HealTargetAreaAbilityBehavior = __TS__Class()
|
|
99
|
+
local HealTargetAreaAbilityBehavior = ____exports.HealTargetAreaAbilityBehavior
|
|
100
|
+
HealTargetAreaAbilityBehavior.name = "HealTargetAreaAbilityBehavior"
|
|
101
|
+
__TS__ClassExtends(HealTargetAreaAbilityBehavior, HealAreaAbilityBehavior)
|
|
102
|
+
function HealTargetAreaAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
103
|
+
HealAreaAbilityBehavior.prototype.____constructor(self, ability, healing, parameters)
|
|
104
|
+
end
|
|
105
|
+
function HealTargetAreaAbilityBehavior.prototype.onNoTargetImpact(self, caster)
|
|
106
|
+
self:healArea(caster, caster.x, caster.y)
|
|
107
|
+
end
|
|
108
|
+
function HealTargetAreaAbilityBehavior.prototype.onWidgetTargetImpact(self, caster, target)
|
|
109
|
+
self:healArea(caster, target.x, target.y)
|
|
110
|
+
end
|
|
111
|
+
function HealTargetAreaAbilityBehavior.prototype.onPointTargetImpact(self, caster, x, y)
|
|
112
|
+
self:healArea(caster, x, y)
|
|
34
113
|
end
|
|
35
114
|
return ____exports
|
|
@@ -12,8 +12,12 @@ local InstantImpactAbilityBehavior = ____exports.InstantImpactAbilityBehavior
|
|
|
12
12
|
InstantImpactAbilityBehavior.name = "InstantImpactAbilityBehavior"
|
|
13
13
|
__TS__ClassExtends(InstantImpactAbilityBehavior, AbilityBehavior)
|
|
14
14
|
function InstantImpactAbilityBehavior.prototype.onCastingStart(self, caster)
|
|
15
|
+
local abilityTypeId = self.ability.typeId
|
|
15
16
|
local manaCost = self:resolveCurrentAbilityDependentValue(MANA_COST_ABILITY_INTEGER_LEVEL_FIELD)
|
|
16
17
|
local cooldown = self:resolveCurrentAbilityDependentValue(COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD)
|
|
18
|
+
if caster:getAbilityRemainingCooldown(abilityTypeId) ~= 0 or caster.mana < manaCost then
|
|
19
|
+
return
|
|
20
|
+
end
|
|
17
21
|
caster.mana = caster.mana - manaCost
|
|
18
22
|
if cooldown == 0 then
|
|
19
23
|
caster:interruptCast(self.ability.typeId)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** @noSelfInFile */
|
|
2
|
+
import { Ability } from "../../internal/ability";
|
|
3
|
+
import { Unit } from "../../internal/unit";
|
|
4
|
+
import { AbilityDependentValue } from "../../object-field/ability";
|
|
5
|
+
import { AbilityBehavior } from "../ability";
|
|
6
|
+
export declare class RestoreManaSelfAbilityBehavior extends AbilityBehavior {
|
|
7
|
+
private readonly mana;
|
|
8
|
+
constructor(ability: Ability, mana: AbilityDependentValue<number>);
|
|
9
|
+
onImpact(caster: Unit): void;
|
|
10
|
+
}
|
|
11
|
+
export declare class RestoreManaAbilityBehavior extends AbilityBehavior {
|
|
12
|
+
private readonly mana;
|
|
13
|
+
constructor(ability: Ability, mana: AbilityDependentValue<number>);
|
|
14
|
+
onUnitTargetImpact(caster: Unit, target: Unit): void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____ability = require("engine.behaviour.ability")
|
|
6
|
+
local AbilityBehavior = ____ability.AbilityBehavior
|
|
7
|
+
____exports.RestoreManaSelfAbilityBehavior = __TS__Class()
|
|
8
|
+
local RestoreManaSelfAbilityBehavior = ____exports.RestoreManaSelfAbilityBehavior
|
|
9
|
+
RestoreManaSelfAbilityBehavior.name = "RestoreManaSelfAbilityBehavior"
|
|
10
|
+
__TS__ClassExtends(RestoreManaSelfAbilityBehavior, AbilityBehavior)
|
|
11
|
+
function RestoreManaSelfAbilityBehavior.prototype.____constructor(self, ability, mana)
|
|
12
|
+
AbilityBehavior.prototype.____constructor(self, ability)
|
|
13
|
+
self.mana = mana
|
|
14
|
+
end
|
|
15
|
+
function RestoreManaSelfAbilityBehavior.prototype.onImpact(self, caster)
|
|
16
|
+
caster.mana = caster.mana + self:resolveCurrentAbilityDependentValue(self.mana)
|
|
17
|
+
end
|
|
18
|
+
____exports.RestoreManaAbilityBehavior = __TS__Class()
|
|
19
|
+
local RestoreManaAbilityBehavior = ____exports.RestoreManaAbilityBehavior
|
|
20
|
+
RestoreManaAbilityBehavior.name = "RestoreManaAbilityBehavior"
|
|
21
|
+
__TS__ClassExtends(RestoreManaAbilityBehavior, AbilityBehavior)
|
|
22
|
+
function RestoreManaAbilityBehavior.prototype.____constructor(self, ability, mana)
|
|
23
|
+
AbilityBehavior.prototype.____constructor(self, ability)
|
|
24
|
+
self.mana = mana
|
|
25
|
+
end
|
|
26
|
+
function RestoreManaAbilityBehavior.prototype.onUnitTargetImpact(self, caster, target)
|
|
27
|
+
target.mana = target.mana + self:resolveCurrentAbilityDependentValue(self.mana)
|
|
28
|
+
end
|
|
29
|
+
return ____exports
|
|
@@ -9,13 +9,20 @@ import { Destructable } from "../../core/types/destructable";
|
|
|
9
9
|
import { EffectParameters } from "../../core/types/effect";
|
|
10
10
|
import { AbilityDependentValue } from "../object-field/ability";
|
|
11
11
|
export type AbilityBehaviorConstructor<Args extends any[]> = new (ability: Ability, ...args: Args) => AbilityBehavior;
|
|
12
|
-
export declare abstract class AbilityBehavior<
|
|
12
|
+
export declare abstract class AbilityBehavior<Parameters extends {
|
|
13
|
+
periodicActionParameters?: any[];
|
|
14
|
+
missileParameters?: any[];
|
|
15
|
+
} = {}> extends Behavior<Ability, NonNullable<Parameters["periodicActionParameters"]>> {
|
|
13
16
|
constructor(ability: Ability);
|
|
14
17
|
get ability(): Ability;
|
|
15
18
|
protected resolveCurrentAbilityDependentValue<T extends boolean | number | string>(value: AbilityDependentValue<T>): T;
|
|
16
19
|
protected flashAreaEffect(x: number, y: number, ...parametersOrDuration: [parameters?: EffectParameters] | [duration?: number, parameters?: EffectParameters]): void;
|
|
17
20
|
protected flashEffect(x: number, y: number, ...parametersOrDuration: [parameters?: EffectParameters] | [duration?: number, parameters?: EffectParameters]): void;
|
|
18
21
|
protected flashSpecialEffect(...args: [...pointOrWidget: [x: number, y: number] | [widget: Widget], duration?: number]): void;
|
|
22
|
+
private static MissileLaunchConfig;
|
|
23
|
+
private get missileLaunchConfig();
|
|
24
|
+
protected launchMissile(source: Unit, target: Unit, ...parameters: NonNullable<Parameters["missileParameters"]>): void;
|
|
25
|
+
onMissileArrival(...parameters: NonNullable<Parameters["missileParameters"]>): void;
|
|
19
26
|
onUnitGainAbility(_unit: Unit): void;
|
|
20
27
|
onUnitLoseAbility(_unit: Unit): void;
|
|
21
28
|
onCastingStart(caster: Unit): void;
|
|
@@ -15,13 +15,52 @@ local Effect = ____effect.Effect
|
|
|
15
15
|
local ____ability = require("engine.standard.fields.ability")
|
|
16
16
|
local AREA_EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD = ____ability.AREA_EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD
|
|
17
17
|
local EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD = ____ability.EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD
|
|
18
|
+
local MISSILE_ARC_ABILITY_FLOAT_FIELD = ____ability.MISSILE_ARC_ABILITY_FLOAT_FIELD
|
|
19
|
+
local MISSILE_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD = ____ability.MISSILE_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD
|
|
20
|
+
local MISSILE_SPEED_ABILITY_INTEGER_FIELD = ____ability.MISSILE_SPEED_ABILITY_INTEGER_FIELD
|
|
18
21
|
local SPECIAL_EFFECT_ATTACHMENT_POINT_STRING_FIELD = ____ability.SPECIAL_EFFECT_ATTACHMENT_POINT_STRING_FIELD
|
|
19
22
|
local SPECIAL_EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD = ____ability.SPECIAL_EFFECT_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD
|
|
20
23
|
local ____ability = require("engine.object-field.ability")
|
|
21
24
|
local resolveCurrentAbilityDependentValue = ____ability.resolveCurrentAbilityDependentValue
|
|
22
25
|
local ____timer = require("core.types.timer")
|
|
23
26
|
local Timer = ____timer.Timer
|
|
27
|
+
local ____missile = require("core.types.missile")
|
|
28
|
+
local Missile = ____missile.Missile
|
|
24
29
|
local createBehaviorFunctionsByAbilityTypeId = {}
|
|
30
|
+
local function invokeOnMissileArrival(_missile, success, abilityBehavior, ...)
|
|
31
|
+
if success then
|
|
32
|
+
abilityBehavior:onMissileArrival(...)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
local ____class_0 = __TS__Class()
|
|
36
|
+
____class_0.name = ""
|
|
37
|
+
function ____class_0.prototype.____constructor(self, abilityBehavior)
|
|
38
|
+
self.abilityBehavior = abilityBehavior
|
|
39
|
+
end
|
|
40
|
+
__TS__SetDescriptor(
|
|
41
|
+
____class_0.prototype,
|
|
42
|
+
"art",
|
|
43
|
+
{get = function(self)
|
|
44
|
+
return MISSILE_MODEL_PATHS_ABILITY_STRING_ARRAY_FIELD:getValue(self.abilityBehavior.ability, 0)
|
|
45
|
+
end},
|
|
46
|
+
true
|
|
47
|
+
)
|
|
48
|
+
__TS__SetDescriptor(
|
|
49
|
+
____class_0.prototype,
|
|
50
|
+
"arc",
|
|
51
|
+
{get = function(self)
|
|
52
|
+
return MISSILE_ARC_ABILITY_FLOAT_FIELD:getValue(self.abilityBehavior.ability)
|
|
53
|
+
end},
|
|
54
|
+
true
|
|
55
|
+
)
|
|
56
|
+
__TS__SetDescriptor(
|
|
57
|
+
____class_0.prototype,
|
|
58
|
+
"speed",
|
|
59
|
+
{get = function(self)
|
|
60
|
+
return MISSILE_SPEED_ABILITY_INTEGER_FIELD:getValue(self.abilityBehavior.ability)
|
|
61
|
+
end},
|
|
62
|
+
true
|
|
63
|
+
)
|
|
25
64
|
____exports.AbilityBehavior = __TS__Class()
|
|
26
65
|
local AbilityBehavior = ____exports.AbilityBehavior
|
|
27
66
|
AbilityBehavior.name = "AbilityBehavior"
|
|
@@ -65,6 +104,18 @@ function AbilityBehavior.prototype.flashSpecialEffect(self, xOrWidget, yOrDurati
|
|
|
65
104
|
)
|
|
66
105
|
end
|
|
67
106
|
end
|
|
107
|
+
function AbilityBehavior.prototype.launchMissile(self, source, target, ...)
|
|
108
|
+
Missile:launch(
|
|
109
|
+
self.missileLaunchConfig,
|
|
110
|
+
source,
|
|
111
|
+
target,
|
|
112
|
+
invokeOnMissileArrival,
|
|
113
|
+
self,
|
|
114
|
+
...
|
|
115
|
+
)
|
|
116
|
+
end
|
|
117
|
+
function AbilityBehavior.prototype.onMissileArrival(self, ...)
|
|
118
|
+
end
|
|
68
119
|
function AbilityBehavior.prototype.onUnitGainAbility(self, _unit)
|
|
69
120
|
end
|
|
70
121
|
function AbilityBehavior.prototype.onUnitLoseAbility(self, _unit)
|
|
@@ -127,6 +178,17 @@ __TS__SetDescriptor(
|
|
|
127
178
|
return self.object
|
|
128
179
|
end},
|
|
129
180
|
true
|
|
181
|
+
)
|
|
182
|
+
AbilityBehavior.MissileLaunchConfig = ____class_0
|
|
183
|
+
__TS__SetDescriptor(
|
|
184
|
+
AbilityBehavior.prototype,
|
|
185
|
+
"missileLaunchConfig",
|
|
186
|
+
{get = function(self)
|
|
187
|
+
local missileLaunchConfig = __TS__New(____exports.AbilityBehavior.MissileLaunchConfig, self)
|
|
188
|
+
rawset(self, "missileLaunchConfig", missileLaunchConfig)
|
|
189
|
+
return missileLaunchConfig
|
|
190
|
+
end},
|
|
191
|
+
true
|
|
130
192
|
);
|
|
131
193
|
(function(self)
|
|
132
194
|
local function createUnitEventListener(key)
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import { Behavior } from "../behavior";
|
|
3
3
|
import { Ability } from "../internal/ability";
|
|
4
4
|
import { DamageEvent, DamagingEvent, Unit } from "../internal/unit";
|
|
5
|
+
import "../internal/unit+ability";
|
|
5
6
|
import "../internal/unit-missile-launch";
|
|
7
|
+
import { Item } from "../internal/item";
|
|
6
8
|
export type UnitBehaviorConstructor<Args extends any[]> = new (unit: Unit, ...args: Args) => UnitBehavior;
|
|
7
9
|
export declare abstract class UnitBehavior<PeriodicActionParameters extends any[] = any[]> extends Behavior<Unit, PeriodicActionParameters> {
|
|
8
10
|
constructor(unit: Unit);
|
|
@@ -13,8 +15,12 @@ export declare abstract class UnitBehavior<PeriodicActionParameters extends any[
|
|
|
13
15
|
onDamageDealt(target: Unit, event: DamageEvent): void;
|
|
14
16
|
onDamageReceiving(source: Unit | undefined, event: DamagingEvent): void;
|
|
15
17
|
onDamageReceived(source: Unit | undefined, event: DamageEvent): void;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
onAbilityGained(ability: Ability): void;
|
|
19
|
+
onAbilityLost(ability: Ability): void;
|
|
20
|
+
onItemDropped(item: Item): void;
|
|
21
|
+
onItemPickedUp(item: Item): void;
|
|
22
|
+
onItemUsed(item: Item): void;
|
|
23
|
+
onItemStacked(item: Item): void;
|
|
18
24
|
onKill(target: Unit): void;
|
|
19
25
|
onDeath(source: Unit | undefined): void;
|
|
20
26
|
}
|
|
@@ -7,6 +7,7 @@ local ____behavior = require("engine.behavior")
|
|
|
7
7
|
local Behavior = ____behavior.Behavior
|
|
8
8
|
local ____unit = require("engine.internal.unit")
|
|
9
9
|
local Unit = ____unit.Unit
|
|
10
|
+
require("engine.internal.unit+ability")
|
|
10
11
|
require("engine.internal.unit-missile-launch")
|
|
11
12
|
____exports.UnitBehavior = __TS__Class()
|
|
12
13
|
local UnitBehavior = ____exports.UnitBehavior
|
|
@@ -31,6 +32,14 @@ function UnitBehavior.prototype.onAbilityGained(self, ability)
|
|
|
31
32
|
end
|
|
32
33
|
function UnitBehavior.prototype.onAbilityLost(self, ability)
|
|
33
34
|
end
|
|
35
|
+
function UnitBehavior.prototype.onItemDropped(self, item)
|
|
36
|
+
end
|
|
37
|
+
function UnitBehavior.prototype.onItemPickedUp(self, item)
|
|
38
|
+
end
|
|
39
|
+
function UnitBehavior.prototype.onItemUsed(self, item)
|
|
40
|
+
end
|
|
41
|
+
function UnitBehavior.prototype.onItemStacked(self, item)
|
|
42
|
+
end
|
|
34
43
|
function UnitBehavior.prototype.onKill(self, target)
|
|
35
44
|
end
|
|
36
45
|
function UnitBehavior.prototype.onDeath(self, source)
|
|
@@ -62,12 +71,30 @@ __TS__SetDescriptor(
|
|
|
62
71
|
end
|
|
63
72
|
____exports.UnitBehavior:forAll(target, "onDamageReceived", source, event)
|
|
64
73
|
end)
|
|
74
|
+
Unit.abilityGainedEvent:addListener(function(source, target)
|
|
75
|
+
____exports.UnitBehavior:forAll(source, "onAbilityGained", target)
|
|
76
|
+
end)
|
|
77
|
+
Unit.abilityLostEvent:addListener(function(source, target)
|
|
78
|
+
____exports.UnitBehavior:forAll(source, "onAbilityLost", target)
|
|
79
|
+
end)
|
|
65
80
|
Unit.deathEvent:addListener(function(target, source)
|
|
66
81
|
if source ~= nil then
|
|
67
82
|
____exports.UnitBehavior:forAll(source, "onKill", target)
|
|
68
83
|
end
|
|
69
84
|
____exports.UnitBehavior:forAll(target, "onDeath", source)
|
|
70
85
|
end)
|
|
86
|
+
Unit.itemDroppedEvent:addListener(function(unit, item)
|
|
87
|
+
____exports.UnitBehavior:forAll(unit, "onItemDropped", item)
|
|
88
|
+
end)
|
|
89
|
+
Unit.itemPickedUpEvent:addListener(function(unit, item)
|
|
90
|
+
____exports.UnitBehavior:forAll(unit, "onItemPickedUp", item)
|
|
91
|
+
end)
|
|
92
|
+
Unit.itemUsedEvent:addListener(function(unit, item)
|
|
93
|
+
____exports.UnitBehavior:forAll(unit, "onItemUsed", item)
|
|
94
|
+
end)
|
|
95
|
+
Unit.itemStackedEvent:addListener(function(unit, item)
|
|
96
|
+
____exports.UnitBehavior:forAll(unit, "onItemStacked", item)
|
|
97
|
+
end)
|
|
71
98
|
end)(UnitBehavior)
|
|
72
99
|
Unit.destroyEvent:addListener(function(unit)
|
|
73
100
|
____exports.UnitBehavior:forAll(unit, "destroy")
|
package/engine/buff.d.ts
CHANGED
|
@@ -5,16 +5,19 @@ import { Ability } from "./internal/ability";
|
|
|
5
5
|
import { AbilityTypeId } from "./object-data/entry/ability-type";
|
|
6
6
|
import { BuffPolarity } from "./object-data/auxiliary/buff-polarity";
|
|
7
7
|
import { BuffResistanceType } from "./object-data/auxiliary/buff-resistance-type";
|
|
8
|
-
import { AbilityBooleanField, AbilityBooleanLevelField, AbilityCombatClassificationsLevelField, AbilityDependentValue, AbilityIntegerField, AbilityIntegerLevelField, AbilityNumberField, AbilityNumberLevelField } from "./object-field/ability";
|
|
8
|
+
import { AbilityBooleanField, AbilityBooleanLevelField, AbilityCombatClassificationsLevelField, AbilityDependentValue, AbilityEnumLevelField, AbilityIntegerField, AbilityIntegerLevelField, AbilityNumberField, AbilityNumberLevelField } from "./object-field/ability";
|
|
9
9
|
import { CombatClassifications } from "./object-data/auxiliary/combat-classification";
|
|
10
|
-
import { IsExactlyAny,
|
|
10
|
+
import { IsExactlyAny, Prohibit, ReadonlyNonEmptyArray } from "../utility/types";
|
|
11
11
|
import { UnitBehavior } from "./behaviour/unit";
|
|
12
12
|
import type { Widget } from "../core/types/widget";
|
|
13
13
|
import { Destructor } from "../destroyable";
|
|
14
14
|
export type BuffConstructor<T extends Buff<any> = Buff<any>, Args extends any[] = any> = OmitConstructor<typeof Buff<any>> & (new (...args: Args) => T);
|
|
15
|
+
type EnumParameterValueType<T extends number> = T | AbilityEnumLevelField<T>;
|
|
15
16
|
type NumberParameterValueType = number | AbilityNumberField | AbilityNumberLevelField;
|
|
16
17
|
type IntegerParameterValueType = number | AbilityIntegerField | AbilityIntegerLevelField;
|
|
17
18
|
type BooleanParameterValueType = boolean | AbilityBooleanField | AbilityBooleanLevelField;
|
|
19
|
+
export type BuffPolarityParameterType = EnumParameterValueType<BuffPolarity>;
|
|
20
|
+
export type BuffResistanceTypeParameterType = EnumParameterValueType<BuffResistanceType>;
|
|
18
21
|
export declare class BuffUniqueGroup {
|
|
19
22
|
}
|
|
20
23
|
export type BuffParameters<T extends Buff<any> = Buff> = Buff extends T ? {
|
|
@@ -51,6 +54,7 @@ export type BuffParameters<T extends Buff<any> = Buff> = Buff extends T ? {
|
|
|
51
54
|
armorIncreaseFactor?: NumberParameterValueType;
|
|
52
55
|
attackSpeedIncreaseFactor?: NumberParameterValueType;
|
|
53
56
|
movementSpeedIncreaseFactor?: NumberParameterValueType;
|
|
57
|
+
damageFactor?: NumberParameterValueType;
|
|
54
58
|
receivedDamageFactor?: NumberParameterValueType;
|
|
55
59
|
receivedMagicDamageFactor?: NumberParameterValueType;
|
|
56
60
|
durationIncreaseOnAutoAttack?: NumberParameterValueType;
|
|
@@ -64,8 +68,14 @@ export type BuffParameters<T extends Buff<any> = Buff> = Buff extends T ? {
|
|
|
64
68
|
disablesAutoAttack?: BooleanParameterValueType;
|
|
65
69
|
destroysOnDamage?: BooleanParameterValueType;
|
|
66
70
|
maximumAutoAttackCount?: IntegerParameterValueType;
|
|
71
|
+
maximumDamageDealtEventCount?: IntegerParameterValueType;
|
|
72
|
+
maximumDamageReceivedEventCount?: IntegerParameterValueType;
|
|
73
|
+
damageOnExpiration?: NumberParameterValueType;
|
|
74
|
+
healingOnExpiration?: NumberParameterValueType;
|
|
75
|
+
killsOnExpiration?: BooleanParameterValueType;
|
|
76
|
+
explodesOnExpiration?: BooleanParameterValueType;
|
|
67
77
|
uniqueGroup?: BuffUniqueGroup;
|
|
68
|
-
} : BuffParameters & (T extends Buff<infer AdditionalParameters> ? AdditionalParameters :
|
|
78
|
+
} : BuffParameters & (T extends Buff<infer AdditionalParameters> ? AdditionalParameters : object);
|
|
69
79
|
declare const enum BuffPropertyKey {
|
|
70
80
|
UNIT = 100,
|
|
71
81
|
SOURCE = 101,
|
|
@@ -86,19 +96,27 @@ declare const enum BuffPropertyKey {
|
|
|
86
96
|
HEALING_INTERVAL = 116,
|
|
87
97
|
REMAINING_HEALING_OVER_DURATION = 117,
|
|
88
98
|
HEALING_INTERVAL_TIMER = 118,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
99
|
+
DAMAGE_ON_EXPIRATION = 119,
|
|
100
|
+
HEALING_ON_EXPIRATION = 120,
|
|
101
|
+
DAMAGE_UPON_DEATH_ALLOWED_TARGET_CLASSIFICATIONS = 121,
|
|
102
|
+
DAMAGE_UPON_DEATH = 122,
|
|
103
|
+
DAMAGE_UPON_DEATH_RANGE = 123,
|
|
104
|
+
MEDIUM_DAMAGE_UPON_DEATH = 124,
|
|
105
|
+
MEDIUM_DAMAGE_UPON_DEATH_RANGE = 125,
|
|
106
|
+
SMALL_DAMAGE_UPON_DEATH = 126,
|
|
107
|
+
SMALL_DAMAGE_UPON_DEATH_RANGE = 127,
|
|
108
|
+
AUTO_ATTACK_COUNT = 128,
|
|
109
|
+
MAXIMUM_AUTO_ATTACK_COUNT = 129,
|
|
110
|
+
DAMAGE_DEALT_EVENT_COUNT = 130,
|
|
111
|
+
MAXIMUM_DAMAGE_DEALT_EVENT_COUNT = 131,
|
|
112
|
+
DAMAGE_RECEIVED_EVENT_COUNT = 132,
|
|
113
|
+
MAXIMUM_DAMAGE_RECEIVED_EVENT_COUNT = 133,
|
|
114
|
+
STUNS = 134,
|
|
115
|
+
IGNORES_STUN_IMMUNITY = 135,
|
|
116
|
+
DISABLES_AUTO_ATTACK = 136,
|
|
117
|
+
PROVIDES_INVULNERABILITY = 137,
|
|
118
|
+
KILLS_ON_EXPIRATION = 138,
|
|
119
|
+
EXPLODES_ON_EXPIRATION = 139
|
|
102
120
|
}
|
|
103
121
|
export declare const enum BuffTypeIdSelectionPolicy {
|
|
104
122
|
LEAST_DURATION = 0
|
|
@@ -106,17 +124,17 @@ export declare const enum BuffTypeIdSelectionPolicy {
|
|
|
106
124
|
export type BuffAdditionalParameters = Prohibit<Record<string, any>, keyof BuffParameters>;
|
|
107
125
|
export type BuffConstructorParameters<AdditionalParameters extends BuffAdditionalParameters> = [
|
|
108
126
|
...typeId: [ApplicableBuffTypeId] | [
|
|
109
|
-
typeIds:
|
|
127
|
+
typeIds: ReadonlyNonEmptyArray<ApplicableBuffTypeId>,
|
|
110
128
|
typeIdSelectionPolicy: BuffTypeIdSelectionPolicy
|
|
111
129
|
],
|
|
112
|
-
polarity:
|
|
113
|
-
resistanceType:
|
|
130
|
+
polarity: BuffPolarityParameterType,
|
|
131
|
+
resistanceType: BuffResistanceTypeParameterType,
|
|
114
132
|
...abilityOrParameters: [
|
|
115
133
|
ability: Ability,
|
|
116
134
|
parameters?: BuffParameters & Omit<AdditionalParameters, keyof BuffParameters>
|
|
117
135
|
] | [parameters?: BuffParameters & Omit<AdditionalParameters, keyof BuffParameters>]
|
|
118
136
|
];
|
|
119
|
-
export declare class Buff<AdditionalParameters extends Prohibit<Record<string, any>, keyof BuffParameters> =
|
|
137
|
+
export declare class Buff<AdditionalParameters extends Prohibit<Record<string, any>, keyof BuffParameters> = object> extends UnitBehavior {
|
|
120
138
|
private _unit;
|
|
121
139
|
protected readonly __additionalParametersBrand?: AdditionalParameters;
|
|
122
140
|
private [BuffPropertyKey.UNIT];
|
|
@@ -138,6 +156,8 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
|
|
|
138
156
|
private [BuffPropertyKey.HEALING_INTERVAL]?;
|
|
139
157
|
private [BuffPropertyKey.REMAINING_HEALING_OVER_DURATION]?;
|
|
140
158
|
private [BuffPropertyKey.HEALING_INTERVAL_TIMER]?;
|
|
159
|
+
private [BuffPropertyKey.DAMAGE_ON_EXPIRATION]?;
|
|
160
|
+
private [BuffPropertyKey.HEALING_ON_EXPIRATION]?;
|
|
141
161
|
private [BuffPropertyKey.DAMAGE_UPON_DEATH_ALLOWED_TARGET_CLASSIFICATIONS]?;
|
|
142
162
|
private [BuffPropertyKey.DAMAGE_UPON_DEATH]?;
|
|
143
163
|
private [BuffPropertyKey.DAMAGE_UPON_DEATH_RANGE]?;
|
|
@@ -147,10 +167,16 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
|
|
|
147
167
|
private [BuffPropertyKey.SMALL_DAMAGE_UPON_DEATH_RANGE]?;
|
|
148
168
|
private [BuffPropertyKey.MAXIMUM_AUTO_ATTACK_COUNT]?;
|
|
149
169
|
private [BuffPropertyKey.AUTO_ATTACK_COUNT]?;
|
|
170
|
+
private [BuffPropertyKey.MAXIMUM_DAMAGE_DEALT_EVENT_COUNT]?;
|
|
171
|
+
private [BuffPropertyKey.DAMAGE_DEALT_EVENT_COUNT]?;
|
|
172
|
+
private [BuffPropertyKey.MAXIMUM_DAMAGE_RECEIVED_EVENT_COUNT]?;
|
|
173
|
+
private [BuffPropertyKey.DAMAGE_RECEIVED_EVENT_COUNT]?;
|
|
150
174
|
private [BuffPropertyKey.STUNS]?;
|
|
151
175
|
private [BuffPropertyKey.IGNORES_STUN_IMMUNITY]?;
|
|
152
176
|
private [BuffPropertyKey.DISABLES_AUTO_ATTACK]?;
|
|
153
177
|
private [BuffPropertyKey.PROVIDES_INVULNERABILITY]?;
|
|
178
|
+
private [BuffPropertyKey.KILLS_ON_EXPIRATION]?;
|
|
179
|
+
private [BuffPropertyKey.EXPLODES_ON_EXPIRATION]?;
|
|
154
180
|
protected static readonly defaultParameters: BuffParameters;
|
|
155
181
|
get source(): Unit;
|
|
156
182
|
readonly typeId: ApplicableBuffTypeId;
|
|
@@ -187,6 +213,12 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
|
|
|
187
213
|
set healingPerInterval(healingPerInterval: number);
|
|
188
214
|
get healingInterval(): number;
|
|
189
215
|
set healingInterval(healingInterval: number);
|
|
216
|
+
get damageOnExpiration(): number;
|
|
217
|
+
set damageOnExpiration(damageOnExpiration: number);
|
|
218
|
+
get healingOnExpiration(): number;
|
|
219
|
+
set healingOnExpiration(healingOnExpiration: number);
|
|
220
|
+
get damageFactor(): number;
|
|
221
|
+
set damageFactor(damageFactor: number);
|
|
190
222
|
get receivedDamageFactor(): number;
|
|
191
223
|
set receivedDamageFactor(receivedDamageFactor: number);
|
|
192
224
|
get armorIncrease(): number;
|
|
@@ -199,6 +231,14 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
|
|
|
199
231
|
set disablesAutoAttack(disablesAutoAttack: boolean);
|
|
200
232
|
get providesInvulnerability(): boolean;
|
|
201
233
|
set providesInvulnerability(providesInvulnerability: boolean);
|
|
234
|
+
get killsOnExpiration(): boolean;
|
|
235
|
+
set killsOnExpiration(killsOnExpiration: boolean);
|
|
236
|
+
get explodesOnExpiration(): boolean;
|
|
237
|
+
set explodesOnExpiration(killsOnExpiration: boolean);
|
|
238
|
+
get maximumDamageDealtEventCount(): number;
|
|
239
|
+
set maximumDamageDealtEventCount(maximumDamageDealtEventCount: number);
|
|
240
|
+
get maximumDamageReceivedEventCount(): number;
|
|
241
|
+
set maximumDamageReceivedEventCount(maximumDamageReceivedEventCount: number);
|
|
202
242
|
get maximumAutoAttackCount(): number;
|
|
203
243
|
set maximumAutoAttackCount(maximumAutoAttackCount: number);
|
|
204
244
|
get durationIncreaseOnAutoAttack(): number;
|
|
@@ -215,7 +255,9 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
|
|
|
215
255
|
protected onDestroy(): Destructor;
|
|
216
256
|
static apply<T extends Buff<any>, Args extends any[]>(this: BuffConstructor<T, Args>, ...args: Args): T | undefined;
|
|
217
257
|
static getByTypeId<T extends Buff<any>, Args extends any[]>(this: BuffConstructor<T, Args>, unit: Unit, typeId: ApplicableBuffTypeId): T | undefined;
|
|
258
|
+
onExpiration(): void;
|
|
218
259
|
onDeath(source: Unit | undefined): void;
|
|
219
260
|
onDamageDealt(target: Unit, event: DamageEvent): void;
|
|
261
|
+
onDamageReceived(source: Unit | undefined, event: DamageEvent): void;
|
|
220
262
|
}
|
|
221
263
|
export {};
|