warscript 0.0.1-dev.064c144 → 0.0.1-dev.072eba1

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 (49) 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 +4 -0
  7. package/engine/behaviour/ability.lua +29 -0
  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.lua +13 -3
  11. package/engine/buff.d.ts +7 -2
  12. package/engine/buff.lua +42 -24
  13. package/engine/internal/mechanics/cast-ability.lua +6 -3
  14. package/engine/internal/object-data/mana-regeneration-rate-increase-factor.d.ts +2 -0
  15. package/engine/internal/object-data/mana-regeneration-rate-increase-factor.lua +16 -0
  16. package/engine/internal/unit/attributes.d.ts +17 -0
  17. package/engine/internal/unit/attributes.lua +46 -0
  18. package/engine/internal/unit/bonus.d.ts +2 -0
  19. package/engine/internal/unit/bonus.lua +10 -0
  20. package/engine/internal/unit/fly-height.lua +3 -3
  21. package/engine/internal/unit/interrupts.d.ts +12 -0
  22. package/engine/internal/unit/interrupts.lua +28 -0
  23. package/engine/internal/unit/scale.lua +3 -3
  24. package/engine/internal/unit-missile-launch.lua +12 -5
  25. package/engine/internal/unit.d.ts +2 -8
  26. package/engine/internal/unit.lua +79 -97
  27. package/engine/local-client.d.ts +1 -1
  28. package/engine/local-client.lua +4 -4
  29. package/engine/object-data/auxiliary/health-regeneration-type.d.ts +8 -0
  30. package/engine/object-data/auxiliary/health-regeneration-type.lua +2 -0
  31. package/engine/object-data/entry/ability-type/mana-regeneration.d.ts +8 -0
  32. package/engine/object-data/entry/ability-type/mana-regeneration.lua +26 -0
  33. package/engine/object-data/entry/destructible-type.d.ts +27 -1
  34. package/engine/object-data/entry/destructible-type.lua +155 -0
  35. package/engine/object-field/unit.d.ts +7 -4
  36. package/engine/object-field/unit.lua +4 -0
  37. package/engine/object-field.d.ts +2 -0
  38. package/engine/object-field.lua +171 -115
  39. package/engine/standard/fields/unit.d.ts +11 -5
  40. package/engine/standard/fields/unit.lua +13 -4
  41. package/engine/unit.d.ts +2 -0
  42. package/engine/unit.lua +2 -0
  43. package/objutil/buff.lua +9 -7
  44. package/package.json +2 -2
  45. package/patch-lua.lua +15 -0
  46. package/utility/linked-map.d.ts +26 -0
  47. package/utility/linked-map.lua +66 -0
  48. package/utility/linked-set.lua +4 -0
  49. package/utility/records.lua +20 -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)
