warscript 0.0.1-dev.dd8349d → 0.0.1-dev.e147c49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/attributes.d.ts +1 -0
- package/attributes.lua +9 -0
- package/core/types/frame.d.ts +1 -0
- package/core/types/frame.lua +136 -58
- 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/player.d.ts +18 -1
- package/core/types/player.lua +76 -26
- package/core/types/playerCamera.d.ts +2 -0
- package/core/types/playerCamera.lua +123 -5
- 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 +11 -1
- package/core/types/tileCell.lua +97 -0
- package/core/types/timer.d.ts +3 -1
- package/core/types/timer.lua +27 -2
- package/core/types/unit.d.ts +4 -0
- package/core/types/unit.lua +4 -0
- package/decl/native.d.ts +711 -11
- package/destroyable.d.ts +1 -0
- package/destroyable.lua +9 -0
- package/engine/behavior.d.ts +14 -1
- package/engine/behavior.lua +230 -70
- package/engine/behaviour/ability/apply-buff.lua +5 -5
- package/engine/behaviour/ability/damage.d.ts +3 -0
- package/engine/behaviour/ability/damage.lua +18 -15
- package/engine/behaviour/ability/emulate-impact.d.ts +1 -1
- package/engine/behaviour/ability/emulate-impact.lua +16 -7
- package/engine/behaviour/ability/remove-buffs.d.ts +9 -0
- package/engine/behaviour/ability/remove-buffs.lua +21 -0
- package/engine/behaviour/ability/restore-mana.d.ts +1 -1
- package/engine/behaviour/ability/restore-mana.lua +6 -6
- package/engine/behaviour/ability.d.ts +12 -6
- package/engine/behaviour/ability.lua +49 -17
- package/engine/behaviour/unit/stun-immunity.d.ts +12 -6
- package/engine/behaviour/unit/stun-immunity.lua +57 -31
- package/engine/behaviour/unit.d.ts +28 -5
- package/engine/behaviour/unit.lua +186 -27
- package/engine/buff.d.ts +75 -28
- package/engine/buff.lua +433 -196
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +9 -1
- package/engine/internal/ability.lua +96 -44
- package/engine/internal/item/ability.lua +51 -1
- package/engine/internal/item/fields.d.ts +12 -0
- package/engine/internal/item/fields.lua +33 -0
- package/engine/internal/item+owner.d.ts +1 -0
- package/engine/internal/item+owner.lua +19 -6
- package/engine/internal/item.d.ts +24 -14
- package/engine/internal/item.lua +176 -85
- package/engine/internal/mechanics/cast-ability.lua +6 -3
- package/engine/internal/misc/frame-coordinates.lua +21 -0
- package/engine/internal/misc/get-terrain-z.d.ts +2 -0
- package/engine/internal/misc/get-terrain-z.lua +11 -0
- package/engine/internal/misc/player-local-handle.d.ts +2 -0
- package/engine/internal/misc/player-local-handle.lua +5 -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/mana-bonus.d.ts +2 -0
- package/engine/internal/object-data/mana-bonus.lua +16 -0
- package/engine/internal/object-data/mana-regeneration-rate-increase-factor.d.ts +2 -0
- package/engine/internal/object-data/mana-regeneration-rate-increase-factor.lua +16 -0
- package/engine/internal/unit/ability.d.ts +35 -0
- package/engine/internal/unit/ability.lua +113 -12
- package/engine/internal/unit/appearance.d.ts +15 -0
- package/engine/internal/unit/appearance.lua +85 -0
- package/engine/internal/unit/attributes.d.ts +17 -0
- package/engine/internal/unit/attributes.lua +46 -0
- package/engine/internal/unit/bag.d.ts +18 -0
- package/engine/internal/unit/bag.lua +63 -0
- package/engine/internal/unit/bonus.d.ts +6 -0
- package/engine/internal/unit/bonus.lua +33 -3
- package/engine/internal/unit/buff.d.ts +2 -2
- package/engine/internal/unit/buff.lua +34 -19
- package/engine/internal/unit/equipment.d.ts +36 -0
- package/engine/internal/unit/equipment.lua +169 -0
- package/engine/internal/unit/fly-height.d.ts +7 -0
- package/engine/internal/unit/fly-height.lua +20 -0
- package/engine/internal/unit/interrupts.d.ts +12 -0
- package/engine/internal/unit/interrupts.lua +28 -0
- package/engine/internal/unit/{item.d.ts → inventory.d.ts} +3 -3
- package/engine/internal/unit/{item.lua → inventory.lua} +25 -26
- package/engine/internal/unit/main-selected.lua +12 -27
- package/engine/internal/unit/order.d.ts +20 -0
- package/engine/internal/unit/order.lua +136 -0
- package/engine/internal/unit/pseudo-passive-abilities.d.ts +2 -0
- package/engine/internal/unit/pseudo-passive-abilities.lua +11 -0
- package/engine/internal/unit/range-event.d.ts +12 -0
- package/engine/internal/unit/range-event.lua +90 -0
- package/engine/internal/unit/scale.d.ts +7 -0
- package/engine/internal/unit/scale.lua +20 -0
- package/engine/internal/unit+ability.lua +10 -1
- 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-missile-data.lua +58 -32
- package/engine/internal/unit-missile-launch.lua +52 -14
- package/engine/internal/unit.d.ts +19 -24
- package/engine/internal/unit.lua +233 -246
- package/engine/local-client.d.ts +27 -0
- package/engine/local-client.lua +518 -54
- package/engine/object-data/auxiliary/armor-type.d.ts +11 -0
- package/engine/object-data/auxiliary/armor-type.lua +46 -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 +13 -0
- package/engine/object-data/auxiliary/equipment-type.lua +2 -0
- package/engine/object-data/auxiliary/health-regeneration-type.d.ts +8 -0
- package/engine/object-data/auxiliary/health-regeneration-type.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/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/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/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.d.ts +3 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +30 -0
- 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/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/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/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/mana-regeneration.d.ts +8 -0
- package/engine/object-data/entry/ability-type/mana-regeneration.lua +26 -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/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/reincarnation.d.ts +8 -0
- package/engine/object-data/entry/ability-type/reincarnation.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-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 +12 -3
- package/engine/object-data/entry/ability-type.lua +142 -8
- package/engine/object-data/entry/buff-type/applicable.lua +113 -109
- 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 +32 -2
- package/engine/object-data/entry/destructible-type.lua +181 -0
- package/engine/object-data/entry/item-type.d.ts +12 -3
- package/engine/object-data/entry/item-type.lua +52 -0
- package/engine/object-data/entry/lightning-type.d.ts +2 -2
- package/engine/object-data/entry/sound-preset.d.ts +2 -2
- package/engine/object-data/entry/unit-type.d.ts +62 -4
- package/engine/object-data/entry/unit-type.lua +474 -38
- package/engine/object-data/entry/upgrade.d.ts +2 -2
- package/engine/object-data/entry.d.ts +4 -1
- package/engine/object-field/ability.d.ts +3 -3
- package/engine/object-field/ability.lua +9 -8
- package/engine/object-field/item.d.ts +22 -0
- package/engine/object-field/item.lua +118 -0
- package/engine/object-field/unit.d.ts +31 -5
- package/engine/object-field/unit.lua +95 -0
- package/engine/object-field.d.ts +18 -7
- package/engine/object-field.lua +294 -135
- package/engine/random.d.ts +10 -0
- package/engine/random.lua +21 -0
- package/engine/standard/entries/ability-type.d.ts +3102 -7
- package/engine/standard/entries/ability-type.lua +0 -6
- package/engine/standard/entries/item-type.d.ts +1299 -0
- package/engine/standard/entries/item-type.lua +2 -0
- 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/standard/fields/unit.d.ts +12 -0
- package/engine/standard/fields/unit.lua +20 -0
- package/engine/synchronization.d.ts +11 -0
- package/engine/synchronization.lua +77 -0
- package/engine/text-tag.d.ts +36 -2
- package/engine/text-tag.lua +250 -10
- package/engine/unit.d.ts +10 -1
- package/engine/unit.lua +10 -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/net/socket.lua +1 -1
- package/network.lua +25 -1
- package/objutil/buff.lua +10 -8
- package/objutil/object.lua +1 -1
- package/operation.d.ts +8 -1
- package/operation.lua +38 -18
- package/package.json +3 -23
- package/patch-lua.lua +15 -0
- package/patch-lualib.lua +1 -1
- package/utility/arrays.d.ts +1 -0
- package/utility/arrays.lua +8 -0
- package/utility/callback-array.d.ts +17 -0
- package/utility/callback-array.lua +61 -0
- package/utility/functions.d.ts +7 -0
- package/utility/functions.lua +12 -0
- package/utility/linked-map.d.ts +35 -0
- package/utility/linked-map.lua +107 -0
- package/utility/linked-set.d.ts +4 -1
- package/utility/linked-set.lua +46 -1
- package/utility/lua-maps.d.ts +12 -2
- package/utility/lua-maps.lua +37 -2
- package/utility/lua-sets.d.ts +1 -0
- package/utility/lua-sets.lua +4 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/utility/records.lua +20 -1
- package/utility/types.d.ts +3 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
- package/core/types/order.d.ts +0 -26
- package/core/types/order.lua +0 -65
- /package/engine/internal/{object-data/armor-increase.d.ts → misc/frame-coordinates.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/internal/item.lua
CHANGED
|
@@ -13,6 +13,8 @@ local ____color = require("core.types.color")
|
|
|
13
13
|
local Color = ____color.Color
|
|
14
14
|
local ____event = require("event")
|
|
15
15
|
local Event = ____event.Event
|
|
16
|
+
local ____playerColor = require("core.types.playerColor")
|
|
17
|
+
local PlayerColor = ____playerColor.PlayerColor
|
|
16
18
|
local ____rect = require("core.types.rect")
|
|
17
19
|
local Rect = ____rect.Rect
|
|
18
20
|
local ____ability = require("engine.internal.ability")
|
|
@@ -27,28 +29,57 @@ local ____add_2Ditem_2Dto_2Dslot = require("engine.internal.unit.add-item-to-slo
|
|
|
27
29
|
local SLOT_FILLER_ITEM_TYPE_ID = ____add_2Ditem_2Dto_2Dslot.SLOT_FILLER_ITEM_TYPE_ID
|
|
28
30
|
local ____vec2 = require("math.vec2")
|
|
29
31
|
local distance = ____vec2.distance
|
|
30
|
-
local
|
|
31
|
-
local
|
|
32
|
-
local
|
|
33
|
-
local
|
|
34
|
-
local
|
|
35
|
-
local
|
|
36
|
-
local
|
|
37
|
-
local
|
|
38
|
-
local removeItem = RemoveItem
|
|
39
|
-
local getHandleId = GetHandleId
|
|
40
|
-
local setRect = SetRect
|
|
32
|
+
local ____timer = require("core.types.timer")
|
|
33
|
+
local Timer = ____timer.Timer
|
|
34
|
+
local chooseRandomItemExWithFilter = ChooseRandomItemExWithFilter
|
|
35
|
+
local condition = Condition
|
|
36
|
+
local convertEquipmentType = ConvertEquipmentType
|
|
37
|
+
local convertItemTag = ConvertItemTag
|
|
38
|
+
local createTrigger = CreateTrigger
|
|
39
|
+
local destroyTrigger = DestroyTrigger
|
|
41
40
|
local enumItemsInRect = EnumItemsInRect
|
|
41
|
+
local getAbilityId = BlzGetAbilityId
|
|
42
42
|
local getEnumItem = GetEnumItem
|
|
43
|
+
local getHandleId = GetHandleId
|
|
44
|
+
local getItemAbility = BlzGetItemAbility
|
|
45
|
+
local getItemAbilityByIndex = BlzGetItemAbilityByIndex
|
|
46
|
+
local getItemBooleanField = BlzGetItemBooleanField
|
|
47
|
+
local getItemCharges = GetItemCharges
|
|
48
|
+
local getItemEquipmentType = GetItemEquipmentType
|
|
49
|
+
local getItemIntegerField = BlzGetItemIntegerField
|
|
50
|
+
local getItemTag = GetItemTag
|
|
43
51
|
local getItemTypeId = GetItemTypeId
|
|
44
52
|
local getItemX = GetItemX
|
|
45
53
|
local getItemY = GetItemY
|
|
46
|
-
local
|
|
54
|
+
local getManipulatedItem = GetManipulatedItem
|
|
55
|
+
local getTriggerWidget = GetTriggerWidget
|
|
56
|
+
local getWidgetLife = GetWidgetLife
|
|
57
|
+
local isItemEquipped = IsItemEquipped
|
|
58
|
+
local isItemInBag = IsItemInBag
|
|
59
|
+
local isItemPawnable = IsItemPawnable
|
|
60
|
+
local isItemPowerup = IsItemPowerup
|
|
61
|
+
local itemAddAbility = BlzItemAddAbility
|
|
62
|
+
local itemRemoveAbility = BlzItemRemoveAbility
|
|
63
|
+
local loadItemHandle = LoadItemHandle
|
|
64
|
+
local removeItem = RemoveItem
|
|
65
|
+
local saveWidgetHandle = SaveWidgetHandle
|
|
66
|
+
local setItemBooleanField = BlzSetItemBooleanField
|
|
47
67
|
local setItemCharges = SetItemCharges
|
|
68
|
+
local setItemColor = SetItemColor
|
|
69
|
+
local setItemDropOnDeath = SetItemDropOnDeath
|
|
70
|
+
local setItemDroppable = SetItemDroppable
|
|
71
|
+
local setItemPawnable = SetItemPawnable
|
|
72
|
+
local setRect = SetRect
|
|
73
|
+
local triggerAddCondition = TriggerAddCondition
|
|
74
|
+
local triggerRegisterDeathEvent = TriggerRegisterDeathEvent
|
|
48
75
|
local unitRemoveAbility = UnitRemoveAbility
|
|
76
|
+
local unitRemoveItem = UnitRemoveItem
|
|
49
77
|
local unitUseItem = UnitUseItem
|
|
50
78
|
local unitUseItemPoint = UnitUseItemPoint
|
|
51
79
|
local unitUseItemTarget = UnitUseItemTarget
|
|
80
|
+
local tableRemove = table.remove
|
|
81
|
+
local itemChargesChangeEvent = __TS__New(Event)
|
|
82
|
+
local itemDeathEvent = __TS__New(Event)
|
|
52
83
|
_G.SetItemCharges = function(whichItem, charges)
|
|
53
84
|
setItemCharges(whichItem, charges)
|
|
54
85
|
invoke(
|
|
@@ -56,9 +87,6 @@ _G.SetItemCharges = function(whichItem, charges)
|
|
|
56
87
|
____exports.Item:of(whichItem)
|
|
57
88
|
)
|
|
58
89
|
end
|
|
59
|
-
local getItemIntegerField = BlzGetItemIntegerField
|
|
60
|
-
local setItemBooleanField = BlzSetItemBooleanField
|
|
61
|
-
local getItemBooleanField = BlzGetItemBooleanField
|
|
62
90
|
invoke = Event.invoke
|
|
63
91
|
local enumRect = Rect:create(0, 0, 0, 0).handle
|
|
64
92
|
---
|
|
@@ -131,40 +159,83 @@ local function collectIntoTargetRange()
|
|
|
131
159
|
targetCollectionNextIndex = targetCollectionNextIndex + 1
|
|
132
160
|
end
|
|
133
161
|
end
|
|
162
|
+
local hashtable = InitHashtable()
|
|
163
|
+
local deathTriggerCondition = condition(function()
|
|
164
|
+
saveWidgetHandle(
|
|
165
|
+
hashtable,
|
|
166
|
+
1,
|
|
167
|
+
1,
|
|
168
|
+
getTriggerWidget()
|
|
169
|
+
)
|
|
170
|
+
local item = ____exports.Item:of(loadItemHandle(hashtable, 1, 1))
|
|
171
|
+
if item ~= nil then
|
|
172
|
+
invoke(itemDeathEvent, item)
|
|
173
|
+
end
|
|
174
|
+
end)
|
|
175
|
+
itemDeathEvent:addListener(
|
|
176
|
+
999999,
|
|
177
|
+
function(item)
|
|
178
|
+
Timer:run(item, "destroy")
|
|
179
|
+
end
|
|
180
|
+
)
|
|
134
181
|
____exports.Item = __TS__Class()
|
|
135
182
|
local Item = ____exports.Item
|
|
136
183
|
Item.name = "Item"
|
|
137
184
|
__TS__ClassExtends(Item, Handle)
|
|
138
185
|
function Item.prototype.____constructor(self, handle)
|
|
139
186
|
Handle.prototype.____constructor(self, handle)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
end
|
|
146
|
-
self[101] = luaIndexByAbilityTypeId
|
|
187
|
+
self[100] = doAbilityAction(handle, getItemAbilities, self)
|
|
188
|
+
local deathTrigger = createTrigger()
|
|
189
|
+
triggerRegisterDeathEvent(deathTrigger, handle)
|
|
190
|
+
triggerAddCondition(deathTrigger, deathTriggerCondition)
|
|
191
|
+
self[101] = deathTrigger
|
|
147
192
|
end
|
|
148
193
|
function Item.prototype.onDestroy(self)
|
|
194
|
+
local owner = self.owner
|
|
195
|
+
if owner ~= nil then
|
|
196
|
+
unitRemoveItem(owner.handle, self.handle)
|
|
197
|
+
end
|
|
149
198
|
local abilities = self[100]
|
|
150
199
|
for i = 1, #abilities do
|
|
151
200
|
abilities[i]:destroy()
|
|
152
201
|
end
|
|
153
202
|
removeItem(self.handle)
|
|
203
|
+
destroyTrigger(self[101])
|
|
154
204
|
return Handle.prototype.onDestroy(self)
|
|
155
205
|
end
|
|
156
206
|
function Item.create(self, id, x, y, skinId)
|
|
157
207
|
return self:of(BlzCreateItemWithSkin(id, x, y, skinId or id))
|
|
158
208
|
end
|
|
209
|
+
function Item.getRandomTypeId(self, level, equipmentType, tag, itemType)
|
|
210
|
+
if equipmentType == nil then
|
|
211
|
+
equipmentType = 9
|
|
212
|
+
end
|
|
213
|
+
if tag == nil then
|
|
214
|
+
tag = 8
|
|
215
|
+
end
|
|
216
|
+
if itemType == nil then
|
|
217
|
+
itemType = ITEM_TYPE_ANY
|
|
218
|
+
end
|
|
219
|
+
local id = chooseRandomItemExWithFilter(
|
|
220
|
+
itemType,
|
|
221
|
+
level,
|
|
222
|
+
convertEquipmentType(equipmentType),
|
|
223
|
+
convertItemTag(tag)
|
|
224
|
+
)
|
|
225
|
+
return id ~= 0 and id or nil
|
|
226
|
+
end
|
|
159
227
|
function Item.prototype.consumeCharge(self)
|
|
228
|
+
return self:consumeCharges(1)
|
|
229
|
+
end
|
|
230
|
+
function Item.prototype.consumeCharges(self, count)
|
|
160
231
|
local handle = self.handle
|
|
161
232
|
local charges = getItemCharges(handle)
|
|
162
|
-
if charges
|
|
163
|
-
setItemCharges(handle, charges -
|
|
233
|
+
if charges > count then
|
|
234
|
+
setItemCharges(handle, charges - count)
|
|
164
235
|
invoke(itemChargesChangeEvent, self)
|
|
165
236
|
return true
|
|
166
237
|
end
|
|
167
|
-
if charges ==
|
|
238
|
+
if charges == count then
|
|
168
239
|
if getItemBooleanField(handle, ITEM_BF_PERISHABLE) then
|
|
169
240
|
self:destroy()
|
|
170
241
|
return true
|
|
@@ -174,6 +245,7 @@ function Item.prototype.consumeCharge(self)
|
|
|
174
245
|
invoke(itemChargesChangeEvent, self)
|
|
175
246
|
return true
|
|
176
247
|
end
|
|
248
|
+
setItemCharges(handle, 1)
|
|
177
249
|
local ____doAbilityActionForceDummy_2 = doAbilityActionForceDummy
|
|
178
250
|
local ____opt_0 = self.owner
|
|
179
251
|
____doAbilityActionForceDummy_2(handle, ____opt_0 and ____opt_0.handle, consumeCharge)
|
|
@@ -187,33 +259,32 @@ function Item.prototype.addAbility(self, abilityTypeId)
|
|
|
187
259
|
if nativeAbility ~= nil then
|
|
188
260
|
local ability = ItemAbility:of(nativeAbility, abilityTypeId, self)
|
|
189
261
|
local abilities = self[100]
|
|
190
|
-
|
|
191
|
-
abilities[luaIndex] = ability
|
|
192
|
-
self[101][abilityTypeId] = luaIndex
|
|
262
|
+
abilities[#abilities + 1] = ability
|
|
193
263
|
return ability
|
|
194
264
|
end
|
|
195
265
|
return nil
|
|
196
266
|
end
|
|
197
267
|
function Item.prototype.removeAbility(self, abilityTypeId)
|
|
198
|
-
local
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
for j = luaIndex, abilityTypeIdsLength do
|
|
206
|
-
abilities[j] = abilities[j + 1]
|
|
268
|
+
local abilities = self[100]
|
|
269
|
+
for i = 1, #abilities do
|
|
270
|
+
if abilities[i].typeId == abilityTypeId then
|
|
271
|
+
local ability = abilities[i]
|
|
272
|
+
tableRemove(abilities, i)
|
|
273
|
+
ability:destroy()
|
|
274
|
+
return true
|
|
207
275
|
end
|
|
208
276
|
end
|
|
209
|
-
return
|
|
277
|
+
return doAbilityAction(self.handle, itemRemoveAbility, abilityTypeId)
|
|
210
278
|
end
|
|
211
279
|
function Item.prototype.hasAbility(self, abilityTypeId)
|
|
212
|
-
return self
|
|
280
|
+
return doAbilityAction(self.handle, getItemAbility, abilityTypeId) ~= nil
|
|
213
281
|
end
|
|
214
282
|
function Item.prototype.getAbility(self, abilityTypeId)
|
|
215
|
-
|
|
216
|
-
|
|
283
|
+
return ItemAbility:of(
|
|
284
|
+
doAbilityAction(self.handle, getItemAbility, abilityTypeId),
|
|
285
|
+
abilityTypeId,
|
|
286
|
+
self
|
|
287
|
+
)
|
|
217
288
|
end
|
|
218
289
|
function Item.getInRange(self, x, y, range)
|
|
219
290
|
targetCollection = {}
|
|
@@ -237,6 +308,52 @@ function Item.getInRect(self, rect)
|
|
|
237
308
|
enumItemsInRect(rect.handle, nil, collectIntoTarget)
|
|
238
309
|
return targetCollection
|
|
239
310
|
end
|
|
311
|
+
__TS__SetDescriptor(
|
|
312
|
+
Item.prototype,
|
|
313
|
+
"isEquipped",
|
|
314
|
+
{get = function(self)
|
|
315
|
+
return isItemEquipped(self.handle)
|
|
316
|
+
end},
|
|
317
|
+
true
|
|
318
|
+
)
|
|
319
|
+
__TS__SetDescriptor(
|
|
320
|
+
Item.prototype,
|
|
321
|
+
"isInBag",
|
|
322
|
+
{get = function(self)
|
|
323
|
+
return isItemInBag(self.handle)
|
|
324
|
+
end},
|
|
325
|
+
true
|
|
326
|
+
)
|
|
327
|
+
__TS__SetDescriptor(
|
|
328
|
+
Item.prototype,
|
|
329
|
+
"equipmentType",
|
|
330
|
+
{get = function(self)
|
|
331
|
+
return getHandleId(getItemEquipmentType(self.handle))
|
|
332
|
+
end},
|
|
333
|
+
true
|
|
334
|
+
)
|
|
335
|
+
__TS__SetDescriptor(
|
|
336
|
+
Item.prototype,
|
|
337
|
+
"tag",
|
|
338
|
+
{get = function(self)
|
|
339
|
+
return getHandleId(getItemTag(self.handle))
|
|
340
|
+
end},
|
|
341
|
+
true
|
|
342
|
+
)
|
|
343
|
+
__TS__SetDescriptor(
|
|
344
|
+
Item.prototype,
|
|
345
|
+
"color",
|
|
346
|
+
{
|
|
347
|
+
get = function(self)
|
|
348
|
+
return self[102] or PlayerColor.red
|
|
349
|
+
end,
|
|
350
|
+
set = function(self, color)
|
|
351
|
+
setItemColor(self.handle, color.handle)
|
|
352
|
+
self[102] = color
|
|
353
|
+
end
|
|
354
|
+
},
|
|
355
|
+
true
|
|
356
|
+
)
|
|
240
357
|
__TS__SetDescriptor(
|
|
241
358
|
Item.prototype,
|
|
242
359
|
"typeId",
|
|
@@ -325,65 +442,55 @@ __TS__SetDescriptor(
|
|
|
325
442
|
)
|
|
326
443
|
__TS__SetDescriptor(
|
|
327
444
|
Item.prototype,
|
|
328
|
-
"
|
|
445
|
+
"dropsOnDeath",
|
|
329
446
|
{
|
|
330
447
|
get = function(self)
|
|
331
|
-
return
|
|
448
|
+
return getItemBooleanField(self.handle, ITEM_BF_DROPPED_WHEN_CARRIER_DIES)
|
|
332
449
|
end,
|
|
333
|
-
set = function(self,
|
|
334
|
-
|
|
335
|
-
end
|
|
336
|
-
},
|
|
337
|
-
true
|
|
338
|
-
)
|
|
339
|
-
__TS__SetDescriptor(
|
|
340
|
-
Item.prototype,
|
|
341
|
-
"droppable",
|
|
342
|
-
{
|
|
343
|
-
get = function(self)
|
|
344
|
-
return BlzGetItemBooleanField(self.handle, ITEM_BF_CAN_BE_DROPPED)
|
|
345
|
-
end,
|
|
346
|
-
set = function(self, v)
|
|
347
|
-
SetItemDroppable(self.handle, v)
|
|
450
|
+
set = function(self, dropsOnDeath)
|
|
451
|
+
setItemDropOnDeath(self.handle, dropsOnDeath)
|
|
348
452
|
end
|
|
349
453
|
},
|
|
350
454
|
true
|
|
351
455
|
)
|
|
352
456
|
__TS__SetDescriptor(
|
|
353
457
|
Item.prototype,
|
|
354
|
-
"
|
|
458
|
+
"canBeDropped",
|
|
355
459
|
{
|
|
356
460
|
get = function(self)
|
|
357
|
-
return
|
|
461
|
+
return getItemBooleanField(self.handle, ITEM_BF_CAN_BE_DROPPED)
|
|
358
462
|
end,
|
|
359
|
-
set = function(self,
|
|
360
|
-
|
|
463
|
+
set = function(self, canBeDropped)
|
|
464
|
+
setItemDroppable(self.handle, canBeDropped)
|
|
361
465
|
end
|
|
362
466
|
},
|
|
363
467
|
true
|
|
364
468
|
)
|
|
365
469
|
__TS__SetDescriptor(
|
|
366
470
|
Item.prototype,
|
|
367
|
-
"
|
|
471
|
+
"perishes",
|
|
368
472
|
{
|
|
369
473
|
get = function(self)
|
|
370
474
|
return getItemBooleanField(self.handle, ITEM_BF_PERISHABLE)
|
|
371
475
|
end,
|
|
372
|
-
set = function(self,
|
|
373
|
-
|
|
476
|
+
set = function(self, perishes)
|
|
477
|
+
local handle = self.handle
|
|
478
|
+
local powerUp = isItemPowerup(handle)
|
|
479
|
+
setItemBooleanField(handle, ITEM_BF_PERISHABLE, perishes)
|
|
480
|
+
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, powerUp)
|
|
374
481
|
end
|
|
375
482
|
},
|
|
376
483
|
true
|
|
377
484
|
)
|
|
378
485
|
__TS__SetDescriptor(
|
|
379
486
|
Item.prototype,
|
|
380
|
-
"
|
|
487
|
+
"isPowerUp",
|
|
381
488
|
{
|
|
382
489
|
get = function(self)
|
|
383
490
|
return isItemPowerup(self.handle)
|
|
384
491
|
end,
|
|
385
|
-
set = function(self,
|
|
386
|
-
setItemBooleanField(self.handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED,
|
|
492
|
+
set = function(self, isPowerUp)
|
|
493
|
+
setItemBooleanField(self.handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, isPowerUp)
|
|
387
494
|
end
|
|
388
495
|
},
|
|
389
496
|
true
|
|
@@ -417,22 +524,6 @@ __TS__SetDescriptor(
|
|
|
417
524
|
},
|
|
418
525
|
true
|
|
419
526
|
)
|
|
420
|
-
__TS__SetDescriptor(
|
|
421
|
-
Item.prototype,
|
|
422
|
-
"usable",
|
|
423
|
-
{
|
|
424
|
-
get = function(self)
|
|
425
|
-
return getItemBooleanField(self.handle, ITEM_BF_ACTIVELY_USED)
|
|
426
|
-
end,
|
|
427
|
-
set = function(self, v)
|
|
428
|
-
local handle = self.handle
|
|
429
|
-
local powerup = isItemPowerup(handle)
|
|
430
|
-
setItemBooleanField(handle, ITEM_BF_ACTIVELY_USED, v)
|
|
431
|
-
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, powerup)
|
|
432
|
-
end
|
|
433
|
-
},
|
|
434
|
-
true
|
|
435
|
-
)
|
|
436
527
|
__TS__SetDescriptor(
|
|
437
528
|
Item.prototype,
|
|
438
529
|
"visible",
|
|
@@ -654,8 +745,8 @@ __TS__ObjectDefineProperty(
|
|
|
654
745
|
return self.onDestroyEvent
|
|
655
746
|
end}
|
|
656
747
|
)
|
|
748
|
+
Item.deathEvent = itemDeathEvent
|
|
657
749
|
Item.chargesChangedEvent = itemChargesChangeEvent
|
|
658
|
-
local getManipulatedItem = GetManipulatedItem
|
|
659
750
|
local trigger = CreateTrigger()
|
|
660
751
|
TriggerRegisterAnyUnitEventBJ(trigger, EVENT_PLAYER_UNIT_PICKUP_ITEM)
|
|
661
752
|
TriggerAddAction(
|
|
@@ -74,9 +74,12 @@ ____exports.castAbility = function(nativeUnit, abilityTypeId, prepareAbility, ..
|
|
|
74
74
|
unitRemoveAbility(nativeUnit, INVENTORY_ABILITY_TYPE_ID)
|
|
75
75
|
if latestInventoryAbilityTypeId ~= 0 then
|
|
76
76
|
unitAddAbility(nativeUnit, latestInventoryAbilityTypeId)
|
|
77
|
-
for slot,
|
|
78
|
-
|
|
79
|
-
|
|
77
|
+
for slot = 0, inventorySize - 1 do
|
|
78
|
+
local nativeItem = nativeItemBySlot[slot]
|
|
79
|
+
if nativeItem ~= nil then
|
|
80
|
+
unitAddItem(nativeUnit, nativeItem)
|
|
81
|
+
unitDropItemSlot(nativeUnit, nativeItem, slot)
|
|
82
|
+
end
|
|
80
83
|
end
|
|
81
84
|
end
|
|
82
85
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local getLocalClientWidth = BlzGetLocalClientWidth
|
|
3
|
+
local getLocalClientHeight = BlzGetLocalClientHeight
|
|
4
|
+
---
|
|
5
|
+
-- @internal For use by internal systems only.
|
|
6
|
+
____exports.getFrameMinXMaxX = function()
|
|
7
|
+
local w = getLocalClientWidth()
|
|
8
|
+
local h = getLocalClientHeight()
|
|
9
|
+
local width4by3 = (w - h / 600 * 800) / 2
|
|
10
|
+
local pxtodpi = 0.6 / h
|
|
11
|
+
local minX = -width4by3 * pxtodpi
|
|
12
|
+
local maxX = minX + w * pxtodpi
|
|
13
|
+
return minX, maxX
|
|
14
|
+
end
|
|
15
|
+
---
|
|
16
|
+
-- @internal For use by internal systems only.
|
|
17
|
+
____exports.FRAME_MIN_Y = 0
|
|
18
|
+
---
|
|
19
|
+
-- @internal For use by internal systems only.
|
|
20
|
+
____exports.FRAME_MAX_Y = 0.6
|
|
21
|
+
return ____exports
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local getLocationZ = GetLocationZ
|
|
3
|
+
local moveLocation = MoveLocation
|
|
4
|
+
local location = Location(0, 0)
|
|
5
|
+
---
|
|
6
|
+
-- @internal For use by internal systems only.
|
|
7
|
+
____exports.getTerrainZ = function(x, y)
|
|
8
|
+
moveLocation(location, x, y)
|
|
9
|
+
return getLocationZ(location)
|
|
10
|
+
end
|
|
11
|
+
return ____exports
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
|
-
local
|
|
3
|
-
local AttributeBonusAbilityType =
|
|
2
|
+
local ____attribute_2Dbonus = require("engine.object-data.entry.ability-type.attribute-bonus")
|
|
3
|
+
local AttributeBonusAbilityType = ____attribute_2Dbonus.AttributeBonusAbilityType
|
|
4
4
|
---
|
|
5
5
|
-- @internal For use by internal systems.
|
|
6
6
|
____exports.ATTRIBUTE_BONUS_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____health_2Dbonus = require("engine.object-data.entry.ability-type.health-bonus")
|
|
3
|
+
local HealthBonusAbilityType = ____health_2Dbonus.HealthBonusAbilityType
|
|
4
|
+
---
|
|
5
|
+
-- @internal For use by internal systems only.
|
|
6
|
+
____exports.HEALTH_BONUS_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
7
|
+
local abilityType = HealthBonusAbilityType:create()
|
|
8
|
+
abilityType.isInternal = true
|
|
9
|
+
abilityType.isButtonVisible = false
|
|
10
|
+
abilityType.healthBonus = 0
|
|
11
|
+
return abilityType.id
|
|
12
|
+
end)
|
|
13
|
+
---
|
|
14
|
+
-- @internal For use by internal systems only.
|
|
15
|
+
____exports.HEALTH_BONUS_DUMMY_ABILITY_FIELD = ABILITY_ILF_MAX_LIFE_GAINED
|
|
16
|
+
return ____exports
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____mana_2Dbonus = require("engine.object-data.entry.ability-type.mana-bonus")
|
|
3
|
+
local ManaBonusAbilityType = ____mana_2Dbonus.ManaBonusAbilityType
|
|
4
|
+
---
|
|
5
|
+
-- @internal For use by internal systems only.
|
|
6
|
+
____exports.MANA_BONUS_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
7
|
+
local abilityType = ManaBonusAbilityType:create()
|
|
8
|
+
abilityType.isInternal = true
|
|
9
|
+
abilityType.isButtonVisible = false
|
|
10
|
+
abilityType.manaBonus = 0
|
|
11
|
+
return abilityType.id
|
|
12
|
+
end)
|
|
13
|
+
---
|
|
14
|
+
-- @internal For use by internal systems only.
|
|
15
|
+
____exports.MANA_BONUS_DUMMY_ABILITY_FIELD = ABILITY_ILF_MAX_MANA_GAINED
|
|
16
|
+
return ____exports
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____mana_2Dregeneration = require("engine.object-data.entry.ability-type.mana-regeneration")
|
|
3
|
+
local ManaRegenerationAbilityType = ____mana_2Dregeneration.ManaRegenerationAbilityType
|
|
4
|
+
---
|
|
5
|
+
-- @internal For use by internal systems.
|
|
6
|
+
____exports.MANA_REGENERATION_RATE_INCREASE_FACTOR_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
7
|
+
local abilityType = ManaRegenerationAbilityType:create()
|
|
8
|
+
abilityType.isInternal = true
|
|
9
|
+
abilityType.isButtonVisible = false
|
|
10
|
+
abilityType.manaRegenerationRateIncreaseFactor = 4
|
|
11
|
+
return abilityType.id
|
|
12
|
+
end)
|
|
13
|
+
---
|
|
14
|
+
-- @internal For use by internal systems.
|
|
15
|
+
____exports.MANA_REGENERATION_RATE_INCREASE_FACTOR_ABILITY_FIELD = ABILITY_RLF_MANA_REGENERATION_BONUS_AS_FRACTION_OF_NORMAL
|
|
16
|
+
return ____exports
|
|
@@ -150,3 +150,38 @@ declare module "../unit" {
|
|
|
150
150
|
};
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
+
declare module "../unit" {
|
|
154
|
+
namespace Unit {
|
|
155
|
+
const abilityImpactEvent: DispatchingEvent<[Unit, Ability]>;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
declare module "../unit" {
|
|
159
|
+
namespace Unit {
|
|
160
|
+
const abilityWidgetTargetImpactEvent: DispatchingEvent<[Unit, Ability, Widget]>;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
declare module "../unit" {
|
|
164
|
+
namespace Unit {
|
|
165
|
+
const abilityUnitTargetImpactEvent: DispatchingEvent<[Unit, Ability, Unit]>;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
declare module "../unit" {
|
|
169
|
+
namespace Unit {
|
|
170
|
+
const abilityItemTargetImpactEvent: DispatchingEvent<[Unit, Ability, Item]>;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
declare module "../unit" {
|
|
174
|
+
namespace Unit {
|
|
175
|
+
const abilityDestructibleTargetImpactEvent: DispatchingEvent<[Unit, Ability, Destructable]>;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
declare module "../unit" {
|
|
179
|
+
namespace Unit {
|
|
180
|
+
const abilityPointTargetImpactEvent: DispatchingEvent<[Unit, Ability, number, number]>;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
declare module "../unit" {
|
|
184
|
+
namespace Unit {
|
|
185
|
+
const abilityNoTargetImpactEvent: DispatchingEvent<[Unit, Ability]>;
|
|
186
|
+
}
|
|
187
|
+
}
|