warscript 0.0.1-dev.5abc199 → 0.0.1-dev.5bc80ec
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 +16 -2
- package/core/types/frame.lua +128 -67
- 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 +7 -6
- package/core/types/player.d.ts +2 -1
- package/core/types/player.lua +18 -13
- 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 +13 -5
- 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 +92 -53
- package/engine/buff.lua +427 -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.lua +12 -0
- package/engine/internal/object-data/armor-bonus.d.ts +2 -0
- package/engine/internal/object-data/attribute-bonus.lua +2 -2
- package/engine/internal/object-data/health-bonus.d.ts +2 -0
- package/engine/internal/object-data/health-bonus.lua +16 -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/mana-bonus.d.ts +2 -0
- package/engine/internal/object-data/mana-bonus.lua +16 -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 +15 -0
- package/engine/internal/unit/bonus.lua +103 -8
- 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+ability.d.ts +2 -1
- package/engine/internal/unit+ability.lua +73 -2
- package/engine/internal/unit+bonus.lua +3 -3
- 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 +58 -32
- package/engine/internal/unit-missile-launch.lua +13 -13
- package/engine/internal/unit.d.ts +2 -10
- package/engine/internal/unit.lua +53 -100
- 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/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/armor-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/{armor-increase.lua → armor-bonus.lua} +9 -9
- 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/{armor-increase.d.ts → healing-modifier.d.ts} +4 -3
- 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/health-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/health-bonus.lua +26 -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-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/mana-bonus.lua +26 -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 +259 -47
- 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/unit.d.ts +5 -1
- package/engine/unit.lua +5 -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/internal/{object-data/armor-increase.d.ts → misc/unit-ability-level-natives.d.ts} +0 -0
- /package/engine/internal/object-data/{armor-increase.lua → armor-bonus.lua} +0 -0
- /package/engine/object-data/entry/ability-type/{attribute-increase.d.ts → attribute-bonus.d.ts} +0 -0
- /package/engine/object-data/entry/ability-type/{attribute-increase.lua → attribute-bonus.lua} +0 -0
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 = {}
|
|
@@ -103,7 +107,8 @@ local buffParametersKeys = {
|
|
|
103
107
|
damageIncrease = true,
|
|
104
108
|
damageIncreaseFactor = true,
|
|
105
109
|
armorIncrease = true,
|
|
106
|
-
|
|
110
|
+
maxHealthIncrease = true,
|
|
111
|
+
maxManaIncrease = true,
|
|
107
112
|
attackSpeedIncreaseFactor = true,
|
|
108
113
|
movementSpeedIncreaseFactor = true,
|
|
109
114
|
manaRegenerationRateIncreaseFactor = true,
|
|
@@ -111,6 +116,7 @@ local buffParametersKeys = {
|
|
|
111
116
|
missProbability = true,
|
|
112
117
|
damageFactor = true,
|
|
113
118
|
receivedDamageFactor = true,
|
|
119
|
+
returnedMeleeDamageFactor = true,
|
|
114
120
|
receivedMagicDamageFactor = true,
|
|
115
121
|
durationIncreaseOnAutoAttack = true,
|
|
116
122
|
maximumDuration = true,
|
|
@@ -126,7 +132,11 @@ local buffParametersKeys = {
|
|
|
126
132
|
maximumAutoAttackCount = true,
|
|
127
133
|
maximumDamageDealtEventCount = true,
|
|
128
134
|
maximumDamageReceivedEventCount = true,
|
|
135
|
+
absorbedDamageFactor = true,
|
|
136
|
+
maximumDamageAbsorbed = true,
|
|
137
|
+
destroysOnMaximumDamageAbsorbed = true,
|
|
129
138
|
uniqueGroup = true,
|
|
139
|
+
destructionSoundPresetId = true,
|
|
130
140
|
damageOnExpiration = true,
|
|
131
141
|
healingOnExpiration = true,
|
|
132
142
|
killsOnExpiration = true,
|
|
@@ -182,6 +192,7 @@ local function resolveAndSetNumberValue(buff, property, ability, level, value, d
|
|
|
182
192
|
end
|
|
183
193
|
end
|
|
184
194
|
local buffBooleanParameters = {
|
|
195
|
+
"destroysOnMaximumDamageAbsorbed",
|
|
185
196
|
"turnsIntoGhost",
|
|
186
197
|
"stuns",
|
|
187
198
|
"ignoresStunImmunity",
|
|
@@ -197,8 +208,11 @@ local buffNumberParameters = {
|
|
|
197
208
|
"manaRegenerationRateIncreaseFactor",
|
|
198
209
|
"evasionProbability",
|
|
199
210
|
"armorIncrease",
|
|
211
|
+
"maxHealthIncrease",
|
|
212
|
+
"maxManaIncrease",
|
|
200
213
|
"damageFactor",
|
|
201
214
|
"receivedDamageFactor",
|
|
215
|
+
"returnedMeleeDamageFactor",
|
|
202
216
|
"maximumAutoAttackCount",
|
|
203
217
|
"maximumDamageDealtEventCount",
|
|
204
218
|
"maximumDamageReceivedEventCount",
|
|
@@ -210,6 +224,8 @@ local buffNumberParameters = {
|
|
|
210
224
|
"healingOverDuration",
|
|
211
225
|
"damageOnExpiration",
|
|
212
226
|
"healingOnExpiration",
|
|
227
|
+
"absorbedDamageFactor",
|
|
228
|
+
"maximumDamageAbsorbed",
|
|
213
229
|
"abilityCooldownFactor"
|
|
214
230
|
}
|
|
215
231
|
local unsuccessfulApplicationMarker = {}
|
|
@@ -245,17 +261,21 @@ local function destroyBuff(buff)
|
|
|
245
261
|
buff:destroy()
|
|
246
262
|
end
|
|
247
263
|
local function expireBuff(buff)
|
|
248
|
-
|
|
249
|
-
|
|
264
|
+
if buff.isDestroyed or buff[100] ~= 1 then
|
|
265
|
+
return
|
|
266
|
+
end
|
|
267
|
+
buff[100] = 2
|
|
268
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
269
|
+
local remainingHealingOverDuration = buff[114] or 0
|
|
250
270
|
if remainingDamageOverDuration ~= 0 or remainingHealingOverDuration ~= 0 then
|
|
251
271
|
buff:flashSpecialEffect()
|
|
252
272
|
if remainingDamageOverDuration ~= 0 then
|
|
253
273
|
(buff[102] or buff[101]):damageTarget(buff[101], remainingDamageOverDuration)
|
|
254
|
-
buff[
|
|
274
|
+
buff[114] = nil
|
|
255
275
|
end
|
|
256
276
|
if remainingHealingOverDuration ~= 0 then
|
|
257
277
|
(buff[102] or buff[101]):healTarget(buff[101], remainingHealingOverDuration)
|
|
258
|
-
buff[
|
|
278
|
+
buff[119] = nil
|
|
259
279
|
end
|
|
260
280
|
end
|
|
261
281
|
Timer:run(destroyBuff, buff)
|
|
@@ -263,8 +283,8 @@ local function expireBuff(buff)
|
|
|
263
283
|
end
|
|
264
284
|
local function buffDamageIntervalInitialTimerCallback(buff)
|
|
265
285
|
buffDamageIntervalTimerCallback(buff)
|
|
266
|
-
local timer = buff[
|
|
267
|
-
local damageInterval = buff[
|
|
286
|
+
local timer = buff[115]
|
|
287
|
+
local damageInterval = buff[113]
|
|
268
288
|
if timer ~= nil and damageInterval ~= nil and damageInterval > 0 then
|
|
269
289
|
timer:start(damageInterval, true, buffDamageIntervalTimerCallback, buff)
|
|
270
290
|
end
|
|
@@ -272,43 +292,43 @@ end
|
|
|
272
292
|
buffDamageIntervalTimerCallback = function(buff)
|
|
273
293
|
buff:flashSpecialEffect()
|
|
274
294
|
local source = buff[102] or buff[101]
|
|
275
|
-
local remainingDamageOverDuration = buff[
|
|
295
|
+
local remainingDamageOverDuration = buff[114] or 0
|
|
276
296
|
if remainingDamageOverDuration ~= 0 then
|
|
277
|
-
local damageInterval = buff[
|
|
297
|
+
local damageInterval = buff[113] or 0
|
|
278
298
|
if damageInterval ~= 0 then
|
|
279
299
|
local damage = remainingDamageOverDuration / (1 + buff.remainingDuration / damageInterval)
|
|
280
300
|
source:damageTarget(buff[101], damage)
|
|
281
|
-
buff[
|
|
301
|
+
buff[114] = remainingDamageOverDuration - damage
|
|
282
302
|
end
|
|
283
303
|
end
|
|
284
|
-
local damagePerInterval = buff[
|
|
304
|
+
local damagePerInterval = buff[112] or 0
|
|
285
305
|
if remainingDamageOverDuration == 0 or damagePerInterval ~= 0 then
|
|
286
306
|
source:damageTarget(buff[101], damagePerInterval)
|
|
287
307
|
end
|
|
288
308
|
end
|
|
289
309
|
local function buffHealingIntervalInitialTimerCallback(buff)
|
|
290
310
|
buffHealingIntervalTimerCallback(buff)
|
|
291
|
-
local timer = buff[
|
|
292
|
-
local healingInterval = buff[
|
|
311
|
+
local timer = buff[120]
|
|
312
|
+
local healingInterval = buff[118]
|
|
293
313
|
if timer ~= nil and healingInterval ~= nil and healingInterval > 0 then
|
|
294
314
|
timer:start(healingInterval, true, buffHealingIntervalTimerCallback, buff)
|
|
295
315
|
end
|
|
296
316
|
end
|
|
297
317
|
buffHealingIntervalTimerCallback = function(buff)
|
|
298
|
-
if buff[
|
|
318
|
+
if buff[118] ~= buff[113] then
|
|
299
319
|
buff:flashSpecialEffect()
|
|
300
320
|
end
|
|
301
321
|
local source = buff[102] or buff[101]
|
|
302
|
-
local remainingHealingOverDuration = buff[
|
|
322
|
+
local remainingHealingOverDuration = buff[119] or 0
|
|
303
323
|
if remainingHealingOverDuration ~= 0 then
|
|
304
|
-
local healingInterval = buff[
|
|
324
|
+
local healingInterval = buff[118] or 0
|
|
305
325
|
if healingInterval ~= 0 then
|
|
306
326
|
local healing = remainingHealingOverDuration / (1 + buff.remainingDuration / healingInterval)
|
|
307
327
|
source:healTarget(buff[101], healing)
|
|
308
|
-
buff[
|
|
328
|
+
buff[119] = remainingHealingOverDuration - healing
|
|
309
329
|
end
|
|
310
330
|
end
|
|
311
|
-
local healingPerInterval = buff[
|
|
331
|
+
local healingPerInterval = buff[117] or 0
|
|
312
332
|
if remainingHealingOverDuration == 0 or healingPerInterval ~= 0 then
|
|
313
333
|
source:healTarget(buff[101], healingPerInterval)
|
|
314
334
|
end
|
|
@@ -388,14 +408,15 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
388
408
|
local missProbability = parameters and parameters.missProbability or defaultParameters.missProbability
|
|
389
409
|
if missProbability ~= nil then
|
|
390
410
|
missProbability = resolveNumberValue(ability, level, missProbability)
|
|
391
|
-
self[
|
|
411
|
+
self[147] = missProbability
|
|
392
412
|
end
|
|
393
413
|
local buffByTypeId = buffByTypeIdByUnit[_unit]
|
|
394
414
|
if buffByTypeId == nil then
|
|
395
415
|
buffByTypeId = {}
|
|
396
416
|
buffByTypeIdByUnit[_unit] = buffByTypeId
|
|
397
417
|
end
|
|
398
|
-
|
|
418
|
+
self.previousBuff = buffByTypeId[typeId]
|
|
419
|
+
local ____opt_15 = self.previousBuff
|
|
399
420
|
if ____opt_15 ~= nil then
|
|
400
421
|
____opt_15:destroy()
|
|
401
422
|
end
|
|
@@ -432,17 +453,18 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
432
453
|
self[102] = source
|
|
433
454
|
self[103] = duration or 0
|
|
434
455
|
self[104] = uniqueGroup
|
|
435
|
-
self[105] =
|
|
436
|
-
self[106] = BlzGetAbilityStringLevelField(self.handle,
|
|
456
|
+
self[105] = parameters and parameters.destructionSoundPresetId or defaultParameters and defaultParameters.destructionSoundPresetId
|
|
457
|
+
self[106] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_EFFECT, 0)
|
|
458
|
+
self[107] = BlzGetAbilityStringLevelField(self.handle, ABILITY_SLF_SPECIAL, 0)
|
|
437
459
|
if parameters ~= nil or (next(defaultParameters)) ~= nil then
|
|
438
460
|
for ____, buffBooleanParameter in ipairs(buffBooleanParameters) do
|
|
439
|
-
local
|
|
440
|
-
local
|
|
441
|
-
local
|
|
442
|
-
if
|
|
443
|
-
|
|
461
|
+
local ____ability_28 = ability
|
|
462
|
+
local ____level_29 = level
|
|
463
|
+
local ____temp_27 = parameters and parameters[buffBooleanParameter]
|
|
464
|
+
if ____temp_27 == nil then
|
|
465
|
+
____temp_27 = defaultParameters[buffBooleanParameter]
|
|
444
466
|
end
|
|
445
|
-
if resolveBooleanValue(
|
|
467
|
+
if resolveBooleanValue(____ability_28, ____level_29, ____temp_27) then
|
|
446
468
|
self[buffBooleanParameter] = true
|
|
447
469
|
end
|
|
448
470
|
end
|
|
@@ -458,11 +480,11 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
458
480
|
end
|
|
459
481
|
local maximumDuration = parameters and parameters.maximumDuration or defaultParameters.maximumDuration
|
|
460
482
|
if maximumDuration ~= nil then
|
|
461
|
-
self[
|
|
483
|
+
self[109] = resolveNumberValue(ability, level, maximumDuration)
|
|
462
484
|
end
|
|
463
485
|
local maximumRemainingDuration = parameters and parameters.maximumRemainingDuration or defaultParameters.maximumRemainingDuration
|
|
464
486
|
if maximumRemainingDuration ~= nil then
|
|
465
|
-
self[
|
|
487
|
+
self[110] = resolveNumberValue(ability, level, maximumRemainingDuration)
|
|
466
488
|
end
|
|
467
489
|
local parametersAbilityTypeIds = parameters and parameters.abilityTypeIds or defaultParameters.abilityTypeIds
|
|
468
490
|
if parametersAbilityTypeIds ~= nil then
|
|
@@ -472,7 +494,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
472
494
|
self._abilityTypeIds = abilityTypeIds
|
|
473
495
|
end
|
|
474
496
|
for ____, abilityTypeId in ipairs(sortedKeysUnnested(parametersAbilityTypeIds)) do
|
|
475
|
-
local abilityParameters = parametersAbilityTypeIds[abilityTypeId]
|
|
497
|
+
local abilityParameters = checkNotNull(parametersAbilityTypeIds[abilityTypeId])
|
|
476
498
|
local addedAbility = _unit:addAbility(abilityTypeId)
|
|
477
499
|
if addedAbility ~= nil then
|
|
478
500
|
_unit:makeAbilityPermanent(abilityTypeId, true)
|
|
@@ -525,7 +547,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
|
|
|
525
547
|
end
|
|
526
548
|
function Buff.prototype.onAbilityGained(self, ability)
|
|
527
549
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
528
|
-
local abilityCooldownModifier = self[
|
|
550
|
+
local abilityCooldownModifier = self[149]
|
|
529
551
|
if abilityCooldownModifier then
|
|
530
552
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, abilityCooldownModifier)
|
|
531
553
|
end
|
|
@@ -533,80 +555,93 @@ function Buff.prototype.onAbilityGained(self, ability)
|
|
|
533
555
|
end
|
|
534
556
|
function Buff.prototype.onAbilityLost(self, ability)
|
|
535
557
|
if __TS__InstanceOf(ability, UnitAbility) then
|
|
536
|
-
local abilityCooldownModifier = self[
|
|
558
|
+
local abilityCooldownModifier = self[149]
|
|
537
559
|
if abilityCooldownModifier then
|
|
538
560
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, abilityCooldownModifier)
|
|
539
561
|
end
|
|
540
562
|
end
|
|
541
563
|
end
|
|
542
564
|
function Buff.prototype.flashEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
565
|
+
self:flash(
|
|
566
|
+
self[106],
|
|
567
|
+
stringValueByBuffTypeIdByFieldId[fourCC("feft")][self.typeId] or "origin",
|
|
568
|
+
widgetOrXOrParametersOrDuration,
|
|
569
|
+
yOrParametersOrDuration,
|
|
570
|
+
parametersOrDuration
|
|
571
|
+
)
|
|
572
|
+
end
|
|
573
|
+
function Buff.prototype.flashSpecialEffect(self, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
574
|
+
self:flash(
|
|
575
|
+
self[107],
|
|
576
|
+
stringValueByBuffTypeIdByFieldId[fourCC("fspt")][self.typeId] or "origin",
|
|
577
|
+
widgetOrXOrParametersOrDuration,
|
|
578
|
+
yOrParametersOrDuration,
|
|
579
|
+
parametersOrDuration
|
|
580
|
+
)
|
|
581
|
+
end
|
|
582
|
+
function Buff.prototype.flash(self, modelPath, attachmentPoint, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
543
583
|
if type(widgetOrXOrParametersOrDuration) == "number" and type(yOrParametersOrDuration) == "number" then
|
|
544
|
-
Effect:flash(
|
|
584
|
+
Effect:flash(modelPath, widgetOrXOrParametersOrDuration, yOrParametersOrDuration, parametersOrDuration)
|
|
545
585
|
else
|
|
546
586
|
local isWidgetProvided = __TS__InstanceOf(widgetOrXOrParametersOrDuration, Unit) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Item) or __TS__InstanceOf(widgetOrXOrParametersOrDuration, Destructable)
|
|
547
|
-
local
|
|
548
|
-
local
|
|
549
|
-
local
|
|
550
|
-
|
|
551
|
-
isWidgetProvided and widgetOrXOrParametersOrDuration or self._unit,
|
|
552
|
-
stringValueByBuffTypeIdByFieldId[fourCC("feft")][self.typeId] or "origin"
|
|
553
|
-
)
|
|
554
|
-
local ____isWidgetProvided_38
|
|
587
|
+
local ____Effect_44 = Effect
|
|
588
|
+
local ____Effect_flash_45 = Effect.flash
|
|
589
|
+
local ____array_43 = __TS__SparseArrayNew(modelPath, isWidgetProvided and widgetOrXOrParametersOrDuration or self._unit, attachmentPoint)
|
|
590
|
+
local ____isWidgetProvided_42
|
|
555
591
|
if isWidgetProvided then
|
|
556
|
-
|
|
592
|
+
____isWidgetProvided_42 = yOrParametersOrDuration
|
|
557
593
|
else
|
|
558
|
-
|
|
594
|
+
____isWidgetProvided_42 = widgetOrXOrParametersOrDuration
|
|
559
595
|
end
|
|
560
|
-
__TS__SparseArrayPush(
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
__TS__SparseArraySpread(
|
|
596
|
+
__TS__SparseArrayPush(____array_43, ____isWidgetProvided_42)
|
|
597
|
+
____Effect_flash_45(
|
|
598
|
+
____Effect_44,
|
|
599
|
+
__TS__SparseArraySpread(____array_43)
|
|
564
600
|
)
|
|
565
601
|
end
|
|
566
602
|
end
|
|
567
|
-
function Buff.prototype.flashSpecialEffect(self, widgetOrDuration, duration)
|
|
568
|
-
local isWidgetProvided = type(widgetOrDuration) == "table"
|
|
569
|
-
local ____Effect_44 = Effect
|
|
570
|
-
local ____Effect_flash_45 = Effect.flash
|
|
571
|
-
local ____array_43 = __TS__SparseArrayNew(
|
|
572
|
-
self[106],
|
|
573
|
-
isWidgetProvided and widgetOrDuration or self._unit,
|
|
574
|
-
stringValueByBuffTypeIdByFieldId[fourCC("fspt")][self.typeId] or "origin"
|
|
575
|
-
)
|
|
576
|
-
local ____isWidgetProvided_42
|
|
577
|
-
if isWidgetProvided then
|
|
578
|
-
____isWidgetProvided_42 = duration
|
|
579
|
-
else
|
|
580
|
-
____isWidgetProvided_42 = widgetOrDuration
|
|
581
|
-
end
|
|
582
|
-
__TS__SparseArrayPush(____array_43, ____isWidgetProvided_42)
|
|
583
|
-
____Effect_flash_45(
|
|
584
|
-
____Effect_44,
|
|
585
|
-
__TS__SparseArraySpread(____array_43)
|
|
586
|
-
)
|
|
587
|
-
end
|
|
588
603
|
function Buff.prototype.expire(self)
|
|
589
604
|
expireBuff(self)
|
|
590
605
|
end
|
|
606
|
+
function Buff.prototype.dispel(self, source)
|
|
607
|
+
if self.isDestroyed or self[100] ~= 1 then
|
|
608
|
+
return
|
|
609
|
+
end
|
|
610
|
+
self[100] = 2
|
|
611
|
+
do
|
|
612
|
+
pcall(function()
|
|
613
|
+
self:onDispel(source)
|
|
614
|
+
end)
|
|
615
|
+
do
|
|
616
|
+
self:destroy()
|
|
617
|
+
end
|
|
618
|
+
end
|
|
619
|
+
end
|
|
591
620
|
function Buff.prototype.onCreate(self)
|
|
592
621
|
end
|
|
593
622
|
function Buff.prototype.onDestroy(self)
|
|
594
623
|
check(self[100] ~= 0, "Cannot destroy a buff that has not finished creating yet.")
|
|
595
624
|
self[100] = 2
|
|
596
625
|
local unit = self._unit
|
|
626
|
+
local destructionSoundPresetId = self[105]
|
|
627
|
+
if destructionSoundPresetId ~= nil then
|
|
628
|
+
Sound3D:playFromLabel(destructionSoundPresetId, SoundSettings.Ability, unit)
|
|
629
|
+
end
|
|
597
630
|
if getUnitAbility(unit.handle, self.typeId) == self.handle then
|
|
598
631
|
removeBuff(unit.handle, self.typeId)
|
|
632
|
+
else
|
|
633
|
+
removeBuffApplicator(unit.handle, self.typeId)
|
|
599
634
|
end
|
|
600
635
|
buffByTypeIdByUnit[unit][self.typeId] = nil
|
|
601
|
-
local healingIntervalTimer = self[
|
|
636
|
+
local healingIntervalTimer = self[120]
|
|
602
637
|
if healingIntervalTimer ~= nil then
|
|
603
638
|
healingIntervalTimer:destroy()
|
|
604
|
-
self[
|
|
639
|
+
self[120] = nil
|
|
605
640
|
end
|
|
606
|
-
local damageIntervalTimer = self[
|
|
641
|
+
local damageIntervalTimer = self[115]
|
|
607
642
|
if damageIntervalTimer ~= nil then
|
|
608
643
|
damageIntervalTimer:destroy()
|
|
609
|
-
self[
|
|
644
|
+
self[115] = nil
|
|
610
645
|
end
|
|
611
646
|
if self._timer ~= nil then
|
|
612
647
|
self._timer:destroy()
|
|
@@ -616,25 +651,25 @@ function Buff.prototype.onDestroy(self)
|
|
|
616
651
|
behavior:destroy()
|
|
617
652
|
end
|
|
618
653
|
end
|
|
619
|
-
local previousAbilityCooldownModifier = self[
|
|
654
|
+
local previousAbilityCooldownModifier = self[149]
|
|
620
655
|
if previousAbilityCooldownModifier then
|
|
621
656
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
622
657
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
623
658
|
end
|
|
624
659
|
end
|
|
625
|
-
if self[
|
|
660
|
+
if self[144] then
|
|
626
661
|
unit:decrementInvulnerabilityCounter()
|
|
627
662
|
end
|
|
628
|
-
if self[
|
|
663
|
+
if self[143] then
|
|
629
664
|
unit:decrementDisableAutoAttackCounter()
|
|
630
665
|
end
|
|
631
|
-
if self[
|
|
632
|
-
if self[
|
|
666
|
+
if self[141] then
|
|
667
|
+
if self[142] then
|
|
633
668
|
unit:decrementForceStunCounter()
|
|
634
669
|
end
|
|
635
670
|
unit:decrementStunCounter()
|
|
636
671
|
end
|
|
637
|
-
if self[
|
|
672
|
+
if self[140] then
|
|
638
673
|
unit:decrementGhostCounter()
|
|
639
674
|
end
|
|
640
675
|
if self._abilityTypeIds ~= nil then
|
|
@@ -678,42 +713,44 @@ function Buff.getByTypeId(self, unit, typeId)
|
|
|
678
713
|
end
|
|
679
714
|
return nil
|
|
680
715
|
end
|
|
716
|
+
function Buff.prototype.onDispel(self, source)
|
|
717
|
+
end
|
|
681
718
|
function Buff.prototype.onExpiration(self)
|
|
682
719
|
local unit = self.unit
|
|
683
|
-
if self[120] ~= nil then
|
|
684
|
-
(self[102] or unit):damageTarget(unit, self[120] or 0)
|
|
685
|
-
end
|
|
686
720
|
if self[121] ~= nil then
|
|
687
|
-
(self[102] or unit):
|
|
721
|
+
(self[102] or unit):damageTarget(unit, self[121] or 0)
|
|
688
722
|
end
|
|
689
|
-
if self[
|
|
723
|
+
if self[122] ~= nil then
|
|
724
|
+
(self[102] or unit):healTarget(unit, self[121] or 0)
|
|
725
|
+
end
|
|
726
|
+
if self[146] then
|
|
690
727
|
unit:explode()
|
|
691
|
-
elseif self[
|
|
728
|
+
elseif self[145] then
|
|
692
729
|
unit:kill()
|
|
693
730
|
end
|
|
694
731
|
end
|
|
695
732
|
function Buff.prototype.onDeath(self, source)
|
|
696
733
|
local unit = self.unit
|
|
697
|
-
if self[
|
|
734
|
+
if self[123] ~= nil then
|
|
698
735
|
damageArea(
|
|
699
736
|
self[102] or unit,
|
|
700
|
-
self[
|
|
737
|
+
self[123],
|
|
701
738
|
unit.x,
|
|
702
739
|
unit.y,
|
|
740
|
+
self[125] or 0,
|
|
703
741
|
self[124] or 0,
|
|
704
|
-
self[
|
|
742
|
+
self[127] or 0,
|
|
705
743
|
self[126] or 0,
|
|
706
|
-
self[
|
|
707
|
-
self[128] or 0
|
|
708
|
-
self[127] or 0
|
|
744
|
+
self[129] or 0,
|
|
745
|
+
self[128] or 0
|
|
709
746
|
)
|
|
710
747
|
end
|
|
711
748
|
end
|
|
712
749
|
function Buff.prototype.onDamageDealt(self, target, event)
|
|
713
750
|
if event.isAttack then
|
|
714
|
-
if self[
|
|
715
|
-
local durationIncrease = self[
|
|
716
|
-
local maximumDuration = self[
|
|
751
|
+
if self[108] ~= nil then
|
|
752
|
+
local durationIncrease = self[108]
|
|
753
|
+
local maximumDuration = self[109] or 0
|
|
717
754
|
if maximumDuration > 0 then
|
|
718
755
|
durationIncrease = min(
|
|
719
756
|
durationIncrease,
|
|
@@ -721,31 +758,43 @@ function Buff.prototype.onDamageDealt(self, target, event)
|
|
|
721
758
|
)
|
|
722
759
|
end
|
|
723
760
|
local remainingDuration = self.remainingDuration + durationIncrease
|
|
724
|
-
local maximumRemainingDuration = self[
|
|
761
|
+
local maximumRemainingDuration = self[110] or 0
|
|
725
762
|
if maximumRemainingDuration > 0 then
|
|
726
763
|
remainingDuration = min(remainingDuration, maximumRemainingDuration)
|
|
727
764
|
end
|
|
728
765
|
self.remainingDuration = remainingDuration
|
|
729
766
|
end
|
|
730
|
-
local autoAttackCount = (self[
|
|
731
|
-
self[
|
|
732
|
-
if autoAttackCount == self[
|
|
767
|
+
local autoAttackCount = (self[130] or 0) + 1
|
|
768
|
+
self[130] = autoAttackCount
|
|
769
|
+
if autoAttackCount == self[131] then
|
|
733
770
|
self:destroy()
|
|
734
771
|
end
|
|
735
772
|
end
|
|
736
773
|
if event.originalAmount ~= 0 then
|
|
737
|
-
local damageDealtEventCount = (self[
|
|
738
|
-
self[
|
|
739
|
-
if damageDealtEventCount == self[
|
|
774
|
+
local damageDealtEventCount = (self[132] or 0) + 1
|
|
775
|
+
self[132] = damageDealtEventCount
|
|
776
|
+
if damageDealtEventCount == self[133] then
|
|
740
777
|
self:destroy()
|
|
741
778
|
end
|
|
742
779
|
end
|
|
743
780
|
end
|
|
744
781
|
function Buff.prototype.onDamageReceived(self, source, event)
|
|
745
782
|
if event.originalAmount ~= 0 then
|
|
746
|
-
local
|
|
747
|
-
|
|
748
|
-
|
|
783
|
+
local absorbedDamage = min(event.amount * (self[136] or 1), (self[137] or 0) - (self[138] or 0))
|
|
784
|
+
if absorbedDamage > 0 then
|
|
785
|
+
event.amount = event.amount - absorbedDamage
|
|
786
|
+
self[138] = (self[138] or 0) + absorbedDamage
|
|
787
|
+
local ____self__139_48 = self[139]
|
|
788
|
+
if ____self__139_48 == nil then
|
|
789
|
+
____self__139_48 = true
|
|
790
|
+
end
|
|
791
|
+
if ____self__139_48 and self[138] >= (self[137] or 0) then
|
|
792
|
+
self:destroy()
|
|
793
|
+
end
|
|
794
|
+
end
|
|
795
|
+
local damageReceivedEventCount = (self[134] or 0) + 1
|
|
796
|
+
self[134] = damageReceivedEventCount
|
|
797
|
+
if damageReceivedEventCount == self[135] then
|
|
749
798
|
self:destroy()
|
|
750
799
|
end
|
|
751
800
|
end
|
|
@@ -772,13 +821,13 @@ __TS__SetDescriptor(
|
|
|
772
821
|
"remainingDamageOverDuration",
|
|
773
822
|
{
|
|
774
823
|
get = function(self)
|
|
775
|
-
return self[
|
|
824
|
+
return self[114] or 0
|
|
776
825
|
end,
|
|
777
826
|
set = function(self, remainingDamageOverDuration)
|
|
778
|
-
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[
|
|
779
|
-
self[
|
|
780
|
-
local damageOverDuration = (self[
|
|
781
|
-
self[
|
|
827
|
+
local remainingDamageOverDurationDelta = remainingDamageOverDuration - (self[114] or 0)
|
|
828
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
829
|
+
local damageOverDuration = (self[111] or 0) + remainingDamageOverDurationDelta
|
|
830
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
782
831
|
end
|
|
783
832
|
},
|
|
784
833
|
true
|
|
@@ -788,13 +837,13 @@ __TS__SetDescriptor(
|
|
|
788
837
|
"damageOverDuration",
|
|
789
838
|
{
|
|
790
839
|
get = function(self)
|
|
791
|
-
return self[
|
|
840
|
+
return self[111] or 0
|
|
792
841
|
end,
|
|
793
842
|
set = function(self, damageOverDuration)
|
|
794
|
-
local damageOverDurationDelta = damageOverDuration - (self[
|
|
795
|
-
self[
|
|
796
|
-
local remainingDamageOverDuration = (self[
|
|
797
|
-
self[
|
|
843
|
+
local damageOverDurationDelta = damageOverDuration - (self[111] or 0)
|
|
844
|
+
self[111] = damageOverDuration ~= 0 and damageOverDuration or nil
|
|
845
|
+
local remainingDamageOverDuration = (self[114] or 0) + damageOverDurationDelta
|
|
846
|
+
self[114] = remainingDamageOverDuration ~= 0 and remainingDamageOverDuration or nil
|
|
798
847
|
end
|
|
799
848
|
},
|
|
800
849
|
true
|
|
@@ -804,10 +853,10 @@ __TS__SetDescriptor(
|
|
|
804
853
|
"damagePerInterval",
|
|
805
854
|
{
|
|
806
855
|
get = function(self)
|
|
807
|
-
return self[
|
|
856
|
+
return self[112] or 0
|
|
808
857
|
end,
|
|
809
858
|
set = function(self, damagePerInterval)
|
|
810
|
-
self[
|
|
859
|
+
self[112] = damagePerInterval ~= 0 and damagePerInterval or nil
|
|
811
860
|
end
|
|
812
861
|
},
|
|
813
862
|
true
|
|
@@ -817,25 +866,25 @@ __TS__SetDescriptor(
|
|
|
817
866
|
"damageInterval",
|
|
818
867
|
{
|
|
819
868
|
get = function(self)
|
|
820
|
-
return self[
|
|
869
|
+
return self[113] or 0
|
|
821
870
|
end,
|
|
822
871
|
set = function(self, damageInterval)
|
|
823
872
|
if damageInterval <= 0 then
|
|
824
|
-
self[
|
|
825
|
-
local timer = self[
|
|
873
|
+
self[113] = damageInterval ~= 0 and damageInterval or nil
|
|
874
|
+
local timer = self[115]
|
|
826
875
|
if timer ~= nil then
|
|
827
876
|
timer:destroy()
|
|
828
|
-
self[
|
|
877
|
+
self[115] = nil
|
|
829
878
|
end
|
|
830
879
|
return
|
|
831
880
|
end
|
|
832
|
-
self[
|
|
833
|
-
local
|
|
834
|
-
local elapsed =
|
|
835
|
-
local timer = self[
|
|
881
|
+
self[113] = damageInterval
|
|
882
|
+
local ____opt_49 = self._timer
|
|
883
|
+
local elapsed = ____opt_49 and ____opt_49.elapsed or 0
|
|
884
|
+
local timer = self[115]
|
|
836
885
|
if timer == nil then
|
|
837
886
|
timer = Timer:create()
|
|
838
|
-
self[
|
|
887
|
+
self[115] = timer
|
|
839
888
|
end
|
|
840
889
|
local initialDelay = damageInterval - (elapsed >= damageInterval and math.fmod(elapsed, damageInterval) or elapsed)
|
|
841
890
|
if initialDelay == damageInterval then
|
|
@@ -852,13 +901,13 @@ __TS__SetDescriptor(
|
|
|
852
901
|
"remainingHealingOverDuration",
|
|
853
902
|
{
|
|
854
903
|
get = function(self)
|
|
855
|
-
return self[
|
|
904
|
+
return self[119] or 0
|
|
856
905
|
end,
|
|
857
906
|
set = function(self, remainingHealingOverDuration)
|
|
858
|
-
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[
|
|
859
|
-
self[
|
|
860
|
-
local healingOverDuration = (self[
|
|
861
|
-
self[
|
|
907
|
+
local remainingHealingOverDurationDelta = remainingHealingOverDuration - (self[119] or 0)
|
|
908
|
+
self[114] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
909
|
+
local healingOverDuration = (self[116] or 0) + remainingHealingOverDurationDelta
|
|
910
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
862
911
|
end
|
|
863
912
|
},
|
|
864
913
|
true
|
|
@@ -868,13 +917,13 @@ __TS__SetDescriptor(
|
|
|
868
917
|
"healingOverDuration",
|
|
869
918
|
{
|
|
870
919
|
get = function(self)
|
|
871
|
-
return self[
|
|
920
|
+
return self[116] or 0
|
|
872
921
|
end,
|
|
873
922
|
set = function(self, healingOverDuration)
|
|
874
|
-
local healingOverDurationDelta = healingOverDuration - (self[
|
|
875
|
-
self[
|
|
876
|
-
local remainingHealingOverDuration = (self[
|
|
877
|
-
self[
|
|
923
|
+
local healingOverDurationDelta = healingOverDuration - (self[116] or 0)
|
|
924
|
+
self[116] = healingOverDuration ~= 0 and healingOverDuration or nil
|
|
925
|
+
local remainingHealingOverDuration = (self[119] or 0) + healingOverDurationDelta
|
|
926
|
+
self[119] = remainingHealingOverDuration ~= 0 and remainingHealingOverDuration or nil
|
|
878
927
|
end
|
|
879
928
|
},
|
|
880
929
|
true
|
|
@@ -884,10 +933,10 @@ __TS__SetDescriptor(
|
|
|
884
933
|
"healingPerInterval",
|
|
885
934
|
{
|
|
886
935
|
get = function(self)
|
|
887
|
-
return self[
|
|
936
|
+
return self[117] or 0
|
|
888
937
|
end,
|
|
889
938
|
set = function(self, healingPerInterval)
|
|
890
|
-
self[
|
|
939
|
+
self[117] = healingPerInterval ~= 0 and healingPerInterval or nil
|
|
891
940
|
end
|
|
892
941
|
},
|
|
893
942
|
true
|
|
@@ -897,25 +946,25 @@ __TS__SetDescriptor(
|
|
|
897
946
|
"healingInterval",
|
|
898
947
|
{
|
|
899
948
|
get = function(self)
|
|
900
|
-
return self[
|
|
949
|
+
return self[118] or 0
|
|
901
950
|
end,
|
|
902
951
|
set = function(self, healingInterval)
|
|
903
952
|
if healingInterval <= 0 then
|
|
904
|
-
self[
|
|
905
|
-
local timer = self[
|
|
953
|
+
self[118] = healingInterval ~= 0 and healingInterval or nil
|
|
954
|
+
local timer = self[120]
|
|
906
955
|
if timer ~= nil then
|
|
907
956
|
timer:destroy()
|
|
908
|
-
self[
|
|
957
|
+
self[120] = nil
|
|
909
958
|
end
|
|
910
959
|
return
|
|
911
960
|
end
|
|
912
|
-
self[
|
|
913
|
-
local
|
|
914
|
-
local elapsed =
|
|
915
|
-
local timer = self[
|
|
961
|
+
self[118] = healingInterval
|
|
962
|
+
local ____opt_51 = self._timer
|
|
963
|
+
local elapsed = ____opt_51 and ____opt_51.elapsed or 0
|
|
964
|
+
local timer = self[120]
|
|
916
965
|
if timer == nil then
|
|
917
966
|
timer = Timer:create()
|
|
918
|
-
self[
|
|
967
|
+
self[120] = timer
|
|
919
968
|
end
|
|
920
969
|
local initialDelay = healingInterval - (elapsed >= healingInterval and math.fmod(elapsed, healingInterval) or elapsed)
|
|
921
970
|
if initialDelay == healingInterval then
|
|
@@ -932,10 +981,10 @@ __TS__SetDescriptor(
|
|
|
932
981
|
"damageOnExpiration",
|
|
933
982
|
{
|
|
934
983
|
get = function(self)
|
|
935
|
-
return self[
|
|
984
|
+
return self[121] or 0
|
|
936
985
|
end,
|
|
937
986
|
set = function(self, damageOnExpiration)
|
|
938
|
-
self[
|
|
987
|
+
self[121] = damageOnExpiration ~= 0 and damageOnExpiration or nil
|
|
939
988
|
end
|
|
940
989
|
},
|
|
941
990
|
true
|
|
@@ -945,10 +994,10 @@ __TS__SetDescriptor(
|
|
|
945
994
|
"healingOnExpiration",
|
|
946
995
|
{
|
|
947
996
|
get = function(self)
|
|
948
|
-
return self[
|
|
997
|
+
return self[122] or 0
|
|
949
998
|
end,
|
|
950
999
|
set = function(self, healingOnExpiration)
|
|
951
|
-
self[
|
|
1000
|
+
self[122] = healingOnExpiration ~= 0 and healingOnExpiration or nil
|
|
952
1001
|
end
|
|
953
1002
|
},
|
|
954
1003
|
true
|
|
@@ -979,6 +1028,19 @@ __TS__SetDescriptor(
|
|
|
979
1028
|
},
|
|
980
1029
|
true
|
|
981
1030
|
)
|
|
1031
|
+
__TS__SetDescriptor(
|
|
1032
|
+
Buff.prototype,
|
|
1033
|
+
"returnedMeleeDamageFactor",
|
|
1034
|
+
{
|
|
1035
|
+
get = function(self)
|
|
1036
|
+
return self:getUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR)
|
|
1037
|
+
end,
|
|
1038
|
+
set = function(self, returnedMeleeDamageFactor)
|
|
1039
|
+
self:addOrUpdateOrRemoveUnitBonus(UnitBonusType.RETURNED_MELEE_DAMAGE_FACTOR, returnedMeleeDamageFactor)
|
|
1040
|
+
end
|
|
1041
|
+
},
|
|
1042
|
+
true
|
|
1043
|
+
)
|
|
982
1044
|
__TS__SetDescriptor(
|
|
983
1045
|
Buff.prototype,
|
|
984
1046
|
"armorIncrease",
|
|
@@ -992,24 +1054,50 @@ __TS__SetDescriptor(
|
|
|
992
1054
|
},
|
|
993
1055
|
true
|
|
994
1056
|
)
|
|
1057
|
+
__TS__SetDescriptor(
|
|
1058
|
+
Buff.prototype,
|
|
1059
|
+
"maxHealthIncrease",
|
|
1060
|
+
{
|
|
1061
|
+
get = function(self)
|
|
1062
|
+
return self:getUnitBonus(UnitBonusType.HEALTH)
|
|
1063
|
+
end,
|
|
1064
|
+
set = function(self, maxHealthIncrease)
|
|
1065
|
+
self:addOrUpdateOrRemoveUnitBonus(UnitBonusType.HEALTH, maxHealthIncrease)
|
|
1066
|
+
end
|
|
1067
|
+
},
|
|
1068
|
+
true
|
|
1069
|
+
)
|
|
1070
|
+
__TS__SetDescriptor(
|
|
1071
|
+
Buff.prototype,
|
|
1072
|
+
"maxManaIncrease",
|
|
1073
|
+
{
|
|
1074
|
+
get = function(self)
|
|
1075
|
+
return self:getUnitBonus(UnitBonusType.MANA)
|
|
1076
|
+
end,
|
|
1077
|
+
set = function(self, maxManaIncrease)
|
|
1078
|
+
self:addOrUpdateOrRemoveUnitBonus(UnitBonusType.MANA, maxManaIncrease)
|
|
1079
|
+
end
|
|
1080
|
+
},
|
|
1081
|
+
true
|
|
1082
|
+
)
|
|
995
1083
|
__TS__SetDescriptor(
|
|
996
1084
|
Buff.prototype,
|
|
997
1085
|
"turnsIntoGhost",
|
|
998
1086
|
{
|
|
999
1087
|
get = function(self)
|
|
1000
|
-
local
|
|
1001
|
-
if
|
|
1002
|
-
|
|
1088
|
+
local ____self__140_53 = self[140]
|
|
1089
|
+
if ____self__140_53 == nil then
|
|
1090
|
+
____self__140_53 = false
|
|
1003
1091
|
end
|
|
1004
|
-
return
|
|
1092
|
+
return ____self__140_53
|
|
1005
1093
|
end,
|
|
1006
1094
|
set = function(self, turnsIntoGhost)
|
|
1007
|
-
if not turnsIntoGhost and self[
|
|
1095
|
+
if not turnsIntoGhost and self[140] then
|
|
1008
1096
|
self.object:decrementGhostCounter()
|
|
1009
|
-
self[
|
|
1010
|
-
elseif turnsIntoGhost and not self[
|
|
1097
|
+
self[140] = nil
|
|
1098
|
+
elseif turnsIntoGhost and not self[140] then
|
|
1011
1099
|
self.object:incrementGhostCounter()
|
|
1012
|
-
self[
|
|
1100
|
+
self[140] = true
|
|
1013
1101
|
end
|
|
1014
1102
|
end
|
|
1015
1103
|
},
|
|
@@ -1020,25 +1108,25 @@ __TS__SetDescriptor(
|
|
|
1020
1108
|
"stuns",
|
|
1021
1109
|
{
|
|
1022
1110
|
get = function(self)
|
|
1023
|
-
local
|
|
1024
|
-
if
|
|
1025
|
-
|
|
1111
|
+
local ____self__141_54 = self[141]
|
|
1112
|
+
if ____self__141_54 == nil then
|
|
1113
|
+
____self__141_54 = false
|
|
1026
1114
|
end
|
|
1027
|
-
return
|
|
1115
|
+
return ____self__141_54
|
|
1028
1116
|
end,
|
|
1029
1117
|
set = function(self, stuns)
|
|
1030
|
-
if not stuns and self[
|
|
1031
|
-
if self[
|
|
1118
|
+
if not stuns and self[141] then
|
|
1119
|
+
if self[142] then
|
|
1032
1120
|
self.object:decrementForceStunCounter()
|
|
1033
1121
|
end
|
|
1034
1122
|
self.object:decrementStunCounter()
|
|
1035
|
-
self[
|
|
1036
|
-
elseif stuns and not self[
|
|
1037
|
-
if self[
|
|
1123
|
+
self[141] = nil
|
|
1124
|
+
elseif stuns and not self[141] then
|
|
1125
|
+
if self[142] then
|
|
1038
1126
|
self.object:incrementForceStunCounter()
|
|
1039
1127
|
end
|
|
1040
1128
|
self.object:incrementStunCounter()
|
|
1041
|
-
self[
|
|
1129
|
+
self[141] = true
|
|
1042
1130
|
end
|
|
1043
1131
|
end
|
|
1044
1132
|
},
|
|
@@ -1049,23 +1137,23 @@ __TS__SetDescriptor(
|
|
|
1049
1137
|
"ignoresStunImmunity",
|
|
1050
1138
|
{
|
|
1051
1139
|
get = function(self)
|
|
1052
|
-
local
|
|
1053
|
-
if
|
|
1054
|
-
|
|
1140
|
+
local ____self__142_55 = self[142]
|
|
1141
|
+
if ____self__142_55 == nil then
|
|
1142
|
+
____self__142_55 = false
|
|
1055
1143
|
end
|
|
1056
|
-
return
|
|
1144
|
+
return ____self__142_55
|
|
1057
1145
|
end,
|
|
1058
1146
|
set = function(self, ignoresStunImmunity)
|
|
1059
|
-
if not ignoresStunImmunity and self[
|
|
1060
|
-
if self[
|
|
1147
|
+
if not ignoresStunImmunity and self[142] then
|
|
1148
|
+
if self[141] then
|
|
1061
1149
|
self.object:decrementForceStunCounter()
|
|
1062
1150
|
end
|
|
1063
|
-
self[
|
|
1064
|
-
elseif ignoresStunImmunity and not self[
|
|
1065
|
-
if self[
|
|
1151
|
+
self[142] = nil
|
|
1152
|
+
elseif ignoresStunImmunity and not self[142] then
|
|
1153
|
+
if self[141] then
|
|
1066
1154
|
self.object:incrementForceStunCounter()
|
|
1067
1155
|
end
|
|
1068
|
-
self[
|
|
1156
|
+
self[142] = true
|
|
1069
1157
|
end
|
|
1070
1158
|
end
|
|
1071
1159
|
},
|
|
@@ -1076,19 +1164,19 @@ __TS__SetDescriptor(
|
|
|
1076
1164
|
"disablesAutoAttack",
|
|
1077
1165
|
{
|
|
1078
1166
|
get = function(self)
|
|
1079
|
-
local
|
|
1080
|
-
if
|
|
1081
|
-
|
|
1167
|
+
local ____self__143_56 = self[143]
|
|
1168
|
+
if ____self__143_56 == nil then
|
|
1169
|
+
____self__143_56 = false
|
|
1082
1170
|
end
|
|
1083
|
-
return
|
|
1171
|
+
return ____self__143_56
|
|
1084
1172
|
end,
|
|
1085
1173
|
set = function(self, disablesAutoAttack)
|
|
1086
|
-
if not disablesAutoAttack and self[
|
|
1174
|
+
if not disablesAutoAttack and self[143] then
|
|
1087
1175
|
self.object:decrementDisableAutoAttackCounter()
|
|
1088
|
-
self[
|
|
1089
|
-
elseif disablesAutoAttack and not self[
|
|
1176
|
+
self[143] = nil
|
|
1177
|
+
elseif disablesAutoAttack and not self[143] then
|
|
1090
1178
|
self.object:incrementDisableAutoAttackCounter()
|
|
1091
|
-
self[
|
|
1179
|
+
self[143] = true
|
|
1092
1180
|
end
|
|
1093
1181
|
end
|
|
1094
1182
|
},
|
|
@@ -1099,19 +1187,19 @@ __TS__SetDescriptor(
|
|
|
1099
1187
|
"providesInvulnerability",
|
|
1100
1188
|
{
|
|
1101
1189
|
get = function(self)
|
|
1102
|
-
local
|
|
1103
|
-
if
|
|
1104
|
-
|
|
1190
|
+
local ____self__144_57 = self[144]
|
|
1191
|
+
if ____self__144_57 == nil then
|
|
1192
|
+
____self__144_57 = false
|
|
1105
1193
|
end
|
|
1106
|
-
return
|
|
1194
|
+
return ____self__144_57
|
|
1107
1195
|
end,
|
|
1108
1196
|
set = function(self, providesInvulnerability)
|
|
1109
|
-
if not providesInvulnerability and self[
|
|
1197
|
+
if not providesInvulnerability and self[144] then
|
|
1110
1198
|
self.object:decrementInvulnerabilityCounter()
|
|
1111
|
-
self[
|
|
1112
|
-
elseif providesInvulnerability and not self[
|
|
1199
|
+
self[144] = nil
|
|
1200
|
+
elseif providesInvulnerability and not self[144] then
|
|
1113
1201
|
self.object:incrementInvulnerabilityCounter()
|
|
1114
|
-
self[
|
|
1202
|
+
self[144] = true
|
|
1115
1203
|
end
|
|
1116
1204
|
end
|
|
1117
1205
|
},
|
|
@@ -1122,17 +1210,17 @@ __TS__SetDescriptor(
|
|
|
1122
1210
|
"killsOnExpiration",
|
|
1123
1211
|
{
|
|
1124
1212
|
get = function(self)
|
|
1125
|
-
local
|
|
1126
|
-
if
|
|
1127
|
-
|
|
1213
|
+
local ____self__145_58 = self[145]
|
|
1214
|
+
if ____self__145_58 == nil then
|
|
1215
|
+
____self__145_58 = false
|
|
1128
1216
|
end
|
|
1129
|
-
return
|
|
1217
|
+
return ____self__145_58
|
|
1130
1218
|
end,
|
|
1131
1219
|
set = function(self, killsOnExpiration)
|
|
1132
|
-
if not killsOnExpiration and self[
|
|
1133
|
-
self[
|
|
1134
|
-
elseif killsOnExpiration and not self[
|
|
1135
|
-
self[
|
|
1220
|
+
if not killsOnExpiration and self[145] then
|
|
1221
|
+
self[145] = nil
|
|
1222
|
+
elseif killsOnExpiration and not self[145] then
|
|
1223
|
+
self[145] = true
|
|
1136
1224
|
end
|
|
1137
1225
|
end
|
|
1138
1226
|
},
|
|
@@ -1143,17 +1231,17 @@ __TS__SetDescriptor(
|
|
|
1143
1231
|
"explodesOnExpiration",
|
|
1144
1232
|
{
|
|
1145
1233
|
get = function(self)
|
|
1146
|
-
local
|
|
1147
|
-
if
|
|
1148
|
-
|
|
1234
|
+
local ____self__146_59 = self[146]
|
|
1235
|
+
if ____self__146_59 == nil then
|
|
1236
|
+
____self__146_59 = false
|
|
1149
1237
|
end
|
|
1150
|
-
return
|
|
1238
|
+
return ____self__146_59
|
|
1151
1239
|
end,
|
|
1152
1240
|
set = function(self, killsOnExpiration)
|
|
1153
|
-
if not killsOnExpiration and self[
|
|
1154
|
-
self[
|
|
1155
|
-
elseif killsOnExpiration and not self[
|
|
1156
|
-
self[
|
|
1241
|
+
if not killsOnExpiration and self[146] then
|
|
1242
|
+
self[146] = nil
|
|
1243
|
+
elseif killsOnExpiration and not self[146] then
|
|
1244
|
+
self[146] = true
|
|
1157
1245
|
end
|
|
1158
1246
|
end
|
|
1159
1247
|
},
|
|
@@ -1164,13 +1252,13 @@ __TS__SetDescriptor(
|
|
|
1164
1252
|
"maximumDamageDealtEventCount",
|
|
1165
1253
|
{
|
|
1166
1254
|
get = function(self)
|
|
1167
|
-
return self[
|
|
1255
|
+
return self[133] or 0
|
|
1168
1256
|
end,
|
|
1169
1257
|
set = function(self, maximumDamageDealtEventCount)
|
|
1170
1258
|
if maximumDamageDealtEventCount == 0 then
|
|
1171
|
-
self[
|
|
1259
|
+
self[133] = nil
|
|
1172
1260
|
else
|
|
1173
|
-
self[
|
|
1261
|
+
self[133] = maximumDamageDealtEventCount
|
|
1174
1262
|
end
|
|
1175
1263
|
end
|
|
1176
1264
|
},
|
|
@@ -1181,13 +1269,13 @@ __TS__SetDescriptor(
|
|
|
1181
1269
|
"maximumDamageReceivedEventCount",
|
|
1182
1270
|
{
|
|
1183
1271
|
get = function(self)
|
|
1184
|
-
return self[
|
|
1272
|
+
return self[135] or 0
|
|
1185
1273
|
end,
|
|
1186
1274
|
set = function(self, maximumDamageReceivedEventCount)
|
|
1187
1275
|
if maximumDamageReceivedEventCount == 0 then
|
|
1188
|
-
self[
|
|
1276
|
+
self[135] = nil
|
|
1189
1277
|
else
|
|
1190
|
-
self[
|
|
1278
|
+
self[135] = maximumDamageReceivedEventCount
|
|
1191
1279
|
end
|
|
1192
1280
|
end
|
|
1193
1281
|
},
|
|
@@ -1198,13 +1286,13 @@ __TS__SetDescriptor(
|
|
|
1198
1286
|
"maximumAutoAttackCount",
|
|
1199
1287
|
{
|
|
1200
1288
|
get = function(self)
|
|
1201
|
-
return self[
|
|
1289
|
+
return self[131] or 0
|
|
1202
1290
|
end,
|
|
1203
1291
|
set = function(self, maximumAutoAttackCount)
|
|
1204
1292
|
if maximumAutoAttackCount == 0 then
|
|
1205
|
-
self[
|
|
1293
|
+
self[131] = nil
|
|
1206
1294
|
else
|
|
1207
|
-
self[
|
|
1295
|
+
self[131] = maximumAutoAttackCount
|
|
1208
1296
|
end
|
|
1209
1297
|
end
|
|
1210
1298
|
},
|
|
@@ -1215,10 +1303,10 @@ __TS__SetDescriptor(
|
|
|
1215
1303
|
"durationIncreaseOnAutoAttack",
|
|
1216
1304
|
{
|
|
1217
1305
|
get = function(self)
|
|
1218
|
-
return self[
|
|
1306
|
+
return self[108] or 0
|
|
1219
1307
|
end,
|
|
1220
1308
|
set = function(self, durationIncreaseOnAutoAttack)
|
|
1221
|
-
self[
|
|
1309
|
+
self[108] = durationIncreaseOnAutoAttack
|
|
1222
1310
|
end
|
|
1223
1311
|
},
|
|
1224
1312
|
true
|
|
@@ -1302,13 +1390,13 @@ __TS__SetDescriptor(
|
|
|
1302
1390
|
"remainingDuration",
|
|
1303
1391
|
{
|
|
1304
1392
|
get = function(self)
|
|
1305
|
-
local
|
|
1306
|
-
return
|
|
1393
|
+
local ____opt_60 = self._timer
|
|
1394
|
+
return ____opt_60 and ____opt_60.remaining or 0
|
|
1307
1395
|
end,
|
|
1308
1396
|
set = function(self, remainingDuration)
|
|
1309
|
-
local
|
|
1310
|
-
local
|
|
1311
|
-
local remainingDurationDelta =
|
|
1397
|
+
local ____remainingDuration_64 = remainingDuration
|
|
1398
|
+
local ____opt_62 = self._timer
|
|
1399
|
+
local remainingDurationDelta = ____remainingDuration_64 - (____opt_62 and ____opt_62.remaining or 0)
|
|
1312
1400
|
if remainingDurationDelta ~= 0 then
|
|
1313
1401
|
self[103] = self[103] + remainingDurationDelta
|
|
1314
1402
|
if remainingDuration <= 0 then
|
|
@@ -1323,7 +1411,7 @@ __TS__SetDescriptor(
|
|
|
1323
1411
|
remainingDuration,
|
|
1324
1412
|
self._spellStealPriority,
|
|
1325
1413
|
self._learnLevelMinimum,
|
|
1326
|
-
self[
|
|
1414
|
+
self[147]
|
|
1327
1415
|
) then
|
|
1328
1416
|
local timer = self._timer
|
|
1329
1417
|
if timer == nil then
|
|
@@ -1338,15 +1426,80 @@ __TS__SetDescriptor(
|
|
|
1338
1426
|
},
|
|
1339
1427
|
true
|
|
1340
1428
|
)
|
|
1429
|
+
__TS__SetDescriptor(
|
|
1430
|
+
Buff.prototype,
|
|
1431
|
+
"absorbedDamageFactor",
|
|
1432
|
+
{
|
|
1433
|
+
get = function(self)
|
|
1434
|
+
return self[136] or 1
|
|
1435
|
+
end,
|
|
1436
|
+
set = function(self, absorbedDamageFactor)
|
|
1437
|
+
if absorbedDamageFactor == 1 then
|
|
1438
|
+
self[136] = nil
|
|
1439
|
+
else
|
|
1440
|
+
self[136] = absorbedDamageFactor
|
|
1441
|
+
end
|
|
1442
|
+
end
|
|
1443
|
+
},
|
|
1444
|
+
true
|
|
1445
|
+
)
|
|
1446
|
+
__TS__SetDescriptor(
|
|
1447
|
+
Buff.prototype,
|
|
1448
|
+
"maximumDamageAbsorbed",
|
|
1449
|
+
{
|
|
1450
|
+
get = function(self)
|
|
1451
|
+
return self[137] or 0
|
|
1452
|
+
end,
|
|
1453
|
+
set = function(self, maximumDamageAbsorbed)
|
|
1454
|
+
if maximumDamageAbsorbed == 0 then
|
|
1455
|
+
self[137] = nil
|
|
1456
|
+
else
|
|
1457
|
+
self[137] = maximumDamageAbsorbed
|
|
1458
|
+
end
|
|
1459
|
+
end
|
|
1460
|
+
},
|
|
1461
|
+
true
|
|
1462
|
+
)
|
|
1463
|
+
__TS__SetDescriptor(
|
|
1464
|
+
Buff.prototype,
|
|
1465
|
+
"damageAbsorbed",
|
|
1466
|
+
{get = function(self)
|
|
1467
|
+
return self[138] or 0
|
|
1468
|
+
end},
|
|
1469
|
+
true
|
|
1470
|
+
)
|
|
1471
|
+
__TS__SetDescriptor(
|
|
1472
|
+
Buff.prototype,
|
|
1473
|
+
"destroysOnMaximumDamageAbsorbed",
|
|
1474
|
+
{
|
|
1475
|
+
get = function(self)
|
|
1476
|
+
local ____self__139_65 = self[139]
|
|
1477
|
+
if ____self__139_65 == nil then
|
|
1478
|
+
____self__139_65 = true
|
|
1479
|
+
end
|
|
1480
|
+
return ____self__139_65
|
|
1481
|
+
end,
|
|
1482
|
+
set = function(self, destroysOnMaximumDamageAbsorbed)
|
|
1483
|
+
local ____destroysOnMaximumDamageAbsorbed_66
|
|
1484
|
+
if destroysOnMaximumDamageAbsorbed then
|
|
1485
|
+
____destroysOnMaximumDamageAbsorbed_66 = nil
|
|
1486
|
+
else
|
|
1487
|
+
____destroysOnMaximumDamageAbsorbed_66 = false
|
|
1488
|
+
end
|
|
1489
|
+
self[139] = ____destroysOnMaximumDamageAbsorbed_66
|
|
1490
|
+
end
|
|
1491
|
+
},
|
|
1492
|
+
true
|
|
1493
|
+
)
|
|
1341
1494
|
__TS__SetDescriptor(
|
|
1342
1495
|
Buff.prototype,
|
|
1343
1496
|
"abilityCooldownFactor",
|
|
1344
1497
|
{
|
|
1345
1498
|
get = function(self)
|
|
1346
|
-
return self[
|
|
1499
|
+
return self[148] or 1
|
|
1347
1500
|
end,
|
|
1348
1501
|
set = function(self, abilityCooldownFactor)
|
|
1349
|
-
local previousAbilityCooldownModifier = self[
|
|
1502
|
+
local previousAbilityCooldownModifier = self[149]
|
|
1350
1503
|
if previousAbilityCooldownModifier then
|
|
1351
1504
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1352
1505
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:removeModifier(ability, previousAbilityCooldownModifier)
|
|
@@ -1358,8 +1511,8 @@ __TS__SetDescriptor(
|
|
|
1358
1511
|
for ____, ability in ipairs(self._unit.abilities) do
|
|
1359
1512
|
COOLDOWN_ABILITY_FLOAT_LEVEL_FIELD:applyModifier(ability, modifier)
|
|
1360
1513
|
end
|
|
1361
|
-
self[
|
|
1362
|
-
self[
|
|
1514
|
+
self[149] = modifier
|
|
1515
|
+
self[148] = abilityCooldownFactor
|
|
1363
1516
|
end
|
|
1364
1517
|
},
|
|
1365
1518
|
true
|
|
@@ -1367,35 +1520,40 @@ __TS__SetDescriptor(
|
|
|
1367
1520
|
Buff.createdEvent = buffCreatedEvent
|
|
1368
1521
|
Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
1369
1522
|
(function(self)
|
|
1370
|
-
local function destroyBuffIfNeeded(buff)
|
|
1371
|
-
|
|
1372
|
-
|
|
1523
|
+
local function destroyBuffIfNeeded(buff, isDispel, source)
|
|
1524
|
+
local currentHandle = getUnitAbility(buff[101].handle, buff.typeId)
|
|
1525
|
+
if currentHandle ~= buff.handle and buff[100] == 1 then
|
|
1526
|
+
if isDispel and currentHandle == nil and buff.unit.isAlive and buff.resistanceType == 1 and (buff._timer == nil or buff.remainingDuration > 0) then
|
|
1527
|
+
buff:dispel(source)
|
|
1528
|
+
else
|
|
1529
|
+
buff:destroy()
|
|
1530
|
+
end
|
|
1373
1531
|
end
|
|
1374
1532
|
end
|
|
1375
|
-
____exports.checkBuff = function(unit, buffTypeId)
|
|
1533
|
+
____exports.checkBuff = function(unit, buffTypeId, isDispel, source)
|
|
1376
1534
|
local buffByTypeId = buffByTypeIdByUnit[unit]
|
|
1377
1535
|
if buffByTypeId ~= nil then
|
|
1378
1536
|
local buff = buffByTypeId[buffTypeId]
|
|
1379
1537
|
if buff ~= nil then
|
|
1380
|
-
destroyBuffIfNeeded(buff)
|
|
1538
|
+
destroyBuffIfNeeded(buff, isDispel, source)
|
|
1381
1539
|
end
|
|
1382
1540
|
end
|
|
1383
1541
|
end
|
|
1384
|
-
____exports.checkBuffs = function(unit)
|
|
1385
|
-
____exports.Buff:forAll(unit, destroyBuffIfNeeded)
|
|
1542
|
+
____exports.checkBuffs = function(unit, isDispel, source)
|
|
1543
|
+
____exports.Buff:forAll(unit, destroyBuffIfNeeded, isDispel, source)
|
|
1386
1544
|
end
|
|
1387
1545
|
Unit.abilityChannelingStartEvent:addListener(
|
|
1388
1546
|
0,
|
|
1389
1547
|
function(caster)
|
|
1390
|
-
____exports.checkBuffs(caster)
|
|
1391
|
-
Timer:run(____exports.checkBuffs, caster)
|
|
1548
|
+
____exports.checkBuffs(caster, true, caster)
|
|
1549
|
+
Timer:run(____exports.checkBuffs, caster, true, caster)
|
|
1392
1550
|
end
|
|
1393
1551
|
)
|
|
1394
1552
|
Unit.abilityUnitTargetChannelingStartEvent:addListener(
|
|
1395
1553
|
0,
|
|
1396
1554
|
function(caster, ability, target)
|
|
1397
|
-
____exports.checkBuffs(target)
|
|
1398
|
-
Timer:run(____exports.checkBuffs, target)
|
|
1555
|
+
____exports.checkBuffs(target, true, caster)
|
|
1556
|
+
Timer:run(____exports.checkBuffs, target, true, caster)
|
|
1399
1557
|
end
|
|
1400
1558
|
)
|
|
1401
1559
|
Unit.abilityPointTargetChannelingStartEvent:addListener(
|
|
@@ -1406,17 +1564,40 @@ Buff.beingDestroyedEvent = buffBeingDestroyedEvent;
|
|
|
1406
1564
|
y,
|
|
1407
1565
|
ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1408
1566
|
)
|
|
1409
|
-
forEach(units, ____exports.checkBuffs)
|
|
1410
|
-
Timer:run(
|
|
1567
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1568
|
+
Timer:run(
|
|
1569
|
+
forEach,
|
|
1570
|
+
units,
|
|
1571
|
+
____exports.checkBuffs,
|
|
1572
|
+
true,
|
|
1573
|
+
caster
|
|
1574
|
+
)
|
|
1575
|
+
end
|
|
1576
|
+
)
|
|
1577
|
+
Unit.abilityNoTargetChannelingStartEvent:addListener(
|
|
1578
|
+
0,
|
|
1579
|
+
function(caster, ability)
|
|
1580
|
+
local radius = ability:getField(ABILITY_RLF_AREA_OF_EFFECT)
|
|
1581
|
+
if radius > 0 then
|
|
1582
|
+
local units = Unit:getInCollisionRange(caster.x, caster.y, radius)
|
|
1583
|
+
forEach(units, ____exports.checkBuffs, true, caster)
|
|
1584
|
+
Timer:run(
|
|
1585
|
+
forEach,
|
|
1586
|
+
units,
|
|
1587
|
+
____exports.checkBuffs,
|
|
1588
|
+
true,
|
|
1589
|
+
caster
|
|
1590
|
+
)
|
|
1591
|
+
end
|
|
1411
1592
|
end
|
|
1412
1593
|
)
|
|
1413
1594
|
Unit.onDamage:addListener(
|
|
1414
1595
|
0,
|
|
1415
1596
|
function(source, target)
|
|
1416
1597
|
if source ~= nil then
|
|
1417
|
-
____exports.checkBuffs
|
|
1598
|
+
Timer:run(____exports.checkBuffs, source, false)
|
|
1418
1599
|
end
|
|
1419
|
-
____exports.checkBuffs
|
|
1600
|
+
Timer:run(____exports.checkBuffs, target, false)
|
|
1420
1601
|
end
|
|
1421
1602
|
)
|
|
1422
1603
|
buffCreatedEvent:addListener(function(buff)
|