@@ -139,6 +139,7 @@ export declare class Unit extends Handle<junit> {
139
139
  private _fields?;
140
140
  private getEvent;
141
141
  constructor(handle: junit);
142
+ private saveData;
142
143
  protected onDestroy(): HandleDestructor;
143
144
  addAttackHandler(condition: AttackHandlerCondition, action: AttackHandlerAction): AttackHandler;
144
145
  removeAttackHandler(handler: AttackHandler): boolean;
@@ -177,16 +178,10 @@ export declare class Unit extends Handle<junit> {
177
178
  set xp(v: number);
178
179
  get primaryAttribute(): UnitAttribute;
179
180
  set primaryAttribute(primaryAttribute: UnitAttribute);
180
- get strengthBase(): number;
181
- set strengthBase(strengthBase: number);
182
181
  get strengthBonus(): number;
183
182
  get strength(): number;
184
- get agilityBase(): number;
185
- set agilityBase(agilityBase: number);
186
183
  get agilityBonus(): number;
187
184
  get agility(): number;
188
- get intelligenceBase(): number;
189
- set intelligenceBase(intelligenceBase: number);
190
185
  get intelligenceBonus(): number;
191
186
  get intelligence(): number;
192
187
  get name(): string;
@@ -277,8 +272,6 @@ export declare class Unit extends Handle<junit> {
277
272
  getAbilityRemainingCooldown(abilityId: number): number;
278
273
  startAbilityCooldown(abilityId: number, cooldown: number): void;
279
274
  endAbilityCooldown(abilityId: number): void;
280
- interruptMovement(): void;
281
- interruptAttack(): void;
282
275
  interruptCast(abilityId: number): void;
283
276
  getDistanceTo(target: Unit | Vec2): number;
284
277
  getCollisionDistanceTo(...target: [Unit] | [targetX: number, targetY: number]): number;
@@ -318,6 +311,7 @@ export declare class Unit extends Handle<junit> {
318
311
  static getInCollisionRange(x: number, y: number, range: number, predicate?: (unit: Unit) => boolean): Unit[];
319
312
  static getInSector(pos: Vec2, range: number, offsetAngle: number, centralAngle: number): Unit[];
320
313
  static getSelectionOf(player: Player, target?: Unit[]): Unit[];
314
+ static readonly levelChangedEvent: UnitTriggerEvent<[]>;
321
315
  static readonly deathEvent: UnitTriggerEvent<[Unit]>;
322
316
  static readonly onDecay: UnitTriggerEvent<[]>;
323
317
  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,41 +710,57 @@ 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
754
+ end
755
+ function Unit.prototype.saveData(self)
756
+ local handle = self.handle
757
+ self[108] = self[108] or getUnitX(handle)
758
+ self[109] = self[109] or getUnitY(handle)
759
+ self._owner = self._owner or Player:of(getOwningPlayer(handle))
727
760
  end
728
761
  function Unit.prototype.onDestroy(self)
729
762
  local handle = self.handle
730
- self[108] = getUnitX(handle)
731
- self[109] = getUnitY(handle)
732
- if not self._owner then
733
- self._owner = Player:of(getOwningPlayer(handle))
734
- end
763
+ self:saveData()
735
764
  local abilities = self.abilities
736
765
  for ____, ability in ipairs(abilities) do
737
766
  ability:destroy()
@@ -767,7 +796,11 @@ function Unit.prototype.addAttackHandler(self, condition, action)
767
796
  self._attackHandlers = handlers
768
797
  if #handlers == 1 then
769
798
  local handle = self.handle
770
- assert(unitAddAbility(handle, attackHandlerAbilityId) and UnitMakeAbilityPermanent(handle, true, attackHandlerAbilityId))
799
+ assert(
800
+ unitAddAbility(handle, attackHandlerAbilityId) and UnitMakeAbilityPermanent(handle, true, attackHandlerAbilityId),
801
+ "attack handler ability must be added",
802
+ self
803
+ )
771
804
  end
772
805
  return handler
773
806
  end
@@ -980,24 +1013,6 @@ end
980
1013
  function Unit.prototype.endAbilityCooldown(self, abilityId)
981
1014
  BlzEndUnitAbilityCooldown(self.handle, abilityId)
982
1015
  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
1016
  function Unit.prototype.interruptCast(self, abilityId)
1002
1017
  local handle = self.handle
1003
1018
  unitDisableAbility(handle, abilityId, true, false)
@@ -1392,19 +1407,6 @@ __TS__SetDescriptor(
1392
1407
  },
1393
1408
  true
1394
1409
  )
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
1410
  __TS__SetDescriptor(
1409
1411
  Unit.prototype,
1410
1412
  "strengthBonus",
@@ -1422,19 +1424,6 @@ __TS__SetDescriptor(
1422
1424
  end},
1423
1425
  true
1424
1426
  )
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
1427
  __TS__SetDescriptor(
1439
1428
  Unit.prototype,
1440
1429
  "agilityBonus",
@@ -1452,19 +1441,6 @@ __TS__SetDescriptor(
1452
1441
  end},
1453
1442
  true
1454
1443
  )
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
1444
  __TS__SetDescriptor(
1469
1445
  Unit.prototype,
1470
1446
  "intelligenceBonus",
@@ -2172,6 +2148,11 @@ __TS__SetDescriptor(
2172
2148
  end},
2173
2149
  true
2174
2150
  )
2151
+ Unit.levelChangedEvent = __TS__New(
2152
+ ____exports.UnitTriggerEvent,
2153
+ EVENT_PLAYER_HERO_LEVEL,
2154
+ function() return ____exports.Unit:of(getTriggerUnit()) end
2155
+ )
2175
2156
  Unit.deathEvent = __TS__New(
2176
2157
  ____exports.UnitTriggerEvent,
2177
2158
  EVENT_PLAYER_UNIT_DEATH,
@@ -2830,7 +2811,8 @@ Unit.synchronize = synchronizer(
2830
2811
  return
2831
2812
  end
2832
2813
  end
2833
- unit:destroy()
2814
+ unit:saveData()
2815
+ Timer:run(unit, "destroy")
2834
2816
  end)
2835
2817
  end
2836
2818
  end)(Unit)
@@ -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
  }