warscript 0.0.1-dev.bad60be → 0.0.1-dev.bc4cd10
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/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 +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 +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 +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 +4 -4
- 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 +1 -1
- package/engine/behaviour/ability/emulate-impact.lua +7 -5
- 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/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 +13 -6
- package/engine/behaviour/ability.lua +56 -1
- package/engine/behaviour/unit/stun-immunity.d.ts +9 -5
- package/engine/behaviour/unit/stun-immunity.lua +17 -7
- package/engine/behaviour/unit.d.ts +16 -5
- package/engine/behaviour/unit.lua +135 -27
- package/engine/buff.d.ts +73 -27
- package/engine/buff.lua +424 -193
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +7 -1
- package/engine/internal/ability.lua +90 -47
- package/engine/internal/item/ability.lua +2 -1
- 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 +37 -8
- package/engine/internal/item.d.ts +27 -14
- package/engine/internal/item.lua +185 -82
- 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/misc/unit-ability-level-natives.d.ts +2 -0
- package/engine/internal/misc/unit-ability-level-natives.lua +12 -0
- package/engine/internal/object-data/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/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 +14 -14
- package/engine/internal/unit/ability.lua +86 -47
- 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/attributes.d.ts +17 -0
- package/engine/internal/unit/attributes.lua +46 -0
- package/engine/internal/unit/bonus.d.ts +14 -0
- package/engine/internal/unit/bonus.lua +102 -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/fly-height.d.ts +7 -0
- package/engine/internal/unit/fly-height.lua +20 -0
- package/engine/internal/unit/ignore-events-items.lua +10 -1
- 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} +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/main-selected.lua +12 -27
- package/engine/internal/unit/order.d.ts +3 -3
- package/engine/internal/unit/order.lua +10 -10
- 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.d.ts +2 -1
- package/engine/internal/unit+ability.lua +73 -3
- 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 +65 -27
- package/engine/internal/unit.d.ts +19 -32
- package/engine/internal/unit.lua +241 -341
- package/engine/local-client.d.ts +28 -0
- package/engine/local-client.lua +324 -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/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/health-regeneration-type.d.ts +8 -0
- package/engine/object-data/auxiliary/health-regeneration-type.lua +2 -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/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/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/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/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/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/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/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-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 +25 -6
- package/engine/object-data/entry/ability-type.lua +249 -12
- 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 +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 +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 +6 -1
- package/engine/object-data/entry.lua +8 -0
- 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 +27 -5
- package/engine/object-field/unit.lua +82 -0
- package/engine/object-field.d.ts +12 -4
- package/engine/object-field.lua +273 -126
- 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/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/standard/fields/unit.d.ts +11 -2
- package/engine/standard/fields/unit.lua +16 -1
- package/engine/synchronization.d.ts +11 -0
- package/engine/synchronization.lua +77 -0
- package/engine/text-tag.d.ts +1 -1
- package/engine/text-tag.lua +92 -17
- 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 +11 -9
- 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 +2 -0
- package/utility/arrays.lua +20 -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 +11 -2
- package/utility/lua-maps.lua +33 -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/engine/internal/unit/item.lua +0 -78
- /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,58 @@ 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 isItemOwned = IsItemOwned
|
|
60
|
+
local isItemPawnable = IsItemPawnable
|
|
61
|
+
local isItemPowerup = IsItemPowerup
|
|
62
|
+
local itemAddAbility = BlzItemAddAbility
|
|
63
|
+
local itemRemoveAbility = BlzItemRemoveAbility
|
|
64
|
+
local loadItemHandle = LoadItemHandle
|
|
65
|
+
local removeItem = RemoveItem
|
|
66
|
+
local saveWidgetHandle = SaveWidgetHandle
|
|
67
|
+
local setItemBooleanField = BlzSetItemBooleanField
|
|
47
68
|
local setItemCharges = SetItemCharges
|
|
69
|
+
local setItemColor = SetItemColor
|
|
70
|
+
local setItemDropOnDeath = SetItemDropOnDeath
|
|
71
|
+
local setItemDroppable = SetItemDroppable
|
|
72
|
+
local setItemPawnable = SetItemPawnable
|
|
73
|
+
local setRect = SetRect
|
|
74
|
+
local triggerAddCondition = TriggerAddCondition
|
|
75
|
+
local triggerRegisterDeathEvent = TriggerRegisterDeathEvent
|
|
48
76
|
local unitRemoveAbility = UnitRemoveAbility
|
|
77
|
+
local unitRemoveItem = UnitRemoveItem
|
|
49
78
|
local unitUseItem = UnitUseItem
|
|
50
79
|
local unitUseItemPoint = UnitUseItemPoint
|
|
51
80
|
local unitUseItemTarget = UnitUseItemTarget
|
|
81
|
+
local tableRemove = table.remove
|
|
82
|
+
local itemChargesChangeEvent = __TS__New(Event)
|
|
83
|
+
local itemDeathEvent = __TS__New(Event)
|
|
52
84
|
_G.SetItemCharges = function(whichItem, charges)
|
|
53
85
|
setItemCharges(whichItem, charges)
|
|
54
86
|
invoke(
|
|
@@ -56,9 +88,6 @@ _G.SetItemCharges = function(whichItem, charges)
|
|
|
56
88
|
____exports.Item:of(whichItem)
|
|
57
89
|
)
|
|
58
90
|
end
|
|
59
|
-
local getItemIntegerField = BlzGetItemIntegerField
|
|
60
|
-
local setItemBooleanField = BlzSetItemBooleanField
|
|
61
|
-
local getItemBooleanField = BlzGetItemBooleanField
|
|
62
91
|
invoke = Event.invoke
|
|
63
92
|
local enumRect = Rect:create(0, 0, 0, 0).handle
|
|
64
93
|
---
|
|
@@ -131,31 +160,68 @@ local function collectIntoTargetRange()
|
|
|
131
160
|
targetCollectionNextIndex = targetCollectionNextIndex + 1
|
|
132
161
|
end
|
|
133
162
|
end
|
|
163
|
+
local hashtable = InitHashtable()
|
|
164
|
+
local deathTriggerCondition = condition(function()
|
|
165
|
+
saveWidgetHandle(
|
|
166
|
+
hashtable,
|
|
167
|
+
1,
|
|
168
|
+
1,
|
|
169
|
+
getTriggerWidget()
|
|
170
|
+
)
|
|
171
|
+
local item = ____exports.Item:of(loadItemHandle(hashtable, 1, 1))
|
|
172
|
+
if item ~= nil then
|
|
173
|
+
invoke(itemDeathEvent, item)
|
|
174
|
+
end
|
|
175
|
+
end)
|
|
176
|
+
itemDeathEvent:addListener(
|
|
177
|
+
999999,
|
|
178
|
+
function(item)
|
|
179
|
+
Timer:run(item, "destroy")
|
|
180
|
+
end
|
|
181
|
+
)
|
|
134
182
|
____exports.Item = __TS__Class()
|
|
135
183
|
local Item = ____exports.Item
|
|
136
184
|
Item.name = "Item"
|
|
137
185
|
__TS__ClassExtends(Item, Handle)
|
|
138
186
|
function Item.prototype.____constructor(self, handle)
|
|
139
187
|
Handle.prototype.____constructor(self, handle)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
end
|
|
146
|
-
self[101] = luaIndexByAbilityTypeId
|
|
188
|
+
self[100] = doAbilityAction(handle, getItemAbilities, self)
|
|
189
|
+
local deathTrigger = createTrigger()
|
|
190
|
+
triggerRegisterDeathEvent(deathTrigger, handle)
|
|
191
|
+
triggerAddCondition(deathTrigger, deathTriggerCondition)
|
|
192
|
+
self[101] = deathTrigger
|
|
147
193
|
end
|
|
148
194
|
function Item.prototype.onDestroy(self)
|
|
195
|
+
local owner = self.owner
|
|
196
|
+
if owner ~= nil then
|
|
197
|
+
unitRemoveItem(owner.handle, self.handle)
|
|
198
|
+
end
|
|
149
199
|
local abilities = self[100]
|
|
150
200
|
for i = 1, #abilities do
|
|
151
201
|
abilities[i]:destroy()
|
|
152
202
|
end
|
|
153
203
|
removeItem(self.handle)
|
|
204
|
+
destroyTrigger(self[101])
|
|
154
205
|
return Handle.prototype.onDestroy(self)
|
|
155
206
|
end
|
|
156
207
|
function Item.create(self, id, x, y, skinId)
|
|
157
208
|
return self:of(BlzCreateItemWithSkin(id, x, y, skinId or id))
|
|
158
209
|
end
|
|
210
|
+
function Item.getRandomTypeId(self, level, equipmentType, tag, itemType)
|
|
211
|
+
if tag == nil then
|
|
212
|
+
tag = 8
|
|
213
|
+
end
|
|
214
|
+
if itemType == nil then
|
|
215
|
+
itemType = ITEM_TYPE_ANY
|
|
216
|
+
end
|
|
217
|
+
local id = chooseRandomItemExWithFilter(
|
|
218
|
+
itemType,
|
|
219
|
+
level,
|
|
220
|
+
convertEquipmentType(equipmentType or 9),
|
|
221
|
+
convertItemTag(tag)
|
|
222
|
+
)
|
|
223
|
+
return id ~= 0 and id or nil
|
|
224
|
+
end
|
|
159
225
|
function Item.prototype.consumeCharge(self)
|
|
160
226
|
return self:consumeCharges(1)
|
|
161
227
|
end
|
|
@@ -191,33 +257,32 @@ function Item.prototype.addAbility(self, abilityTypeId)
|
|
|
191
257
|
if nativeAbility ~= nil then
|
|
192
258
|
local ability = ItemAbility:of(nativeAbility, abilityTypeId, self)
|
|
193
259
|
local abilities = self[100]
|
|
194
|
-
|
|
195
|
-
abilities[luaIndex] = ability
|
|
196
|
-
self[101][abilityTypeId] = luaIndex
|
|
260
|
+
abilities[#abilities + 1] = ability
|
|
197
261
|
return ability
|
|
198
262
|
end
|
|
199
263
|
return nil
|
|
200
264
|
end
|
|
201
265
|
function Item.prototype.removeAbility(self, abilityTypeId)
|
|
202
|
-
local
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
for j = luaIndex, abilityTypeIdsLength do
|
|
210
|
-
abilities[j] = abilities[j + 1]
|
|
266
|
+
local abilities = self[100]
|
|
267
|
+
for i = 1, #abilities do
|
|
268
|
+
if abilities[i].typeId == abilityTypeId then
|
|
269
|
+
local ability = abilities[i]
|
|
270
|
+
tableRemove(abilities, i)
|
|
271
|
+
ability:destroy()
|
|
272
|
+
return true
|
|
211
273
|
end
|
|
212
274
|
end
|
|
213
|
-
return
|
|
275
|
+
return doAbilityAction(self.handle, itemRemoveAbility, abilityTypeId)
|
|
214
276
|
end
|
|
215
277
|
function Item.prototype.hasAbility(self, abilityTypeId)
|
|
216
|
-
return self
|
|
278
|
+
return doAbilityAction(self.handle, getItemAbility, abilityTypeId) ~= nil
|
|
217
279
|
end
|
|
218
280
|
function Item.prototype.getAbility(self, abilityTypeId)
|
|
219
|
-
|
|
220
|
-
|
|
281
|
+
return ItemAbility:of(
|
|
282
|
+
doAbilityAction(self.handle, getItemAbility, abilityTypeId),
|
|
283
|
+
abilityTypeId,
|
|
284
|
+
self
|
|
285
|
+
)
|
|
221
286
|
end
|
|
222
287
|
function Item.getInRange(self, x, y, range)
|
|
223
288
|
targetCollection = {}
|
|
@@ -241,6 +306,70 @@ function Item.getInRect(self, rect)
|
|
|
241
306
|
enumItemsInRect(rect.handle, nil, collectIntoTarget)
|
|
242
307
|
return targetCollection
|
|
243
308
|
end
|
|
309
|
+
__TS__SetDescriptor(
|
|
310
|
+
Item.prototype,
|
|
311
|
+
"isOwned",
|
|
312
|
+
{get = function(self)
|
|
313
|
+
local handle = self.handle
|
|
314
|
+
return isItemOwned(handle) or isItemInBag(handle) or isItemEquipped(handle)
|
|
315
|
+
end},
|
|
316
|
+
true
|
|
317
|
+
)
|
|
318
|
+
__TS__SetDescriptor(
|
|
319
|
+
Item.prototype,
|
|
320
|
+
"isInInventory",
|
|
321
|
+
{get = function(self)
|
|
322
|
+
local handle = self.handle
|
|
323
|
+
return isItemOwned(handle) and not isItemInBag(handle) and not isItemEquipped(handle)
|
|
324
|
+
end},
|
|
325
|
+
true
|
|
326
|
+
)
|
|
327
|
+
__TS__SetDescriptor(
|
|
328
|
+
Item.prototype,
|
|
329
|
+
"isInExtendedInventory",
|
|
330
|
+
{get = function(self)
|
|
331
|
+
return isItemInBag(self.handle)
|
|
332
|
+
end},
|
|
333
|
+
true
|
|
334
|
+
)
|
|
335
|
+
__TS__SetDescriptor(
|
|
336
|
+
Item.prototype,
|
|
337
|
+
"isInEquipmentInventory",
|
|
338
|
+
{get = function(self)
|
|
339
|
+
return isItemEquipped(self.handle)
|
|
340
|
+
end},
|
|
341
|
+
true
|
|
342
|
+
)
|
|
343
|
+
__TS__SetDescriptor(
|
|
344
|
+
Item.prototype,
|
|
345
|
+
"equipmentType",
|
|
346
|
+
{get = function(self)
|
|
347
|
+
return getHandleId(getItemEquipmentType(self.handle))
|
|
348
|
+
end},
|
|
349
|
+
true
|
|
350
|
+
)
|
|
351
|
+
__TS__SetDescriptor(
|
|
352
|
+
Item.prototype,
|
|
353
|
+
"tag",
|
|
354
|
+
{get = function(self)
|
|
355
|
+
return getHandleId(getItemTag(self.handle))
|
|
356
|
+
end},
|
|
357
|
+
true
|
|
358
|
+
)
|
|
359
|
+
__TS__SetDescriptor(
|
|
360
|
+
Item.prototype,
|
|
361
|
+
"color",
|
|
362
|
+
{
|
|
363
|
+
get = function(self)
|
|
364
|
+
return self[102] or PlayerColor.red
|
|
365
|
+
end,
|
|
366
|
+
set = function(self, color)
|
|
367
|
+
setItemColor(self.handle, color.handle)
|
|
368
|
+
self[102] = color
|
|
369
|
+
end
|
|
370
|
+
},
|
|
371
|
+
true
|
|
372
|
+
)
|
|
244
373
|
__TS__SetDescriptor(
|
|
245
374
|
Item.prototype,
|
|
246
375
|
"typeId",
|
|
@@ -329,65 +458,55 @@ __TS__SetDescriptor(
|
|
|
329
458
|
)
|
|
330
459
|
__TS__SetDescriptor(
|
|
331
460
|
Item.prototype,
|
|
332
|
-
"
|
|
461
|
+
"dropsOnDeath",
|
|
333
462
|
{
|
|
334
463
|
get = function(self)
|
|
335
|
-
return
|
|
464
|
+
return getItemBooleanField(self.handle, ITEM_BF_DROPPED_WHEN_CARRIER_DIES)
|
|
336
465
|
end,
|
|
337
|
-
set = function(self,
|
|
338
|
-
|
|
466
|
+
set = function(self, dropsOnDeath)
|
|
467
|
+
setItemDropOnDeath(self.handle, dropsOnDeath)
|
|
339
468
|
end
|
|
340
469
|
},
|
|
341
470
|
true
|
|
342
471
|
)
|
|
343
472
|
__TS__SetDescriptor(
|
|
344
473
|
Item.prototype,
|
|
345
|
-
"
|
|
474
|
+
"canBeDropped",
|
|
346
475
|
{
|
|
347
476
|
get = function(self)
|
|
348
|
-
return
|
|
477
|
+
return getItemBooleanField(self.handle, ITEM_BF_CAN_BE_DROPPED)
|
|
349
478
|
end,
|
|
350
|
-
set = function(self,
|
|
351
|
-
|
|
352
|
-
end
|
|
353
|
-
},
|
|
354
|
-
true
|
|
355
|
-
)
|
|
356
|
-
__TS__SetDescriptor(
|
|
357
|
-
Item.prototype,
|
|
358
|
-
"pawnable",
|
|
359
|
-
{
|
|
360
|
-
get = function(self)
|
|
361
|
-
return IsItemPawnable(self.handle)
|
|
362
|
-
end,
|
|
363
|
-
set = function(self, v)
|
|
364
|
-
SetItemPawnable(self.handle, v)
|
|
479
|
+
set = function(self, canBeDropped)
|
|
480
|
+
setItemDroppable(self.handle, canBeDropped)
|
|
365
481
|
end
|
|
366
482
|
},
|
|
367
483
|
true
|
|
368
484
|
)
|
|
369
485
|
__TS__SetDescriptor(
|
|
370
486
|
Item.prototype,
|
|
371
|
-
"
|
|
487
|
+
"perishes",
|
|
372
488
|
{
|
|
373
489
|
get = function(self)
|
|
374
490
|
return getItemBooleanField(self.handle, ITEM_BF_PERISHABLE)
|
|
375
491
|
end,
|
|
376
|
-
set = function(self,
|
|
377
|
-
|
|
492
|
+
set = function(self, perishes)
|
|
493
|
+
local handle = self.handle
|
|
494
|
+
local powerUp = isItemPowerup(handle)
|
|
495
|
+
setItemBooleanField(handle, ITEM_BF_PERISHABLE, perishes)
|
|
496
|
+
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, powerUp)
|
|
378
497
|
end
|
|
379
498
|
},
|
|
380
499
|
true
|
|
381
500
|
)
|
|
382
501
|
__TS__SetDescriptor(
|
|
383
502
|
Item.prototype,
|
|
384
|
-
"
|
|
503
|
+
"isPowerUp",
|
|
385
504
|
{
|
|
386
505
|
get = function(self)
|
|
387
506
|
return isItemPowerup(self.handle)
|
|
388
507
|
end,
|
|
389
|
-
set = function(self,
|
|
390
|
-
setItemBooleanField(self.handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED,
|
|
508
|
+
set = function(self, isPowerUp)
|
|
509
|
+
setItemBooleanField(self.handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, isPowerUp)
|
|
391
510
|
end
|
|
392
511
|
},
|
|
393
512
|
true
|
|
@@ -421,22 +540,6 @@ __TS__SetDescriptor(
|
|
|
421
540
|
},
|
|
422
541
|
true
|
|
423
542
|
)
|
|
424
|
-
__TS__SetDescriptor(
|
|
425
|
-
Item.prototype,
|
|
426
|
-
"usable",
|
|
427
|
-
{
|
|
428
|
-
get = function(self)
|
|
429
|
-
return getItemBooleanField(self.handle, ITEM_BF_ACTIVELY_USED)
|
|
430
|
-
end,
|
|
431
|
-
set = function(self, v)
|
|
432
|
-
local handle = self.handle
|
|
433
|
-
local powerup = isItemPowerup(handle)
|
|
434
|
-
setItemBooleanField(handle, ITEM_BF_ACTIVELY_USED, v)
|
|
435
|
-
setItemBooleanField(handle, ITEM_BF_USE_AUTOMATICALLY_WHEN_ACQUIRED, powerup)
|
|
436
|
-
end
|
|
437
|
-
},
|
|
438
|
-
true
|
|
439
|
-
)
|
|
440
543
|
__TS__SetDescriptor(
|
|
441
544
|
Item.prototype,
|
|
442
545
|
"visible",
|
|
@@ -658,8 +761,8 @@ __TS__ObjectDefineProperty(
|
|
|
658
761
|
return self.onDestroyEvent
|
|
659
762
|
end}
|
|
660
763
|
)
|
|
764
|
+
Item.deathEvent = itemDeathEvent
|
|
661
765
|
Item.chargesChangedEvent = itemChargesChangeEvent
|
|
662
|
-
local getManipulatedItem = GetManipulatedItem
|
|
663
766
|
local trigger = CreateTrigger()
|
|
664
767
|
TriggerRegisterAnyUnitEventBJ(trigger, EVENT_PLAYER_UNIT_PICKUP_ITEM)
|
|
665
768
|
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
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
---
|
|
3
|
+
-- @internal The original natives, captured before `unit+ability` wraps them to report
|
|
4
|
+
-- ability level changes. For internal level juggling that must not be reported.
|
|
5
|
+
____exports.rawSetUnitAbilityLevel = SetUnitAbilityLevel
|
|
6
|
+
---
|
|
7
|
+
-- @internal
|
|
8
|
+
____exports.rawIncUnitAbilityLevel = IncUnitAbilityLevel
|
|
9
|
+
---
|
|
10
|
+
-- @internal
|
|
11
|
+
____exports.rawDecUnitAbilityLevel = DecUnitAbilityLevel
|
|
12
|
+
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,48 @@
|
|
|
1
|
+
local ____exports = {}
|
|
2
|
+
local ____healing_2Dward_2Daura = require("engine.object-data.entry.ability-type.healing-ward-aura")
|
|
3
|
+
local HealingWardAuraAbilityType = ____healing_2Dward_2Daura.HealingWardAuraAbilityType
|
|
4
|
+
local ____item_2Dlife_2Dregeneration = require("engine.object-data.entry.ability-type.item-life-regeneration")
|
|
5
|
+
local ItemLifeRegenerationAbilityType = ____item_2Dlife_2Dregeneration.ItemLifeRegenerationAbilityType
|
|
6
|
+
local ____combat_2Dclassification = require("engine.object-data.auxiliary.combat-classification")
|
|
7
|
+
local combatClassificationsOf = ____combat_2Dclassification.combatClassificationsOf
|
|
8
|
+
local function createHealthRegenerationDummyAbilityType(healthRegeneration)
|
|
9
|
+
local abilityType = ItemLifeRegenerationAbilityType:create()
|
|
10
|
+
abilityType.isInternal = true
|
|
11
|
+
abilityType.isButtonVisible = false
|
|
12
|
+
abilityType.healthRegeneration = healthRegeneration
|
|
13
|
+
return abilityType.id
|
|
14
|
+
end
|
|
15
|
+
---
|
|
16
|
+
-- @internal For use by internal systems. The ability at index `i` regenerates `2^i` hit
|
|
17
|
+
-- points per second; together they compose any value from 0 to 1023.
|
|
18
|
+
____exports.HEALTH_REGENERATION_RATE_INCREASE_DUMMY_ABILITY_TYPE_IDS = compiletime(function()
|
|
19
|
+
local abilityTypeIds = {}
|
|
20
|
+
for i = 0, 9 do
|
|
21
|
+
abilityTypeIds[i + 1] = createHealthRegenerationDummyAbilityType(1 << i)
|
|
22
|
+
end
|
|
23
|
+
return abilityTypeIds
|
|
24
|
+
end)
|
|
25
|
+
---
|
|
26
|
+
-- @internal For use by internal systems.
|
|
27
|
+
____exports.HEALTH_REGENERATION_RATE_DECREASE_DUMMY_VALUE = -1024
|
|
28
|
+
---
|
|
29
|
+
-- @internal For use by internal systems. Shifts negative values into the positive range.
|
|
30
|
+
____exports.HEALTH_REGENERATION_RATE_DECREASE_DUMMY_ABILITY_TYPE_ID = compiletime(function() return createHealthRegenerationDummyAbilityType(____exports.HEALTH_REGENERATION_RATE_DECREASE_DUMMY_VALUE) end)
|
|
31
|
+
---
|
|
32
|
+
-- @internal For use by internal systems. Holds the fractional remainder; being an aura,
|
|
33
|
+
-- it accepts field writes but applies with the usual aura delay.
|
|
34
|
+
____exports.FRACTIONAL_HEALTH_REGENERATION_RATE_INCREASE_DUMMY_ABILITY_TYPE_ID = compiletime(function()
|
|
35
|
+
local abilityType = HealingWardAuraAbilityType:create()
|
|
36
|
+
abilityType.isInternal = true
|
|
37
|
+
abilityType.isButtonVisible = false
|
|
38
|
+
abilityType.healthRegeneration = 0
|
|
39
|
+
abilityType.isHealthRegenerationPercentage = false
|
|
40
|
+
abilityType.allowedTargetCombatClassifications = combatClassificationsOf(4096)
|
|
41
|
+
abilityType.buffTypeIds = {}
|
|
42
|
+
abilityType.targetEffectPresets = {}
|
|
43
|
+
return abilityType.id
|
|
44
|
+
end)
|
|
45
|
+
---
|
|
46
|
+
-- @internal For use by internal systems.
|
|
47
|
+
____exports.FRACTIONAL_HEALTH_REGENERATION_RATE_INCREASE_ABILITY_FIELD = ABILITY_RLF_AMOUNT_OF_HIT_POINTS_REGENERATED
|
|
48
|
+
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
|