warscript 0.0.1-dev.48e5280 → 0.0.1-dev.4b6e45a
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/core/dummy.lua +4 -2
- package/core/types/effect.d.ts +11 -1
- package/core/types/effect.lua +43 -77
- package/core/types/frame.d.ts +21 -2
- package/core/types/frame.lua +153 -78
- package/core/types/handle.lua +9 -9
- package/core/types/item.d.ts +1 -0
- package/core/types/item.lua +1 -0
- package/core/types/missile.lua +8 -7
- package/core/types/player.d.ts +2 -1
- package/core/types/player.lua +18 -13
- package/core/types/playerCamera.lua +1 -1
- package/core/types/playerColor.lua +4 -3
- package/core/types/sound.d.ts +1 -1
- package/core/types/sound.lua +14 -9
- package/core/types/tileCell.d.ts +7 -2
- package/core/types/tileCell.lua +11 -0
- package/core/types/unit.d.ts +5 -0
- package/core/types/unit.lua +5 -0
- package/core/util.d.ts +3 -1
- package/core/util.lua +109 -3
- package/decl/native.d.ts +706 -7
- package/engine/ability-type-extended-tooltip.d.ts +8 -0
- package/engine/ability-type-extended-tooltip.lua +44 -0
- package/engine/behaviour/ability/apply-unit-behavior.lua +5 -0
- package/engine/behaviour/ability/damage.d.ts +4 -0
- package/engine/behaviour/ability/damage.lua +19 -15
- package/engine/behaviour/ability/emulate-impact.d.ts +14 -0
- package/engine/behaviour/ability/emulate-impact.lua +79 -5
- package/engine/behaviour/ability/instant-impact.d.ts +12 -1
- package/engine/behaviour/ability/instant-impact.lua +17 -2
- package/engine/behaviour/ability/on-command-impact.d.ts +1 -0
- package/engine/behaviour/ability/on-command-impact.lua +1 -0
- package/engine/behaviour/ability.d.ts +8 -0
- package/engine/behaviour/ability.lua +89 -8
- package/engine/behaviour/unit.d.ts +1 -0
- package/engine/behaviour/unit.lua +1 -0
- package/engine/buff.d.ts +79 -55
- package/engine/buff.lua +376 -246
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +7 -0
- package/engine/internal/ability.lua +65 -36
- package/engine/internal/item/fields.d.ts +12 -0
- package/engine/internal/item/fields.lua +33 -0
- package/engine/internal/item/owner-cache.d.ts +5 -0
- package/engine/internal/item/owner-cache.lua +4 -0
- package/engine/internal/item+owner.d.ts +2 -0
- package/engine/internal/item+owner.lua +27 -4
- package/engine/internal/item.d.ts +20 -5
- package/engine/internal/item.lua +146 -57
- package/engine/internal/misc/unit-ability-level-natives.d.ts +2 -0
- package/engine/internal/misc/unit-ability-level-natives.lua +12 -0
- package/engine/internal/object-data/health-regeneration-rate-increase.d.ts +2 -0
- package/engine/internal/object-data/health-regeneration-rate-increase.lua +48 -0
- package/engine/internal/object-data/returned-melee-damage-factor.d.ts +2 -0
- package/engine/internal/object-data/returned-melee-damage-factor.lua +21 -0
- package/engine/internal/unit/ability.lua +16 -0
- package/engine/internal/unit/add-item-to-slot-init.lua +3 -14
- package/engine/internal/unit/add-item-to-slot.lua +53 -12
- package/engine/internal/unit/appearance.d.ts +15 -0
- package/engine/internal/unit/appearance.lua +85 -0
- package/engine/internal/unit/bonus.d.ts +11 -0
- package/engine/internal/unit/bonus.lua +80 -5
- package/engine/internal/unit/buff.d.ts +2 -2
- package/engine/internal/unit/buff.lua +34 -19
- package/engine/internal/unit/equipment-inventory.d.ts +44 -0
- package/engine/internal/unit/equipment-inventory.lua +233 -0
- package/engine/internal/unit/expiration-timer.lua +1 -1
- package/engine/internal/unit/extended-inventory.d.ts +25 -0
- package/engine/internal/unit/extended-inventory.lua +99 -0
- package/engine/internal/unit/ignore-events-items.lua +10 -1
- package/engine/internal/unit/{item.d.ts → inventory.d.ts} +7 -3
- package/engine/internal/unit/inventory.lua +87 -0
- package/engine/internal/unit/item-container.d.ts +25 -0
- package/engine/internal/unit/item-container.lua +11 -0
- package/engine/internal/unit/item-order-events.d.ts +17 -0
- package/engine/internal/unit/item-order-events.lua +67 -0
- package/engine/internal/unit/item-slot.d.ts +27 -0
- package/engine/internal/unit/item-slot.lua +92 -0
- package/engine/internal/unit/order.d.ts +3 -3
- package/engine/internal/unit/order.lua +10 -10
- package/engine/internal/unit/shared-vision-counter.d.ts +18 -0
- package/engine/internal/unit/shared-vision-counter.lua +31 -0
- package/engine/internal/unit+ability.d.ts +2 -1
- package/engine/internal/unit+ability.lua +73 -2
- package/engine/internal/unit+damage.d.ts +9 -0
- package/engine/internal/unit+damage.lua +33 -0
- package/engine/internal/unit+rally.lua +9 -31
- package/engine/internal/unit-missile-data.lua +96 -68
- package/engine/internal/unit-missile-launch.lua +13 -13
- package/engine/internal/unit.d.ts +5 -10
- package/engine/internal/unit.lua +67 -101
- package/engine/lightning.lua +4 -4
- package/engine/local-client.d.ts +26 -0
- package/engine/local-client.lua +294 -54
- package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -0
- package/engine/object-data/auxiliary/attachment-preset.lua +7 -0
- package/engine/object-data/auxiliary/equipment-slot.d.ts +12 -0
- package/engine/object-data/auxiliary/equipment-slot.lua +2 -0
- package/engine/object-data/auxiliary/equipment-type.d.ts +12 -0
- package/engine/object-data/auxiliary/equipment-type.lua +26 -0
- package/engine/object-data/auxiliary/item-class.d.ts +11 -0
- package/engine/object-data/auxiliary/item-class.lua +2 -0
- package/engine/object-data/auxiliary/item-tag.d.ts +12 -0
- package/engine/object-data/auxiliary/item-tag.lua +2 -0
- package/engine/object-data/auxiliary/order-type.d.ts +939 -0
- package/engine/object-data/auxiliary/order-type.lua +2 -0
- package/engine/object-data/auxiliary/sound-set-name.d.ts +14 -3
- package/engine/object-data/auxiliary/unit-attribute.lua +1 -1
- package/engine/object-data/auxiliary/unit-weapon-type.d.ts +21 -0
- package/engine/object-data/auxiliary/unit-weapon-type.lua +2 -0
- package/engine/object-data/entry/ability-type/apprehend.d.ts +22 -0
- package/engine/object-data/entry/ability-type/apprehend.lua +66 -0
- package/engine/object-data/entry/ability-type/aura-of-blight.d.ts +13 -0
- package/engine/object-data/entry/ability-type/aura-of-blight.lua +39 -0
- package/engine/object-data/entry/ability-type/banshee.d.ts +8 -0
- package/engine/object-data/entry/ability-type/banshee.lua +13 -0
- package/engine/object-data/entry/ability-type/banshees-wail-damage-amp.d.ts +12 -0
- package/engine/object-data/entry/ability-type/banshees-wail-damage-amp.lua +27 -0
- package/engine/object-data/entry/ability-type/banshees-wail.d.ts +31 -0
- package/engine/object-data/entry/ability-type/banshees-wail.lua +117 -0
- package/engine/object-data/entry/ability-type/barrage.d.ts +12 -0
- package/engine/object-data/entry/ability-type/barrage.lua +52 -0
- package/engine/object-data/entry/ability-type/battering-ram.d.ts +33 -0
- package/engine/object-data/entry/ability-type/battering-ram.lua +130 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +2 -2
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.d.ts +23 -0
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.lua +112 -0
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +4 -0
- package/engine/object-data/entry/ability-type/blank-passive.lua +27 -7
- package/engine/object-data/entry/ability-type/breath-of-fire.d.ts +11 -0
- package/engine/object-data/entry/ability-type/breath-of-fire.lua +27 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +2 -2
- package/engine/object-data/entry/ability-type/channel.lua +3 -3
- package/engine/object-data/entry/ability-type/cleansing-fire.d.ts +27 -0
- package/engine/object-data/entry/ability-type/cleansing-fire.lua +104 -0
- package/engine/object-data/entry/ability-type/consecration.d.ts +15 -0
- package/engine/object-data/entry/ability-type/consecration.lua +52 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.d.ts +12 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.lua +39 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.d.ts +18 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.lua +65 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.d.ts +21 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.lua +78 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.d.ts +8 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.lua +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.lua +27 -0
- package/engine/object-data/entry/ability-type/equipment.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment.lua +27 -0
- package/engine/object-data/entry/ability-type/exhume-corpses.d.ts +14 -0
- package/engine/object-data/entry/ability-type/exhume-corpses.lua +40 -0
- package/engine/object-data/entry/ability-type/firebolt.d.ts +7 -0
- package/engine/object-data/entry/ability-type/firebolt.lua +13 -0
- package/engine/object-data/entry/ability-type/flame-strike.d.ts +25 -0
- package/engine/object-data/entry/ability-type/flame-strike.lua +92 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.d.ts +8 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.lua +13 -0
- package/engine/object-data/entry/ability-type/grim-conviction.d.ts +36 -0
- package/engine/object-data/entry/ability-type/grim-conviction.lua +131 -0
- package/engine/object-data/entry/ability-type/grit.d.ts +18 -0
- package/engine/object-data/entry/ability-type/grit.lua +65 -0
- package/engine/object-data/entry/ability-type/guiding-hand.d.ts +27 -0
- package/engine/object-data/entry/ability-type/guiding-hand.lua +104 -0
- package/engine/object-data/entry/ability-type/headsplitter.d.ts +27 -0
- package/engine/object-data/entry/ability-type/headsplitter.lua +104 -0
- package/engine/object-data/entry/ability-type/healing-modifier.d.ts +9 -0
- package/engine/object-data/entry/ability-type/healing-modifier.lua +26 -0
- package/engine/object-data/entry/ability-type/healing-ward-aura.d.ts +13 -0
- package/engine/object-data/entry/ability-type/healing-ward-aura.lua +39 -0
- package/engine/object-data/entry/ability-type/heroic-slash.d.ts +18 -0
- package/engine/object-data/entry/ability-type/heroic-slash.lua +65 -0
- package/engine/object-data/entry/ability-type/holy-wrath.d.ts +30 -0
- package/engine/object-data/entry/ability-type/holy-wrath.lua +117 -0
- package/engine/object-data/entry/ability-type/inspire-courage.d.ts +18 -0
- package/engine/object-data/entry/ability-type/inspire-courage.lua +65 -0
- package/engine/object-data/entry/ability-type/item-life-regeneration.d.ts +10 -0
- package/engine/object-data/entry/ability-type/item-life-regeneration.lua +26 -0
- package/engine/object-data/entry/ability-type/life-drain.d.ts +37 -0
- package/engine/object-data/entry/ability-type/life-drain.lua +144 -0
- package/engine/object-data/entry/ability-type/lights-mercy.d.ts +27 -0
- package/engine/object-data/entry/ability-type/lights-mercy.lua +104 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.d.ts +12 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.lua +39 -0
- package/engine/object-data/entry/ability-type/mind-control.d.ts +21 -0
- package/engine/object-data/entry/ability-type/mind-control.lua +78 -0
- package/engine/object-data/entry/ability-type/on-attack-cast-spell.d.ts +21 -0
- package/engine/object-data/entry/ability-type/on-attack-cast-spell.lua +52 -0
- package/engine/object-data/entry/ability-type/on-basic-attack-cast-spell.d.ts +19 -0
- package/engine/object-data/entry/ability-type/on-basic-attack-cast-spell.lua +65 -0
- package/engine/object-data/entry/ability-type/on-hit-cast-spell.d.ts +15 -0
- package/engine/object-data/entry/ability-type/on-hit-cast-spell.lua +26 -0
- package/engine/object-data/entry/ability-type/on-magic-attack-cast-spell.d.ts +6 -0
- package/engine/object-data/entry/ability-type/on-magic-attack-cast-spell.lua +12 -0
- package/engine/object-data/entry/ability-type/provoke.d.ts +21 -0
- package/engine/object-data/entry/ability-type/provoke.lua +66 -0
- package/engine/object-data/entry/ability-type/rain-of-fire.d.ts +7 -0
- package/engine/object-data/entry/ability-type/rain-of-fire.lua +13 -0
- package/engine/object-data/entry/ability-type/raise-the-banner.d.ts +9 -0
- package/engine/object-data/entry/ability-type/raise-the-banner.lua +26 -0
- package/engine/object-data/entry/ability-type/resolve.d.ts +12 -0
- package/engine/object-data/entry/ability-type/resolve.lua +39 -0
- package/engine/object-data/entry/ability-type/righteous-fury.d.ts +33 -0
- package/engine/object-data/entry/ability-type/righteous-fury.lua +130 -0
- package/engine/object-data/entry/ability-type/sacred-aura.d.ts +27 -0
- package/engine/object-data/entry/ability-type/sacred-aura.lua +104 -0
- package/engine/object-data/entry/ability-type/soul-burn.d.ts +22 -0
- package/engine/object-data/entry/ability-type/soul-burn.lua +79 -0
- package/engine/object-data/entry/ability-type/soul-lantern.d.ts +30 -0
- package/engine/object-data/entry/ability-type/soul-lantern.lua +117 -0
- package/engine/object-data/entry/ability-type/spell-amp.d.ts +15 -0
- package/engine/object-data/entry/ability-type/spell-amp.lua +52 -0
- package/engine/object-data/entry/ability-type/spell-critical-strike.d.ts +12 -0
- package/engine/object-data/entry/ability-type/spell-critical-strike.lua +39 -0
- package/engine/object-data/entry/ability-type/spell-vamp.d.ts +12 -0
- package/engine/object-data/entry/ability-type/spell-vamp.lua +39 -0
- package/engine/object-data/entry/ability-type/stackable-evasion.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-evasion.lua +13 -0
- package/engine/object-data/entry/ability-type/stackable-hardened-skin.d.ts +21 -0
- package/engine/object-data/entry/ability-type/stackable-hardened-skin.lua +78 -0
- package/engine/object-data/entry/ability-type/stackable-life-steal.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-life-steal.lua +26 -0
- package/engine/object-data/entry/ability-type/stackable-spell-damage-reduction.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-spell-damage-reduction.lua +13 -0
- package/engine/object-data/entry/ability-type/stackable-thorn-shield.d.ts +9 -0
- package/engine/object-data/entry/ability-type/stackable-thorn-shield.lua +13 -0
- package/engine/object-data/entry/ability-type/stat-details.d.ts +12 -0
- package/engine/object-data/entry/ability-type/stat-details.lua +27 -0
- package/engine/object-data/entry/ability-type/surge-of-light.d.ts +33 -0
- package/engine/object-data/entry/ability-type/surge-of-light.lua +130 -0
- package/engine/object-data/entry/ability-type/sweeping-strike.d.ts +57 -0
- package/engine/object-data/entry/ability-type/sweeping-strike.lua +234 -0
- package/engine/object-data/entry/ability-type/talents.d.ts +12 -0
- package/engine/object-data/entry/ability-type/talents.lua +27 -0
- package/engine/object-data/entry/ability-type/unyielding-guard.d.ts +30 -0
- package/engine/object-data/entry/ability-type/unyielding-guard.lua +117 -0
- package/engine/object-data/entry/ability-type/valiant-charge.d.ts +27 -0
- package/engine/object-data/entry/ability-type/valiant-charge.lua +104 -0
- package/engine/object-data/entry/ability-type/warcry.d.ts +9 -0
- package/engine/object-data/entry/ability-type/warcry.lua +26 -0
- package/engine/object-data/entry/ability-type/withering-fire.d.ts +21 -0
- package/engine/object-data/entry/ability-type/withering-fire.lua +78 -0
- package/engine/object-data/entry/ability-type.d.ts +33 -8
- package/engine/object-data/entry/ability-type.lua +256 -48
- package/engine/object-data/entry/buff-type/applicable.lua +122 -111
- package/engine/object-data/entry/buff-type.d.ts +6 -2
- package/engine/object-data/entry/buff-type.lua +26 -0
- package/engine/object-data/entry/destructible-type.d.ts +6 -2
- package/engine/object-data/entry/destructible-type.lua +26 -0
- package/engine/object-data/entry/item-type.d.ts +18 -3
- package/engine/object-data/entry/item-type.lua +84 -0
- package/engine/object-data/entry/lightning-type.d.ts +6 -8
- package/engine/object-data/entry/lightning-type.lua +1 -1
- package/engine/object-data/entry/sound-preset.d.ts +2 -2
- package/engine/object-data/entry/unit-type.d.ts +57 -2
- package/engine/object-data/entry/unit-type.lua +412 -64
- package/engine/object-data/entry/upgrade.d.ts +2 -2
- package/engine/object-data/entry.d.ts +6 -1
- package/engine/object-data/entry.lua +8 -0
- package/engine/object-field/ability.lua +2 -2
- package/engine/object-field/item.d.ts +22 -0
- package/engine/object-field/item.lua +118 -0
- package/engine/object-field.d.ts +1 -1
- package/engine/object-field.lua +9 -7
- package/engine/random.lua +1 -1
- package/engine/standard/entries/ability-type.d.ts +3102 -7
- package/engine/standard/entries/ability-type.lua +0 -6
- package/engine/standard/entries/buff-type.d.ts +45 -0
- package/engine/standard/entries/buff-type.lua +43 -0
- package/engine/standard/entries/item-type.d.ts +1299 -0
- package/engine/standard/entries/item-type.lua +2 -0
- package/engine/standard/entries/lightning-type.d.ts +42 -15
- package/engine/standard/entries/lightning-type.lua +0 -14
- package/engine/standard/entries/unit-type.d.ts +5 -0
- package/engine/standard/entries/unit-type.lua +5 -0
- package/engine/standard/fields/ability.d.ts +2 -2
- package/engine/standard/fields/ability.lua +2 -2
- package/engine/standard/fields/item.d.ts +4 -0
- package/engine/standard/fields/item.lua +6 -0
- package/engine/text-tag.d.ts +13 -1
- package/engine/text-tag.lua +79 -42
- package/engine/unit.d.ts +6 -1
- package/engine/unit.lua +6 -1
- package/event.d.ts +1 -1
- package/lualib_bundle.lua +1 -1
- package/math.d.ts +2 -0
- package/math.lua +14 -0
- package/network.lua +25 -1
- package/objutil/buff.lua +1 -1
- package/objutil/object.lua +1 -1
- package/operation.d.ts +8 -1
- package/operation.lua +38 -18
- package/package.json +3 -23
- package/utility/arrays.d.ts +7 -1
- package/utility/arrays.lua +17 -0
- package/utility/linked-map.d.ts +2 -1
- package/utility/linked-map.lua +6 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +6 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
- package/engine/internal/unit/item.lua +0 -78
package/engine/buff.lua
CHANGED
|
@@ -14,6 +14,7 @@ local Unit = ____unit.Unit
|
|
|
14
14
|
local ____applicable = require("engine.object-data.entry.buff-type.applicable")
|
|
15
15
|
local internalApplyBuff = ____applicable.internalApplyBuff
|
|
16
16
|
local removeBuff = ____applicable.removeBuff
|
|
17
|
+
local removeBuffApplicator = ____applicable.removeBuffApplicator
|
|
17
18
|
local ____ability = require("engine.internal.ability")
|
|
18
19
|
local Ability = ____ability.Ability
|
|
19
20
|
local UnitAbility = ____ability.UnitAbility
|
|
@@ -58,6 +59,9 @@ local ____ability = require("engine.behaviour.ability")
|
|
|
58
59
|
local AbilityBehavior = ____ability.AbilityBehavior
|
|
59
60
|
local ____records = require("utility.records")
|
|
60
61
|
local sortedKeysUnnested = ____records.sortedKeysUnnested
|
|
62
|
+
local ____sound = require("core.types.sound")
|
|
63
|
+
local Sound3D = ____sound.Sound3D
|
|
64
|
+
local SoundSettings = ____sound.SoundSettings
|
|
61
65
|
local getUnitAbility = BlzGetUnitAbility
|
|
62
66
|
local stringValueByBuffTypeIdByFieldId = postcompile(function()
|
|
63
67
|
local stringValueByBuffTypeIdByFieldId = {}
|
|
@@ -112,6 +116,7 @@ local buffParametersKeys = {
|
|
|
112
116
|
missProbability = true,
|
|
113
117
|
damageFactor = true,
|
|
114
118
|
receivedDamageFactor = true,
|
|
119
|
+
returnedMeleeDamageFactor = true,
|
|
115
120
|
receivedMagicDamageFactor = true,
|
|
116
121
|
durationIncreaseOnAutoAttack = true,
|
|
117
122
|
maximumDuration = true,
|
|
@@ -131,11 +136,13 @@ local buffParametersKeys = {
|
|
|
131
136
|
maximumDamageAbsorbed = true,
|
|
132
137
|
destroysOnMaximumDamageAbsorbed = true,
|
|
133
138
|
uniqueGroup = true,
|
|
139
|
+
destructionSoundPresetId = true,
|
|
134
140
|
damageOnExpiration = true,
|
|
135
141
|
healingOnExpiration = true,
|
|
136
142
|
killsOnExpiration = true,
|
|
137
143
|
explodesOnExpiration = true,
|
|
138
|
-
abilityCooldownFactor = true
|
|
144
|
+
abilityCooldownFactor = true,
|
|
145
|
+
sharesVisionWithSource = true
|
|
139
146
|
}
|
|
140
147
|
local function resolveEnumValue(ability, level, value)
|
|
141
148
|
if value == nil or type(value) == "number" then
|
|
@@ -193,7 +200,8 @@ local buffBooleanParameters = {
|
|
|
193
200
|
"disablesAutoAttack",
|
|
194
201
|
"providesInvulnerability",
|
|
195
202
|
"killsOnExpiration",
|
|
196
|
-
"explodesOnExpiration"
|
|
203
|
+
"explodesOnExpiration",
|
|
204
|
+
"sharesVisionWithSource"
|
|
197
205
|
}
|
|
198
206
|
local buffNumberParameters = {
|
|
199
207
|
"durationIncreaseOnAutoAttack",
|
|
@@ -206,6 +214,7 @@ local buffNumberParameters = {
|
|
|
206
214
|
"maxManaIncrease",
|
|
207
215
|
"damageFactor",
|
|
208
216
|
"receivedDamageFactor",
|
|
217
|
+
"returnedMeleeDamageFactor",
|
|
209
218
|
"maximumAutoAttackCount",
|
|
210
219
|
"maximumDamageDealtEventCount",
|
|
211
220
|
"maximumDamageReceivedEventCount",
|
|
@@ -253,18 +262,44 @@ end
|
|
|
253
262
|
local function destroyBuff(buff)
|
|
254
263
|
buff:destroy()
|
|
255
264
|
end
|
|
265
|
+
local function destroyBuffOnDeath(buff)
|
|
266
|
+
if buff[100] == 0 then
|
|
267
|
+
Timer:run(destroyBuff, buff)
|
|
268
|
+
else
|
|
269
|
+
buff:destroy()
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
local function shareVisionWithSource(buff)
|
|
273
|
+
local source = buff[102]
|
|
274
|
+
if source ~= nil then
|
|
275
|
+
local player = source.owner
|
|
276
|
+
buff[101]:incrementSharedVisionCounter(player)
|
|
277
|
+
buff[151] = player
|
|
278
|
+
end
|
|
279
|
+
end
|
|
280
|
+
local function unshareVisionWithSource(buff)
|
|
281
|
+
local player = buff[151]
|
|
282
|
+
if player ~= nil then
|
|
283
|
+
buff[101]:decrementSharedVisionCounter(player)
|
|
284
|
+
buff[151] = nil
|
|
285
|
+
end
|
|
286
|
+
end
|
|
256
287
|
local function expireBuff(buff)
|
|
257
|
-
|
|
258
|
-
|
|
288
|
+
if buff.isDestroyed or buff[100] ~= 1 then
|
|
289
|
+
return
|
|
290
|
+
end
|
|
291
|
+
buff[100] = 2
|
|
292
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
293
|
+
local remainingHealingOverDuration = buff[114] or 0
|
|
259
294
|
if remainingDamageOverDuration ~= 0 or remainingHealingOverDuration ~= 0 then
|
|
260
295
|
buff:flashSpecialEffect()
|
|
261
296
|
if remainingDamageOverDuration ~= 0 then
|
|
262
297
|
(buff[102] or buff[101]):damageTarget(buff[101], remainingDamageOverDuration)
|
|
263
|
-
buff[
|
|
298
|
+
buff[114] = nil
|
|
264
299
|
end
|
|
265
300
|
if remainingHealingOverDuration ~= 0 then
|
|
266
301
|
(buff[102] or buff[101]):healTarget(buff[101], remainingHealingOverDuration)
|
|
267
|
-
buff[
|
|
302
|
+
buff[119] = nil
|
|
268
303
|
end
|
|
269
304
|
end
|
|
270
305
|
Timer:run(destroyBuff, buff)
|
|
@@ -272,8 +307,8 @@ local function expireBuff(buff)
|
|
|
272
307
|
end
|
|
273
308
|
local function buffDamageIntervalInitialTimerCallback(buff)
|
|
274
309
|
buffDamageIntervalTimerCallback(buff)
|
|
275
|
-
local timer = buff[
|
|
276
|
-
local damageInterval = buff[
|
|
310
|
+
local timer = buff[115]
|
|
311
|
+
local damageInterval = buff[113]
|
|
277
312
|
if timer ~= nil and damageInterval ~= nil and damageInterval > 0 then
|
|
278
313
|
timer:start(damageInterval, true, buffDamageIntervalTimerCallback, buff)
|
|
279
314
|
end
|
|
@@ -281,43 +316,43 @@ end
|
|
|
281
316
|
buffDamageIntervalTimerCallback = function(buff)
|
|
282
317
|
buff:flashSpecialEffect()
|
|
283
318
|
local source = buff[102] or buff[101]
|
|
284
|
-
local remainingDamageOverDuration = buff[
|
|
319
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
285
320
|
if remainingDamageOverDuration ~= 0 then
|
|
286
|
-
local damageInterval = buff[
|
|
321
|
+
local damageInterval = buff[113] or 0
|
|
287
322
|
if damageInterval ~= 0 then
|
|
288
323
|
local damage = remainingDamageOverDuration / (1 + buff.remainingDuration / damageInterval)
|
|
289
324
|
source:damageTarget(buff[101], damage)
|
|
290
|
-
buff[
|
|
325
|
+
buff[114] = remainingDamageOverDuration - damage
|
|
291
326
|
end
|
|
292
327
|
end
|
|
293
|
-
local damagePerInterval = buff[
|
|
328
|
+
local damagePerInterval = buff[112] or 0
|
|
294
329
|
if remainingDamageOverDuration == 0 or damagePerInterval ~= 0 then
|
|
295
330
|
source:damageTarget(buff[101], damagePerInterval)
|
|
296
331
|
end
|
|
297
332
|
end
|
|
298
333
|
local function buffHealingIntervalInitialTimerCallback(buff)
|
|
299
334
|
buffHealingIntervalTimerCallback(buff)
|
|
300
|
-
local timer = buff[
|
|
301
|
-
local healingInterval = buff[
|
|
335
|
+
local timer = buff[120]
|
|
336
|
+
local healingInterval = buff[118]
|
|
302
337
|
if timer ~= nil and healingInterval ~= nil and healingInterval > 0 then
|
|
303
338
|
timer:start(healingInterval, true, buffHealingIntervalTimerCallback, buff)
|
|
304
339
|
end
|
|
305
340
|
end
|
|
306
341
|
buffHealingIntervalTimerCallback = function(buff)
|
|
307
|
-
if buff[
|
|
342
|
+
if buff[118] ~= buff[113] then
|
|
308
343
|
buff:flashSpecialEffect()
|
|
309
344
|
end
|
|
310
345
|
local source = buff[102] or buff[101]
|
|
311
|
-
local remainingHealingOverDuration = buff[
|
|
346
|
+
local remainingHealingOverDuration = buff[119] or 0
|
|
312
347
|
if remainingHealingOverDuration ~= 0 then
|
|
313
|
-
local healingInterval = buff[
|
|
348
|
+
local healingInterval = buff[118] or 0
|
|
314
349
|
if healingInterval ~= 0 then
|
|
315
350
|
local healing = remainingHealingOverDuration / (1 + buff.remainingDuration / healingInterval)
|
|
316
351
|
source:healTarget(buff[101], healing)
|
|
317
|
-
buff[
|
|
352
|
+
buff[119] = remainingHealingOverDuration - healing
|
|
318
353
|
end
|
|
319
354
|
end
|
|
320
|
-
local healingPerInterval = buff[
|
|
355
|
+
local healingPerInterval = buff[117] or 0
|
|
321
356
|
if remainingHealingOverDuration == 0 or healingPerInterval ~= 0 then
|
|
322
357
|
source:healTarget(buff[101], healingPerInterval)
|
|
323
358
|
end
|
|
@@ -397,14 +432,15 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
397
432
|
local missProbability = parameters and parameters.missProbability or defaultParameters.missProbability
|
|
398
433
|
if missProbability ~= nil then
|
|
399
434
|
missProbability = resolveNumberValue(ability, level, missProbability)
|
|
400
|
-
self[
|
|
435
|
+
self[147] = missProbability
|
|
401
436
|
end
|
|
402
437
|
local buffByTypeId = buffByTypeIdByUnit[_unit]
|
|
403
438
|
if buffByTypeId == nil then
|
|
404
439
|
buffByTypeId = {}
|
|
405
440
|
buffByTypeIdByUnit[_unit] = buffByTypeId
|
|
406
441
|
end
|
|
407
|
-
|
|
442
|
+
self.previousBuff = buffByTypeId[typeId]
|
|
443
|
+
local ____opt_15 = self.previousBuff
|
|
408
444
|
if ____opt_15 ~= nil then
|
|
409
445
|
____opt_15:destroy()
|
|
410
446
|
end
|
|
@@ -441,17 +477,18 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
441
477
|
self[102] = source
|
|
442
478
|
self[103] = duration or 0
|
|
443
479
|
self[104] = uniqueGroup
|
|
444
|
-
self[105] =
|
|
445
|
-
self[106] = BlzGetAbilityStringLevelField(self.handle,
|
|
480
|
+
self[105] = parameters and parameters.destructionSoundPresetId or defaultParameters and defaultParameters.destructionSoundPresetId
|
|
481
|
+
self[106] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_EFFECT, 0)
|
|
482
|
+
self[107] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_SPECIAL, 0)
|
|
446
483
|
if parameters ~= nil or (next(defaultParameters)) ~= nil then
|
|
447
484
|
for ____, buffBooleanParameter in ipairs(buffBooleanParameters) do
|
|
448
|
-
local
|
|
449
|
-
local
|
|
450
|
-
local
|
|
451
|
-
if
|
|
452
|
-
|
|
485
|
+
local ____ability_28 = ability
|
|
486
|
+
local ____level_29 = level
|
|
487
|
+
local ____temp_27 = parameters and parameters[buffBooleanParameter]
|
|
488
|
+
if ____temp_27 == nil then
|
|
489
|
+
____temp_27 = defaultParameters[buffBooleanParameter]
|
|
453
490
|
end
|
|
454
|
-
if resolveBooleanValue(
|
|
491
|
+
if resolveBooleanValue(____ability_28, ____level_29, ____temp_27) then
|
|
455
492
|
self[buffBooleanParameter] = true
|
|
456
493
|
end
|
|
457
494
|
end
|
|
@@ -467,11 +504,11 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
467
504
|
end
|
|
468
505
|
local maximumDuration = parameters and parameters.maximumDuration or defaultParameters.maximumDuration
|
|
469
506
|
if maximumDuration ~= nil then
|
|
470
|
-
self[
|
|
507
|
+
self[109] = resolveNumberValue(ability, level, maximumDuration)
|
|
471
508
|
end
|
|
472
509
|
local maximumRemainingDuration = parameters and parameters.maximumRemainingDuration or defaultParameters.maximumRemainingDuration
|
|
473
510
|
if maximumRemainingDuration ~= nil then
|
|
474
|
-
self[
|
|
511
|
+
self[110] = resolveNumberValue(ability, level, maximumRemainingDuration)
|
|
475
512
|
end
|
|
476
513
|
local parametersAbilityTypeIds = parameters and parameters.abilityTypeIds or defaultParameters.abilityTypeIds
|
|
477
514
|
if parametersAbilityTypeIds ~= nil then
|
|
@@ -481,7 +518,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
481
518
|
self._abilityTypeIds = abilityTypeIds
|
|
482
519
|
end
|
|
483
520
|
for ____, abilityTypeId in ipairs(sortedKeysUnnested(parametersAbilityTypeIds)) do
|
|
484
|
-
local abilityParameters = parametersAbilityTypeIds[abilityTypeId]
|
|
521
|
+
local abilityParameters = checkNotNull(parametersAbilityTypeIds[abilityTypeId])
|
|
485
522
|
local addedAbility = _unit:addAbility(abilityTypeId)
|
|
486
523
|
if addedAbility ~= nil then
|
|
487
524
|
_unit:makeAbilityPermanent(abilityTypeId, true)
|
|
@@ -534,7 +571,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
534
571
|
end
|
|
535
572
|
function Buff.prototype.onAbilityGained(self, ability)
|
|
536
573
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
537
|
-
local abilityCooldownModifier = self[
|
|
574
|
+
local abilityCooldownModifier = self[149]
|
|
538
575
|
if abilityCooldownModifier then
|
|
539
576
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, abilityCooldownModifier)
|
|
540
577
|
end
|
|
@@ -542,7 +579,7 @@ function Buff.prototype.onAbilityGained(self, ability)
|
|
|
542
579
|
end
|
|
543
580
|
function Buff.prototype.onAbilityLost(self, ability)
|
|
544
581
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
545
|
-
local abilityCooldownModifier = self[
|
|
582
|
+
local abilityCooldownModifier = self[149]
|
|
546
583
|
if abilityCooldownModifier then
|
|
547
584
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, abilityCooldownModifier)
|
|
548
585
|
end
|
|
@@ -550,7 +587,7 @@ function Buff.prototype.onAbilityLost(self, ability)
|
|
|
550
587
|
end
|
|
551
588
|
function Buff.prototype.flashEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
552
589
|
self:flash(
|
|
553
|
-
self[
|
|
590
|
+
self[106],
|
|
554
591
|
stringValueByBuffTypeIdByFieldId[fourCC("feft")][self.typeId] or "origin",
|
|
555
592
|
widgetOrXOrParametersOrDuration,
|
|
556
593
|
yOrParametersOrDuration,
|
|
@@ -559,7 +596,7 @@ function Buff.prototype.flashEffect(self, widgetOrXOrParametersOrDuration, yOrPa
|
|
|
559
596
|
end
|
|
560
597
|
function Buff.prototype.flashSpecialEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
561
598
|
self:flash(
|
|
562
|
-
self[
|
|
599
|
+
self[107],
|
|
563
600
|
stringValueByBuffTypeIdByFieldId[fourCC("fspt")][self.typeId] or "origin",
|
|
564
601
|
widgetOrXOrParametersOrDuration,
|
|
565
602
|
yOrParametersOrDuration,
|
|
@@ -571,44 +608,64 @@ function Buff.prototype.flash(self, modelPath, attachmentPoint, widgetOrXOrParam
|
|
|
571
608
|
Effect:flash(modelPath, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
572
609
|
else
|
|
573
610
|
local isWidgetProvided = __TS__InstanceOf(widgetOrXOrParametersOrDuration, Unit) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Item) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Destructable)
|
|
574
|
-
local
|
|
575
|
-
local
|
|
576
|
-
local
|
|
577
|
-
local
|
|
611
|
+
local ____Effect_44 = Effect
|
|
612
|
+
local ____Effect_flash_45 = Effect.flash
|
|
613
|
+
local ____array_43 = __TS__SparseArrayNew(modelPath, isWidgetProvided and widgetOrXOrParametersOrDuration or self._unit, attachmentPoint)
|
|
614
|
+
local ____isWidgetProvided_42
|
|
578
615
|
if isWidgetProvided then
|
|
579
|
-
|
|
616
|
+
____isWidgetProvided_42 = yOrParametersOrDuration
|
|
580
617
|
else
|
|
581
|
-
|
|
618
|
+
____isWidgetProvided_42 = widgetOrXOrParametersOrDuration
|
|
582
619
|
end
|
|
583
|
-
__TS__SparseArrayPush(
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
__TS__SparseArraySpread(
|
|
620
|
+
__TS__SparseArrayPush(____array_43, ____isWidgetProvided_42)
|
|
621
|
+
____Effect_flash_45(
|
|
622
|
+
____Effect_44,
|
|
623
|
+
__TS__SparseArraySpread(____array_43)
|
|
587
624
|
)
|
|
588
625
|
end
|
|
589
626
|
end
|
|
590
627
|
function Buff.prototype.expire(self)
|
|
591
628
|
expireBuff(self)
|
|
592
629
|
end
|
|
630
|
+
function Buff.prototype.dispel(self, source)
|
|
631
|
+
if self.isDestroyed or self[100] ~= 1 then
|
|
632
|
+
return
|
|
633
|
+
end
|
|
634
|
+
self[100] = 2
|
|
635
|
+
do
|
|
636
|
+
pcall(function()
|
|
637
|
+
self:onDispel(source)
|
|
638
|
+
end)
|
|
639
|
+
do
|
|
640
|
+
self:destroy()
|
|
641
|
+
end
|
|
642
|
+
end
|
|
643
|
+
end
|
|
593
644
|
function Buff.prototype.onCreate(self)
|
|
594
645
|
end
|
|
595
646
|
function Buff.prototype.onDestroy(self)
|
|
596
647
|
check(self[100] ~= 0, "Cannot destroy a buff that has not finished creating yet.")
|
|
597
648
|
self[100] = 2
|
|
598
649
|
local unit = self._unit
|
|
650
|
+
local destructionSoundPresetId = self[105]
|
|
651
|
+
if destructionSoundPresetId ~= nil then
|
|
652
|
+
Sound3D:playFromLabel(destructionSoundPresetId, SoundSettings.Ability, unit)
|
|
653
|
+
end
|
|
599
654
|
if getUnitAbility(unit.handle, self.typeId) == self.handle then
|
|
600
655
|
removeBuff(unit.handle, self.typeId)
|
|
656
|
+
else
|
|
657
|
+
removeBuffApplicator(unit.handle, self.typeId)
|
|
601
658
|
end
|
|
602
659
|
buffByTypeIdByUnit[unit][self.typeId] = nil
|
|
603
|
-
local healingIntervalTimer = self[
|
|
660
|
+
local healingIntervalTimer = self[120]
|
|
604
661
|
if healingIntervalTimer ~= nil then
|
|
605
662
|
healingIntervalTimer:destroy()
|
|
606
|
-
self[
|
|
663
|
+
self[120] = nil
|
|
607
664
|
end
|
|
608
|
-
local damageIntervalTimer = self[
|
|
665
|
+
local damageIntervalTimer = self[115]
|
|
609
666
|
if damageIntervalTimer ~= nil then
|
|
610
667
|
damageIntervalTimer:destroy()
|
|
611
|
-
self[
|
|
668
|
+
self[115] = nil
|
|
612
669
|
end
|
|
613
670
|
if self._timer ~= nil then
|
|
614
671
|
self._timer:destroy()
|
|
@@ -618,27 +675,28 @@ function Buff.prototype.onDestroy(self)
|
|
|
618
675
|
behavior:destroy()
|
|
619
676
|
end
|
|
620
677
|
end
|
|
621
|
-
local previousAbilityCooldownModifier = self[
|
|
678
|
+
local previousAbilityCooldownModifier = self[149]
|
|
622
679
|
if previousAbilityCooldownModifier then
|
|
623
680
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
624
681
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
625
682
|
end
|
|
626
683
|
end
|
|
627
|
-
if self[
|
|
684
|
+
if self[144] then
|
|
628
685
|
unit:decrementInvulnerabilityCounter()
|
|
629
686
|
end
|
|
630
|
-
if self[
|
|
687
|
+
if self[143] then
|
|
631
688
|
unit:decrementDisableAutoAttackCounter()
|
|
632
689
|
end
|
|
633
|
-
if self[
|
|
634
|
-
if self[
|
|
690
|
+
if self[141] then
|
|
691
|
+
if self[142] then
|
|
635
692
|
unit:decrementForceStunCounter()
|
|
636
693
|
end
|
|
637
694
|
unit:decrementStunCounter()
|
|
638
695
|
end
|
|
639
|
-
if self[
|
|
696
|
+
if self[140] then
|
|
640
697
|
unit:decrementGhostCounter()
|
|
641
698
|
end
|
|
699
|
+
unshareVisionWithSource(self)
|
|
642
700
|
if self._abilityTypeIds ~= nil then
|
|
643
701
|
for ____, abilityTypeId in ipairs(self._abilityTypeIds) do
|
|
644
702
|
unit:removeAbility(abilityTypeId)
|
|
@@ -673,49 +731,51 @@ function Buff.apply(self, ...)
|
|
|
673
731
|
end
|
|
674
732
|
end
|
|
675
733
|
function Buff.getByTypeId(self, unit, typeId)
|
|
676
|
-
local
|
|
677
|
-
local buff =
|
|
734
|
+
local ____opt_46 = buffByTypeIdByUnit[unit]
|
|
735
|
+
local buff = ____opt_46 and ____opt_46[typeId]
|
|
678
736
|
if __TS__InstanceOf(buff, self) then
|
|
679
737
|
return buff
|
|
680
738
|
end
|
|
681
739
|
return nil
|
|
682
740
|
end
|
|
741
|
+
function Buff.prototype.onDispel(self, source)
|
|
742
|
+
end
|
|
683
743
|
function Buff.prototype.onExpiration(self)
|
|
684
744
|
local unit = self.unit
|
|
685
|
-
if self[120] ~= nil then
|
|
686
|
-
(self[102] or unit):damageTarget(unit, self[120] or 0)
|
|
687
|
-
end
|
|
688
745
|
if self[121] ~= nil then
|
|
689
|
-
(self[102] or unit):
|
|
746
|
+
(self[102] or unit):damageTarget(unit, self[121] or 0)
|
|
690
747
|
end
|
|
691
|
-
if self[
|
|
748
|
+
if self[122] ~= nil then
|
|
749
|
+
(self[102] or unit):healTarget(unit, self[121] or 0)
|
|
750
|
+
end
|
|
751
|
+
if self[146] then
|
|
692
752
|
unit:explode()
|
|
693
|
-
elseif self[
|
|
753
|
+
elseif self[145] then
|
|
694
754
|
unit:kill()
|
|
695
755
|
end
|
|
696
756
|
end
|
|
697
757
|
function Buff.prototype.onDeath(self, source)
|
|
698
758
|
local unit = self.unit
|
|
699
|
-
if self[
|
|
759
|
+
if self[123] ~= nil then
|
|
700
760
|
damageArea(
|
|
701
761
|
self[102] or unit,
|
|
702
|
-
self[
|
|
762
|
+
self[123],
|
|
703
763
|
unit.x,
|
|
704
764
|
unit.y,
|
|
765
|
+
self[125] or 0,
|
|
705
766
|
self[124] or 0,
|
|
706
|
-
self[
|
|
767
|
+
self[127] or 0,
|
|
707
768
|
self[126] or 0,
|
|
708
|
-
self[
|
|
709
|
-
self[128] or 0
|
|
710
|
-
self[127] or 0
|
|
769
|
+
self[129] or 0,
|
|
770
|
+
self[128] or 0
|
|
711
771
|
)
|
|
712
772
|
end
|
|
713
773
|
end
|
|
714
774
|
function Buff.prototype.onDamageDealt(self, target, event)
|
|
715
775
|
if event.isAttack then
|
|
716
|
-
if self[
|
|
717
|
-
local durationIncrease = self[
|
|
718
|
-
local maximumDuration = self[
|
|
776
|
+
if self[108] ~= nil then
|
|
777
|
+
local durationIncrease = self[108]
|
|
778
|
+
local maximumDuration = self[109] or 0
|
|
719
779
|
if maximumDuration > 0 then
|
|
720
780
|
durationIncrease = min(
|
|
721
781
|
durationIncrease,
|
|
@@ -723,43 +783,43 @@ function Buff.prototype.onDamageDealt(self, target, event)
|
|
|
723
783
|
)
|
|
724
784
|
end
|
|
725
785
|
local remainingDuration = self.remainingDuration + durationIncrease
|
|
726
|
-
local maximumRemainingDuration = self[
|
|
786
|
+
local maximumRemainingDuration = self[110] or 0
|
|
727
787
|
if maximumRemainingDuration > 0 then
|
|
728
788
|
remainingDuration = min(remainingDuration, maximumRemainingDuration)
|
|
729
789
|
end
|
|
730
790
|
self.remainingDuration = remainingDuration
|
|
731
791
|
end
|
|
732
|
-
local autoAttackCount = (self[
|
|
733
|
-
self[
|
|
734
|
-
if autoAttackCount == self[
|
|
792
|
+
local autoAttackCount = (self[130] or 0) + 1
|
|
793
|
+
self[130] = autoAttackCount
|
|
794
|
+
if autoAttackCount == self[131] then
|
|
735
795
|
self:destroy()
|
|
736
796
|
end
|
|
737
797
|
end
|
|
738
798
|
if event.originalAmount ~= 0 then
|
|
739
|
-
local damageDealtEventCount = (self[
|
|
740
|
-
self[
|
|
741
|
-
if damageDealtEventCount == self[
|
|
799
|
+
local damageDealtEventCount = (self[132] or 0) + 1
|
|
800
|
+
self[132] = damageDealtEventCount
|
|
801
|
+
if damageDealtEventCount == self[133] then
|
|
742
802
|
self:destroy()
|
|
743
803
|
end
|
|
744
804
|
end
|
|
745
805
|
end
|
|
746
806
|
function Buff.prototype.onDamageReceived(self, source, event)
|
|
747
807
|
if event.originalAmount ~= 0 then
|
|
748
|
-
local absorbedDamage = min(event.amount * (self[
|
|
808
|
+
local absorbedDamage = min(event.amount * (self[136] or 1), (self[137] or 0) - (self[138] or 0))
|
|
749
809
|
if absorbedDamage > 0 then
|
|
750
810
|
event.amount = event.amount - absorbedDamage
|
|
751
|
-
self[
|
|
752
|
-
local
|
|
753
|
-
if
|
|
754
|
-
|
|
811
|
+
self[138] = (self[138] or 0) + absorbedDamage
|
|
812
|
+
local ____self__139_48 = self[139]
|
|
813
|
+
if ____self__139_48 == nil then
|
|
814
|
+
____self__139_48 = true
|
|
755
815
|
end
|
|
756
|
-
if
|
|
816
|
+
if ____self__139_48 and self[138] >= (self[137] or 0) then
|
|
757
817
|
self:destroy()
|
|
758
818
|
end
|
|
759
819
|
end
|
|
760
|
-
local damageReceivedEventCount = (self[
|
|
761
|
-
self[
|
|
762
|
-
if damageReceivedEventCount == self[
|
|
820
|
+
local damageReceivedEventCount = (self[134] or 0) + 1
|
|
821
|
+
self[134] = damageReceivedEventCount
|
|
822
|
+
if damageReceivedEventCount == self[135] then
|
|
763
823
|
self:destroy()
|
|
764
824
|
end
|
|
765
825
|
end
|
|
@@ -786,13 +846,13 @@ __TS__SetDescriptor(
|
|
|
786
846
|
"remainingDamageOverDuration",
|
|
787
847
|
{
|
|
788
848
|
get = function(self)
|
|
789
|
-
return self[
|
|
849
|
+
return self[114] or 0
|
|
790
850
|
end,
|
|
791
851
|
set = function(self, remainingDamageOverDuration)
|
|
792
|
-
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[
|
|
793
|
-
self[
|
|
794
|
-
local damageOverDuration = (self[
|
|
795
|
-
self[
|
|
852
|
+
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[114] or 0)
|
|
853
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
854
|
+
local damageOverDuration = (self[111] or 0) + remainingDamageOverDurationDelta
|
|
855
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
796
856
|
end
|
|
797
857
|
},
|
|
798
858
|
true
|
|
@@ -802,13 +862,13 @@ __TS__SetDescriptor(
|
|
|
802
862
|
"damageOverDuration",
|
|
803
863
|
{
|
|
804
864
|
get = function(self)
|
|
805
|
-
return self[
|
|
865
|
+
return self[111] or 0
|
|
806
866
|
end,
|
|
807
867
|
set = function(self, damageOverDuration)
|
|
808
|
-
local damageOverDurationDelta = damageOverDuration - (self[
|
|
809
|
-
self[
|
|
810
|
-
local remainingDamageOverDuration = (self[
|
|
811
|
-
self[
|
|
868
|
+
local damageOverDurationDelta = damageOverDuration - (self[111] or 0)
|
|
869
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
870
|
+
local remainingDamageOverDuration = (self[114] or 0) + damageOverDurationDelta
|
|
871
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
812
872
|
end
|
|
813
873
|
},
|
|
814
874
|
true
|
|
@@ -818,10 +878,10 @@ __TS__SetDescriptor(
|
|
|
818
878
|
"damagePerInterval",
|
|
819
879
|
{
|
|
820
880
|
get = function(self)
|
|
821
|
-
return self[
|
|
881
|
+
return self[112] or 0
|
|
822
882
|
end,
|
|
823
883
|
set = function(self, damagePerInterval)
|
|
824
|
-
self[
|
|
884
|
+
self[112] = damagePerInterval ~= 0 and damagePerInterval or nil
|
|
825
885
|
end
|
|
826
886
|
},
|
|
827
887
|
true
|
|
@@ -831,25 +891,25 @@ __TS__SetDescriptor(
|
|
|
831
891
|
"damageInterval",
|
|
832
892
|
{
|
|
833
893
|
get = function(self)
|
|
834
|
-
return self[
|
|
894
|
+
return self[113] or 0
|
|
835
895
|
end,
|
|
836
896
|
set = function(self, damageInterval)
|
|
837
897
|
if damageInterval <= 0 then
|
|
838
|
-
self[
|
|
839
|
-
local timer = self[
|
|
898
|
+
self[113] = damageInterval ~= 0 and damageInterval or nil
|
|
899
|
+
local timer = self[115]
|
|
840
900
|
if timer ~= nil then
|
|
841
901
|
timer:destroy()
|
|
842
|
-
self[
|
|
902
|
+
self[115] = nil
|
|
843
903
|
end
|
|
844
904
|
return
|
|
845
905
|
end
|
|
846
|
-
self[
|
|
847
|
-
local
|
|
848
|
-
local elapsed =
|
|
849
|
-
local timer = self[
|
|
906
|
+
self[113] = damageInterval
|
|
907
|
+
local ____opt_49 = self._timer
|
|
908
|
+
local elapsed = ____opt_49 and ____opt_49.elapsed or 0
|
|
909
|
+
local timer = self[115]
|
|
850
910
|
if timer == nil then
|
|
851
911
|
timer = Timer:create()
|
|
852
|
-
self[
|
|
912
|
+
self[115] = timer
|
|
853
913
|
end
|
|
854
914
|
local initialDelay = damageInterval - (elapsed >= damageInterval and math.fmod(elapsed, damageInterval) or elapsed)
|
|
855
915
|
if initialDelay == damageInterval then
|
|
@@ -866,13 +926,13 @@ __TS__SetDescriptor(
|
|
|
866
926
|
"remainingHealingOverDuration",
|
|
867
927
|
{
|
|
868
928
|
get = function(self)
|
|
869
|
-
return self[
|
|
929
|
+
return self[119] or 0
|
|
870
930
|
end,
|
|
871
931
|
set = function(self, remainingHealingOverDuration)
|
|
872
|
-
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[
|
|
873
|
-
self[
|
|
874
|
-
local healingOverDuration = (self[
|
|
875
|
-
self[
|
|
932
|
+
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[119] or 0)
|
|
933
|
+
self[114] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
934
|
+
local healingOverDuration = (self[116] or 0) + remainingHealingOverDurationDelta
|
|
935
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
876
936
|
end
|
|
877
937
|
},
|
|
878
938
|
true
|
|
@@ -882,13 +942,13 @@ __TS__SetDescriptor(
|
|
|
882
942
|
"healingOverDuration",
|
|
883
943
|
{
|
|
884
944
|
get = function(self)
|
|
885
|
-
return self[
|
|
945
|
+
return self[116] or 0
|
|
886
946
|
end,
|
|
887
947
|
set = function(self, healingOverDuration)
|
|
888
|
-
local healingOverDurationDelta = healingOverDuration - (self[
|
|
889
|
-
self[
|
|
890
|
-
local remainingHealingOverDuration = (self[
|
|
891
|
-
self[
|
|
948
|
+
local healingOverDurationDelta = healingOverDuration - (self[116] or 0)
|
|
949
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
950
|
+
local remainingHealingOverDuration = (self[119] or 0) + healingOverDurationDelta
|
|
951
|
+
self[119] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
892
952
|
end
|
|
893
953
|
},
|
|
894
954
|
true
|
|
@@ -898,10 +958,10 @@ __TS__SetDescriptor(
|
|
|
898
958
|
"healingPerInterval",
|
|
899
959
|
{
|
|
900
960
|
get = function(self)
|
|
901
|
-
return self[
|
|
961
|
+
return self[117] or 0
|
|
902
962
|
end,
|
|
903
963
|
set = function(self, healingPerInterval)
|
|
904
|
-
self[
|
|
964
|
+
self[117] = healingPerInterval ~= 0 and healingPerInterval or nil
|
|
905
965
|
end
|
|
906
966
|
},
|
|
907
967
|
true
|
|
@@ -911,25 +971,25 @@ __TS__SetDescriptor(
|
|
|
911
971
|
"healingInterval",
|
|
912
972
|
{
|
|
913
973
|
get = function(self)
|
|
914
|
-
return self[
|
|
974
|
+
return self[118] or 0
|
|
915
975
|
end,
|
|
916
976
|
set = function(self, healingInterval)
|
|
917
977
|
if healingInterval <= 0 then
|
|
918
|
-
self[
|
|
919
|
-
local timer = self[
|
|
978
|
+
self[118] = healingInterval ~= 0 and healingInterval or nil
|
|
979
|
+
local timer = self[120]
|
|
920
980
|
if timer ~= nil then
|
|
921
981
|
timer:destroy()
|
|
922
|
-
self[
|
|
982
|
+
self[120] = nil
|
|
923
983
|
end
|
|
924
984
|
return
|
|
925
985
|
end
|
|
926
|
-
self[
|
|
927
|
-
local
|
|
928
|
-
local elapsed =
|
|
929
|
-
local timer = self[
|
|
986
|
+
self[118] = healingInterval
|
|
987
|
+
local ____opt_51 = self._timer
|
|
988
|
+
local elapsed = ____opt_51 and ____opt_51.elapsed or 0
|
|
989
|
+
local timer = self[120]
|
|
930
990
|
if timer == nil then
|
|
931
991
|
timer = Timer:create()
|
|
932
|
-
self[
|
|
992
|
+
self[120] = timer
|
|
933
993
|
end
|
|
934
994
|
local initialDelay = healingInterval - (elapsed >= healingInterval and math.fmod(elapsed, healingInterval) or elapsed)
|
|
935
995
|
if initialDelay == healingInterval then
|
|
@@ -946,10 +1006,10 @@ __TS__SetDescriptor(
|
|
|
946
1006
|
"damageOnExpiration",
|
|
947
1007
|
{
|
|
948
1008
|
get = function(self)
|
|
949
|
-
return self[
|
|
1009
|
+
return self[121] or 0
|
|
950
1010
|
end,
|
|
951
1011
|
set = function(self, damageOnExpiration)
|
|
952
|
-
self[
|
|
1012
|
+
self[121] = damageOnExpiration ~= 0 and damageOnExpiration or nil
|
|
953
1013
|
end
|
|
954
1014
|
},
|
|
955
1015
|
true
|
|
@@ -959,10 +1019,10 @@ __TS__SetDescriptor(
|
|
|
959
1019
|
"healingOnExpiration",
|
|
960
1020
|
{
|
|
961
1021
|
get = function(self)
|
|
962
|
-
return self[
|
|
1022
|
+
return self[122] or 0
|
|
963
1023
|
end,
|
|
964
1024
|
set = function(self, healingOnExpiration)
|
|
965
|
-
self[
|
|
1025
|
+
self[122] = healingOnExpiration ~= 0 and healingOnExpiration or nil
|
|
966
1026
|
end
|
|
967
1027
|
},
|
|
968
1028
|
true
|
|
@@ -993,6 +1053,19 @@ __TS__SetDescriptor(
|
|
|
993
1053
|
},
|
|
994
1054
|
true
|
|
995
1055
|
)
|
|
1056
|
+
__TS__SetDescriptor(
|
|
1057
|
+
Buff.prototype,
|
|
1058
|
+
"returnedMeleeDamageFactor",
|
|
1059
|
+
{
|
|
1060
|
+
get = function(self)
|
|
1061
|
+
return self:getUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR)
|
|
1062
|
+
end,
|
|
1063
|
+
set = function(self, returnedMeleeDamageFactor)
|
|
1064
|
+
self:addOrUpdateOrRemoveUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR, returnedMeleeDamageFactor)
|
|
1065
|
+
end
|
|
1066
|
+
},
|
|
1067
|
+
true
|
|
1068
|
+
)
|
|
996
1069
|
__TS__SetDescriptor(
|
|
997
1070
|
Buff.prototype,
|
|
998
1071
|
"armorIncrease",
|
|
@@ -1037,19 +1110,19 @@ __TS__SetDescriptor(
|
|
|
1037
1110
|
"turnsIntoGhost",
|
|
1038
1111
|
{
|
|
1039
1112
|
get = function(self)
|
|
1040
|
-
local
|
|
1041
|
-
if
|
|
1042
|
-
|
|
1113
|
+
local ____self__140_53 = self[140]
|
|
1114
|
+
if ____self__140_53 == nil then
|
|
1115
|
+
____self__140_53 = false
|
|
1043
1116
|
end
|
|
1044
|
-
return
|
|
1117
|
+
return ____self__140_53
|
|
1045
1118
|
end,
|
|
1046
1119
|
set = function(self, turnsIntoGhost)
|
|
1047
|
-
if not turnsIntoGhost and self[
|
|
1120
|
+
if not turnsIntoGhost and self[140] then
|
|
1048
1121
|
self.object:decrementGhostCounter()
|
|
1049
|
-
self[
|
|
1050
|
-
elseif turnsIntoGhost and not self[
|
|
1122
|
+
self[140] = nil
|
|
1123
|
+
elseif turnsIntoGhost and not self[140] then
|
|
1051
1124
|
self.object:incrementGhostCounter()
|
|
1052
|
-
self[
|
|
1125
|
+
self[140] = true
|
|
1053
1126
|
end
|
|
1054
1127
|
end
|
|
1055
1128
|
},
|
|
@@ -1060,25 +1133,25 @@ __TS__SetDescriptor(
|
|
|
1060
1133
|
"stuns",
|
|
1061
1134
|
{
|
|
1062
1135
|
get = function(self)
|
|
1063
|
-
local
|
|
1064
|
-
if
|
|
1065
|
-
|
|
1136
|
+
local ____self__141_54 = self[141]
|
|
1137
|
+
if ____self__141_54 == nil then
|
|
1138
|
+
____self__141_54 = false
|
|
1066
1139
|
end
|
|
1067
|
-
return
|
|
1140
|
+
return ____self__141_54
|
|
1068
1141
|
end,
|
|
1069
1142
|
set = function(self, stuns)
|
|
1070
|
-
if not stuns and self[
|
|
1071
|
-
if self[
|
|
1143
|
+
if not stuns and self[141] then
|
|
1144
|
+
if self[142] then
|
|
1072
1145
|
self.object:decrementForceStunCounter()
|
|
1073
1146
|
end
|
|
1074
1147
|
self.object:decrementStunCounter()
|
|
1075
|
-
self[
|
|
1076
|
-
elseif stuns and not self[
|
|
1077
|
-
if self[
|
|
1148
|
+
self[141] = nil
|
|
1149
|
+
elseif stuns and not self[141] then
|
|
1150
|
+
if self[142] then
|
|
1078
1151
|
self.object:incrementForceStunCounter()
|
|
1079
1152
|
end
|
|
1080
1153
|
self.object:incrementStunCounter()
|
|
1081
|
-
self[
|
|
1154
|
+
self[141] = true
|
|
1082
1155
|
end
|
|
1083
1156
|
end
|
|
1084
1157
|
},
|
|
@@ -1089,23 +1162,23 @@ __TS__SetDescriptor(
|
|
|
1089
1162
|
"ignoresStunImmunity",
|
|
1090
1163
|
{
|
|
1091
1164
|
get = function(self)
|
|
1092
|
-
local
|
|
1093
|
-
if
|
|
1094
|
-
|
|
1165
|
+
local ____self__142_55 = self[142]
|
|
1166
|
+
if ____self__142_55 == nil then
|
|
1167
|
+
____self__142_55 = false
|
|
1095
1168
|
end
|
|
1096
|
-
return
|
|
1169
|
+
return ____self__142_55
|
|
1097
1170
|
end,
|
|
1098
1171
|
set = function(self, ignoresStunImmunity)
|
|
1099
|
-
if not ignoresStunImmunity and self[
|
|
1100
|
-
if self[
|
|
1172
|
+
if not ignoresStunImmunity and self[142] then
|
|
1173
|
+
if self[141] then
|
|
1101
1174
|
self.object:decrementForceStunCounter()
|
|
1102
1175
|
end
|
|
1103
|
-
self[
|
|
1104
|
-
elseif ignoresStunImmunity and not self[
|
|
1105
|
-
if self[
|
|
1176
|
+
self[142] = nil
|
|
1177
|
+
elseif ignoresStunImmunity and not self[142] then
|
|
1178
|
+
if self[141] then
|
|
1106
1179
|
self.object:incrementForceStunCounter()
|
|
1107
1180
|
end
|
|
1108
|
-
self[
|
|
1181
|
+
self[142] = true
|
|
1109
1182
|
end
|
|
1110
1183
|
end
|
|
1111
1184
|
},
|
|
@@ -1116,19 +1189,19 @@ __TS__SetDescriptor(
|
|
|
1116
1189
|
"disablesAutoAttack",
|
|
1117
1190
|
{
|
|
1118
1191
|
get = function(self)
|
|
1119
|
-
local
|
|
1120
|
-
if
|
|
1121
|
-
|
|
1192
|
+
local ____self__143_56 = self[143]
|
|
1193
|
+
if ____self__143_56 == nil then
|
|
1194
|
+
____self__143_56 = false
|
|
1122
1195
|
end
|
|
1123
|
-
return
|
|
1196
|
+
return ____self__143_56
|
|
1124
1197
|
end,
|
|
1125
1198
|
set = function(self, disablesAutoAttack)
|
|
1126
|
-
if not disablesAutoAttack and self[
|
|
1199
|
+
if not disablesAutoAttack and self[143] then
|
|
1127
1200
|
self.object:decrementDisableAutoAttackCounter()
|
|
1128
|
-
self[
|
|
1129
|
-
elseif disablesAutoAttack and not self[
|
|
1201
|
+
self[143] = nil
|
|
1202
|
+
elseif disablesAutoAttack and not self[143] then
|
|
1130
1203
|
self.object:incrementDisableAutoAttackCounter()
|
|
1131
|
-
self[
|
|
1204
|
+
self[143] = true
|
|
1132
1205
|
end
|
|
1133
1206
|
end
|
|
1134
1207
|
},
|
|
@@ -1139,19 +1212,19 @@ __TS__SetDescriptor(
|
|
|
1139
1212
|
"providesInvulnerability",
|
|
1140
1213
|
{
|
|
1141
1214
|
get = function(self)
|
|
1142
|
-
local
|
|
1143
|
-
if
|
|
1144
|
-
|
|
1215
|
+
local ____self__144_57 = self[144]
|
|
1216
|
+
if ____self__144_57 == nil then
|
|
1217
|
+
____self__144_57 = false
|
|
1145
1218
|
end
|
|
1146
|
-
return
|
|
1219
|
+
return ____self__144_57
|
|
1147
1220
|
end,
|
|
1148
1221
|
set = function(self, providesInvulnerability)
|
|
1149
|
-
if not providesInvulnerability and self[
|
|
1222
|
+
if not providesInvulnerability and self[144] then
|
|
1150
1223
|
self.object:decrementInvulnerabilityCounter()
|
|
1151
|
-
self[
|
|
1152
|
-
elseif providesInvulnerability and not self[
|
|
1224
|
+
self[144] = nil
|
|
1225
|
+
elseif providesInvulnerability and not self[144] then
|
|
1153
1226
|
self.object:incrementInvulnerabilityCounter()
|
|
1154
|
-
self[
|
|
1227
|
+
self[144] = true
|
|
1155
1228
|
end
|
|
1156
1229
|
end
|
|
1157
1230
|
},
|
|
@@ -1162,17 +1235,17 @@ __TS__SetDescriptor(
|
|
|
1162
1235
|
"killsOnExpiration",
|
|
1163
1236
|
{
|
|
1164
1237
|
get = function(self)
|
|
1165
|
-
local
|
|
1166
|
-
if
|
|
1167
|
-
|
|
1238
|
+
local ____self__145_58 = self[145]
|
|
1239
|
+
if ____self__145_58 == nil then
|
|
1240
|
+
____self__145_58 = false
|
|
1168
1241
|
end
|
|
1169
|
-
return
|
|
1242
|
+
return ____self__145_58
|
|
1170
1243
|
end,
|
|
1171
1244
|
set = function(self, killsOnExpiration)
|
|
1172
|
-
if not killsOnExpiration and self[
|
|
1173
|
-
self[
|
|
1174
|
-
elseif killsOnExpiration and not self[
|
|
1175
|
-
self[
|
|
1245
|
+
if not killsOnExpiration and self[145] then
|
|
1246
|
+
self[145] = nil
|
|
1247
|
+
elseif killsOnExpiration and not self[145] then
|
|
1248
|
+
self[145] = true
|
|
1176
1249
|
end
|
|
1177
1250
|
end
|
|
1178
1251
|
},
|
|
@@ -1183,17 +1256,40 @@ __TS__SetDescriptor(
|
|
|
1183
1256
|
"explodesOnExpiration",
|
|
1184
1257
|
{
|
|
1185
1258
|
get = function(self)
|
|
1186
|
-
local
|
|
1187
|
-
if
|
|
1188
|
-
|
|
1259
|
+
local ____self__146_59 = self[146]
|
|
1260
|
+
if ____self__146_59 == nil then
|
|
1261
|
+
____self__146_59 = false
|
|
1189
1262
|
end
|
|
1190
|
-
return
|
|
1263
|
+
return ____self__146_59
|
|
1191
1264
|
end,
|
|
1192
1265
|
set = function(self, killsOnExpiration)
|
|
1193
|
-
if not killsOnExpiration and self[
|
|
1194
|
-
self[
|
|
1195
|
-
elseif killsOnExpiration and not self[
|
|
1196
|
-
self[
|
|
1266
|
+
if not killsOnExpiration and self[146] then
|
|
1267
|
+
self[146] = nil
|
|
1268
|
+
elseif killsOnExpiration and not self[146] then
|
|
1269
|
+
self[146] = true
|
|
1270
|
+
end
|
|
1271
|
+
end
|
|
1272
|
+
},
|
|
1273
|
+
true
|
|
1274
|
+
)
|
|
1275
|
+
__TS__SetDescriptor(
|
|
1276
|
+
Buff.prototype,
|
|
1277
|
+
"sharesVisionWithSource",
|
|
1278
|
+
{
|
|
1279
|
+
get = function(self)
|
|
1280
|
+
local ____self__150_60 = self[150]
|
|
1281
|
+
if ____self__150_60 == nil then
|
|
1282
|
+
____self__150_60 = false
|
|
1283
|
+
end
|
|
1284
|
+
return ____self__150_60
|
|
1285
|
+
end,
|
|
1286
|
+
set = function(self, sharesVisionWithSource)
|
|
1287
|
+
if not sharesVisionWithSource and self[150] then
|
|
1288
|
+
unshareVisionWithSource(self)
|
|
1289
|
+
self[150] = nil
|
|
1290
|
+
elseif sharesVisionWithSource and not self[150] then
|
|
1291
|
+
self[150] = true
|
|
1292
|
+
shareVisionWithSource(self)
|
|
1197
1293
|
end
|
|
1198
1294
|
end
|
|
1199
1295
|
},
|
|
@@ -1204,13 +1300,13 @@ __TS__SetDescriptor(
|
|
|
1204
1300
|
"maximumDamageDealtEventCount",
|
|
1205
1301
|
{
|
|
1206
1302
|
get = function(self)
|
|
1207
|
-
return self[
|
|
1303
|
+
return self[133] or 0
|
|
1208
1304
|
end,
|
|
1209
1305
|
set = function(self, maximumDamageDealtEventCount)
|
|
1210
1306
|
if maximumDamageDealtEventCount == 0 then
|
|
1211
|
-
self[
|
|
1307
|
+
self[133] = nil
|
|
1212
1308
|
else
|
|
1213
|
-
self[
|
|
1309
|
+
self[133] = maximumDamageDealtEventCount
|
|
1214
1310
|
end
|
|
1215
1311
|
end
|
|
1216
1312
|
},
|
|
@@ -1221,13 +1317,13 @@ __TS__SetDescriptor(
|
|
|
1221
1317
|
"maximumDamageReceivedEventCount",
|
|
1222
1318
|
{
|
|
1223
1319
|
get = function(self)
|
|
1224
|
-
return self[
|
|
1320
|
+
return self[135] or 0
|
|
1225
1321
|
end,
|
|
1226
1322
|
set = function(self, maximumDamageReceivedEventCount)
|
|
1227
1323
|
if maximumDamageReceivedEventCount == 0 then
|
|
1228
|
-
self[
|
|
1324
|
+
self[135] = nil
|
|
1229
1325
|
else
|
|
1230
|
-
self[
|
|
1326
|
+
self[135] = maximumDamageReceivedEventCount
|
|
1231
1327
|
end
|
|
1232
1328
|
end
|
|
1233
1329
|
},
|
|
@@ -1238,13 +1334,13 @@ __TS__SetDescriptor(
|
|
|
1238
1334
|
"maximumAutoAttackCount",
|
|
1239
1335
|
{
|
|
1240
1336
|
get = function(self)
|
|
1241
|
-
return self[
|
|
1337
|
+
return self[131] or 0
|
|
1242
1338
|
end,
|
|
1243
1339
|
set = function(self, maximumAutoAttackCount)
|
|
1244
1340
|
if maximumAutoAttackCount == 0 then
|
|
1245
|
-
self[
|
|
1341
|
+
self[131] = nil
|
|
1246
1342
|
else
|
|
1247
|
-
self[
|
|
1343
|
+
self[131] = maximumAutoAttackCount
|
|
1248
1344
|
end
|
|
1249
1345
|
end
|
|
1250
1346
|
},
|
|
@@ -1255,10 +1351,10 @@ __TS__SetDescriptor(
|
|
|
1255
1351
|
"durationIncreaseOnAutoAttack",
|
|
1256
1352
|
{
|
|
1257
1353
|
get = function(self)
|
|
1258
|
-
return self[
|
|
1354
|
+
return self[108] or 0
|
|
1259
1355
|
end,
|
|
1260
1356
|
set = function(self, durationIncreaseOnAutoAttack)
|
|
1261
|
-
self[
|
|
1357
|
+
self[108] = durationIncreaseOnAutoAttack
|
|
1262
1358
|
end
|
|
1263
1359
|
},
|
|
1264
1360
|
true
|
|
@@ -1342,13 +1438,13 @@ __TS__SetDescriptor(
|
|
|
1342
1438
|
"remainingDuration",
|
|
1343
1439
|
{
|
|
1344
1440
|
get = function(self)
|
|
1345
|
-
local
|
|
1346
|
-
return
|
|
1441
|
+
local ____opt_61 = self._timer
|
|
1442
|
+
return ____opt_61 and ____opt_61.remaining or 0
|
|
1347
1443
|
end,
|
|
1348
1444
|
set = function(self, remainingDuration)
|
|
1349
|
-
local
|
|
1350
|
-
local
|
|
1351
|
-
local remainingDurationDelta =
|
|
1445
|
+
local ____remainingDuration_65 = remainingDuration
|
|
1446
|
+
local ____opt_63 = self._timer
|
|
1447
|
+
local remainingDurationDelta = ____remainingDuration_65 - (____opt_63 and ____opt_63.remaining or 0)
|
|
1352
1448
|
if remainingDurationDelta ~= 0 then
|
|
1353
1449
|
self[103] = self[103] + remainingDurationDelta
|
|
1354
1450
|
if remainingDuration <= 0 then
|
|
@@ -1363,7 +1459,7 @@ __TS__SetDescriptor(
|
|
|
1363
1459
|
remainingDuration,
|
|
1364
1460
|
self._spellStealPriority,
|
|
1365
1461
|
self._learnLevelMinimum,
|
|
1366
|
-
self[
|
|
1462
|
+
self[147]
|
|
1367
1463
|
) then
|
|
1368
1464
|
local timer = self._timer
|
|
1369
1465
|
if timer == nil then
|
|
@@ -1383,13 +1479,13 @@ __TS__SetDescriptor(
|
|
|
1383
1479
|
"absorbedDamageFactor",
|
|
1384
1480
|
{
|
|
1385
1481
|
get = function(self)
|
|
1386
|
-
return self[
|
|
1482
|
+
return self[136] or 1
|
|
1387
1483
|
end,
|
|
1388
1484
|
set = function(self, absorbedDamageFactor)
|
|
1389
1485
|
if absorbedDamageFactor == 1 then
|
|
1390
|
-
self[
|
|
1486
|
+
self[136] = nil
|
|
1391
1487
|
else
|
|
1392
|
-
self[
|
|
1488
|
+
self[136] = absorbedDamageFactor
|
|
1393
1489
|
end
|
|
1394
1490
|
end
|
|
1395
1491
|
},
|
|
@@ -1400,13 +1496,13 @@ __TS__SetDescriptor(
|
|
|
1400
1496
|
"maximumDamageAbsorbed",
|
|
1401
1497
|
{
|
|
1402
1498
|
get = function(self)
|
|
1403
|
-
return self[
|
|
1499
|
+
return self[137] or 0
|
|
1404
1500
|
end,
|
|
1405
1501
|
set = function(self, maximumDamageAbsorbed)
|
|
1406
1502
|
if maximumDamageAbsorbed == 0 then
|
|
1407
|
-
self[
|
|
1503
|
+
self[137] = nil
|
|
1408
1504
|
else
|
|
1409
|
-
self[
|
|
1505
|
+
self[137] = maximumDamageAbsorbed
|
|
1410
1506
|
end
|
|
1411
1507
|
end
|
|
1412
1508
|
},
|
|
@@ -1416,7 +1512,7 @@ __TS__SetDescriptor(
|
|
|
1416
1512
|
Buff.prototype,
|
|
1417
1513
|
"damageAbsorbed",
|
|
1418
1514
|
{get = function(self)
|
|
1419
|
-
return self[
|
|
1515
|
+
return self[138] or 0
|
|
1420
1516
|
end},
|
|
1421
1517
|
true
|
|
1422
1518
|
)
|
|
@@ -1425,20 +1521,20 @@ __TS__SetDescriptor(
|
|
|
1425
1521
|
"destroysOnMaximumDamageAbsorbed",
|
|
1426
1522
|
{
|
|
1427
1523
|
get = function(self)
|
|
1428
|
-
local
|
|
1429
|
-
if
|
|
1430
|
-
|
|
1524
|
+
local ____self__139_66 = self[139]
|
|
1525
|
+
if ____self__139_66 == nil then
|
|
1526
|
+
____self__139_66 = true
|
|
1431
1527
|
end
|
|
1432
|
-
return
|
|
1528
|
+
return ____self__139_66
|
|
1433
1529
|
end,
|
|
1434
1530
|
set = function(self, destroysOnMaximumDamageAbsorbed)
|
|
1435
|
-
local
|
|
1531
|
+
local ____destroysOnMaximumDamageAbsorbed_67
|
|
1436
1532
|
if destroysOnMaximumDamageAbsorbed then
|
|
1437
|
-
|
|
1533
|
+
____destroysOnMaximumDamageAbsorbed_67 = nil
|
|
1438
1534
|
else
|
|
1439
|
-
|
|
1535
|
+
____destroysOnMaximumDamageAbsorbed_67 = false
|
|
1440
1536
|
end
|
|
1441
|
-
self[
|
|
1537
|
+
self[139] = ____destroysOnMaximumDamageAbsorbed_67
|
|
1442
1538
|
end
|
|
1443
1539
|
},
|
|
1444
1540
|
true
|
|
@@ -1448,10 +1544,10 @@ __TS__SetDescriptor(
|
|
|
1448
1544
|
"abilityCooldownFactor",
|
|
1449
1545
|
{
|
|
1450
1546
|
get = function(self)
|
|
1451
|
-
return self[
|
|
1547
|
+
return self[148] or 1
|
|
1452
1548
|
end,
|
|
1453
1549
|
set = function(self, abilityCooldownFactor)
|
|
1454
|
-
local previousAbilityCooldownModifier = self[
|
|
1550
|
+
local previousAbilityCooldownModifier = self[149]
|
|
1455
1551
|
if previousAbilityCooldownModifier then
|
|
1456
1552
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1457
1553
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
@@ -1463,8 +1559,8 @@ __TS__SetDescriptor(
|
|
|
1463
1559
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1464
1560
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, modifier)
|
|
1465
1561
|
end
|
|
1466
|
-
self[
|
|
1467
|
-
self[
|
|
1562
|
+
self[149] = modifier
|
|
1563
|
+
self[148] = abilityCooldownFactor
|
|
1468
1564
|
end
|
|
1469
1565
|
},
|
|
1470
1566
|
true
|
|
@@ -1472,35 +1568,40 @@ __TS__SetDescriptor(
|
|
|
1472
1568
|
Buff.createdEvent = buffCreatedEvent
|
|
1473
1569
|
Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
1474
1570
|
(function(self)
|
|
1475
|
-
local function destroyBuffIfNeeded(buff)
|
|
1476
|
-
|
|
1477
|
-
|
|
1571
|
+
local function destroyBuffIfNeeded(buff, isDispel, source)
|
|
1572
|
+
local currentHandle = getUnitAbility(buff[101].handle, buff.typeId)
|
|
1573
|
+
if currentHandle ~= buff.handle and buff[100] == 1 then
|
|
1574
|
+
if isDispel and currentHandle == nil and buff.unit.isAlive and buff.resistanceType == 1 and (buff._timer == nil or buff.remainingDuration > 0) then
|
|
1575
|
+
buff:dispel(source)
|
|
1576
|
+
else
|
|
1577
|
+
buff:destroy()
|
|
1578
|
+
end
|
|
1478
1579
|
end
|
|
1479
1580
|
end
|
|
1480
|
-
____exports.checkBuff = function(unit, buffTypeId)
|
|
1581
|
+
____exports.checkBuff = function(unit, buffTypeId, isDispel, source)
|
|
1481
1582
|
local buffByTypeId = buffByTypeIdByUnit[unit]
|
|
1482
1583
|
if buffByTypeId ~= nil then
|
|
1483
1584
|
local buff = buffByTypeId[buffTypeId]
|
|
1484
1585
|
if buff ~= nil then
|
|
1485
|
-
destroyBuffIfNeeded(buff)
|
|
1586
|
+
destroyBuffIfNeeded(buff, isDispel, source)
|
|
1486
1587
|
end
|
|
1487
1588
|
end
|
|
1488
1589
|
end
|
|
1489
|
-
____exports.checkBuffs = function(unit)
|
|
1490
|
-
____exports.Buff:forAll(unit, destroyBuffIfNeeded)
|
|
1590
|
+
____exports.checkBuffs = function(unit, isDispel, source)
|
|
1591
|
+
____exports.Buff:forAll(unit, destroyBuffIfNeeded, isDispel, source)
|
|
1491
1592
|
end
|
|
1492
1593
|
Unit.abilityChannelingStartEvent:addListener(
|
|
1493
1594
|
0,
|
|
1494
1595
|
function(caster)
|
|
1495
|
-
____exports.checkBuffs(caster)
|
|
1496
|
-
Timer:run(____exports.checkBuffs, caster)
|
|
1596
|
+
____exports.checkBuffs(caster, true, caster)
|
|
1597
|
+
Timer:run(____exports.checkBuffs, caster, true, caster)
|
|
1497
1598
|
end
|
|
1498
1599
|
)
|
|
1499
1600
|
Unit.abilityUnitTargetChannelingStartEvent:addListener(
|
|
1500
1601
|
0,
|
|
1501
1602
|
function(caster, ability, target)
|
|
1502
|
-
____exports.checkBuffs(target)
|
|
1503
|
-
Timer:run(____exports.checkBuffs, target)
|
|
1603
|
+
____exports.checkBuffs(target, true, caster)
|
|
1604
|
+
Timer:run(____exports.checkBuffs, target, true, caster)
|
|
1504
1605
|
end
|
|
1505
1606
|
)
|
|
1506
1607
|
Unit.abilityPointTargetChannelingStartEvent:addListener(
|
|
@@ -1511,17 +1612,46 @@ Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
|
1511
1612
|
y,
|
|
1512
1613
|
ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1513
1614
|
)
|
|
1514
|
-
forEach(units, ____exports.checkBuffs)
|
|
1515
|
-
Timer:run(
|
|
1615
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1616
|
+
Timer:run(
|
|
1617
|
+
forEach,
|
|
1618
|
+
units,
|
|
1619
|
+
____exports.checkBuffs,
|
|
1620
|
+
true,
|
|
1621
|
+
caster
|
|
1622
|
+
)
|
|
1623
|
+
end
|
|
1624
|
+
)
|
|
1625
|
+
Unit.abilityNoTargetChannelingStartEvent:addListener(
|
|
1626
|
+
0,
|
|
1627
|
+
function(caster, ability)
|
|
1628
|
+
local radius = ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1629
|
+
if radius > 0 then
|
|
1630
|
+
local units = Unit:getInCollisionRange(caster.x, caster.y, radius)
|
|
1631
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1632
|
+
Timer:run(
|
|
1633
|
+
forEach,
|
|
1634
|
+
units,
|
|
1635
|
+
____exports.checkBuffs,
|
|
1636
|
+
true,
|
|
1637
|
+
caster
|
|
1638
|
+
)
|
|
1639
|
+
end
|
|
1516
1640
|
end
|
|
1517
1641
|
)
|
|
1518
1642
|
Unit.onDamage:addListener(
|
|
1519
1643
|
0,
|
|
1520
1644
|
function(source, target)
|
|
1521
1645
|
if source ~= nil then
|
|
1522
|
-
____exports.checkBuffs
|
|
1646
|
+
Timer:run(____exports.checkBuffs, source, false)
|
|
1523
1647
|
end
|
|
1524
|
-
____exports.checkBuffs
|
|
1648
|
+
Timer:run(____exports.checkBuffs, target, false)
|
|
1649
|
+
end
|
|
1650
|
+
)
|
|
1651
|
+
Unit.deathEvent:addListener(
|
|
1652
|
+
-999999,
|
|
1653
|
+
function(unit)
|
|
1654
|
+
____exports.Buff:forAll(unit, destroyBuffOnDeath)
|
|
1525
1655
|
end
|
|
1526
1656
|
)
|
|
1527
1657
|
buffCreatedEvent:addListener(function(buff)
|