warscript 0.0.1-dev.7b00732 → 0.0.1-dev.7b27dc0
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 +5 -0
- package/attributes.lua +8 -1
- 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 +3 -0
- package/core/types/frame.lua +59 -0
- package/core/types/order.d.ts +1 -0
- package/core/types/order.lua +11 -1
- package/core/types/sound.d.ts +17 -24
- package/core/types/sound.lua +99 -24
- package/core/types/timer.d.ts +6 -7
- package/core/types/timer.lua +18 -21
- package/core/util.d.ts +1 -1
- package/core/util.lua +12 -1
- package/decl/native.d.ts +840 -786
- 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 +5 -0
- package/engine/behaviour/ability/apply-buff.lua +32 -0
- package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
- package/engine/behaviour/ability/damage.d.ts +9 -3
- package/engine/behaviour/ability/damage.lua +26 -38
- package/engine/behaviour/ability/emulate-impact.d.ts +6 -0
- package/engine/behaviour/ability/emulate-impact.lua +42 -0
- 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 +16 -0
- package/engine/behaviour/ability/remove-buffs.lua +28 -0
- package/engine/behaviour/ability.d.ts +20 -4
- package/engine/behaviour/ability.lua +112 -39
- package/engine/behaviour/unit.d.ts +17 -0
- package/engine/behaviour/unit.lua +114 -4
- package/engine/buff.d.ts +62 -42
- package/engine/buff.lua +312 -234
- package/engine/internal/ability.d.ts +19 -2
- package/engine/internal/ability.lua +101 -4
- package/engine/internal/item/ability.lua +112 -4
- package/engine/internal/item.d.ts +7 -4
- package/engine/internal/item.lua +131 -28
- package/engine/internal/mechanics/ability-duration.lua +1 -1
- package/engine/internal/misc/ability-disable-counter.d.ts +2 -0
- 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/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/unit/ability.d.ts +15 -1
- package/engine/internal/unit/ability.lua +50 -14
- 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/bonus.d.ts +2 -0
- package/engine/internal/unit/bonus.lua +17 -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/item.d.ts +1 -0
- package/engine/internal/unit/item.lua +8 -4
- package/engine/internal/unit/main-selected.d.ts +6 -0
- package/engine/internal/unit/main-selected.lua +12 -1
- package/engine/internal/unit+damage.d.ts +2 -11
- package/engine/internal/unit+damage.lua +10 -14
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit-missile-launch.lua +1 -1
- package/engine/internal/unit.d.ts +34 -4
- package/engine/internal/unit.lua +254 -59
- package/engine/internal/utility.lua +12 -0
- package/engine/lightning.d.ts +12 -5
- package/engine/lightning.lua +48 -14
- package/engine/local-client.lua +2 -1
- 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/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/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/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/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.lua +12 -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/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/feral-spirit.lua +2 -2
- 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/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/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/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/web.d.ts +12 -0
- package/engine/object-data/entry/ability-type/web.lua +52 -0
- package/engine/object-data/entry/ability-type.d.ts +19 -17
- package/engine/object-data/entry/ability-type.lua +89 -33
- package/engine/object-data/entry/buff-type/applicable.lua +18 -37
- package/engine/object-data/entry/buff-type.d.ts +6 -12
- package/engine/object-data/entry/buff-type.lua +13 -29
- package/engine/object-data/entry/destructible-type.d.ts +1 -1
- package/engine/object-data/entry/item-type.d.ts +3 -1
- package/engine/object-data/entry/item-type.lua +15 -2
- package/engine/object-data/entry/lightning-type.d.ts +1 -1
- 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 +10 -3
- package/engine/object-data/entry/unit-type.lua +155 -92
- package/engine/object-data/entry/upgrade.d.ts +1 -1
- package/engine/object-data/entry/upgrade.lua +4 -4
- package/engine/object-data/entry.d.ts +16 -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 +10 -4
- package/engine/object-field/ability.lua +3 -0
- package/engine/object-field/unit.d.ts +46 -3
- package/engine/object-field/unit.lua +173 -7
- package/engine/object-field.d.ts +11 -3
- package/engine/object-field.lua +162 -76
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/engine/standard/entries/sound-preset.d.ts +10 -0
- package/engine/standard/entries/sound-preset.lua +10 -0
- package/engine/standard/fields/ability.d.ts +2 -0
- package/engine/standard/fields/ability.lua +2 -0
- package/engine/unit.d.ts +1 -0
- package/engine/unit.lua +1 -0
- package/objutil/buff.lua +1 -2
- package/objutil/unit.lua +8 -0
- package/package.json +2 -2
- package/utility/arrays.d.ts +9 -1
- package/utility/arrays.lua +37 -3
- package/utility/functions.d.ts +1 -0
- package/utility/functions.lua +1 -0
- package/utility/lazy.d.ts +2 -0
- package/utility/lazy.lua +14 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +3 -0
- package/utility/lua-maps.d.ts +3 -0
- package/utility/lua-maps.lua +16 -0
- package/utility/lua-sets.d.ts +1 -0
- package/utility/lua-sets.lua +3 -0
- package/utility/reflection.lua +11 -7
package/engine/internal/unit.lua
CHANGED
|
@@ -51,12 +51,19 @@ local ____arrays = require("utility.arrays")
|
|
|
51
51
|
local forEach = ____arrays.forEach
|
|
52
52
|
local ____math = require("math")
|
|
53
53
|
local min = ____math.min
|
|
54
|
+
local ____ignore_2Devents_2Ditems = require("engine.internal.unit.ignore-events-items")
|
|
55
|
+
local ignoreEventsItems = ____ignore_2Devents_2Ditems.ignoreEventsItems
|
|
56
|
+
local ____attack_2Dtype = require("engine.object-data.auxiliary.attack-type")
|
|
57
|
+
local attackTypeToNative = ____attack_2Dtype.attackTypeToNative
|
|
58
|
+
local nativeToAttackType = ____attack_2Dtype.nativeToAttackType
|
|
59
|
+
local ____damage_2Dmetadata_2Dby_2Dtarget = require("engine.internal.misc.damage-metadata-by-target")
|
|
60
|
+
local damageMetadataByTarget = ____damage_2Dmetadata_2Dby_2Dtarget.damageMetadataByTarget
|
|
61
|
+
local ____attributes = require("attributes")
|
|
62
|
+
local isAttribute = ____attributes.isAttribute
|
|
54
63
|
local match = string.match
|
|
55
64
|
local ____tostring = _G.tostring
|
|
56
65
|
local setUnitAnimation = SetUnitAnimation
|
|
57
|
-
local setUnitAnimationWithRarity = SetUnitAnimationWithRarity
|
|
58
66
|
local setUnitAnimationByIndex = SetUnitAnimationByIndex
|
|
59
|
-
local queueUnitAnimation = QueueUnitAnimation
|
|
60
67
|
local getUnitIntegerField = BlzGetUnitIntegerField
|
|
61
68
|
local getUnitRealField = BlzGetUnitRealField
|
|
62
69
|
local getHeroStr = GetHeroStr
|
|
@@ -75,9 +82,9 @@ local setUnitScale = SetUnitScale
|
|
|
75
82
|
local setUnitPosition = SetUnitPosition
|
|
76
83
|
local setUnitTimeScale = SetUnitTimeScale
|
|
77
84
|
local getHandleId = GetHandleId
|
|
85
|
+
local getUnitCurrentOrder = GetUnitCurrentOrder
|
|
78
86
|
local createUnit = CreateUnit
|
|
79
87
|
local killUnit = KillUnit
|
|
80
|
-
local setUnitExploded = SetUnitExploded
|
|
81
88
|
local removeUnit = RemoveUnit
|
|
82
89
|
local getUnitTypeId = GetUnitTypeId
|
|
83
90
|
local isHeroUnitId = IsHeroUnitId
|
|
@@ -93,8 +100,6 @@ local getSpellTargetItem = GetSpellTargetItem
|
|
|
93
100
|
local getSpellTargetDestructable = GetSpellTargetDestructable
|
|
94
101
|
local isUnitInRangeXY = IsUnitInRangeXY
|
|
95
102
|
local isUnitInRange = IsUnitInRange
|
|
96
|
-
local setResourceAmount = SetResourceAmount
|
|
97
|
-
local getResourceAmount = GetResourceAmount
|
|
98
103
|
local getUnitWeaponRealField = BlzGetUnitWeaponRealField
|
|
99
104
|
local setUnitWeaponRealField = BlzSetUnitWeaponRealField
|
|
100
105
|
local getUnitWeaponStringField = BlzGetUnitWeaponStringField
|
|
@@ -125,8 +130,6 @@ local isUnitType = IsUnitType
|
|
|
125
130
|
local isUnitAlly = IsUnitAlly
|
|
126
131
|
local isUnitEnemy = IsUnitEnemy
|
|
127
132
|
local getOwningPlayer = GetOwningPlayer
|
|
128
|
-
local setUnitColor = SetUnitColor
|
|
129
|
-
local showUnitTeamGlow = BlzShowUnitTeamGlow
|
|
130
133
|
____exports.UnitClassification = {}
|
|
131
134
|
local UnitClassification = ____exports.UnitClassification
|
|
132
135
|
do
|
|
@@ -136,6 +139,7 @@ do
|
|
|
136
139
|
UnitClassification.GROUND = UNIT_TYPE_GROUND
|
|
137
140
|
UnitClassification.SUMMONED = UNIT_TYPE_SUMMONED
|
|
138
141
|
UnitClassification.MECHANICAL = UNIT_TYPE_MECHANICAL
|
|
142
|
+
UnitClassification.WORKER = UNIT_TYPE_PEON
|
|
139
143
|
UnitClassification.ANCIENT = UNIT_TYPE_ANCIENT
|
|
140
144
|
UnitClassification.SUICIDAL = UNIT_TYPE_SAPPER
|
|
141
145
|
UnitClassification.TAUREN = UNIT_TYPE_TAUREN
|
|
@@ -343,6 +347,9 @@ local function dispatchAbility(event)
|
|
|
343
347
|
}
|
|
344
348
|
)
|
|
345
349
|
end
|
|
350
|
+
local function damagingEventPreventRetaliation(self)
|
|
351
|
+
self[0] = true
|
|
352
|
+
end
|
|
346
353
|
local function damageEventPreventDeath(self, callback, ...)
|
|
347
354
|
if self[0] ~= nil then
|
|
348
355
|
return
|
|
@@ -354,7 +361,14 @@ local function damageEventPreventDeath(self, callback, ...)
|
|
|
354
361
|
rawset(self, 1 + i, (select(i, ...)))
|
|
355
362
|
end
|
|
356
363
|
end
|
|
357
|
-
local damageSetters = {
|
|
364
|
+
local damageSetters = {
|
|
365
|
+
amount = BlzSetEventDamage,
|
|
366
|
+
attackType = function(attackType)
|
|
367
|
+
return BlzSetEventAttackType(attackTypeToNative(attackType))
|
|
368
|
+
end,
|
|
369
|
+
damageType = BlzSetEventDamageType,
|
|
370
|
+
weaponType = BlzSetEventWeaponType
|
|
371
|
+
}
|
|
358
372
|
local jlimitopByOperator = {
|
|
359
373
|
[0] = LESS_THAN_OR_EQUAL,
|
|
360
374
|
[1] = LESS_THAN_OR_EQUAL,
|
|
@@ -432,6 +446,19 @@ __TS__SetDescriptor(
|
|
|
432
446
|
},
|
|
433
447
|
true
|
|
434
448
|
)
|
|
449
|
+
__TS__SetDescriptor(
|
|
450
|
+
UnitWeapon.prototype,
|
|
451
|
+
"allowedTargetCombatClassifications",
|
|
452
|
+
{
|
|
453
|
+
get = function(self)
|
|
454
|
+
return BlzGetUnitWeaponIntegerField(self.unit.handle, UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED, self.index)
|
|
455
|
+
end,
|
|
456
|
+
set = function(self, allowedTargetCombatClassifications)
|
|
457
|
+
BlzSetUnitWeaponIntegerField(self.unit.handle, UNIT_WEAPON_IF_ATTACK_TARGETS_ALLOWED, self.index, allowedTargetCombatClassifications)
|
|
458
|
+
end
|
|
459
|
+
},
|
|
460
|
+
true
|
|
461
|
+
)
|
|
435
462
|
__TS__SetDescriptor(
|
|
436
463
|
UnitWeapon.prototype,
|
|
437
464
|
"damageBase",
|
|
@@ -562,17 +589,6 @@ local function retrieveAbility(unit, ability, abilityId)
|
|
|
562
589
|
____exports.Unit:of(unit)
|
|
563
590
|
)
|
|
564
591
|
end
|
|
565
|
-
if not unitAddAbility(unit, abilityId) then
|
|
566
|
-
if getUnitAbility(unit, abilityId) == ability then
|
|
567
|
-
return UnitAbility:of(
|
|
568
|
-
ability,
|
|
569
|
-
abilityId,
|
|
570
|
-
____exports.Unit:of(unit)
|
|
571
|
-
)
|
|
572
|
-
end
|
|
573
|
-
else
|
|
574
|
-
unitRemoveAbility(unit, abilityId)
|
|
575
|
-
end
|
|
576
592
|
for i = 0, unitInventorySize(unit) - 1 do
|
|
577
593
|
local item = unitItemInSlot(unit, i)
|
|
578
594
|
if getItemAbility(item, abilityId) == ability then
|
|
@@ -647,7 +663,8 @@ local function delayHealthChecksCallback(unit)
|
|
|
647
663
|
end
|
|
648
664
|
end
|
|
649
665
|
local nextSyncId = 1
|
|
650
|
-
local unitBySyncId = setmetatable({}, {__mode = "
|
|
666
|
+
local unitBySyncId = setmetatable({}, {__mode = "v"})
|
|
667
|
+
local damagingEventByTarget = setmetatable({}, {__mode = "k"})
|
|
651
668
|
____exports.Unit = __TS__Class()
|
|
652
669
|
local Unit = ____exports.Unit
|
|
653
670
|
Unit.name = "Unit"
|
|
@@ -688,6 +705,8 @@ function Unit.prototype.getEvent(self, event, collector)
|
|
|
688
705
|
end
|
|
689
706
|
function Unit.prototype.onDestroy(self)
|
|
690
707
|
local handle = self.handle
|
|
708
|
+
self[107] = getUnitX(handle)
|
|
709
|
+
self[108] = getUnitY(handle)
|
|
691
710
|
if not self._owner then
|
|
692
711
|
self._owner = Player:of(getOwningPlayer(handle))
|
|
693
712
|
end
|
|
@@ -798,13 +817,25 @@ function Unit.prototype.playAnimation(self, animation, rarity)
|
|
|
798
817
|
if type(animation) == "number" then
|
|
799
818
|
setUnitAnimationByIndex(self.handle, animation)
|
|
800
819
|
elseif rarity then
|
|
801
|
-
|
|
820
|
+
SetUnitAnimationWithRarity(self.handle, animation, rarity)
|
|
802
821
|
else
|
|
803
822
|
setUnitAnimation(self.handle, animation)
|
|
804
823
|
end
|
|
805
824
|
end
|
|
825
|
+
function Unit.prototype.resetAnimation(self)
|
|
826
|
+
ResetUnitAnimation(self.handle)
|
|
827
|
+
end
|
|
806
828
|
function Unit.prototype.queueAnimation(self, animation)
|
|
807
|
-
|
|
829
|
+
QueueUnitAnimation(self.handle, animation)
|
|
830
|
+
end
|
|
831
|
+
function Unit.prototype.chooseWeapon(self, target)
|
|
832
|
+
if target:isAllowedTarget(self, self.firstWeapon.allowedTargetCombatClassifications) then
|
|
833
|
+
return self.firstWeapon
|
|
834
|
+
end
|
|
835
|
+
if target:isAllowedTarget(target, self.secondWeapon.allowedTargetCombatClassifications) then
|
|
836
|
+
return self.secondWeapon
|
|
837
|
+
end
|
|
838
|
+
return nil
|
|
808
839
|
end
|
|
809
840
|
function Unit.prototype.delayHealthChecks(self)
|
|
810
841
|
self[103] = (self[103] or 0) + 1
|
|
@@ -817,7 +848,7 @@ function Unit.prototype.isSelected(self, player)
|
|
|
817
848
|
return IsUnitSelected(self.handle, player.handle)
|
|
818
849
|
end
|
|
819
850
|
function Unit.prototype.explode(self)
|
|
820
|
-
|
|
851
|
+
SetUnitExploded(self.handle, true)
|
|
821
852
|
killUnit(self.handle)
|
|
822
853
|
end
|
|
823
854
|
function Unit.prototype.kill(self)
|
|
@@ -940,8 +971,15 @@ function Unit.prototype.interruptAttack(self)
|
|
|
940
971
|
unitInterruptAttack(self.handle)
|
|
941
972
|
end
|
|
942
973
|
function Unit.prototype.interruptCast(self, abilityId)
|
|
943
|
-
|
|
944
|
-
unitDisableAbility(
|
|
974
|
+
local handle = self.handle
|
|
975
|
+
unitDisableAbility(handle, abilityId, true, false)
|
|
976
|
+
Timer:run(
|
|
977
|
+
unitDisableAbility,
|
|
978
|
+
handle,
|
|
979
|
+
abilityId,
|
|
980
|
+
false,
|
|
981
|
+
false
|
|
982
|
+
)
|
|
945
983
|
end
|
|
946
984
|
function Unit.prototype.getDistanceTo(self, target)
|
|
947
985
|
local handle = self.handle
|
|
@@ -1206,6 +1244,14 @@ __TS__SetDescriptor(
|
|
|
1206
1244
|
end},
|
|
1207
1245
|
true
|
|
1208
1246
|
)
|
|
1247
|
+
__TS__SetDescriptor(
|
|
1248
|
+
Unit.prototype,
|
|
1249
|
+
"isStunned",
|
|
1250
|
+
{get = function(self)
|
|
1251
|
+
return getUnitCurrentOrder(self.handle) == orderId("stunned")
|
|
1252
|
+
end},
|
|
1253
|
+
true
|
|
1254
|
+
)
|
|
1209
1255
|
__TS__SetDescriptor(
|
|
1210
1256
|
Unit.prototype,
|
|
1211
1257
|
"combatClassifications",
|
|
@@ -1279,6 +1325,19 @@ __TS__SetDescriptor(
|
|
|
1279
1325
|
},
|
|
1280
1326
|
true
|
|
1281
1327
|
)
|
|
1328
|
+
__TS__SetDescriptor(
|
|
1329
|
+
Unit.prototype,
|
|
1330
|
+
"primaryAttribute",
|
|
1331
|
+
{
|
|
1332
|
+
get = function(self)
|
|
1333
|
+
return getUnitIntegerField(self.handle, UNIT_IF_PRIMARY_ATTRIBUTE)
|
|
1334
|
+
end,
|
|
1335
|
+
set = function(self, primaryAttribute)
|
|
1336
|
+
setUnitIntegerField(self.handle, UNIT_IF_PRIMARY_ATTRIBUTE, primaryAttribute)
|
|
1337
|
+
end
|
|
1338
|
+
},
|
|
1339
|
+
true
|
|
1340
|
+
)
|
|
1282
1341
|
__TS__SetDescriptor(
|
|
1283
1342
|
Unit.prototype,
|
|
1284
1343
|
"strengthBase",
|
|
@@ -1403,7 +1462,7 @@ __TS__SetDescriptor(
|
|
|
1403
1462
|
return not self[106]
|
|
1404
1463
|
end,
|
|
1405
1464
|
set = function(self, isTeamGlowVisible)
|
|
1406
|
-
|
|
1465
|
+
BlzShowUnitTeamGlow(self.handle, isTeamGlowVisible)
|
|
1407
1466
|
local ____temp_6
|
|
1408
1467
|
if not isTeamGlowVisible then
|
|
1409
1468
|
____temp_6 = true
|
|
@@ -1419,9 +1478,9 @@ __TS__SetDescriptor(
|
|
|
1419
1478
|
Unit.prototype,
|
|
1420
1479
|
"color",
|
|
1421
1480
|
{set = function(self, color)
|
|
1422
|
-
|
|
1481
|
+
SetUnitColor(self.handle, color.handle)
|
|
1423
1482
|
if self[106] then
|
|
1424
|
-
|
|
1483
|
+
BlzShowUnitTeamGlow(self.handle, false)
|
|
1425
1484
|
end
|
|
1426
1485
|
end},
|
|
1427
1486
|
true
|
|
@@ -1590,7 +1649,7 @@ __TS__SetDescriptor(
|
|
|
1590
1649
|
"x",
|
|
1591
1650
|
{
|
|
1592
1651
|
get = function(self)
|
|
1593
|
-
return getUnitX(self.handle)
|
|
1652
|
+
return self[107] or getUnitX(self.handle)
|
|
1594
1653
|
end,
|
|
1595
1654
|
set = function(self, v)
|
|
1596
1655
|
SetUnitX(self.handle, v)
|
|
@@ -1603,7 +1662,7 @@ __TS__SetDescriptor(
|
|
|
1603
1662
|
"y",
|
|
1604
1663
|
{
|
|
1605
1664
|
get = function(self)
|
|
1606
|
-
return getUnitY(self.handle)
|
|
1665
|
+
return self[108] or getUnitY(self.handle)
|
|
1607
1666
|
end,
|
|
1608
1667
|
set = function(self, v)
|
|
1609
1668
|
SetUnitY(self.handle, v)
|
|
@@ -1689,10 +1748,10 @@ __TS__SetDescriptor(
|
|
|
1689
1748
|
"gold",
|
|
1690
1749
|
{
|
|
1691
1750
|
get = function(self)
|
|
1692
|
-
return
|
|
1751
|
+
return GetResourceAmount(self.handle)
|
|
1693
1752
|
end,
|
|
1694
1753
|
set = function(self, gold)
|
|
1695
|
-
|
|
1754
|
+
SetResourceAmount(self.handle, gold)
|
|
1696
1755
|
end
|
|
1697
1756
|
},
|
|
1698
1757
|
true
|
|
@@ -1820,6 +1879,19 @@ __TS__SetDescriptor(
|
|
|
1820
1879
|
end},
|
|
1821
1880
|
true
|
|
1822
1881
|
)
|
|
1882
|
+
__TS__SetDescriptor(
|
|
1883
|
+
Unit.prototype,
|
|
1884
|
+
"movementType",
|
|
1885
|
+
{
|
|
1886
|
+
get = function(self)
|
|
1887
|
+
return getUnitIntegerField(self.handle, UNIT_IF_MOVE_TYPE)
|
|
1888
|
+
end,
|
|
1889
|
+
set = function(self, movementType)
|
|
1890
|
+
setUnitIntegerField(self.handle, UNIT_IF_MOVE_TYPE, movementType)
|
|
1891
|
+
end
|
|
1892
|
+
},
|
|
1893
|
+
true
|
|
1894
|
+
)
|
|
1823
1895
|
__TS__SetDescriptor(
|
|
1824
1896
|
Unit.prototype,
|
|
1825
1897
|
"pathing",
|
|
@@ -2001,6 +2073,14 @@ __TS__SetDescriptor(
|
|
|
2001
2073
|
end},
|
|
2002
2074
|
true
|
|
2003
2075
|
)
|
|
2076
|
+
__TS__SetDescriptor(
|
|
2077
|
+
Unit.prototype,
|
|
2078
|
+
"targetAcquiredEvent",
|
|
2079
|
+
{get = function(self)
|
|
2080
|
+
return self:getEvent(EVENT_UNIT_ACQUIRED_TARGET)
|
|
2081
|
+
end},
|
|
2082
|
+
true
|
|
2083
|
+
)
|
|
2004
2084
|
__TS__SetDescriptor(
|
|
2005
2085
|
Unit.prototype,
|
|
2006
2086
|
"onSelect",
|
|
@@ -2326,10 +2406,12 @@ Unit.onImmediateOrder = dispatchId(__TS__New(
|
|
|
2326
2406
|
____exports.UnitTriggerEvent,
|
|
2327
2407
|
EVENT_PLAYER_UNIT_ISSUED_ORDER,
|
|
2328
2408
|
function()
|
|
2329
|
-
local
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2409
|
+
local handle = getOrderedUnit()
|
|
2410
|
+
if handle ~= nil and getUnitTypeId(handle) ~= dummyUnitId then
|
|
2411
|
+
local unit = ____exports.Unit:of(handle)
|
|
2412
|
+
if unit.state == 1 then
|
|
2413
|
+
return unit, getIssuedOrderId()
|
|
2414
|
+
end
|
|
2333
2415
|
end
|
|
2334
2416
|
return IgnoreEvent
|
|
2335
2417
|
end
|
|
@@ -2360,13 +2442,19 @@ Unit.onDamaging = (function()
|
|
|
2360
2442
|
if source and source.typeId == dummyUnitId then
|
|
2361
2443
|
source = nil
|
|
2362
2444
|
end
|
|
2363
|
-
local target = BlzGetEventDamageTarget()
|
|
2445
|
+
local target = ____exports.Unit:of(BlzGetEventDamageTarget())
|
|
2446
|
+
local metadata = damageMetadataByTarget[target]
|
|
2447
|
+
damageMetadataByTarget[target] = nil
|
|
2364
2448
|
local data = {
|
|
2365
2449
|
amount = GetEventDamage(),
|
|
2366
|
-
attackType = BlzGetEventAttackType(),
|
|
2450
|
+
attackType = nativeToAttackType(BlzGetEventAttackType()),
|
|
2367
2451
|
damageType = BlzGetEventDamageType(),
|
|
2368
2452
|
weaponType = BlzGetEventWeaponType(),
|
|
2369
|
-
|
|
2453
|
+
metadata = metadata,
|
|
2454
|
+
isAttack = BlzGetEventIsAttack(),
|
|
2455
|
+
originalAmount = GetEventDamage(),
|
|
2456
|
+
originalMetadata = metadata,
|
|
2457
|
+
preventRetaliation = damagingEventPreventRetaliation
|
|
2370
2458
|
}
|
|
2371
2459
|
if data.isAttack and source then
|
|
2372
2460
|
local weapon = BlzGetUnitWeaponBooleanField(source.handle, UNIT_WEAPON_BF_ATTACKS_ENABLED, 1) and (BlzGetUnitWeaponBooleanField(source.handle, UNIT_WEAPON_BF_ATTACKS_ENABLED, 0) and -1 or 1) or 0
|
|
@@ -2380,18 +2468,36 @@ Unit.onDamaging = (function()
|
|
|
2380
2468
|
invoke(
|
|
2381
2469
|
event,
|
|
2382
2470
|
source,
|
|
2383
|
-
|
|
2471
|
+
target,
|
|
2384
2472
|
setmetatable(
|
|
2385
2473
|
{},
|
|
2386
2474
|
{
|
|
2387
2475
|
__index = data,
|
|
2388
2476
|
__newindex = function(self, key, value)
|
|
2389
|
-
damageSetters[key]
|
|
2477
|
+
local damageSetter = damageSetters[key]
|
|
2478
|
+
if damageSetter ~= nil then
|
|
2479
|
+
damageSetter(value)
|
|
2480
|
+
end
|
|
2390
2481
|
data[key] = value
|
|
2391
2482
|
end
|
|
2392
2483
|
}
|
|
2393
2484
|
)
|
|
2394
2485
|
)
|
|
2486
|
+
if data[0] and source then
|
|
2487
|
+
local sourceOwner = source.owner.handle
|
|
2488
|
+
data[1] = sourceOwner
|
|
2489
|
+
local targetOwner = target.owner.handle
|
|
2490
|
+
data[2] = targetOwner
|
|
2491
|
+
if not GetPlayerAlliance(sourceOwner, targetOwner, ALLIANCE_PASSIVE) then
|
|
2492
|
+
SetPlayerAlliance(sourceOwner, targetOwner, ALLIANCE_PASSIVE, true)
|
|
2493
|
+
data[3] = true
|
|
2494
|
+
end
|
|
2495
|
+
if not GetPlayerAlliance(targetOwner, sourceOwner, ALLIANCE_PASSIVE) then
|
|
2496
|
+
SetPlayerAlliance(targetOwner, sourceOwner, ALLIANCE_PASSIVE, true)
|
|
2497
|
+
data[4] = true
|
|
2498
|
+
end
|
|
2499
|
+
end
|
|
2500
|
+
damagingEventByTarget[target] = data
|
|
2395
2501
|
return
|
|
2396
2502
|
end
|
|
2397
2503
|
BlzSetEventDamage(0)
|
|
@@ -2399,7 +2505,7 @@ Unit.onDamaging = (function()
|
|
|
2399
2505
|
BlzSetEventDamageType(DAMAGE_TYPE_UNKNOWN)
|
|
2400
2506
|
BlzSetEventWeaponType(WEAPON_TYPE_WHOKNOWS)
|
|
2401
2507
|
local sourceOwner = source.owner.handle
|
|
2402
|
-
local targetOwner =
|
|
2508
|
+
local targetOwner = target.owner.handle
|
|
2403
2509
|
if not GetPlayerAlliance(sourceOwner, targetOwner, ALLIANCE_PASSIVE) then
|
|
2404
2510
|
SetPlayerAlliance(sourceOwner, targetOwner, ALLIANCE_PASSIVE, true)
|
|
2405
2511
|
Timer:run(function()
|
|
@@ -2415,23 +2521,19 @@ Unit.onDamaging = (function()
|
|
|
2415
2521
|
for ____, ____value in ipairs(source._attackHandlers) do
|
|
2416
2522
|
local condition = ____value[1]
|
|
2417
2523
|
local action = ____value[2]
|
|
2418
|
-
if condition(
|
|
2419
|
-
source,
|
|
2420
|
-
____exports.Unit:of(target),
|
|
2421
|
-
data
|
|
2422
|
-
) then
|
|
2524
|
+
if condition(source, target, data) then
|
|
2423
2525
|
action(
|
|
2424
2526
|
source,
|
|
2425
|
-
|
|
2527
|
+
target,
|
|
2426
2528
|
setmetatable(
|
|
2427
2529
|
{fire = function()
|
|
2428
2530
|
UnitDamageTarget(
|
|
2429
2531
|
source.handle,
|
|
2430
|
-
target,
|
|
2532
|
+
target.handle,
|
|
2431
2533
|
data.amount,
|
|
2432
2534
|
true,
|
|
2433
2535
|
true,
|
|
2434
|
-
data.attackType,
|
|
2536
|
+
attackTypeToNative(data.attackType),
|
|
2435
2537
|
data.damageType,
|
|
2436
2538
|
data.weaponType
|
|
2437
2539
|
)
|
|
@@ -2458,26 +2560,50 @@ Unit.onDamage = __TS__New(
|
|
|
2458
2560
|
if source and source.typeId == dummyUnitId then
|
|
2459
2561
|
source = nil
|
|
2460
2562
|
end
|
|
2563
|
+
local target = ____exports.Unit:of(BlzGetEventDamageTarget())
|
|
2564
|
+
local damagingEvent = damagingEventByTarget[target]
|
|
2565
|
+
damagingEventByTarget[target] = nil
|
|
2461
2566
|
local data = {
|
|
2462
2567
|
amount = GetEventDamage(),
|
|
2463
|
-
attackType = BlzGetEventAttackType(),
|
|
2568
|
+
attackType = nativeToAttackType(BlzGetEventAttackType()),
|
|
2464
2569
|
damageType = BlzGetEventDamageType(),
|
|
2465
2570
|
weaponType = BlzGetEventWeaponType(),
|
|
2571
|
+
metadata = damagingEvent and damagingEvent.metadata,
|
|
2466
2572
|
isAttack = BlzGetEventIsAttack(),
|
|
2467
|
-
originalAmount = GetEventDamage(),
|
|
2573
|
+
originalAmount = damagingEvent and damagingEvent.originalAmount or GetEventDamage(),
|
|
2574
|
+
originalMetadata = damagingEvent and damagingEvent.originalMetadata,
|
|
2468
2575
|
preventDeath = damageEventPreventDeath
|
|
2469
2576
|
}
|
|
2577
|
+
if damagingEvent then
|
|
2578
|
+
for key, value in pairs(damagingEvent) do
|
|
2579
|
+
if isAttribute(key) then
|
|
2580
|
+
data[key] = value
|
|
2581
|
+
end
|
|
2582
|
+
end
|
|
2583
|
+
local sourceOwner = damagingEvent[1]
|
|
2584
|
+
if sourceOwner then
|
|
2585
|
+
local targetOwner = damagingEvent[2]
|
|
2586
|
+
if damagingEvent[3] then
|
|
2587
|
+
SetPlayerAlliance(sourceOwner, targetOwner, ALLIANCE_PASSIVE, false)
|
|
2588
|
+
end
|
|
2589
|
+
if damagingEvent[4] then
|
|
2590
|
+
SetPlayerAlliance(targetOwner, sourceOwner, ALLIANCE_PASSIVE, false)
|
|
2591
|
+
end
|
|
2592
|
+
end
|
|
2593
|
+
end
|
|
2470
2594
|
local evData = setmetatable(
|
|
2471
2595
|
{},
|
|
2472
2596
|
{
|
|
2473
2597
|
__index = data,
|
|
2474
2598
|
__newindex = function(self, key, value)
|
|
2475
|
-
damageSetters[key]
|
|
2599
|
+
local damageSetter = damageSetters[key]
|
|
2600
|
+
if damageSetter ~= nil then
|
|
2601
|
+
damageSetter(value)
|
|
2602
|
+
end
|
|
2476
2603
|
data[key] = value
|
|
2477
2604
|
end
|
|
2478
2605
|
}
|
|
2479
2606
|
)
|
|
2480
|
-
local target = ____exports.Unit:of(BlzGetEventDamageTarget())
|
|
2481
2607
|
invoke(event, source, target, evData)
|
|
2482
2608
|
if evData[0] ~= nil and target.health - evData.amount < 0.405 then
|
|
2483
2609
|
local bonusHealth = math.ceil(evData.amount)
|
|
@@ -2520,8 +2646,9 @@ Unit.itemDroppedEvent = __TS__New(
|
|
|
2520
2646
|
EVENT_PLAYER_UNIT_DROP_ITEM,
|
|
2521
2647
|
function()
|
|
2522
2648
|
local unit = getTriggerUnit()
|
|
2523
|
-
|
|
2524
|
-
|
|
2649
|
+
local item = getManipulatedItem()
|
|
2650
|
+
if getUnitTypeId(unit) ~= dummyUnitId and not (ignoreEventsItems[item] ~= nil) then
|
|
2651
|
+
return ____exports.Unit:of(unit), Item:of(item)
|
|
2525
2652
|
end
|
|
2526
2653
|
return IgnoreEvent
|
|
2527
2654
|
end
|
|
@@ -2531,8 +2658,9 @@ Unit.itemPickedUpEvent = __TS__New(
|
|
|
2531
2658
|
EVENT_PLAYER_UNIT_PICKUP_ITEM,
|
|
2532
2659
|
function()
|
|
2533
2660
|
local unit = getTriggerUnit()
|
|
2534
|
-
|
|
2535
|
-
|
|
2661
|
+
local item = getManipulatedItem()
|
|
2662
|
+
if getUnitTypeId(unit) ~= dummyUnitId and not (ignoreEventsItems[item] ~= nil) then
|
|
2663
|
+
return ____exports.Unit:of(unit), Item:of(item)
|
|
2536
2664
|
end
|
|
2537
2665
|
return IgnoreEvent
|
|
2538
2666
|
end
|
|
@@ -2540,13 +2668,80 @@ Unit.itemPickedUpEvent = __TS__New(
|
|
|
2540
2668
|
Unit.itemUsedEvent = __TS__New(
|
|
2541
2669
|
____exports.UnitTriggerEvent,
|
|
2542
2670
|
EVENT_PLAYER_UNIT_USE_ITEM,
|
|
2543
|
-
function()
|
|
2671
|
+
function()
|
|
2672
|
+
local unit = getTriggerUnit()
|
|
2673
|
+
local item = getManipulatedItem()
|
|
2674
|
+
if getUnitTypeId(unit) ~= dummyUnitId and not (ignoreEventsItems[item] ~= nil) then
|
|
2675
|
+
return ____exports.Unit:of(unit), Item:of(item)
|
|
2676
|
+
end
|
|
2677
|
+
return IgnoreEvent
|
|
2678
|
+
end
|
|
2544
2679
|
)
|
|
2545
2680
|
Unit.itemStackedEvent = __TS__New(
|
|
2546
2681
|
____exports.UnitTriggerEvent,
|
|
2547
2682
|
EVENT_PLAYER_UNIT_STACK_ITEM,
|
|
2548
2683
|
function() return ____exports.Unit:of(getTriggerUnit()), Item:of(getManipulatedItem()) end
|
|
2549
2684
|
)
|
|
2685
|
+
__TS__ObjectDefineProperty(
|
|
2686
|
+
Unit,
|
|
2687
|
+
"itemChargesChangedEvent",
|
|
2688
|
+
{get = function(self)
|
|
2689
|
+
local event = __TS__New(Event)
|
|
2690
|
+
Item.chargesChangedEvent:addListener(function(item)
|
|
2691
|
+
local unit = item.owner
|
|
2692
|
+
if unit ~= nil then
|
|
2693
|
+
invoke(event, unit, item)
|
|
2694
|
+
end
|
|
2695
|
+
end)
|
|
2696
|
+
rawset(self, "itemChargesChangedEvent", event)
|
|
2697
|
+
return event
|
|
2698
|
+
end}
|
|
2699
|
+
)
|
|
2700
|
+
__TS__ObjectDefineProperty(
|
|
2701
|
+
Unit,
|
|
2702
|
+
"itemUseOrderEvent",
|
|
2703
|
+
{get = function(self)
|
|
2704
|
+
local event = __TS__New(Event)
|
|
2705
|
+
for order = orderId("useslot0"), orderId("useslot5") do
|
|
2706
|
+
local slot = order - orderId("useslot0")
|
|
2707
|
+
local function listener(unit)
|
|
2708
|
+
local item = unit.items[slot + 1]
|
|
2709
|
+
if item ~= nil then
|
|
2710
|
+
invoke(event, unit, item)
|
|
2711
|
+
end
|
|
2712
|
+
end
|
|
2713
|
+
self.onImmediateOrder[order]:addListener(listener)
|
|
2714
|
+
self.onTargetOrder[order]:addListener(listener)
|
|
2715
|
+
self.onPointOrder[order]:addListener(listener)
|
|
2716
|
+
end
|
|
2717
|
+
rawset(self, "itemUseOrderEvent", event)
|
|
2718
|
+
return event
|
|
2719
|
+
end}
|
|
2720
|
+
)
|
|
2721
|
+
__TS__ObjectDefineProperty(
|
|
2722
|
+
Unit,
|
|
2723
|
+
"itemMoveOrderEvent",
|
|
2724
|
+
{get = function(self)
|
|
2725
|
+
local event = __TS__New(Event)
|
|
2726
|
+
for order = orderId("moveslot0"), orderId("moveslot5") do
|
|
2727
|
+
local slotTo = order - orderId("moveslot0")
|
|
2728
|
+
self.onTargetOrder[order]:addListener(function(unit, item)
|
|
2729
|
+
local slotFrom = unit.items:findSlot(item)
|
|
2730
|
+
if slotFrom ~= nil then
|
|
2731
|
+
invoke(
|
|
2732
|
+
event,
|
|
2733
|
+
unit,
|
|
2734
|
+
item,
|
|
2735
|
+
slotFrom,
|
|
2736
|
+
slotTo
|
|
2737
|
+
)
|
|
2738
|
+
end
|
|
2739
|
+
end)
|
|
2740
|
+
end
|
|
2741
|
+
rawset(self, "itemMoveOrderEvent", event)
|
|
2742
|
+
return event
|
|
2743
|
+
end}
|
|
2744
|
+
)
|
|
2550
2745
|
__TS__ObjectDefineProperty(
|
|
2551
2746
|
Unit,
|
|
2552
2747
|
"onCreate",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
local ____exports = {}
|
|
2
2
|
local getUnitAbility = BlzGetUnitAbility
|
|
3
3
|
local unitAddAbility = UnitAddAbility
|
|
4
|
+
local unitInventorySize = UnitInventorySize
|
|
5
|
+
local unitItemInSlot = UnitItemInSlot
|
|
4
6
|
local unitMakeAbilityPermanent = UnitMakeAbilityPermanent
|
|
5
7
|
---
|
|
6
8
|
-- @internal For use by internal systems only.
|
|
@@ -10,4 +12,14 @@ ____exports.addInternalAbility = function(unit, abilityTypeId)
|
|
|
10
12
|
end
|
|
11
13
|
return getUnitAbility(unit, abilityTypeId)
|
|
12
14
|
end
|
|
15
|
+
---
|
|
16
|
+
-- @internal For use by internal systems only.
|
|
17
|
+
____exports.findUnitItemSlot = function(unit, item)
|
|
18
|
+
for slot = 0, unitInventorySize(unit) - 1 do
|
|
19
|
+
if item == unitItemInSlot(unit, slot) then
|
|
20
|
+
return slot
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
return nil
|
|
24
|
+
end
|
|
13
25
|
return ____exports
|
package/engine/lightning.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
import { LightningTypeId } from "./object-data/entry/lightning-type";
|
|
3
|
-
import { Handle, HandleDestructor } from "../core/types/handle";
|
|
4
3
|
import { Unit } from "../core/types/unit";
|
|
4
|
+
import { AbstractDestroyable, Destructor } from "../destroyable";
|
|
5
5
|
declare const enum LightningPropertyKey {
|
|
6
6
|
CHECK_VISIBILITY = 100,
|
|
7
7
|
SOURCE_UNIT = 101,
|
|
@@ -12,10 +12,12 @@ declare const enum LightningPropertyKey {
|
|
|
12
12
|
TARGET_X = 106,
|
|
13
13
|
TARGET_Y = 107,
|
|
14
14
|
TARGET_Z = 108,
|
|
15
|
-
DURATION = 109
|
|
15
|
+
DURATION = 109,
|
|
16
|
+
FADING = 110
|
|
16
17
|
}
|
|
17
18
|
export type LightningConstructor<T extends Lightning> = typeof Lightning & (new (handle: jlightning, typeId: LightningTypeId) => T);
|
|
18
|
-
export declare class Lightning extends
|
|
19
|
+
export declare class Lightning extends AbstractDestroyable {
|
|
20
|
+
readonly handle: jlightning;
|
|
19
21
|
readonly typeId: LightningTypeId;
|
|
20
22
|
private [LightningPropertyKey.CHECK_VISIBILITY]?;
|
|
21
23
|
private [LightningPropertyKey.SOURCE_UNIT]?;
|
|
@@ -27,8 +29,9 @@ export declare class Lightning extends Handle<jlightning> {
|
|
|
27
29
|
private [LightningPropertyKey.TARGET_Y]?;
|
|
28
30
|
private [LightningPropertyKey.TARGET_Z]?;
|
|
29
31
|
private [LightningPropertyKey.DURATION]?;
|
|
32
|
+
private [LightningPropertyKey.FADING]?;
|
|
30
33
|
constructor(handle: jlightning, typeId: LightningTypeId);
|
|
31
|
-
protected onDestroy():
|
|
34
|
+
protected onDestroy(): Destructor;
|
|
32
35
|
static create<T extends Lightning>(this: LightningConstructor<T>, typeId: LightningTypeId, ...parameters: [
|
|
33
36
|
...checkVisibility: [boolean] | [],
|
|
34
37
|
...sourceAndTarget: [sourceX: number, sourceY: number, targetX: number, targetY: number] | [
|
|
@@ -46,6 +49,10 @@ export declare class Lightning extends Handle<jlightning> {
|
|
|
46
49
|
target: Unit
|
|
47
50
|
]
|
|
48
51
|
]): T;
|
|
49
|
-
static flash(...parameters: [
|
|
52
|
+
static flash(...parameters: [
|
|
53
|
+
...parameters: Parameters<(typeof Lightning)["create"]>,
|
|
54
|
+
duration: number,
|
|
55
|
+
fading?: boolean
|
|
56
|
+
]): void;
|
|
50
57
|
}
|
|
51
58
|
export {};
|