warscript 0.0.1-dev.6fc443a → 0.0.1-dev.702d52d

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.
Files changed (54) hide show
  1. package/destroyable.d.ts +1 -0
  2. package/destroyable.lua +9 -0
  3. package/engine/behavior.d.ts +4 -2
  4. package/engine/behavior.lua +69 -11
  5. package/engine/behaviour/ability/apply-buff.lua +4 -4
  6. package/engine/behaviour/ability.d.ts +2 -1
  7. package/engine/behaviour/ability.lua +2 -1
  8. package/engine/behaviour/unit/stun-immunity.d.ts +1 -1
  9. package/engine/behaviour/unit/stun-immunity.lua +5 -4
  10. package/engine/behaviour/unit.d.ts +1 -0
  11. package/engine/behaviour/unit.lua +15 -3
  12. package/engine/buff.d.ts +9 -3
  13. package/engine/buff.lua +62 -34
  14. package/engine/internal/mechanics/cast-ability.lua +6 -3
  15. package/engine/internal/object-data/mana-regeneration-rate-increase-factor.d.ts +2 -0
  16. package/engine/internal/object-data/mana-regeneration-rate-increase-factor.lua +16 -0
  17. package/engine/internal/unit/attributes.d.ts +17 -0
  18. package/engine/internal/unit/attributes.lua +46 -0
  19. package/engine/internal/unit/bonus.d.ts +2 -0
  20. package/engine/internal/unit/bonus.lua +10 -0
  21. package/engine/internal/unit/fly-height.lua +3 -3
  22. package/engine/internal/unit/interrupts.d.ts +12 -0
  23. package/engine/internal/unit/interrupts.lua +28 -0
  24. package/engine/internal/unit/scale.lua +3 -3
  25. package/engine/internal/unit-missile-launch.lua +12 -5
  26. package/engine/internal/unit.d.ts +1 -8
  27. package/engine/internal/unit.lua +70 -91
  28. package/engine/local-client.d.ts +1 -1
  29. package/engine/local-client.lua +4 -4
  30. package/engine/object-data/auxiliary/health-regeneration-type.d.ts +8 -0
  31. package/engine/object-data/auxiliary/health-regeneration-type.lua +2 -0
  32. package/engine/object-data/entry/ability-type/mana-regeneration.d.ts +8 -0
  33. package/engine/object-data/entry/ability-type/mana-regeneration.lua +26 -0
  34. package/engine/object-data/entry/destructible-type.d.ts +27 -1
  35. package/engine/object-data/entry/destructible-type.lua +155 -0
  36. package/engine/object-data/entry/unit-type.d.ts +4 -0
  37. package/engine/object-data/entry/unit-type.lua +76 -32
  38. package/engine/object-field/unit.d.ts +7 -4
  39. package/engine/object-field/unit.lua +4 -0
  40. package/engine/object-field.d.ts +2 -0
  41. package/engine/object-field.lua +171 -115
  42. package/engine/standard/fields/ability.d.ts +2 -2
  43. package/engine/standard/fields/ability.lua +2 -2
  44. package/engine/standard/fields/unit.d.ts +11 -5
  45. package/engine/standard/fields/unit.lua +13 -4
  46. package/engine/unit.d.ts +2 -0
  47. package/engine/unit.lua +2 -0
  48. package/objutil/buff.lua +9 -7
  49. package/package.json +2 -2
  50. package/patch-lua.lua +15 -0
  51. package/utility/linked-map.d.ts +26 -0
  52. package/utility/linked-map.lua +66 -0
  53. package/utility/linked-set.lua +4 -0
  54. package/utility/records.lua +20 -1
@@ -12,6 +12,7 @@ export type UnitAutoAttackDamageBonusId = UnitBonusId<"autoAttackDamage">;
12
12
  export type UnitDamageFactorBonusId = UnitBonusId<"damageFactor">;
13
13
  export type UnitReceivedDamageFactorBonusId = UnitBonusId<"receivedDamageFactor">;
14
14
  export type UnitEvasionProbabilityBonusId = UnitBonusId<"evasionProbability">;
