warscript 0.0.1-dev.8c7ee30 → 0.0.1-dev.8d8d605
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 +6 -0
- package/attributes.lua +17 -1
- package/binaryreader.d.ts +1 -0
- package/binaryreader.lua +3 -0
- package/config.d.ts +5 -0
- package/config.lua +10 -0
- package/core/types/effect.d.ts +14 -6
- package/core/types/effect.lua +131 -35
- package/core/types/frame.d.ts +9 -0
- package/core/types/frame.lua +193 -23
- package/core/types/handle.lua +11 -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 +18 -25
- package/core/types/sound.lua +113 -33
- package/core/types/tileCell.d.ts +11 -1
- package/core/types/tileCell.lua +97 -0
- package/core/types/timer.d.ts +9 -8
- package/core/types/timer.lua +45 -23
- package/core/types/unit.d.ts +4 -0
- package/core/types/unit.lua +4 -0
- package/core/util.d.ts +1 -1
- package/core/util.lua +18 -1
- package/decl/native.d.ts +1718 -964
- package/destroyable.d.ts +1 -0
- package/destroyable.lua +9 -0
- package/engine/behavior.d.ts +16 -3
- package/engine/behavior.lua +233 -73
- package/engine/behaviour/ability/always-enabled.d.ts +7 -0
- package/engine/behaviour/ability/always-enabled.lua +31 -0
- package/engine/behaviour/ability/apply-buff.d.ts +8 -5
- package/engine/behaviour/ability/apply-buff.lua +36 -4
- package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
- package/engine/behaviour/ability/damage.d.ts +42 -11
- package/engine/behaviour/ability/damage.lua +88 -39
- package/engine/behaviour/ability/emulate-impact.d.ts +6 -0
- package/engine/behaviour/ability/emulate-impact.lua +44 -0
- package/engine/behaviour/ability/heal.d.ts +33 -6
- package/engine/behaviour/ability/heal.lua +89 -10
- package/engine/behaviour/ability/instant-impact.d.ts +2 -2
- package/engine/behaviour/ability/instant-impact.lua +4 -19
- package/engine/behaviour/ability/on-command-impact.d.ts +8 -0
- package/engine/behaviour/ability/on-command-impact.lua +25 -0
- package/engine/behaviour/ability/remove-buffs.d.ts +25 -0
- package/engine/behaviour/ability/remove-buffs.lua +49 -0
- package/engine/behaviour/ability/restore-mana.d.ts +15 -0
- package/engine/behaviour/ability/restore-mana.lua +29 -0
- package/engine/behaviour/ability.d.ts +29 -7
- package/engine/behaviour/ability.lua +148 -43
- 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 +46 -2
- package/engine/behaviour/unit.lua +290 -6
- package/engine/buff.d.ts +166 -57
- package/engine/buff.lua +766 -274
- package/engine/game-map.d.ts +7 -0
- package/engine/game-map.lua +32 -0
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +27 -14
- package/engine/internal/ability.lua +164 -101
- package/engine/internal/item/ability.lua +162 -4
- 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 +30 -18
- package/engine/internal/item.lua +292 -102
- package/engine/internal/mechanics/ability-duration.lua +1 -1
- package/engine/internal/mechanics/cast-ability.lua +6 -3
- package/engine/internal/misc/ability-disable-counter.lua +13 -0
- package/engine/internal/misc/damage-metadata-by-target.d.ts +2 -0
- package/engine/internal/misc/damage-metadata-by-target.lua +5 -0
- package/engine/internal/misc/frame-coordinates.d.ts +2 -0
- 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/auto-attack-speed-increase.d.ts +1 -1
- package/engine/internal/object-data/auto-attack-speed-increase.lua +2 -0
- package/engine/internal/object-data/evasion-probability.d.ts +2 -0
- package/engine/internal/object-data/evasion-probability.lua +16 -0
- 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 +45 -1
- package/engine/internal/unit/ability.lua +142 -19
- package/engine/internal/unit/add-item-to-slot-init.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot-init.lua +23 -0
- package/engine/internal/unit/add-item-to-slot.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot.lua +52 -0
- package/engine/internal/unit/allowed-targets.d.ts +1 -1
- package/engine/internal/unit/allowed-targets.lua +9 -1
- 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 +12 -2
- package/engine/internal/unit/bonus.lua +56 -4
- 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/ignore-events-items.d.ts +2 -0
- package/engine/internal/unit/ignore-events-items.lua +5 -0
- package/engine/internal/unit/interrupts.d.ts +12 -0
- package/engine/internal/unit/interrupts.lua +28 -0
- package/engine/internal/unit/inventory.d.ts +24 -0
- package/engine/internal/unit/inventory.lua +77 -0
- package/engine/internal/unit/main-selected.d.ts +13 -0
- package/engine/internal/unit/main-selected.lua +36 -0
- 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 +12 -3
- package/engine/internal/unit+bonus.lua +3 -3
- package/engine/internal/unit+damage.d.ts +11 -11
- package/engine/internal/unit+damage.lua +43 -14
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit+transport.lua +4 -10
- package/engine/internal/unit-missile-data.lua +58 -32
- package/engine/internal/unit-missile-launch.lua +70 -13
- package/engine/internal/unit.d.ts +63 -30
- package/engine/internal/unit.lua +509 -291
- package/engine/internal/utility.lua +12 -0
- package/engine/lightning.d.ts +12 -5
- package/engine/lightning.lua +48 -14
- package/engine/local-client.d.ts +34 -2
- package/engine/local-client.lua +386 -15
- package/engine/object-data/auxiliary/animation-name.d.ts +1 -0
- package/engine/object-data/auxiliary/animation-name.lua +16 -0
- 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 -2
- package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
- package/engine/object-data/auxiliary/attack-type.d.ts +7 -8
- package/engine/object-data/auxiliary/attack-type.lua +42 -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/movement-type.d.ts +7 -7
- package/engine/object-data/auxiliary/movement-type.lua +22 -0
- package/engine/object-data/auxiliary/sound-eax.d.ts +10 -0
- package/engine/object-data/auxiliary/sound-eax.lua +2 -0
- package/engine/object-data/auxiliary/sound-preset-name.d.ts +5 -1
- package/engine/object-data/auxiliary/sound-set-name.d.ts +14 -3
- package/engine/object-data/auxiliary/tech-tree-dependency.d.ts +1 -1
- package/engine/object-data/auxiliary/unit-attribute.d.ts +6 -0
- package/engine/object-data/auxiliary/unit-attribute.lua +9 -0
- package/engine/object-data/entry/ability-type/apprehend.d.ts +22 -0
- package/engine/object-data/entry/ability-type/apprehend.lua +66 -0
- package/engine/object-data/entry/ability-type/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/berserk.d.ts +2 -0
- package/engine/object-data/entry/ability-type/berserk.lua +13 -0
- package/engine/object-data/entry/ability-type/blank-configurable.d.ts +3 -0
- package/engine/object-data/entry/ability-type/blank-configurable.lua +42 -1
- package/engine/object-data/entry/ability-type/carrion-swarm.d.ts +14 -0
- package/engine/object-data/entry/ability-type/carrion-swarm.lua +65 -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/disease-cloud.lua +2 -2
- package/engine/object-data/entry/ability-type/engineering-upgrade.lua +2 -2
- package/engine/object-data/entry/ability-type/ensnare.d.ts +12 -0
- package/engine/object-data/entry/ability-type/ensnare.lua +52 -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/feral-spirit.lua +2 -2
- 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/permanent-invisibility.d.ts +8 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.lua +26 -0
- package/engine/object-data/entry/ability-type/phase-shift.d.ts +10 -0
- package/engine/object-data/entry/ability-type/phase-shift.lua +39 -0
- package/engine/object-data/entry/ability-type/phoenix-morph.lua +4 -4
- 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-dead.d.ts +17 -0
- package/engine/object-data/entry/ability-type/raise-dead.lua +78 -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/shock-wave.d.ts +4 -0
- package/engine/object-data/entry/ability-type/shock-wave.lua +26 -0
- package/engine/object-data/entry/ability-type/slow-poison.d.ts +10 -0
- package/engine/object-data/entry/ability-type/slow-poison.lua +58 -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/summon-quilbeast.lua +2 -2
- package/engine/object-data/entry/ability-type/summon-water-elemental.lua +2 -2
- 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/web.d.ts +12 -0
- package/engine/object-data/entry/ability-type/web.lua +52 -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 +30 -19
- package/engine/object-data/entry/ability-type.lua +230 -40
- package/engine/object-data/entry/buff-type/applicable.lua +122 -137
- package/engine/object-data/entry/buff-type.d.ts +10 -12
- package/engine/object-data/entry/buff-type.lua +39 -29
- 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 +26 -3
- package/engine/object-data/entry/item-type.lua +145 -2
- package/engine/object-data/entry/lightning-type.d.ts +2 -2
- package/engine/object-data/entry/sound-preset.d.ts +33 -0
- package/engine/object-data/entry/sound-preset.lua +140 -0
- package/engine/object-data/entry/unit-type.d.ts +71 -6
- package/engine/object-data/entry/unit-type.lua +592 -93
- package/engine/object-data/entry/upgrade.d.ts +2 -2
- package/engine/object-data/entry/upgrade.lua +4 -4
- package/engine/object-data/entry.d.ts +19 -14
- package/engine/object-data/entry.lua +60 -32
- package/engine/object-data/utility/object-data-entry-id-generator.lua +7 -0
- package/engine/object-field/ability.d.ts +28 -5
- package/engine/object-field/ability.lua +61 -7
- package/engine/object-field/item.d.ts +22 -0
- package/engine/object-field/item.lua +118 -0
- package/engine/object-field/unit.d.ts +72 -3
- package/engine/object-field/unit.lua +268 -7
- package/engine/object-field.d.ts +26 -7
- package/engine/object-field.lua +362 -117
- 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 +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/engine/standard/entries/item-type.d.ts +1299 -0
- package/engine/standard/entries/item-type.lua +2 -0
- package/engine/standard/entries/sound-preset.d.ts +10 -0
- package/engine/standard/entries/sound-preset.lua +10 -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 +4 -2
- package/engine/standard/fields/ability.lua +4 -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 +12 -0
- package/engine/unit.lua +12 -0
- package/event.d.ts +1 -1
- package/index.d.ts +1 -0
- package/index.lua +1 -0
- package/lualib_bundle.lua +8 -3
- package/math.d.ts +2 -0
- package/math.lua +14 -0
- package/net/socket.d.ts +7 -1
- package/net/socket.lua +45 -4
- package/network.d.ts +1 -0
- package/network.lua +28 -3
- package/objutil/buff.lua +12 -11
- package/objutil/object.lua +1 -1
- package/objutil/unit.lua +8 -0
- package/operation.d.ts +8 -1
- package/operation.lua +38 -18
- package/package.json +3 -23
- package/patch-lua.d.ts +0 -0
- package/patch-lua.lua +25 -0
- package/patch-lualib.lua +1 -1
- package/property.d.ts +55 -0
- package/property.lua +374 -0
- package/utility/arrays.d.ts +10 -1
- package/utility/arrays.lua +45 -3
- package/utility/callback-array.d.ts +17 -0
- package/utility/callback-array.lua +61 -0
- package/utility/functions.d.ts +8 -0
- package/utility/functions.lua +13 -0
- package/utility/lazy.d.ts +2 -0
- package/utility/lazy.lua +14 -0
- package/utility/linked-map.d.ts +35 -0
- package/utility/linked-map.lua +107 -0
- package/utility/linked-set.d.ts +16 -3
- package/utility/linked-set.lua +54 -3
- package/utility/lua-maps.d.ts +15 -2
- package/utility/lua-maps.lua +53 -2
- package/utility/lua-sets.d.ts +2 -0
- package/utility/lua-sets.lua +7 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/utility/records.lua +20 -1
- package/utility/reflection.lua +11 -7
- package/utility/types.d.ts +4 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
- package/core/mapbounds.d.ts +0 -8
- package/core/mapbounds.lua +0 -12
- package/core/types/order.d.ts +0 -25
- package/core/types/order.lua +0 -55
- /package/engine/internal/{object-data/armor-increase.d.ts → misc/ability-disable-counter.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
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
local ____lualib = require("lualib_bundle")
|
|
2
|
+
local __TS__Class = ____lualib.__TS__Class
|
|
3
|
+
local __TS__ObjectDefineProperty = ____lualib.__TS__ObjectDefineProperty
|
|
4
|
+
local ____exports = {}
|
|
5
|
+
local ____rect = require("core.types.rect")
|
|
6
|
+
local Rect = ____rect.Rect
|
|
7
|
+
local ____region = require("core.types.region")
|
|
8
|
+
local Region = ____region.Region
|
|
9
|
+
____exports.GameMap = __TS__Class()
|
|
10
|
+
local GameMap = ____exports.GameMap
|
|
11
|
+
GameMap.name = "GameMap"
|
|
12
|
+
function GameMap.prototype.____constructor(self)
|
|
13
|
+
end
|
|
14
|
+
__TS__ObjectDefineProperty(
|
|
15
|
+
GameMap,
|
|
16
|
+
"worldBoundsRect",
|
|
17
|
+
{get = function(self)
|
|
18
|
+
local rect = Rect:of(GetWorldBounds())
|
|
19
|
+
rawset(self, "worldBoundsRect", rect)
|
|
20
|
+
return rect
|
|
21
|
+
end}
|
|
22
|
+
)
|
|
23
|
+
__TS__ObjectDefineProperty(
|
|
24
|
+
GameMap,
|
|
25
|
+
"worldBoundsRegion",
|
|
26
|
+
{get = function(self)
|
|
27
|
+
local region = Region:create(self.worldBoundsRect)
|
|
28
|
+
rawset(self, "worldBoundsRegion", region)
|
|
29
|
+
return region
|
|
30
|
+
end}
|
|
31
|
+
)
|
|
32
|
+
return ____exports
|
package/engine/index.d.ts
CHANGED
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import { Handle } from "../../core/types/handle";
|
|
2
|
+
import { Handle, HandleDestructor } from "../../core/types/handle";
|
|
3
3
|
import { Event } from "../../event";
|
|
4
4
|
import type { Item } from "../../core/types/item";
|
|
5
5
|
import type { Unit } from "./unit";
|
|
6
6
|
import type { AbilityTypeId } from "../object-data/entry/ability-type";
|
|
7
|
-
interface Fields<K, V> {
|
|
8
|
-
set(field: K, value: V): boolean;
|
|
9
|
-
get(field: K): V;
|
|
10
|
-
has(field: K): boolean;
|
|
11
|
-
}
|
|
12
|
-
interface AbilityLevel {
|
|
13
|
-
realFields: Fields<jabilityreallevelfield, number>;
|
|
14
|
-
}
|
|
15
7
|
export type jabilityfield = jabilityintegerfield | jabilityrealfield | jabilitybooleanfield | jabilitystringfield | jabilityintegerlevelfield | jabilityreallevelfield | jabilitybooleanlevelfield | jabilitystringlevelfield;
|
|
16
8
|
export declare class AbilitySnapshot {
|
|
17
9
|
}
|
|
@@ -20,7 +12,8 @@ export declare abstract class Ability extends Handle<jability> {
|
|
|
20
12
|
protected constructor(handle: jability, typeId: number);
|
|
21
13
|
toString(): string;
|
|
22
14
|
get parentTypeId(): number;
|
|
23
|
-
get
|
|
15
|
+
get orderTypeStringId(): string;
|
|
16
|
+
get orderTypeId(): number;
|
|
24
17
|
abstract readonly owner: Unit | Item;
|
|
25
18
|
getSnapshot(): AbilitySnapshot;
|
|
26
19
|
hasField(field: jabilityfield | number): boolean;
|
|
@@ -40,9 +33,11 @@ export declare abstract class Ability extends Handle<jability> {
|
|
|
40
33
|
setField(field: jabilityintegerlevelfield | jabilityreallevelfield, level: number, value: number): boolean;
|
|
41
34
|
setField(field: jabilitybooleanlevelfield, level: number, value: boolean): boolean;
|
|
42
35
|
setField(field: jabilitystringlevelfield, level: number, value: string): boolean;
|
|
43
|
-
get
|
|
44
|
-
get levels(): readonly AbilityLevel[];
|
|
36
|
+
get levelCount(): number;
|
|
45
37
|
abstract get level(): number;
|
|
38
|
+
abstract get cooldownRemaining(): number;
|
|
39
|
+
abstract set cooldownRemaining(cooldownRemaining: number);
|
|
40
|
+
abstract interruptCast(): void;
|
|
46
41
|
static get onCreate(): Event<[Ability]>;
|
|
47
42
|
static get destroyEvent(): Event<[Ability]>;
|
|
48
43
|
}
|
|
@@ -53,15 +48,30 @@ export declare class UnrecognizedAbility extends Ability {
|
|
|
53
48
|
readonly owner: Unit;
|
|
54
49
|
constructor(typeId: number, owner: Unit);
|
|
55
50
|
get level(): number;
|
|
51
|
+
get cooldownRemaining(): number;
|
|
52
|
+
set cooldownRemaining(_: number);
|
|
53
|
+
interruptCast(): void;
|
|
56
54
|
}
|
|
57
55
|
export declare class UnitAbility extends Ability {
|
|
58
56
|
readonly owner: Unit;
|
|
59
57
|
private readonly u;
|
|
58
|
+
private d?;
|
|
60
59
|
constructor(handle: jability, typeId: number, owner: Unit);
|
|
60
|
+
incrementHideCounter(): void;
|
|
61
|
+
decrementHideCounter(): void;
|
|
62
|
+
incrementDisableCounter(): void;
|
|
63
|
+
decrementDisableCounter(): void;
|
|
64
|
+
get isDisabled(): boolean;
|
|
61
65
|
get level(): number;
|
|
62
66
|
set level(v: number);
|
|
67
|
+
/** Uses the native percentage scale. */
|
|
68
|
+
get cooldownRemainingPercent(): number;
|
|
69
|
+
set cooldownRemainingPercent(percent: number);
|
|
63
70
|
get cooldownRemaining(): number;
|
|
64
|
-
set cooldownRemaining(
|
|
71
|
+
set cooldownRemaining(cooldownRemaining: number);
|
|
72
|
+
startCooldown(cooldown: number): void;
|
|
73
|
+
interruptCast(): void;
|
|
74
|
+
protected onDestroy(): HandleDestructor;
|
|
65
75
|
static get onCreate(): Event<[UnitAbility]>;
|
|
66
76
|
static get onDestroy(): Event<[UnitAbility]>;
|
|
67
77
|
}
|
|
@@ -85,7 +95,10 @@ export declare class ItemAbility extends Ability {
|
|
|
85
95
|
setField(field: jabilitybooleanlevelfield, level: number, value: boolean): boolean;
|
|
86
96
|
setField(field: jabilitystringlevelfield, level: number, value: string): boolean;
|
|
87
97
|
get level(): number;
|
|
98
|
+
get cooldownRemaining(): number;
|
|
99
|
+
set cooldownRemaining(cooldownRemaining: number);
|
|
100
|
+
interruptCast(): void;
|
|
101
|
+
protected onDestroy(): HandleDestructor;
|
|
88
102
|
static get onCreate(): Event<[ItemAbility]>;
|
|
89
103
|
static get onDestroy(): Event<[ItemAbility]>;
|
|
90
104
|
}
|
|
91
|
-
export {};
|
|
@@ -2,7 +2,6 @@ local ____lualib = require("lualib_bundle")
|
|
|
2
2
|
local __TS__ArrayMap = ____lualib.__TS__ArrayMap
|
|
3
3
|
local __TS__ArrayFilter = ____lualib.__TS__ArrayFilter
|
|
4
4
|
local __TS__Class = ____lualib.__TS__Class
|
|
5
|
-
local __TS__New = ____lualib.__TS__New
|
|
6
5
|
local __TS__ClassExtends = ____lualib.__TS__ClassExtends
|
|
7
6
|
local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
8
7
|
local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
@@ -11,29 +10,37 @@ local ____exports = {}
|
|
|
11
10
|
local ____handle = require("core.types.handle")
|
|
12
11
|
local Handle = ____handle.Handle
|
|
13
12
|
local ____ability = require("engine.internal.item.ability")
|
|
13
|
+
local abilityActionDummy = ____ability.abilityActionDummy
|
|
14
14
|
local doAbilityAction = ____ability.doAbilityAction
|
|
15
|
-
local
|
|
16
|
-
local
|
|
17
|
-
local setAbilityIntegerField = BlzSetAbilityIntegerField
|
|
18
|
-
local setAbilityRealField = BlzSetAbilityRealField
|
|
19
|
-
local setAbilityBooleanField = BlzSetAbilityBooleanField
|
|
20
|
-
local setAbilityStringField = BlzSetAbilityStringField
|
|
21
|
-
local setAbilityIntegerLevelField = BlzSetAbilityIntegerLevelField
|
|
22
|
-
local setAbilityRealLevelField = BlzSetAbilityRealLevelField
|
|
23
|
-
local setAbilityBooleanLevelField = BlzSetAbilityBooleanLevelField
|
|
24
|
-
local setAbilityStringLevelField = BlzSetAbilityStringLevelField
|
|
25
|
-
local getAbilityIntegerField = BlzGetAbilityIntegerField
|
|
26
|
-
local getAbilityRealField = BlzGetAbilityRealField
|
|
15
|
+
local doAbilityActionForceDummy = ____ability.doAbilityActionForceDummy
|
|
16
|
+
local startItemCooldown = ____ability.startItemCooldown
|
|
27
17
|
local getAbilityBooleanField = BlzGetAbilityBooleanField
|
|
28
|
-
local
|
|
18
|
+
local getAbilityBooleanLevelField = BlzGetAbilityBooleanLevelField
|
|
19
|
+
local getAbilityIntegerField = BlzGetAbilityIntegerField
|
|
29
20
|
local getAbilityIntegerLevelField = BlzGetAbilityIntegerLevelField
|
|
21
|
+
local getAbilityRealField = BlzGetAbilityRealField
|
|
30
22
|
local getAbilityRealLevelField = BlzGetAbilityRealLevelField
|
|
31
|
-
local
|
|
23
|
+
local getAbilityStringField = BlzGetAbilityStringField
|
|
32
24
|
local getAbilityStringLevelField = BlzGetAbilityStringLevelField
|
|
25
|
+
local getHandleId = GetHandleId
|
|
26
|
+
local getUnitAbilityCooldownPercent = BlzGetUnitAbilityCooldownPercent
|
|
33
27
|
local getUnitAbilityCooldownRemaining = BlzGetUnitAbilityCooldownRemaining
|
|
28
|
+
local getUnitAbilityLevel = GetUnitAbilityLevel
|
|
29
|
+
local order2orderId = _G.OrderId
|
|
30
|
+
local setAbilityBooleanField = BlzSetAbilityBooleanField
|
|
31
|
+
local setAbilityBooleanLevelField = BlzSetAbilityBooleanLevelField
|
|
32
|
+
local setAbilityIntegerField = BlzSetAbilityIntegerField
|
|
33
|
+
local setAbilityIntegerLevelField = BlzSetAbilityIntegerLevelField
|
|
34
|
+
local setAbilityRealField = BlzSetAbilityRealField
|
|
35
|
+
local setAbilityRealLevelField = BlzSetAbilityRealLevelField
|
|
36
|
+
local setAbilityStringField = BlzSetAbilityStringField
|
|
37
|
+
local setAbilityStringLevelField = BlzSetAbilityStringLevelField
|
|
38
|
+
local setUnitAbilityCooldownPercent = BlzSetUnitAbilityCooldownPercent
|
|
39
|
+
local setUnitAbilityCooldownRemaining = BlzSetUnitAbilityCooldownRemaining
|
|
40
|
+
local setUnitAbilityLevel = SetUnitAbilityLevel
|
|
34
41
|
local startUnitAbilityCooldown = BlzStartUnitAbilityCooldown
|
|
35
|
-
local
|
|
36
|
-
local
|
|
42
|
+
local unitDisableAbility = BlzUnitDisableAbility
|
|
43
|
+
local unitHideAbility = BlzUnitHideAbility
|
|
37
44
|
local match = string.match
|
|
38
45
|
local ____type = _G.type
|
|
39
46
|
local ____tostring = _G.tostring
|
|
@@ -151,55 +158,6 @@ local orders = postcompile(function()
|
|
|
151
158
|
end
|
|
152
159
|
return orders
|
|
153
160
|
end)
|
|
154
|
-
local RealFields = __TS__Class()
|
|
155
|
-
RealFields.name = "RealFields"
|
|
156
|
-
function RealFields.prototype.____constructor(self, handle)
|
|
157
|
-
self.handle = handle
|
|
158
|
-
end
|
|
159
|
-
function RealFields.prototype.set(self, field, value)
|
|
160
|
-
return BlzSetAbilityRealField(self.handle, field, value)
|
|
161
|
-
end
|
|
162
|
-
function RealFields.prototype.get(self, field)
|
|
163
|
-
return BlzGetAbilityRealField(self.handle, field)
|
|
164
|
-
end
|
|
165
|
-
function RealFields.prototype.has(self, field)
|
|
166
|
-
local handle = self.handle
|
|
167
|
-
return BlzSetAbilityRealField(
|
|
168
|
-
handle,
|
|
169
|
-
field,
|
|
170
|
-
BlzGetAbilityRealField(handle, field)
|
|
171
|
-
)
|
|
172
|
-
end
|
|
173
|
-
local RealLevelFields = __TS__Class()
|
|
174
|
-
RealLevelFields.name = "RealLevelFields"
|
|
175
|
-
function RealLevelFields.prototype.____constructor(self, handle, level)
|
|
176
|
-
self.handle = handle
|
|
177
|
-
self.level = level
|
|
178
|
-
end
|
|
179
|
-
function RealLevelFields.prototype.set(self, field, value)
|
|
180
|
-
return BlzSetAbilityRealLevelField(self.handle, field, self.level, value)
|
|
181
|
-
end
|
|
182
|
-
function RealLevelFields.prototype.get(self, field)
|
|
183
|
-
return BlzGetAbilityRealLevelField(self.handle, field, self.level)
|
|
184
|
-
end
|
|
185
|
-
function RealLevelFields.prototype.has(self, field)
|
|
186
|
-
local handle = self.handle
|
|
187
|
-
return BlzSetAbilityRealLevelField(
|
|
188
|
-
handle,
|
|
189
|
-
field,
|
|
190
|
-
0,
|
|
191
|
-
BlzGetAbilityRealLevelField(handle, field, 0)
|
|
192
|
-
)
|
|
193
|
-
end
|
|
194
|
-
local realLevelMetatable = {__index = self}
|
|
195
|
-
local levelDescriptors = {realFields = function(self, handle, level)
|
|
196
|
-
return __TS__New(RealLevelFields, handle, level)
|
|
197
|
-
end}
|
|
198
|
-
local levelMetatable = {__index = function(self, key)
|
|
199
|
-
local fields = levelDescriptors[key](levelDescriptors, self.handle, self.level)
|
|
200
|
-
rawset(self, key, fields)
|
|
201
|
-
return fields
|
|
202
|
-
end}
|
|
203
161
|
local fieldGetters = {
|
|
204
162
|
abilityintegerfield = function(ability, field)
|
|
205
163
|
return getAbilityIntegerField(ability.handle, field)
|
|
@@ -259,7 +217,6 @@ local levelRefreshFields = {
|
|
|
259
217
|
[fourCC("Neg1")] = true
|
|
260
218
|
}
|
|
261
219
|
local levelsField = ABILITY_IF_LEVELS
|
|
262
|
-
local order2orderId = _G.OrderId
|
|
263
220
|
local orderIdFieldByParentTypeId = {
|
|
264
221
|
[fourCC("ANcl")] = ABILITY_SLF_BASE_ORDER_ID_NCL6,
|
|
265
222
|
[fourCC("Aspb")] = ABILITY_SLF_BASE_ORDER_ID_SPB5,
|
|
@@ -276,6 +233,19 @@ ____exports.getOrderIdByAbilityTypeId = function(abilityTypeId)
|
|
|
276
233
|
local parentTypeId = availableFields[abilityTypeId]
|
|
277
234
|
return order2orderId(orders[____type(parentTypeId) == "number" and parentTypeId or abilityTypeId] or "")
|
|
278
235
|
end
|
|
236
|
+
---
|
|
237
|
+
-- @internal For use by internal systems only.
|
|
238
|
+
____exports.abilityTypeHasField = function(abilityTypeId, field)
|
|
239
|
+
field = ____type(field) == "number" and field or getHandleId(field)
|
|
240
|
+
if commonFields[field] then
|
|
241
|
+
return true
|
|
242
|
+
end
|
|
243
|
+
local id = availableFields[abilityTypeId]
|
|
244
|
+
if ____type(id) == "number" then
|
|
245
|
+
id = availableFields[id]
|
|
246
|
+
end
|
|
247
|
+
return not not (id and id[field])
|
|
248
|
+
end
|
|
279
249
|
____exports.Ability = __TS__Class()
|
|
280
250
|
local Ability = ____exports.Ability
|
|
281
251
|
Ability.name = "Ability"
|
|
@@ -291,15 +261,7 @@ function Ability.prototype.getSnapshot(self)
|
|
|
291
261
|
return nil
|
|
292
262
|
end
|
|
293
263
|
function Ability.prototype.hasField(self, field)
|
|
294
|
-
|
|
295
|
-
if commonFields[field] then
|
|
296
|
-
return true
|
|
297
|
-
end
|
|
298
|
-
local id = availableFields[self.typeId]
|
|
299
|
-
if ____type(id) == "number" then
|
|
300
|
-
id = availableFields[id]
|
|
301
|
-
end
|
|
302
|
-
return not not (id and id[field])
|
|
264
|
+
return ____exports.abilityTypeHasField(self.typeId, field)
|
|
303
265
|
end
|
|
304
266
|
function Ability.prototype.getField(self, field, level)
|
|
305
267
|
local fieldType = match(
|
|
@@ -346,43 +308,26 @@ __TS__SetDescriptor(
|
|
|
346
308
|
)
|
|
347
309
|
__TS__SetDescriptor(
|
|
348
310
|
Ability.prototype,
|
|
349
|
-
"
|
|
311
|
+
"orderTypeStringId",
|
|
350
312
|
{get = function(self)
|
|
351
313
|
local field = orderIdFieldByParentTypeId[self.parentTypeId]
|
|
352
|
-
return
|
|
314
|
+
return field ~= nil and getAbilityStringLevelField(self.handle, field, self.level) or (orders[self.parentTypeId] or "")
|
|
353
315
|
end},
|
|
354
316
|
true
|
|
355
317
|
)
|
|
356
318
|
__TS__SetDescriptor(
|
|
357
319
|
Ability.prototype,
|
|
358
|
-
"
|
|
320
|
+
"orderTypeId",
|
|
359
321
|
{get = function(self)
|
|
360
|
-
|
|
361
|
-
rawset(self, "realFields", realFields)
|
|
362
|
-
return realFields
|
|
322
|
+
return order2orderId(self.orderTypeStringId)
|
|
363
323
|
end},
|
|
364
324
|
true
|
|
365
325
|
)
|
|
366
326
|
__TS__SetDescriptor(
|
|
367
327
|
Ability.prototype,
|
|
368
|
-
"
|
|
328
|
+
"levelCount",
|
|
369
329
|
{get = function(self)
|
|
370
|
-
|
|
371
|
-
local levels = setmetatable(
|
|
372
|
-
{},
|
|
373
|
-
{
|
|
374
|
-
__len = function(self)
|
|
375
|
-
return BlzGetAbilityIntegerField(handle, ABILITY_IF_LEVELS)
|
|
376
|
-
end,
|
|
377
|
-
__index = function(self, i)
|
|
378
|
-
local level = setmetatable({handle = handle, level = i - 1}, levelMetatable)
|
|
379
|
-
self[i] = level
|
|
380
|
-
return level
|
|
381
|
-
end
|
|
382
|
-
}
|
|
383
|
-
)
|
|
384
|
-
rawset(self, "levels", levels)
|
|
385
|
-
return levels
|
|
330
|
+
return self:getField(ABILITY_IF_LEVELS)
|
|
386
331
|
end},
|
|
387
332
|
true
|
|
388
333
|
)
|
|
@@ -393,6 +338,17 @@ __TS__SetDescriptor(
|
|
|
393
338
|
end},
|
|
394
339
|
true
|
|
395
340
|
)
|
|
341
|
+
__TS__SetDescriptor(
|
|
342
|
+
Ability.prototype,
|
|
343
|
+
"cooldownRemaining",
|
|
344
|
+
{
|
|
345
|
+
get = function(self)
|
|
346
|
+
end,
|
|
347
|
+
set = function(self, cooldownRemaining)
|
|
348
|
+
end
|
|
349
|
+
},
|
|
350
|
+
true
|
|
351
|
+
)
|
|
396
352
|
__TS__ObjectDefineProperty(
|
|
397
353
|
Ability,
|
|
398
354
|
"onCreate",
|
|
@@ -416,6 +372,8 @@ function UnrecognizedAbility.prototype.____constructor(self, typeId, owner)
|
|
|
416
372
|
UnrecognizedAbility.____super.prototype.____constructor(self, nil, typeId)
|
|
417
373
|
self.owner = owner
|
|
418
374
|
end
|
|
375
|
+
function UnrecognizedAbility.prototype.interruptCast(self)
|
|
376
|
+
end
|
|
419
377
|
__TS__SetDescriptor(
|
|
420
378
|
UnrecognizedAbility.prototype,
|
|
421
379
|
"level",
|
|
@@ -424,6 +382,18 @@ __TS__SetDescriptor(
|
|
|
424
382
|
end},
|
|
425
383
|
true
|
|
426
384
|
)
|
|
385
|
+
__TS__SetDescriptor(
|
|
386
|
+
UnrecognizedAbility.prototype,
|
|
387
|
+
"cooldownRemaining",
|
|
388
|
+
{
|
|
389
|
+
get = function(self)
|
|
390
|
+
return 0
|
|
391
|
+
end,
|
|
392
|
+
set = function(self, _)
|
|
393
|
+
end
|
|
394
|
+
},
|
|
395
|
+
true
|
|
396
|
+
)
|
|
427
397
|
____exports.UnitAbility = __TS__Class()
|
|
428
398
|
local UnitAbility = ____exports.UnitAbility
|
|
429
399
|
UnitAbility.name = "UnitAbility"
|
|
@@ -433,6 +403,46 @@ function UnitAbility.prototype.____constructor(self, handle, typeId, owner)
|
|
|
433
403
|
self.owner = owner
|
|
434
404
|
self.u = owner.handle
|
|
435
405
|
end
|
|
406
|
+
function UnitAbility.prototype.incrementHideCounter(self)
|
|
407
|
+
unitHideAbility(self.u, self.typeId, true)
|
|
408
|
+
end
|
|
409
|
+
function UnitAbility.prototype.decrementHideCounter(self)
|
|
410
|
+
unitHideAbility(self.u, self.typeId, false)
|
|
411
|
+
end
|
|
412
|
+
function UnitAbility.prototype.incrementDisableCounter(self)
|
|
413
|
+
local unit = self.u
|
|
414
|
+
local typeId = self.typeId
|
|
415
|
+
unitHideAbility(unit, typeId, true)
|
|
416
|
+
unitDisableAbility(unit, typeId, true, false)
|
|
417
|
+
self.d = (self.d or 0) + 1
|
|
418
|
+
end
|
|
419
|
+
function UnitAbility.prototype.decrementDisableCounter(self)
|
|
420
|
+
local unit = self.u
|
|
421
|
+
local typeId = self.typeId
|
|
422
|
+
unitDisableAbility(unit, typeId, false, false)
|
|
423
|
+
unitHideAbility(unit, typeId, true)
|
|
424
|
+
self.d = (self.d or 0) - 1
|
|
425
|
+
end
|
|
426
|
+
function UnitAbility.prototype.startCooldown(self, cooldown)
|
|
427
|
+
startUnitAbilityCooldown(self.u, self.typeId, cooldown)
|
|
428
|
+
end
|
|
429
|
+
function UnitAbility.prototype.interruptCast(self)
|
|
430
|
+
self.owner:interruptCast(self.typeId)
|
|
431
|
+
end
|
|
432
|
+
function UnitAbility.prototype.onDestroy(self)
|
|
433
|
+
if self.owner.state ~= 2 then
|
|
434
|
+
self.owner:removeAbility(self.typeId)
|
|
435
|
+
end
|
|
436
|
+
return UnitAbility.____super.prototype.onDestroy(self)
|
|
437
|
+
end
|
|
438
|
+
__TS__SetDescriptor(
|
|
439
|
+
UnitAbility.prototype,
|
|
440
|
+
"isDisabled",
|
|
441
|
+
{get = function(self)
|
|
442
|
+
return self.d ~= nil and self.d > 0
|
|
443
|
+
end},
|
|
444
|
+
true
|
|
445
|
+
)
|
|
436
446
|
__TS__SetDescriptor(
|
|
437
447
|
UnitAbility.prototype,
|
|
438
448
|
"level",
|
|
@@ -446,6 +456,19 @@ __TS__SetDescriptor(
|
|
|
446
456
|
},
|
|
447
457
|
true
|
|
448
458
|
)
|
|
459
|
+
__TS__SetDescriptor(
|
|
460
|
+
UnitAbility.prototype,
|
|
461
|
+
"cooldownRemainingPercent",
|
|
462
|
+
{
|
|
463
|
+
get = function(self)
|
|
464
|
+
return getUnitAbilityCooldownPercent(self.u, self.typeId)
|
|
465
|
+
end,
|
|
466
|
+
set = function(self, percent)
|
|
467
|
+
setUnitAbilityCooldownPercent(self.u, self.typeId, percent)
|
|
468
|
+
end
|
|
469
|
+
},
|
|
470
|
+
true
|
|
471
|
+
)
|
|
449
472
|
__TS__SetDescriptor(
|
|
450
473
|
UnitAbility.prototype,
|
|
451
474
|
"cooldownRemaining",
|
|
@@ -453,8 +476,8 @@ __TS__SetDescriptor(
|
|
|
453
476
|
get = function(self)
|
|
454
477
|
return getUnitAbilityCooldownRemaining(self.u, self.typeId)
|
|
455
478
|
end,
|
|
456
|
-
set = function(self,
|
|
457
|
-
|
|
479
|
+
set = function(self, cooldownRemaining)
|
|
480
|
+
setUnitAbilityCooldownRemaining(self.u, self.typeId, cooldownRemaining)
|
|
458
481
|
end
|
|
459
482
|
},
|
|
460
483
|
true
|
|
@@ -479,6 +502,9 @@ end
|
|
|
479
502
|
local function setAbilityField(_, ability, field, levelOrValue, value)
|
|
480
503
|
return ____exports.Ability.prototype.setField(ability, field, levelOrValue, value)
|
|
481
504
|
end
|
|
505
|
+
local function getAbilityCooldown(_, abilityTypeId)
|
|
506
|
+
return getUnitAbilityCooldownRemaining(abilityActionDummy, abilityTypeId)
|
|
507
|
+
end
|
|
482
508
|
____exports.ItemAbility = __TS__Class()
|
|
483
509
|
local ItemAbility = ____exports.ItemAbility
|
|
484
510
|
ItemAbility.name = "ItemAbility"
|
|
@@ -506,6 +532,22 @@ function ItemAbility.prototype.setField(self, field, levelOrValue, value)
|
|
|
506
532
|
value
|
|
507
533
|
)
|
|
508
534
|
end
|
|
535
|
+
function ItemAbility.prototype.interruptCast(self)
|
|
536
|
+
local item = self.owner
|
|
537
|
+
local itemHandle = item.handle
|
|
538
|
+
local ____opt_1 = item.owner
|
|
539
|
+
local itemOwnerHandle = ____opt_1 and ____opt_1.handle
|
|
540
|
+
local cooldownRemaining = doAbilityActionForceDummy(itemHandle, itemOwnerHandle, getAbilityCooldown, self.typeId)
|
|
541
|
+
if cooldownRemaining == 0 then
|
|
542
|
+
startItemCooldown(itemHandle, itemOwnerHandle, 0.015625)
|
|
543
|
+
end
|
|
544
|
+
end
|
|
545
|
+
function ItemAbility.prototype.onDestroy(self)
|
|
546
|
+
if self.owner.state ~= 2 then
|
|
547
|
+
self.owner:removeAbility(self.typeId)
|
|
548
|
+
end
|
|
549
|
+
return ItemAbility.____super.prototype.onDestroy(self)
|
|
550
|
+
end
|
|
509
551
|
__TS__SetDescriptor(
|
|
510
552
|
ItemAbility.prototype,
|
|
511
553
|
"level",
|
|
@@ -514,6 +556,27 @@ __TS__SetDescriptor(
|
|
|
514
556
|
end},
|
|
515
557
|
true
|
|
516
558
|
)
|
|
559
|
+
__TS__SetDescriptor(
|
|
560
|
+
ItemAbility.prototype,
|
|
561
|
+
"cooldownRemaining",
|
|
562
|
+
{
|
|
563
|
+
get = function(self)
|
|
564
|
+
local item = self.owner
|
|
565
|
+
local ____doAbilityActionForceDummy_6 = doAbilityActionForceDummy
|
|
566
|
+
local ____item_handle_5 = item.handle
|
|
567
|
+
local ____opt_3 = item.owner
|
|
568
|
+
return ____doAbilityActionForceDummy_6(____item_handle_5, ____opt_3 and ____opt_3.handle, getAbilityCooldown, self.typeId)
|
|
569
|
+
end,
|
|
570
|
+
set = function(self, cooldownRemaining)
|
|
571
|
+
local item = self.owner
|
|
572
|
+
local ____startItemCooldown_10 = startItemCooldown
|
|
573
|
+
local ____item_handle_9 = item.handle
|
|
574
|
+
local ____opt_7 = item.owner
|
|
575
|
+
____startItemCooldown_10(____item_handle_9, ____opt_7 and ____opt_7.handle, cooldownRemaining)
|
|
576
|
+
end
|
|
577
|
+
},
|
|
578
|
+
true
|
|
579
|
+
)
|
|
517
580
|
__TS__ObjectDefineProperty(
|
|
518
581
|
ItemAbility,
|
|
519
582
|
"onCreate",
|