warscript 0.0.1-dev.9cbb1ff → 0.0.1-dev.9d07b64
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/core/dummy.lua +4 -2
- package/core/types/effect.d.ts +11 -1
- package/core/types/effect.lua +43 -77
- package/core/types/frame.d.ts +16 -2
- package/core/types/frame.lua +141 -77
- 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 +18 -3
- package/core/types/tileCell.lua +108 -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 +1718 -964
- package/destroyable.d.ts +1 -0
- package/destroyable.lua +9 -0
- package/engine/ability-type-extended-tooltip.d.ts +8 -0
- package/engine/ability-type-extended-tooltip.lua +44 -0
- package/engine/behavior.d.ts +14 -1
- package/engine/behavior.lua +230 -70
- package/engine/behaviour/ability/apply-buff.lua +5 -5
- package/engine/behaviour/ability/apply-unit-behavior.lua +5 -0
- package/engine/behaviour/ability/damage.d.ts +10 -3
- package/engine/behaviour/ability/damage.lua +41 -49
- package/engine/behaviour/ability/emulate-impact.d.ts +1 -1
- package/engine/behaviour/ability/emulate-impact.lua +16 -7
- 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 +109 -25
- 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 +40 -3
- package/engine/behaviour/unit.lua +270 -6
- package/engine/buff.d.ts +114 -58
- package/engine/buff.lua +567 -303
- package/engine/index.d.ts +2 -1
- package/engine/internal/ability.d.ts +14 -1
- package/engine/internal/ability.lua +113 -44
- package/engine/internal/item/ability.lua +63 -11
- 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 +32 -16
- package/engine/internal/item.lua +257 -82
- package/engine/internal/mechanics/cast-ability.lua +6 -3
- 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/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/object-data/returned-melee-damage-factor.d.ts +2 -0
- package/engine/internal/object-data/returned-melee-damage-factor.lua +21 -0
- package/engine/internal/unit/ability.d.ts +35 -0
- package/engine/internal/unit/ability.lua +98 -9
- 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/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/bonus.d.ts +17 -0
- package/engine/internal/unit/bonus.lua +113 -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 +20 -0
- package/engine/internal/unit/order.lua +136 -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 +11 -11
- package/engine/internal/unit+damage.lua +43 -14
- package/engine/internal/unit+rally.lua +9 -31
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit-missile-data.lua +58 -32
- package/engine/internal/unit-missile-launch.lua +65 -27
- package/engine/internal/unit.d.ts +35 -36
- package/engine/internal/unit.lua +381 -336
- 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/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 +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.lua +2 -2
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.d.ts +23 -0
- package/engine/object-data/entry/ability-type/blank-passive-with-cooldown.lua +112 -0
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +4 -0
- package/engine/object-data/entry/ability-type/blank-passive.lua +27 -7
- package/engine/object-data/entry/ability-type/breath-of-fire.d.ts +11 -0
- package/engine/object-data/entry/ability-type/breath-of-fire.lua +27 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +2 -2
- package/engine/object-data/entry/ability-type/channel.lua +3 -3
- package/engine/object-data/entry/ability-type/cleansing-fire.d.ts +27 -0
- package/engine/object-data/entry/ability-type/cleansing-fire.lua +104 -0
- package/engine/object-data/entry/ability-type/consecration.d.ts +15 -0
- package/engine/object-data/entry/ability-type/consecration.lua +52 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.d.ts +12 -0
- package/engine/object-data/entry/ability-type/cooldown-reduction.lua +39 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.d.ts +18 -0
- package/engine/object-data/entry/ability-type/critical-strike-system.lua +65 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.d.ts +21 -0
- package/engine/object-data/entry/ability-type/deathseeker-arrows.lua +78 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.d.ts +8 -0
- package/engine/object-data/entry/ability-type/equipment-inventory-interface.lua +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment-inventory.lua +27 -0
- package/engine/object-data/entry/ability-type/equipment.d.ts +13 -0
- package/engine/object-data/entry/ability-type/equipment.lua +27 -0
- package/engine/object-data/entry/ability-type/exhume-corpses.d.ts +14 -0
- package/engine/object-data/entry/ability-type/exhume-corpses.lua +40 -0
- package/engine/object-data/entry/ability-type/firebolt.d.ts +7 -0
- package/engine/object-data/entry/ability-type/firebolt.lua +13 -0
- package/engine/object-data/entry/ability-type/flame-strike.d.ts +25 -0
- package/engine/object-data/entry/ability-type/flame-strike.lua +92 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.d.ts +8 -0
- package/engine/object-data/entry/ability-type/grant-talent-point.lua +13 -0
- package/engine/object-data/entry/ability-type/grim-conviction.d.ts +36 -0
- package/engine/object-data/entry/ability-type/grim-conviction.lua +131 -0
- package/engine/object-data/entry/ability-type/grit.d.ts +18 -0
- package/engine/object-data/entry/ability-type/grit.lua +65 -0
- package/engine/object-data/entry/ability-type/guiding-hand.d.ts +27 -0
- package/engine/object-data/entry/ability-type/guiding-hand.lua +104 -0
- package/engine/object-data/entry/ability-type/headsplitter.d.ts +27 -0
- package/engine/object-data/entry/ability-type/headsplitter.lua +104 -0
- package/engine/object-data/entry/ability-type/{armor-increase.d.ts → healing-modifier.d.ts} +4 -3
- package/engine/object-data/entry/ability-type/healing-modifier.lua +26 -0
- package/engine/object-data/entry/ability-type/healing-ward-aura.d.ts +13 -0
- package/engine/object-data/entry/ability-type/healing-ward-aura.lua +39 -0
- package/engine/object-data/entry/ability-type/health-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/health-bonus.lua +26 -0
- package/engine/object-data/entry/ability-type/heroic-slash.d.ts +18 -0
- package/engine/object-data/entry/ability-type/heroic-slash.lua +65 -0
- package/engine/object-data/entry/ability-type/holy-wrath.d.ts +30 -0
- package/engine/object-data/entry/ability-type/holy-wrath.lua +117 -0
- package/engine/object-data/entry/ability-type/inspire-courage.d.ts +18 -0
- package/engine/object-data/entry/ability-type/inspire-courage.lua +65 -0
- package/engine/object-data/entry/ability-type/item-life-regeneration.d.ts +10 -0
- package/engine/object-data/entry/ability-type/item-life-regeneration.lua +26 -0
- package/engine/object-data/entry/ability-type/life-drain.d.ts +37 -0
- package/engine/object-data/entry/ability-type/life-drain.lua +144 -0
- package/engine/object-data/entry/ability-type/lights-mercy.d.ts +27 -0
- package/engine/object-data/entry/ability-type/lights-mercy.lua +104 -0
- package/engine/object-data/entry/ability-type/mana-bonus.d.ts +8 -0
- package/engine/object-data/entry/ability-type/mana-bonus.lua +26 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.d.ts +12 -0
- package/engine/object-data/entry/ability-type/mana-efficiency.lua +39 -0
- package/engine/object-data/entry/ability-type/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/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 +33 -8
- package/engine/object-data/entry/ability-type.lua +291 -15
- package/engine/object-data/entry/buff-type/applicable.lua +122 -111
- package/engine/object-data/entry/buff-type.d.ts +6 -2
- package/engine/object-data/entry/buff-type.lua +26 -0
- package/engine/object-data/entry/destructible-type.d.ts +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 +74 -6
- package/engine/object-data/entry/unit-type.lua +552 -98
- 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 +4 -4
- 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 +72 -3
- package/engine/object-field/unit.lua +268 -7
- package/engine/object-field.d.ts +18 -7
- package/engine/object-field.lua +294 -135
- package/engine/random.d.ts +10 -0
- package/engine/random.lua +21 -0
- package/engine/standard/entries/ability-type.d.ts +3102 -7
- package/engine/standard/entries/ability-type.lua +0 -6
- package/engine/standard/entries/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 +4 -4
- package/engine/standard/fields/ability.lua +4 -4
- 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 +11 -1
- package/engine/unit.lua +11 -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 +12 -11
- 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 +9 -1
- package/utility/arrays.lua +28 -0
- 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/linked-map.d.ts +35 -0
- package/utility/linked-map.lua +107 -0
- package/utility/linked-set.d.ts +4 -1
- package/utility/linked-set.lua +46 -1
- package/utility/lua-maps.d.ts +12 -2
- package/utility/lua-maps.lua +37 -2
- package/utility/lua-sets.d.ts +1 -0
- package/utility/lua-sets.lua +4 -0
- package/utility/random.d.ts +102 -0
- package/utility/random.lua +273 -0
- package/utility/records.lua +20 -1
- package/utility/types.d.ts +3 -0
- package/utility/unordered-map.d.ts +27 -0
- package/utility/unordered-map.lua +99 -0
- package/core/types/order.d.ts +0 -25
- package/core/types/order.lua +0 -55
- package/engine/internal/unit/item.lua +0 -78
- /package/engine/internal/{object-data/armor-increase.d.ts → misc/damage-metadata-by-target.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
|
@@ -44,58 +44,84 @@ ____exports.MISSILE_DATA_BY_UNIT_TYPE_ID = (function()
|
|
|
44
44
|
UnitType:getAll(),
|
|
45
45
|
function(unitType) return unitType.id end,
|
|
46
46
|
function(unitType)
|
|
47
|
-
local ____ = unitType.missileImpactOffsetZSD
|
|
48
|
-
local ____ = unitType.missileImpactOffsetZHD
|
|
49
47
|
return {
|
|
50
48
|
[0] = unitType.missileImpactOffsetZSD ~= ____exports.DEFAULT_MISSILE_IMPACT_OFFSET_Z and unitType.missileImpactOffsetZSD or nil,
|
|
51
49
|
[1] = unitType.missileImpactOffsetZHD ~= unitType.missileImpactOffsetZSD and unitType.missileImpactOffsetZHD or nil,
|
|
52
|
-
[2] = unitType.
|
|
53
|
-
[3] = unitType.
|
|
54
|
-
[4] = unitType.
|
|
55
|
-
[5] = unitType.
|
|
56
|
-
[6] = unitType.
|
|
57
|
-
[7] = unitType.
|
|
58
|
-
[8] = unitType.
|
|
59
|
-
[9] = unitType.
|
|
50
|
+
[2] = unitType.missileImpactOffsetZDE ~= unitType.missileImpactOffsetZSD and unitType.missileImpactOffsetZDE or nil,
|
|
51
|
+
[3] = unitType.missileLaunchOffsetX ~= ____exports.DEFAULT_MISSILE_LAUNCH_OFFSET_X and unitType.missileLaunchOffsetX or nil,
|
|
52
|
+
[4] = unitType.missileLaunchOffsetY ~= ____exports.DEFAULT_MISSILE_LAUNCH_OFFSET_Y and unitType.missileLaunchOffsetY or nil,
|
|
53
|
+
[5] = unitType.missileLaunchOffsetZSD ~= ____exports.DEFAULT_MISSILE_LAUNCH_OFFSET_Z and unitType.missileLaunchOffsetZSD or nil,
|
|
54
|
+
[6] = unitType.missileLaunchOffsetZHD ~= unitType.missileLaunchOffsetZSD and unitType.missileLaunchOffsetZHD or nil,
|
|
55
|
+
[7] = unitType.missileLaunchOffsetZDE ~= unitType.missileLaunchOffsetZSD and unitType.missileLaunchOffsetZDE or nil,
|
|
56
|
+
[8] = unitType.missileLaunchVisualOffsetXSD ~= ____exports.DEFAULT_MISSILE_LAUNCH_VISUAL_OFFSET_X and unitType.missileLaunchVisualOffsetXSD or nil,
|
|
57
|
+
[9] = unitType.missileLaunchVisualOffsetXHD ~= unitType.missileLaunchVisualOffsetXSD and unitType.missileLaunchVisualOffsetXHD or nil,
|
|
58
|
+
[10] = unitType.missileLaunchVisualOffsetXDE ~= unitType.missileLaunchVisualOffsetXSD and unitType.missileLaunchVisualOffsetXDE or nil,
|
|
59
|
+
[11] = unitType.missileLaunchVisualOffsetYSD ~= ____exports.DEFAULT_MISSILE_LAUNCH_VISUAL_OFFSET_Y and unitType.missileLaunchVisualOffsetYSD or nil,
|
|
60
|
+
[12] = unitType.missileLaunchVisualOffsetYHD ~= unitType.missileLaunchVisualOffsetYSD and unitType.missileLaunchVisualOffsetYHD or nil,
|
|
61
|
+
[13] = unitType.missileLaunchVisualOffsetYDE ~= unitType.missileLaunchVisualOffsetYSD and unitType.missileLaunchVisualOffsetYDE or nil
|
|
60
62
|
}
|
|
61
63
|
end
|
|
62
64
|
)
|
|
63
65
|
end),
|
|
64
66
|
function(data)
|
|
65
|
-
local
|
|
66
|
-
local
|
|
67
|
+
local ____setmetatable_10 = setmetatable
|
|
68
|
+
local ____LocalClient_isHD_1
|
|
67
69
|
if LocalClient.isHD then
|
|
68
|
-
|
|
70
|
+
____LocalClient_isHD_1 = data[1] or data[0]
|
|
69
71
|
else
|
|
70
|
-
|
|
72
|
+
local ____LocalClient_isDE_0
|
|
73
|
+
if LocalClient.isDE then
|
|
74
|
+
____LocalClient_isDE_0 = data[2] or data[0]
|
|
75
|
+
else
|
|
76
|
+
____LocalClient_isDE_0 = data[0]
|
|
77
|
+
end
|
|
78
|
+
____LocalClient_isHD_1 = ____LocalClient_isDE_0
|
|
71
79
|
end
|
|
72
|
-
local
|
|
73
|
-
local
|
|
74
|
-
local
|
|
80
|
+
local ____data__3_8 = data[3]
|
|
81
|
+
local ____data__4_9 = data[4]
|
|
82
|
+
local ____LocalClient_isHD_3
|
|
75
83
|
if LocalClient.isHD then
|
|
76
|
-
|
|
84
|
+
____LocalClient_isHD_3 = data[6] or data[5]
|
|
77
85
|
else
|
|
78
|
-
|
|
86
|
+
local ____LocalClient_isDE_2
|
|
87
|
+
if LocalClient.isDE then
|
|
88
|
+
____LocalClient_isDE_2 = data[7] or data[5]
|
|
89
|
+
else
|
|
90
|
+
____LocalClient_isDE_2 = data[5]
|
|
91
|
+
end
|
|
92
|
+
____LocalClient_isHD_3 = ____LocalClient_isDE_2
|
|
79
93
|
end
|
|
80
|
-
local
|
|
94
|
+
local ____LocalClient_isHD_5
|
|
81
95
|
if LocalClient.isHD then
|
|
82
|
-
|
|
96
|
+
____LocalClient_isHD_5 = data[9] or data[8]
|
|
83
97
|
else
|
|
84
|
-
|
|
98
|
+
local ____LocalClient_isDE_4
|
|
99
|
+
if LocalClient.isDE then
|
|
100
|
+
____LocalClient_isDE_4 = data[10] or data[8]
|
|
101
|
+
else
|
|
102
|
+
____LocalClient_isDE_4 = data[8]
|
|
103
|
+
end
|
|
104
|
+
____LocalClient_isHD_5 = ____LocalClient_isDE_4
|
|
85
105
|
end
|
|
86
|
-
local
|
|
106
|
+
local ____LocalClient_isHD_7
|
|
87
107
|
if LocalClient.isHD then
|
|
88
|
-
|
|
108
|
+
____LocalClient_isHD_7 = data[12] or data[11]
|
|
89
109
|
else
|
|
90
|
-
|
|
110
|
+
local ____LocalClient_isDE_6
|
|
111
|
+
if LocalClient.isDE then
|
|
112
|
+
____LocalClient_isDE_6 = data[13] or data[11]
|
|
113
|
+
else
|
|
114
|
+
____LocalClient_isDE_6 = data[11]
|
|
115
|
+
end
|
|
116
|
+
____LocalClient_isHD_7 = ____LocalClient_isDE_6
|
|
91
117
|
end
|
|
92
|
-
return
|
|
93
|
-
impactOffsetZ =
|
|
94
|
-
launchOffsetX =
|
|
95
|
-
launchOffsetY =
|
|
96
|
-
launchOffsetZ =
|
|
97
|
-
launchVisualOffsetX =
|
|
98
|
-
launchVisualOffsetY =
|
|
118
|
+
return ____setmetatable_10({
|
|
119
|
+
impactOffsetZ = ____LocalClient_isHD_1,
|
|
120
|
+
launchOffsetX = ____data__3_8,
|
|
121
|
+
launchOffsetY = ____data__4_9,
|
|
122
|
+
launchOffsetZ = ____LocalClient_isHD_3,
|
|
123
|
+
launchVisualOffsetX = ____LocalClient_isHD_5,
|
|
124
|
+
launchVisualOffsetY = ____LocalClient_isHD_7
|
|
99
125
|
}, METATABLE)
|
|
100
126
|
end
|
|
101
127
|
),
|
|
@@ -9,43 +9,81 @@ local ____timer = require("core.types.timer")
|
|
|
9
9
|
local Timer = ____timer.Timer
|
|
10
10
|
local ____lua_2Dsets = require("utility.lua-sets")
|
|
11
11
|
local luaSetOf = ____lua_2Dsets.luaSetOf
|
|
12
|
+
local ____attributes = require("attributes")
|
|
13
|
+
local attribute = ____attributes.attribute
|
|
14
|
+
local ____linked_2Dset = require("utility.linked-set")
|
|
15
|
+
local LinkedSet = ____linked_2Dset.LinkedSet
|
|
16
|
+
local ____math = require("math")
|
|
17
|
+
local ceil = ____math.ceil
|
|
12
18
|
local autoAttackFinishEvent = __TS__New(Event)
|
|
13
19
|
rawset(Unit, "autoAttackFinishEvent", autoAttackFinishEvent)
|
|
14
|
-
local
|
|
20
|
+
local units = __TS__New(LinkedSet)
|
|
21
|
+
local targetAttribute = attribute()
|
|
22
|
+
local impactDelayAttribute = attribute()
|
|
23
|
+
local passedTimeAttribute = attribute()
|
|
15
24
|
local instantOrderIds = luaSetOf(
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
852086,
|
|
26
|
+
852100,
|
|
27
|
+
852090,
|
|
28
|
+
852177,
|
|
29
|
+
852002,
|
|
30
|
+
852003,
|
|
31
|
+
852004,
|
|
32
|
+
852005,
|
|
33
|
+
852006,
|
|
34
|
+
852007,
|
|
35
|
+
852087,
|
|
36
|
+
852091,
|
|
37
|
+
852178
|
|
29
38
|
)
|
|
30
|
-
|
|
39
|
+
---
|
|
40
|
+
-- @internal For use by internal systems only.
|
|
41
|
+
____exports.resetAutoAttackTimer = function(unit)
|
|
42
|
+
if units:remove(unit) then
|
|
43
|
+
unit[targetAttribute] = nil
|
|
44
|
+
unit[impactDelayAttribute] = nil
|
|
45
|
+
unit[passedTimeAttribute] = nil
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
local function reset(unit, orderId)
|
|
31
49
|
if not (instantOrderIds[orderId] ~= nil) then
|
|
32
|
-
|
|
33
|
-
if eventTimer then
|
|
34
|
-
eventTimer:destroy()
|
|
35
|
-
eventTimerByUnit[source] = nil
|
|
36
|
-
end
|
|
50
|
+
____exports.resetAutoAttackTimer(unit)
|
|
37
51
|
end
|
|
38
52
|
end
|
|
39
53
|
Unit.onImmediateOrder:addListener(reset)
|
|
40
54
|
Unit.onPointOrder:addListener(reset)
|
|
41
55
|
Unit.onTargetOrder:addListener(reset)
|
|
42
|
-
local
|
|
43
|
-
|
|
44
|
-
|
|
56
|
+
local timerPeriod = 1 / 64
|
|
57
|
+
local function invokeEvent(unit)
|
|
58
|
+
units:remove(unit)
|
|
59
|
+
local target = unit[targetAttribute]
|
|
60
|
+
unit[targetAttribute] = nil
|
|
61
|
+
unit[impactDelayAttribute] = nil
|
|
62
|
+
unit[passedTimeAttribute] = nil
|
|
63
|
+
Event.invoke(autoAttackFinishEvent, unit, target)
|
|
64
|
+
end
|
|
65
|
+
local function checkUnit(unit)
|
|
66
|
+
local passedTime = unit[passedTimeAttribute] + timerPeriod
|
|
67
|
+
local impactDelay = unit[impactDelayAttribute]
|
|
68
|
+
if passedTime >= impactDelay and ceil(passedTime / 0.02) >= ceil(impactDelay / 0.02) then
|
|
69
|
+
invokeEvent(unit)
|
|
70
|
+
else
|
|
71
|
+
unit[passedTimeAttribute] = passedTime
|
|
72
|
+
end
|
|
45
73
|
end
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
local timer = Timer:simple(attackPoint, timerCallback, source, target)
|
|
49
|
-
eventTimerByUnit[source] = timer
|
|
74
|
+
Timer.onPeriod[timerPeriod]:addListener(function()
|
|
75
|
+
units:forEach(checkUnit)
|
|
50
76
|
end)
|
|
77
|
+
Unit.autoAttackStartEvent:addListener(
|
|
78
|
+
999999,
|
|
79
|
+
function(source, target)
|
|
80
|
+
if source[targetAttribute] ~= nil then
|
|
81
|
+
invokeEvent(source)
|
|
82
|
+
end
|
|
83
|
+
source[targetAttribute] = target
|
|
84
|
+
source[impactDelayAttribute] = (source:chooseWeapon(target) or source.firstWeapon).impactDelay
|
|
85
|
+
source[passedTimeAttribute] = -timerPeriod
|
|
86
|
+
units:add(source)
|
|
87
|
+
end
|
|
88
|
+
)
|
|
51
89
|
return ____exports
|
|
@@ -13,6 +13,8 @@ import type { UnitTypeId } from "../object-data/entry/unit-type";
|
|
|
13
13
|
import { CombatClassification, CombatClassifications } from "../object-data/auxiliary/combat-classification";
|
|
14
14
|
import { MovementType } from "../object-data/auxiliary/movement-type";
|
|
15
15
|
import { UnitAttribute } from "../object-data/auxiliary/unit-attribute";
|
|
16
|
+
import { AttackType } from "../object-data/auxiliary/attack-type";
|
|
17
|
+
import { AttributesHolder } from "../../attributes";
|
|
16
18
|
export type UnitClassification = junittype;
|
|
17
19
|
export declare namespace UnitClassification {
|
|
18
20
|
const STRUCTURE: junittype;
|
|
@@ -21,6 +23,7 @@ export declare namespace UnitClassification {
|
|
|
21
23
|
const GROUND: junittype;
|
|
22
24
|
const SUMMONED: junittype;
|
|
23
25
|
const MECHANICAL: junittype;
|
|
26
|
+
const WORKER: junittype;
|
|
24
27
|
const ANCIENT: junittype;
|
|
25
28
|
const SUICIDAL: junittype;
|
|
26
29
|
const TAUREN: junittype;
|
|
@@ -38,15 +41,18 @@ type AbilityDispatcherTable<T extends any[] = []> = {
|
|
|
38
41
|
readonly [id: number]: Event<[Unit, Ability, ...T]>;
|
|
39
42
|
};
|
|
40
43
|
type AbilityEventDispatcher<T extends any[] = []> = Event<[Unit, Ability, ...T]> & AbilityDispatcherTable<T>;
|
|
41
|
-
export interface DamagingEvent {
|
|
44
|
+
export interface DamagingEvent extends AttributesHolder {
|
|
42
45
|
amount: number;
|
|
43
|
-
attackType:
|
|
46
|
+
attackType: AttackType;
|
|
44
47
|
damageType: jdamagetype;
|
|
45
48
|
weaponType: jweapontype;
|
|
49
|
+
metadata: unknown;
|
|
46
50
|
readonly isAttack: boolean;
|
|
47
51
|
readonly originalAmount: number;
|
|
52
|
+
readonly originalMetadata: unknown;
|
|
53
|
+
preventRetaliation(this: DamagingEvent): void;
|
|
48
54
|
}
|
|
49
|
-
export type DamageEvent = DamagingEvent & {
|
|
55
|
+
export type DamageEvent = Omit<DamagingEvent, "preventRetaliation"> & {
|
|
50
56
|
preventDeath<P extends any[]>(this: DamageEvent, callback: (this: void, ...parameters: P) => any, ...parameters: P): void;
|
|
51
57
|
};
|
|
52
58
|
export type AttackDamageEvent = DamagingEvent & {
|
|
@@ -74,10 +80,14 @@ export declare class UnitWeapon {
|
|
|
74
80
|
readonly unit: Unit;
|
|
75
81
|
readonly index: 0 | 1;
|
|
76
82
|
constructor(unit: Unit, index: 0 | 1);
|
|
83
|
+
get isEnabled(): boolean;
|
|
84
|
+
set isEnabled(isEnabled: boolean);
|
|
77
85
|
get cooldown(): number;
|
|
78
86
|
set cooldown(cooldown: number);
|
|
79
87
|
get damage(): [minimumDamage: number, maximumDamage: number];
|
|
80
88
|
set damage([minimumDamage, maximumDamage]: [number, number]);
|
|
89
|
+
get allowedTargetCombatClassifications(): CombatClassifications;
|
|
90
|
+
set allowedTargetCombatClassifications(allowedTargetCombatClassifications: CombatClassifications);
|
|
81
91
|
get damageBase(): number;
|
|
82
92
|
set damageBase(damageBase: number);
|
|
83
93
|
get damageDiceCount(): number;
|
|
@@ -99,12 +109,13 @@ declare const enum UnitPropertyKey {
|
|
|
99
109
|
SYNC_ID = 100,
|
|
100
110
|
IS_PAUSED = 101,
|
|
101
111
|
STUN_COUNTER = 102,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
112
|
+
FORCE_STUN_COUNTER = 103,
|
|
113
|
+
DELAY_HEALTH_CHECKS_COUNTER = 104,
|
|
114
|
+
DELAY_HEALTH_CHECKS_HEALTH_BONUS = 105,
|
|
115
|
+
PREVENT_DEATH_HEALTH_BONUS = 106,
|
|
116
|
+
IS_TEAM_GLOW_HIDDEN = 107,
|
|
117
|
+
LAST_X = 108,
|
|
118
|
+
LAST_Y = 109
|
|
108
119
|
}
|
|
109
120
|
export type UnitSyncId = number & {
|
|
110
121
|
readonly __unitSyncId: unique symbol;
|
|
@@ -113,6 +124,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
113
124
|
readonly syncId: UnitSyncId;
|
|
114
125
|
private [UnitPropertyKey.IS_PAUSED]?;
|
|
115
126
|
private [UnitPropertyKey.STUN_COUNTER]?;
|
|
127
|
+
private [UnitPropertyKey.FORCE_STUN_COUNTER]?;
|
|
116
128
|
private [UnitPropertyKey.DELAY_HEALTH_CHECKS_COUNTER]?;
|
|
117
129
|
private [UnitPropertyKey.DELAY_HEALTH_CHECKS_HEALTH_BONUS]?;
|
|
118
130
|
private [UnitPropertyKey.PREVENT_DEATH_HEALTH_BONUS]?;
|
|
@@ -127,6 +139,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
127
139
|
private _fields?;
|
|
128
140
|
private getEvent;
|
|
129
141
|
constructor(handle: junit);
|
|
142
|
+
private saveData;
|
|
130
143
|
protected onDestroy(): HandleDestructor;
|
|
131
144
|
addAttackHandler(condition: AttackHandlerCondition, action: AttackHandlerAction): AttackHandler;
|
|
132
145
|
removeAttackHandler(handler: AttackHandler): boolean;
|
|
@@ -149,32 +162,26 @@ export declare class Unit extends Handle<junit> {
|
|
|
149
162
|
isVisibleTo(player: Player): boolean;
|
|
150
163
|
isInvisibleTo(player: Player): boolean;
|
|
151
164
|
isInRangeOf(x: number, y: number, range: number): boolean;
|
|
152
|
-
isInRangeOf(
|
|
165
|
+
isInRangeOf(widget: Widget, range: number): boolean;
|
|
153
166
|
isAllyOf(unit: Unit): boolean;
|
|
154
167
|
isEnemyOf(unit: Unit): boolean;
|
|
155
|
-
playAnimation(animation: string, rarity?: jraritycontrol): void;
|
|
156
|
-
playAnimation(animation: number): void;
|
|
168
|
+
playAnimation(...parameters: [animation: number] | [animation: string, rarity?: jraritycontrol]): void;
|
|
157
169
|
resetAnimation(): void;
|
|
158
170
|
queueAnimation(animation: string): void;
|
|
159
171
|
get weapons(): [UnitWeapon, UnitWeapon];
|
|
160
172
|
get firstWeapon(): UnitWeapon;
|
|
161
173
|
get secondWeapon(): UnitWeapon;
|
|
174
|
+
chooseWeapon(target: Unit): UnitWeapon | undefined;
|
|
162
175
|
get level(): number;
|
|
163
176
|
set level(v: number);
|
|
164
177
|
get xp(): number;
|
|
165
178
|
set xp(v: number);
|
|
166
179
|
get primaryAttribute(): UnitAttribute;
|
|
167
180
|
set primaryAttribute(primaryAttribute: UnitAttribute);
|
|
168
|
-
get strengthBase(): number;
|
|
169
|
-
set strengthBase(strengthBase: number);
|
|
170
181
|
get strengthBonus(): number;
|
|
171
182
|
get strength(): number;
|
|
172
|
-
get agilityBase(): number;
|
|
173
|
-
set agilityBase(agilityBase: number);
|
|
174
183
|
get agilityBonus(): number;
|
|
175
184
|
get agility(): number;
|
|
176
|
-
get intelligenceBase(): number;
|
|
177
|
-
set intelligenceBase(intelligenceBase: number);
|
|
178
185
|
get intelligenceBonus(): number;
|
|
179
186
|
get intelligence(): number;
|
|
180
187
|
get name(): string;
|
|
@@ -208,8 +215,6 @@ export declare class Unit extends Handle<junit> {
|
|
|
208
215
|
set facing(v: number);
|
|
209
216
|
get speed(): number;
|
|
210
217
|
set speed(v: number);
|
|
211
|
-
get flyHeight(): number;
|
|
212
|
-
set flyHeight(v: number);
|
|
213
218
|
get x(): number;
|
|
214
219
|
set x(v: number);
|
|
215
220
|
get y(): number;
|
|
@@ -233,8 +238,6 @@ export declare class Unit extends Handle<junit> {
|
|
|
233
238
|
get isInvulnerable(): boolean;
|
|
234
239
|
get vertexColor(): Color;
|
|
235
240
|
set vertexColor(v: Color);
|
|
236
|
-
get scale(): number;
|
|
237
|
-
set scale(v: number);
|
|
238
241
|
get timeScale(): number;
|
|
239
242
|
set timeScale(v: number);
|
|
240
243
|
get collisionSize(): number;
|
|
@@ -258,18 +261,17 @@ export declare class Unit extends Handle<junit> {
|
|
|
258
261
|
dropItemTarget(item: Item, target: Widget): boolean;
|
|
259
262
|
dropItemSlot(item: Item, slot: number): boolean;
|
|
260
263
|
itemInSlot(slot: number): Item | null;
|
|
261
|
-
addAbility(abilityId: number): UnitAbility |
|
|
264
|
+
addAbility(abilityId: number): UnitAbility | undefined;
|
|
262
265
|
makeAbilityPermanent(abilityId: number, permanent: true): boolean;
|
|
263
266
|
setAbilityLevel(abilityId: number, level: number): number;
|
|
264
267
|
getAbilityLevel(abilityId: number): number;
|
|
265
268
|
hasAbility(abilityId: number): boolean;
|
|
266
|
-
|
|
267
|
-
removeAbility(
|
|
269
|
+
getAbility(abilityId: number): UnitAbility | undefined;
|
|
270
|
+
removeAbility(abilityTypeId: number): boolean;
|
|
268
271
|
hideAbility(abilityId: number, flag: boolean): void;
|
|
269
272
|
getAbilityRemainingCooldown(abilityId: number): number;
|
|
270
273
|
startAbilityCooldown(abilityId: number, cooldown: number): void;
|
|
271
274
|
endAbilityCooldown(abilityId: number): void;
|
|
272
|
-
interruptAttack(): void;
|
|
273
275
|
interruptCast(abilityId: number): void;
|
|
274
276
|
getDistanceTo(target: Unit | Vec2): number;
|
|
275
277
|
getCollisionDistanceTo(...target: [Unit] | [targetX: number, targetY: number]): number;
|
|
@@ -283,14 +285,16 @@ export declare class Unit extends Handle<junit> {
|
|
|
283
285
|
unpauseEx(): void;
|
|
284
286
|
incrementStunCounter(): void;
|
|
285
287
|
decrementStunCounter(): void;
|
|
288
|
+
incrementForceStunCounter(): void;
|
|
289
|
+
decrementForceStunCounter(): void;
|
|
286
290
|
set waygateActive(v: boolean);
|
|
287
291
|
get waygateActive(): boolean;
|
|
288
292
|
set waygateDestination(v: Vec2);
|
|
289
293
|
get waygateDestination(): Vec2;
|
|
290
294
|
get abilities(): ReadonlyArray<UnitAbility>;
|
|
291
|
-
get onUnitInRange(): Record<number, Event<[Unit]>>;
|
|
292
295
|
get onManaEqual(): Record<number, Event<[Unit, number]>>;
|
|
293
296
|
get manaEvent(): Record<Operator, Record<number, Event<[Unit]>>>;
|
|
297
|
+
get targetAcquiredEvent(): Event;
|
|
294
298
|
get onSelect(): Event;
|
|
295
299
|
get onDeselect(): Event;
|
|
296
300
|
get onImmediateOrder(): Event<[number]>;
|
|
@@ -306,6 +310,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
306
310
|
static getInCollisionRange(x: number, y: number, range: number, predicate?: (unit: Unit) => boolean): Unit[];
|
|
307
311
|
static getInSector(pos: Vec2, range: number, offsetAngle: number, centralAngle: number): Unit[];
|
|
308
312
|
static getSelectionOf(player: Player, target?: Unit[]): Unit[];
|
|
313
|
+
static readonly levelChangedEvent: UnitTriggerEvent<[]>;
|
|
309
314
|
static readonly deathEvent: UnitTriggerEvent<[Unit]>;
|
|
310
315
|
static readonly onDecay: UnitTriggerEvent<[]>;
|
|
311
316
|
static readonly onResurrect: InitializingEvent<[Unit], void>;
|
|
@@ -316,7 +321,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
316
321
|
static readonly constructionStartEvent: UnitTriggerEvent<[]>;
|
|
317
322
|
static readonly onUpgradeFinish: UnitTriggerEvent<[]>;
|
|
318
323
|
static readonly onSpellEffect: EventDispatcher<[Unit, number], [Unit]>;
|
|
319
|
-
static readonly onTargetCast: EventDispatcher<[Unit, number,
|
|
324
|
+
static readonly onTargetCast: EventDispatcher<[Unit, number, Destructable | Unit | Item], [Unit, Destructable | Unit | Item]>;
|
|
320
325
|
static readonly onCastPrepare: AbilityEventDispatcher<[]>;
|
|
321
326
|
static readonly onCast: AbilityEventDispatcher<[]>;
|
|
322
327
|
static readonly onPointCastPrepare: AbilityEventDispatcher<[number, number]>;
|
|
@@ -343,14 +348,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
343
348
|
static itemDroppedEvent: UnitTriggerEvent<[Item]>;
|
|
344
349
|
static itemPickedUpEvent: UnitTriggerEvent<[Item]>;
|
|
345
350
|
static itemUsedEvent: UnitTriggerEvent<[Item]>;
|
|
346
|
-
static
|
|
347
|
-
static get itemUseOrderEvent(): Event<[unit: Unit, item: Item]>;
|
|
348
|
-
static get itemMoveOrderEvent(): Event<[
|
|
349
|
-
unit: Unit,
|
|
350
|
-
item: Item,
|
|
351
|
-
slotFrom: 0 | 1 | 2 | 3 | 4 | 5,
|
|
352
|
-
slotTo: 0 | 1 | 2 | 3 | 4 | 5
|
|
353
|
-
]>;
|
|
351
|
+
static get itemChargesChangedEvent(): Event<[unit: Unit, item: Item]>;
|
|
354
352
|
static get onCreate(): EventDispatcher<[Unit], [Unit]>;
|
|
355
353
|
static get destroyEvent(): EventDispatcher<[Unit], [Unit]>;
|
|
356
354
|
getField(field: junitintegerfield | junitrealfield): number;
|
|
@@ -362,5 +360,6 @@ export declare class Unit extends Handle<junit> {
|
|
|
362
360
|
setField(field: junitstringfield, value: string): boolean;
|
|
363
361
|
toString(): string;
|
|
364
362
|
static getBySyncId(syncId: UnitSyncId): Unit | undefined;
|
|
363
|
+
static synchronize: (player: Player, object: Unit | undefined) => Promise<Unit | undefined>;
|
|
365
364
|
}
|
|
366
365
|
export {};
|