15
+ export type UnitManaRegenerationRateFactorBonusId = UnitBonusId<"manaRegenerationRateFactor">;
15
16
  export type UnitBonusType<Id extends UnitBonusId = UnitBonusId> = ({
16
17
  abilityTypeId: AbilityTypeId;
17
18
  field: jabilityintegerlevelfield;
@@ -36,6 +37,7 @@ export declare namespace UnitBonusType {
36
37
  const DAMAGE_FACTOR: UnitBonusType<UnitReceivedDamageFactorBonusId>;
37
38
  const RECEIVED_DAMAGE_FACTOR: UnitBonusType<UnitReceivedDamageFactorBonusId>;
38
39
  const EVASION_PROBABILITY: UnitBonusType<UnitEvasionProbabilityBonusId>;
40
+ const MANA_REGENERATION_RATE_FACTOR: UnitBonusType<UnitManaRegenerationRateFactorBonusId>;
39
41
  }
40
42
  export declare const addUnitBonus: <Id extends UnitBonusId>(unit: Unit, bonusType: UnitBonusType<Id>, value: number) => Id;
41
43
  export declare const removeUnitBonus: <Id extends UnitBonusId>(unit: Unit, bonusType: UnitBonusType<Id>, id: Id) => boolean;
@@ -24,6 +24,9 @@ local MOVEMENT_SPEED_INCREASE_FACTOR_DUMMY_ABILITY_TYPE_ID = ____movement_2Dspee
24
24
  local ____evasion_2Dprobability = require("engine.internal.object-data.evasion-probability")
25
25
  local EVASION_PROBABILITY_ABILITY_FIELD = ____evasion_2Dprobability.EVASION_PROBABILITY_ABILITY_FIELD
26
26
  local EVASION_PROBABILITY_DUMMY_ABILITY_TYPE_ID = ____evasion_2Dprobability.EVASION_PROBABILITY_DUMMY_ABILITY_TYPE_ID
27
+ local ____mana_2Dregeneration_2Drate_2Dincrease_2Dfactor = require("engine.internal.object-data.mana-regeneration-rate-increase-factor")
28
+ local MANA_REGENERATION_RATE_INCREASE_FACTOR_ABILITY_FIELD = ____mana_2Dregeneration_2Drate_2Dincrease_2Dfactor.MANA_REGENERATION_RATE_INCREASE_FACTOR_ABILITY_FIELD
29
+ local MANA_REGENERATION_RATE_INCREASE_FACTOR_DUMMY_ABILITY_TYPE_ID = ____mana_2Dregeneration_2Drate_2Dincrease_2Dfactor.MANA_REGENERATION_RATE_INCREASE_FACTOR_DUMMY_ABILITY_TYPE_ID
27
30
  local damageFactorByUnit = {}
28
31
  local receivedDamageFactorByUnit = {}
29
32
  local function atLeastOnceProbability(array)
@@ -73,6 +76,13 @@ do
73
76
  reduce = atLeastOnceProbability,
74
77
  initialValue = 0
75
78
  }
79
+ UnitBonusType.MANA_REGENERATION_RATE_FACTOR = {
80
+ abilityTypeId = MANA_REGENERATION_RATE_INCREASE_FACTOR_DUMMY_ABILITY_TYPE_ID,
81
+ field = MANA_REGENERATION_RATE_INCREASE_FACTOR_ABILITY_FIELD,
82
+ integer = false,
83
+ reduce = sum,
84
+ initialValue = 0
85
+ }
76
86
  end
77
87
  local bonusesByUnitByBonusType = {}
78
88
  local nextId = 1
@@ -4,16 +4,16 @@ local ____exports = {}
4
4
  local ____unit = require("engine.internal.unit")
5
5
  local Unit = ____unit.Unit
6
6
  local ____unit = require("engine.standard.fields.unit")
7
- local FLY_HEIGHT_UNIT_FLOAT_FIELD = ____unit.FLY_HEIGHT_UNIT_FLOAT_FIELD
7
+ local FLY_HEIGHT_UNIT_FIELD = ____unit.FLY_HEIGHT_UNIT_FIELD
8
8
  __TS__ObjectDefineProperty(
9
9
  Unit.prototype,
10
10
  "flyHeight",
11
11
  {
12
12
  get = function(self)
13
- return FLY_HEIGHT_UNIT_FLOAT_FIELD:getValue(self)
13
+ return FLY_HEIGHT_UNIT_FIELD:getValue(self)
14
14
  end,
15
15
  set = function(self, value)
16
- FLY_HEIGHT_UNIT_FLOAT_FIELD:setValue(self, value)
16
+ FLY_HEIGHT_UNIT_FIELD:setValue(self, value)
17
17
  end
18
18
  }
19
19
  )
@@ -0,0 +1,12 @@
1
+ /** @noSelfInFile */
2
+ declare module "../unit" {
3
+ interface Unit {
4
+ interruptAttack(this: Unit): void;
5
+ }
6
+ }
7
+ declare module "../unit" {
8
+ interface Unit {
9
+ interruptMovement(this: Unit): void;
10
+ }
11
+ }
12
+ export {};
@@ -0,0 +1,28 @@
1
+ local ____exports = {}
2
+ local ____unit = require("engine.internal.unit")
3
+ local Unit = ____unit.Unit
4
+ local ____unit_2Dmissile_2Dlaunch = require("engine.internal.unit-missile-launch")
5
+ local resetAutoAttackTimer = ____unit_2Dmissile_2Dlaunch.resetAutoAttackTimer
6
+ local unitDisableAbility = BlzUnitDisableAbility
7
+ local unitInterruptAttack = BlzUnitInterruptAttack
8
+ Unit.prototype.interruptAttack = function(self)
9
+ unitInterruptAttack(self.handle)
10
+ resetAutoAttackTimer(self)
11
+ end
12
+ Unit.prototype.interruptMovement = function(self)
13
+ local handle = self.handle
14
+ unitDisableAbility(
15
+ handle,
16
+ fourCC("Amov"),
17
+ true,
18
+ false
19
+ )
20
+ unitDisableAbility(
21
+ handle,
22
+ fourCC("Amov"),
23
+ false,
24
+ false
25
+ )
26
+ resetAutoAttackTimer(self)
27
+ end
28
+ return ____exports
@@ -4,16 +4,16 @@ local ____exports = {}
4
4
  local ____unit = require("engine.internal.unit")
5
5
  local Unit = ____unit.Unit
6
6
  local ____unit = require("engine.standard.fields.unit")
7
- local SCALING_VALUE_UNIT_FLOAT_FIELD = ____unit.SCALING_VALUE_UNIT_FLOAT_FIELD
7
+ local SCALING_VALUE_UNIT_FIELD = ____unit.SCALING_VALUE_UNIT_FIELD
8
8
  __TS__ObjectDefineProperty(
9
9
  Unit.prototype,
10
10
  "scale",
11
11
  {
12
12
  get = function(self)
13
- return SCALING_VALUE_UNIT_FLOAT_FIELD:getValue(self)
13
+ return SCALING_VALUE_UNIT_FIELD:getValue(self)
14
14
  end,
15
15
  set = function(self, value)
16
- SCALING_VALUE_UNIT_FLOAT_FIELD:setValue(self, value)
16
+ SCALING_VALUE_UNIT_FIELD:setValue(self, value)
17
17
  end
18
18
  }
19
19
  )
@@ -36,11 +36,18 @@ local instantOrderIds = luaSetOf(
36
36
  orderId("undivineshield"),
37
37
  orderId("unimmolation")
38
38
  )
39
- local function reset(source, orderId)
40
- if not (instantOrderIds[orderId] ~= nil) and units:remove(source) then
41
- source[targetAttribute] = nil
42
- source[impactDelayAttribute] = nil
43
- source[passedTimeAttribute] = nil
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)
49
+ if not (instantOrderIds[orderId] ~= nil) then
50
+ ____exports.resetAutoAttackTimer(unit)
44
51
  end
45
52
  end
46
53
  Unit.onImmediateOrder:addListener(reset)
@@ -177,16 +177,10 @@ export declare class Unit extends Handle<junit> {
177
177
  set xp(v: number);
178
178
  get primaryAttribute(): UnitAttribute;
179
179
  set primaryAttribute(primaryAttribute: UnitAttribute);
180
- get strengthBase(): number;
181
- set strengthBase(strengthBase: number);
182
180
  get strengthBonus(): number;
183
181
  get strength(): number;
184
- get agilityBase(): number;
185
- set agilityBase(agilityBase: number);
186
182
  get agilityBonus(): number;
187
183
  get agility(): number;
188
- get intelligenceBase(): number;
189
- set intelligenceBase(intelligenceBase: number);
190
184
  get intelligenceBonus(): number;
191
185
  get intelligence(): number;
192
186
  get name(): string;
@@ -277,8 +271,6 @@ export declare class Unit extends Handle<junit> {
277
271
  getAbilityRemainingCooldown(abilityId: number): number;
278
272
  startAbilityCooldown(abilityId: number, cooldown: number): void;
279
273
  endAbilityCooldown(abilityId: number): void;
280
- interruptMovement(): void;
281
- interruptAttack(): void;
282
274
  interruptCast(abilityId: number): void;
283
275
  getDistanceTo(target: Unit | Vec2): number;
284
276
  getCollisionDistanceTo(...target: [Unit] | [targetX: number, targetY: number]): number;
@@ -318,6 +310,7 @@ export declare class Unit extends Handle<junit> {
318
310
  static getInCollisionRange(x: number, y: number, range: number, predicate?: (unit: Unit) => boolean): Unit[];
319
311
  static getInSector(pos: Vec2, range: number, offsetAngle: number, centralAngle: number): Unit[];
320
312
  static getSelectionOf(player: Player, target?: Unit[]): Unit[];
313
+ static readonly levelChangedEvent: UnitTriggerEvent<[]>;
321
314
  static readonly deathEvent: UnitTriggerEvent<[Unit]>;
322
315
  static readonly onDecay: UnitTriggerEvent<[]>;
323
316
  static readonly onResurrect: InitializingEvent<[Unit], void>;
@@ -64,6 +64,8 @@ local ____ability = require("engine.internal.item.ability")
64
64
  local doUnitAbilityAction = ____ability.doUnitAbilityAction
65
65
  local ____synchronization = require("engine.synchronization")
66
66
  local synchronizer = ____synchronization.synchronizer
67
+ local ____linked_2Dmap = require("utility.linked-map")
68
+ local LinkedMap = ____linked_2Dmap.LinkedMap
67
69
  local match = string.match
68
70
  local ____tostring = _G.tostring
69
71
  local setUnitAnimation = SetUnitAnimation
@@ -73,16 +75,12 @@ local getUnitRealField = BlzGetUnitRealField
73
75
  local getHeroStr = GetHeroStr
74
76
  local getHeroAgi = GetHeroAgi
75
77
  local getHeroInt = GetHeroInt
76
- local setHeroStr = SetHeroStr
77
- local setHeroAgi = SetHeroAgi
78
- local setHeroInt = SetHeroInt
79
78
  local getUnitBooleanField = BlzGetUnitBooleanField
80
79
  local getUnitStringField = BlzGetUnitStringField
81
80
  local setUnitIntegerField = BlzSetUnitIntegerField
82
81
  local setUnitRealField = BlzSetUnitRealField
83
82
  local setUnitBooleanField = BlzSetUnitBooleanField
84
83
  local setUnitStringField = BlzSetUnitStringField
85
- local setUnitScale = SetUnitScale
86
84
  local setUnitPosition = SetUnitPosition
87
85
  local setUnitTimeScale = SetUnitTimeScale
88
86
  local getHandleId = GetHandleId
@@ -110,7 +108,6 @@ local getUnitWeaponStringField = BlzGetUnitWeaponStringField
110
108
  local setUnitWeaponStringField = BlzSetUnitWeaponStringField
111
109
  local getUnitAbilityLevel = GetUnitAbilityLevel
112
110
  local unitDisableAbility = BlzUnitDisableAbility
113
- local unitInterruptAttack = BlzUnitInterruptAttack
114
111
  local isUnitInvisible = IsUnitInvisible
115
112
  local isUnitVisible = IsUnitVisible
116
113
  local getUnitX = GetUnitX
@@ -386,15 +383,27 @@ local modifiers = {
386
383
  end,
387
384
  armor = function(unit, value)
388
385
  if UnitAddAbility(unit, armorBonusAbilityId) then
389
- assert(UnitMakeAbilityPermanent(unit, true, armorBonusAbilityId))
386
+ assert(
387
+ UnitMakeAbilityPermanent(unit, true, armorBonusAbilityId),
388
+ "armor bonus ability must be made permanent",
389
+ unit
390
+ )
390
391
  end
391
- local ability = assert(BlzGetUnitAbility(unit, armorBonusAbilityId))
392
- assert(BlzSetAbilityRealLevelField(
393
- ability,
394
- armorBonusField,
395
- 0,
396
- BlzGetAbilityRealLevelField(ability, armorBonusField, 0) + value
397
- ))
392
+ local ability = assert(
393
+ BlzGetUnitAbility(unit, armorBonusAbilityId),
394
+ "armor bonus ability must be existing",
395
+ unit
396
+ )
397
+ assert(
398
+ BlzSetAbilityRealLevelField(
399
+ ability,
400
+ armorBonusField,
401
+ 0,
402
+ BlzGetAbilityRealLevelField(ability, armorBonusField, 0) + value
403
+ ),
404
+ "armor bonus ability field must be set",
405
+ unit
406
+ )
398
407
  end
399
408
  }
400
409
  local getters = {
@@ -648,13 +657,17 @@ local fieldSetters = {
648
657
  }
649
658
  local dummies = {}
650
659
  for ____, player in ipairs(Player.all) do
651
- local dummy = assert(createUnit(
652
- player.handle,
653
- dummyUnitId,
654
- 0,
655
- 0,
656
- 270
657
- ))
660
+ local dummy = assert(
661
+ createUnit(
662
+ player.handle,
663
+ dummyUnitId,
664
+ 0,
665
+ 0,
666
+ 270
667
+ ),
668
+ "dummy must be created",
669
+ player
670
+ )
658
671
  ShowUnit(dummy, false)
659
672
  dummies[player] = dummy
660
673
  end
@@ -697,33 +710,47 @@ function Unit.prototype.____constructor(self, handle)
697
710
  nextSyncId = ____nextSyncId_1 + 1
698
711
  self.syncId = ____nextSyncId_1
699
712
  self._owner = Player:of(getOwningPlayer(handle))
700
- assert(unitAddAbility(handle, leaveDetectAbilityId) and UnitMakeAbilityPermanent(handle, true, leaveDetectAbilityId))
701
- assert(unitAddAbility(handle, morphDetectAbilityId))
713
+ assert(
714
+ unitAddAbility(handle, leaveDetectAbilityId) and UnitMakeAbilityPermanent(handle, true, leaveDetectAbilityId),
715
+ "leave detection ability must be added",
716
+ self
717
+ )
718
+ assert(
719
+ unitAddAbility(handle, morphDetectAbilityId),
720
+ "morph detection ability must be added",
721
+ self
722
+ )
702
723
  if unitAddAbility(
703
724
  handle,
704
725
  fourCC("Amrf")
705
726
  ) then
706
- assert(unitRemoveAbility(
707
- handle,
708
- fourCC("Amrf")
709
- ))
727
+ assert(
728
+ unitRemoveAbility(
729
+ handle,
730
+ fourCC("Amrf")
731
+ ),
732
+ "fly ability must be removed after addition",
733
+ self
734
+ )
710
735
  end
711
736
  unitBySyncId[self.syncId] = self
712
737
  local ____ = self.abilities
713
738
  end
714
- function Unit.prototype.getEvent(self, event, collector)
715
- self.events = self.events or ({})
716
- local eventId = GetHandleId(event)
717
- if not self.events[eventId] then
718
- self.events[eventId] = __TS__New(
739
+ function Unit.prototype.getEvent(self, jevent, collector)
740
+ self.events = self.events or __TS__New(LinkedMap)
741
+ local eventId = GetHandleId(jevent)
742
+ local event = self.events:get(eventId)
743
+ if event == nil then
744
+ event = __TS__New(
719
745
  TriggerEvent,
720
746
  function(trigger)
721
- TriggerRegisterUnitEvent(trigger, self.handle, event)
747
+ TriggerRegisterUnitEvent(trigger, self.handle, jevent)
722
748
  end,
723
749
  collector or (function() return {} end)
724
750
  )
751
+ self.events:put(eventId, event)
725
752
  end
726
- return self.events[eventId]
753
+ return event
727
754
  end
728
755
  function Unit.prototype.onDestroy(self)
729
756
  local handle = self.handle
@@ -767,7 +794,11 @@ function Unit.prototype.addAttackHandler(self, condition, action)
767
794
  self._attackHandlers = handlers
768
795
  if #handlers == 1 then
769
796
  local handle = self.handle
770
- assert(unitAddAbility(handle, attackHandlerAbilityId) and UnitMakeAbilityPermanent(handle, true, attackHandlerAbilityId))
797
+ assert(
798
+ unitAddAbility(handle, attackHandlerAbilityId) and UnitMakeAbilityPermanent(handle, true, attackHandlerAbilityId),
799
+ "attack handler ability must be added",
800
+ self
801
+ )
771
802
  end
772
803
  return handler
773
804
  end
@@ -980,24 +1011,6 @@ end
980
1011
  function Unit.prototype.endAbilityCooldown(self, abilityId)
981
1012
  BlzEndUnitAbilityCooldown(self.handle, abilityId)
982
1013
  end
983
- function Unit.prototype.interruptMovement(self)
984
- local handle = self.handle
985
- unitDisableAbility(
986
- handle,
987
- fourCC("Amov"),
988
- true,
989
- false
990
- )
991
- unitDisableAbility(
992
- handle,
993
- fourCC("Amov"),
994
- false,
995
- false
996
- )
997
- end
998
- function Unit.prototype.interruptAttack(self)
999
- unitInterruptAttack(self.handle)
1000
- end
1001
1014
  function Unit.prototype.interruptCast(self, abilityId)
1002
1015
  local handle = self.handle
1003
1016
  unitDisableAbility(handle, abilityId, true, false)
@@ -1392,19 +1405,6 @@ __TS__SetDescriptor(
1392
1405
  },
1393
1406
  true
1394
1407
  )
1395
- __TS__SetDescriptor(
1396
- Unit.prototype,
1397
- "strengthBase",
1398
- {
1399
- get = function(self)
1400
- return getHeroStr(self.handle, false)
1401
- end,
1402
- set = function(self, strengthBase)
1403
- setHeroStr(self.handle, strengthBase, true)
1404
- end
1405
- },
1406
- true
1407
- )
1408
1408
  __TS__SetDescriptor(
1409
1409
  Unit.prototype,
1410
1410
  "strengthBonus",
@@ -1422,19 +1422,6 @@ __TS__SetDescriptor(
1422
1422
  end},
1423
1423
  true
1424
1424
  )
1425
- __TS__SetDescriptor(
1426
- Unit.prototype,
1427
- "agilityBase",
1428
- {
1429
- get = function(self)
1430
- return getHeroAgi(self.handle, false)
1431
- end,
1432
- set = function(self, agilityBase)
1433
- setHeroAgi(self.handle, agilityBase, true)
1434
- end
1435
- },
1436
- true
1437
- )
1438
1425
  __TS__SetDescriptor(
1439
1426
  Unit.prototype,
1440
1427
  "agilityBonus",
@@ -1452,19 +1439,6 @@ __TS__SetDescriptor(
1452
1439
  end},
1453
1440
  true
1454
1441
  )
1455
- __TS__SetDescriptor(
1456
- Unit.prototype,
1457
- "intelligenceBase",
1458
- {
1459
- get = function(self)
1460
- return getHeroInt(self.handle, false)
1461
- end,
1462
- set = function(self, intelligenceBase)
1463
- setHeroInt(self.handle, intelligenceBase, true)
1464
- end
1465
- },
1466
- true
1467
- )
1468
1442
  __TS__SetDescriptor(
1469
1443
  Unit.prototype,
1470
1444
  "intelligenceBonus",
@@ -2172,6 +2146,11 @@ __TS__SetDescriptor(
2172
2146
  end},
2173
2147
  true
2174
2148
  )
2149
+ Unit.levelChangedEvent = __TS__New(
2150
+ ____exports.UnitTriggerEvent,
2151
+ EVENT_PLAYER_HERO_LEVEL,
2152
+ function() return ____exports.Unit:of(getTriggerUnit()) end
2153
+ )
2175
2154
  Unit.deathEvent = __TS__New(
2176
2155
  ____exports.UnitTriggerEvent,
2177
2156
  EVENT_PLAYER_UNIT_DEATH,
@@ -12,7 +12,7 @@ export declare class LocalClient {
12
12
  static get isHD(): boolean;
13
13
  static get graphicsMode(): GraphicsMode;
14
14
  static get isActive(): boolean;
15
- static pingMinimap(x: number, y: number, duration: number, ...parameters: [] | [red: number, green: number, blue: number, extraEffects?: boolean] | [color: Color, extraEffects?: boolean]): void;
15
+ static pingMinimap(x: number, y: number, duration: number, ...parameters: [] | [red: number, green: number, blue: number, flashy?: boolean] | [color: Color, flashy?: boolean]): void;
16
16
  static get mouseFocusUnit(): Async<Unit> | undefined;
17
17
  static get mainSelectedUnit(): Async<Unit> | undefined;
18
18
  static get mainSelectedUnitChangeEvent(): Event<[
@@ -67,7 +67,7 @@ local LocalClient = ____exports.LocalClient
67
67
  LocalClient.name = "LocalClient"
68
68
  function LocalClient.prototype.____constructor(self)
69
69
  end
70
- function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrExtraEffects, blue, extraEffects)
70
+ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrFlashy, blue, flashy)
71
71
  if redOrColor == nil then
72
72
  pingMinimap(x, y, duration)
73
73
  elseif __TS__InstanceOf(redOrColor, Color) then
@@ -78,7 +78,7 @@ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrExtraE
78
78
  redOrColor.r,
79
79
  redOrColor.g,
80
80
  redOrColor.b,
81
- greenOrExtraEffects or false
81
+ greenOrFlashy or false
82
82
  )
83
83
  else
84
84
  pingMinimapEx(
@@ -86,9 +86,9 @@ function LocalClient.pingMinimap(self, x, y, duration, redOrColor, greenOrExtraE
86
86
  y,
87
87
  duration,
88
88
  redOrColor,
89
- greenOrExtraEffects,
89
+ greenOrFlashy,
90
90
  blue,
91
- extraEffects or false
91
+ flashy or false
92
92
  )
93
93
  end
94
94
  end
@@ -0,0 +1,8 @@
1
+ /** @noSelfInFile */
2
+ export declare const enum HealthRegenerationType {
3
+ NONE = 0,
4
+ ALWAYS = 1,
5
+ BLIGHT = 2,
6
+ DAY = 3,
7
+ NIGHT = 4
8
+ }
@@ -0,0 +1,2 @@
1
+ local ____exports = {}
2
+ return ____exports
@@ -0,0 +1,8 @@
1
+ /** @noSelfInFile */
2
+ import { AbilityType, AbilityTypeId } from "../ability-type";
3
+ import { ObjectDataEntryLevelFieldValueSupplier } from "../../entry";
4
+ export declare class ManaRegenerationAbilityType extends AbilityType {
5
+ static readonly BASE_ID: AbilityTypeId;
6
+ get manaRegenerationRateIncreaseFactor(): number[];
7
+ set manaRegenerationRateIncreaseFactor(manaRegenerationRateIncreaseFactor: ObjectDataEntryLevelFieldValueSupplier<number>);
8
+ }
@@ -0,0 +1,26 @@
1
+ local ____lualib = require("lualib_bundle")
2
+ local __TS__Class = ____lualib.__TS__Class
3
+ local __TS__ClassExtends = ____lualib.__TS__ClassExtends
4
+ local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
5
+ local ____exports = {}
6
+ local ____ability_2Dtype = require("engine.object-data.entry.ability-type")
7
+ local AbilityType = ____ability_2Dtype.AbilityType
8
+ ____exports.ManaRegenerationAbilityType = __TS__Class()
9
+ local ManaRegenerationAbilityType = ____exports.ManaRegenerationAbilityType
10
+ ManaRegenerationAbilityType.name = "ManaRegenerationAbilityType"
11
+ __TS__ClassExtends(ManaRegenerationAbilityType, AbilityType)
12
+ ManaRegenerationAbilityType.BASE_ID = fourCC("AIrn")
13
+ __TS__SetDescriptor(
14
+ ManaRegenerationAbilityType.prototype,
15
+ "manaRegenerationRateIncreaseFactor",
16
+ {
17
+ get = function(self)
18
+ return self:getNumberLevelField("Imrp")
19
+ end,
20
+ set = function(self, manaRegenerationRateIncreaseFactor)
21
+ self:setNumberLevelField("Imrp", manaRegenerationRateIncreaseFactor)
22
+ end
23
+ },
24
+ true
25
+ )
26
+ return ____exports
@@ -1,14 +1,30 @@
1
1
  /** @noSelfInFile */
2
2
  import { ArmorSoundType } from "../auxiliary/armor-sound-type";
3
3
  import { CombatClassifications } from "../auxiliary/combat-classification";
4
- import { ObjectDataEntry, ObjectDataEntryId } from "../entry";
4
+ import { ObjectDataEntry, ObjectDataEntryConstructor, ObjectDataEntryId } from "../entry";
5
5
  export type DestructibleTypeId = ObjectDataEntryId & number & {
6
6
  readonly __destructibleTypeId: unique symbol;
7
7
  };
8
+ export type StandardDestructibleTypeId = DestructibleTypeId & {
9
+ readonly __standardDestructibleTypeId: unique symbol;
10
+ };
8
11
  export declare abstract class DestructibleType extends ObjectDataEntry<DestructibleTypeId> {
12
+ static readonly [id: StandardDestructibleTypeId]: ObjectDataEntryConstructor<DestructibleType>;
9
13
  private static readonly idGenerator;
10
14
  protected static generateId(): number;
11
15
  protected static getObjectData(map: WarMap): WarObjects;
16
+ get fixedFacing(): number;
17
+ set fixedFacing(fixedFacing: number);
18
+ get flyOverHeight(): number;
19
+ set flyOverHeight(flyOverHeight: number);
20
+ get modelPath(): string;
21
+ set modelPath(modelPath: string);
22
+ get modelPathSD(): string;
23
+ set modelPathSD(modelPathSD: string);
24
+ get modelPathHD(): string;
25
+ set modelPathHD(modelPathHD: string);
26
+ get occlusionHeight(): number;
27
+ set occlusionHeight(occlusionHeight: number);
12
28
  get armorSoundType(): ArmorSoundType;
13
29
  set armorSoundType(armorSoundType: ArmorSoundType);
14
30
  get armorSoundTypeSD(): ArmorSoundType;
@@ -17,4 +33,14 @@ export declare abstract class DestructibleType extends ObjectDataEntry<Destructi
17
33
  set armorSoundTypeHD(armorSoundTypeHD: ArmorSoundType);
18
34
  get combatClassifications(): CombatClassifications;
19
35
  set combatClassifications(combatClassifications: CombatClassifications);
36
+ get cliffHeight(): number;
37
+ set cliffHeight(cliffHeight: number);
38
+ get isWalkable(): boolean;
39
+ set isWalkable(isWalkable: boolean);
40
+ get pathingTexturePath(): string;
41
+ set pathingTexturePath(pathingTexturePath: string);
42
+ get deadPathingTexturePath(): string;
43
+ set deadPathingTexturePath(deadPathingTexturePath: string);
44
+ get name(): string;
45
+ set name(name: string);
20
46
  }