warscript 0.0.1-dev.ff5dbcd → 0.0.1-dev.ffaa090

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.
@@ -41,6 +41,7 @@ function ApplyUnitBehaviorAbilityBehavior.prototype.onUnitGainAbility(self, unit
41
41
  ____opt_0:destroy()
42
42
  end
43
43
  self.unitBehavior = __TS__New(self.unitBehaviorConstructor, unit)
44
+ self.unitBehavior.sourceAbilityBehavior = self
44
45
  self:update()
45
46
  end
46
47
  function ApplyUnitBehaviorAbilityBehavior.prototype.onUnitLoseAbility(self)
@@ -5,6 +5,7 @@ import { Unit } from "../../internal/unit";
5
5
  import { AbilityDependentValue } from "../../object-field/ability";
6
6
  import { Widget } from "../../../core/types/widget";
7
7
  import { AttackType, DamageType, WeaponType } from "../../internal/unit+damage";
8
+ import { CombatClassifications } from "../../object-data/auxiliary/combat-classification";
8
9
  export type DamageAbilityBehaviorParameters = {
9
10
  damagePerStrength?: AbilityDependentValue<number>;
10
11
  damagePerAgility?: AbilityDependentValue<number>;
@@ -15,6 +16,8 @@ export type DamageAbilityBehaviorParameters = {
15
16
  };
16
17
  export type DamageAreaAbilityBehaviorParameters = DamageAbilityBehaviorParameters & {
17
18
  maximumDamage?: AbilityDependentValue<number>;
19
+ areaOfEffect?: AbilityDependentValue<number>;
20
+ allowedTargetCombatClassifications?: AbilityDependentValue<CombatClassifications>;
18
21
  };
19
22
  declare abstract class DamageAbilityBehavior<T extends DamageAbilityBehaviorParameters = DamageAbilityBehaviorParameters> extends AbilityBehavior {
20
23
  protected readonly damage: AbilityDependentValue<number>;
@@ -82,10 +82,10 @@ function DamageAreaAbilityBehavior.prototype.damageArea(self, caster, x, y)
82
82
  local parameters = self.parameters
83
83
  local targets = Unit.getAllowedTargetsInCollisionRange(
84
84
  caster,
85
- self:resolveCurrentAbilityDependentValue(ALLOWED_TARGETS_ABILITY_COMBAT_CLASSIFICATIONS_LEVEL_FIELD),
85
+ self:resolveCurrentAbilityDependentValue(parameters and parameters.allowedTargetCombatClassifications or ALLOWED_TARGETS_ABILITY_COMBAT_CLASSIFICATIONS_LEVEL_FIELD),
86
86
  x,
87
87
  y,
88
- self:resolveCurrentAbilityDependentValue(AREA_OF_EFFECT_ABILITY_FLOAT_LEVEL_FIELD)
88
+ self:resolveCurrentAbilityDependentValue(parameters and parameters.areaOfEffect or AREA_OF_EFFECT_ABILITY_FLOAT_LEVEL_FIELD)
89
89
  )
90
90
  local damage = self:calculateDamage(caster)
91
91
  local maximumDamage = self:resolveCurrentAbilityDependentValue(parameters and parameters.maximumDamage or 0)
@@ -22,6 +22,7 @@ export declare abstract class AbilityBehavior<Parameters extends {
22
22
  protected subscribe<T extends boolean | number | string>(value: SubscribableAbilityDependentValue<T>): void;
23
23
  protected registerCommandEvent(orderTypeStringId?: string): void;
24
24
  get ability(): Ability;
25
+ get unit(): Unit | undefined;
25
26
  protected resolveCurrentAbilityDependentValue<T extends boolean | number | string>(value: AbilityDependentValue<T>): T;
26
27
  protected resolveCurrentAbilityDependentValue<T extends boolean | number | string>(value?: AbilityDependentValue<T>): T | undefined;
27
28
  protected flashCasterEffect(widget: Widget, ...parametersOrDuration: [parameters?: EffectParameters] | [duration?: number, parameters?: EffectParameters]): void;
@@ -237,6 +237,18 @@ __TS__SetDescriptor(
237
237
  end},
238
238
  true
239
239
  )
240
+ __TS__SetDescriptor(
241
+ AbilityBehavior.prototype,
242
+ "unit",
243
+ {get = function(self)
244
+ local owner = self.object.owner
245
+ if __TS__InstanceOf(owner, Unit) then
246
+ return owner
247
+ end
248
+ return owner.owner
249
+ end},
250
+ true
251
+ )
240
252
  AbilityBehavior.MissileLaunchConfig = ____class_2
241
253
  __TS__SetDescriptor(
242
254
  AbilityBehavior.prototype,
@@ -5,9 +5,11 @@ import { DamageEvent, DamagingEvent, Unit } from "../internal/unit";
5
5
  import "../internal/unit+ability";
6
6
  import "../internal/unit-missile-launch";
7
7
  import { Item } from "../internal/item";
8
+ import type { AbilityBehavior } from "./ability";
8
9
  export type UnitBehaviorConstructor<Args extends any[]> = new (unit: Unit, ...args: Args) => UnitBehavior;
9
10
  export declare abstract class UnitBehavior<PeriodicActionParameters extends any[] = any[]> extends Behavior<Unit, PeriodicActionParameters> {
10
11
  constructor(unit: Unit);
12
+ readonly sourceAbilityBehavior?: AbilityBehavior;
11
13
  get unit(): Unit;
12
14
  onAutoAttackStart(target: Unit): void;
13
15
  onAutoAttackFinish(target: Unit): void;
package/engine/buff.d.ts CHANGED
@@ -64,6 +64,7 @@ export type BuffParameters<T extends Buff<any> = Buff> = Buff extends T ? {
64
64
  durationIncreaseOnAutoAttack?: NumberParameterValueType;
65
65
  maximumRemainingDuration?: NumberParameterValueType;
66
66
  maximumDuration?: NumberParameterValueType;
67
+ turnsIntoGhost?: BooleanParameterValueType;
67
68
  stuns?: BooleanParameterValueType;
68
69
  ignoresStunImmunity?: BooleanParameterValueType;
69
70
  providesStunImmunity?: BooleanParameterValueType;
@@ -116,13 +117,14 @@ declare const enum BuffPropertyKey {
116
117
  MAXIMUM_DAMAGE_DEALT_EVENT_COUNT = 132,
117
118
  DAMAGE_RECEIVED_EVENT_COUNT = 133,
118
119
  MAXIMUM_DAMAGE_RECEIVED_EVENT_COUNT = 134,
119
- STUNS = 135,
120
- IGNORES_STUN_IMMUNITY = 136,
121
- DISABLES_AUTO_ATTACK = 137,
122
- PROVIDES_INVULNERABILITY = 138,
123
- KILLS_ON_EXPIRATION = 139,
124
- EXPLODES_ON_EXPIRATION = 140,
125
- MISS_PROBABILITY = 141
120
+ TURNS_INTO_GHOST = 135,
121
+ STUNS = 136,
122
+ IGNORES_STUN_IMMUNITY = 137,
123
+ DISABLES_AUTO_ATTACK = 138,
124
+ PROVIDES_INVULNERABILITY = 139,
125
+ KILLS_ON_EXPIRATION = 140,
126
+ EXPLODES_ON_EXPIRATION = 141,
127
+ MISS_PROBABILITY = 142
126
128
  }
127
129
  export declare const enum BuffTypeIdSelectionPolicy {
128
130
  LEAST_DURATION = 0
@@ -136,7 +138,7 @@ export type BuffConstructorParameters<AdditionalParameters extends BuffAdditiona
136
138
  polarity: BuffPolarityParameterType,
137
139
  resistanceType: BuffResistanceTypeParameterType,
138
140
  ...abilityOrParameters: [
139
- ability: Ability,
141
+ ability?: Ability,
140
142
  parameters?: BuffParameters & Omit<AdditionalParameters, keyof BuffParameters>
141
143
  ] | [parameters?: BuffParameters & Omit<AdditionalParameters, keyof BuffParameters>]
142
144
  ];
@@ -178,6 +180,7 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
178
180
  private [BuffPropertyKey.DAMAGE_DEALT_EVENT_COUNT]?;
179
181
  private [BuffPropertyKey.MAXIMUM_DAMAGE_RECEIVED_EVENT_COUNT]?;
180
182
  private [BuffPropertyKey.DAMAGE_RECEIVED_EVENT_COUNT]?;
183
+ private [BuffPropertyKey.TURNS_INTO_GHOST]?;
181
184
  private [BuffPropertyKey.STUNS]?;
182
185
  private [BuffPropertyKey.IGNORES_STUN_IMMUNITY]?;
183
186
  private [BuffPropertyKey.DISABLES_AUTO_ATTACK]?;
@@ -231,6 +234,8 @@ export declare class Buff<AdditionalParameters extends Prohibit<Record<string, a
231
234
  set receivedDamageFactor(receivedDamageFactor: number);
232
235
  get armorIncrease(): number;
233
236
  set armorIncrease(armorIncrease: number);
237
+ get turnsIntoGhost(): boolean;
238
+ set turnsIntoGhost(turnsIntoGhost: boolean);
234
239
  get stuns(): boolean;
235
240
  set stuns(stuns: boolean);
236
241
  get ignoresStunImmunity(): boolean;
package/engine/buff.lua CHANGED
@@ -109,6 +109,7 @@ local buffParametersKeys = {
109
109
  durationIncreaseOnAutoAttack = true,
110
110
  maximumDuration = true,
111
111
  maximumRemainingDuration = true,
112
+ turnsIntoGhost = true,
112
113
  stuns = true,
113
114
  ignoresStunImmunity = true,
114
115
  providesStunImmunity = true,
@@ -174,6 +175,7 @@ local function resolveAndSetNumberValue(buff, property, ability, level, value, d
174
175
  end
175
176
  end
176
177
  local buffBooleanParameters = {
178
+ "turnsIntoGhost",
177
179
  "stuns",
178
180
  "ignoresStunImmunity",
179
181
  "disablesAutoAttack",
@@ -321,7 +323,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
321
323
  typeId = selectBuffTypeIdWithLeastDuration(typeIdOrTypeIds, _unit)
322
324
  polarity = resistanceTypeOrPolarity
323
325
  resistanceType = abilityOrParametersOrResistanceType
324
- if __TS__InstanceOf(parametersOrAbility, Ability) then
326
+ if __TS__InstanceOf(parametersOrAbility, Ability) or parametersOrAbility == nil then
325
327
  ability = parametersOrAbility
326
328
  else
327
329
  ability = nil
@@ -331,7 +333,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
331
333
  typeId = typeIdOrTypeIds
332
334
  polarity = polarityOrTypeIdSelectionPolicy
333
335
  resistanceType = resistanceTypeOrPolarity
334
- if __TS__InstanceOf(abilityOrParametersOrResistanceType, Ability) then
336
+ if __TS__InstanceOf(abilityOrParametersOrResistanceType, Ability) or abilityOrParametersOrResistanceType == nil then
335
337
  ability = abilityOrParametersOrResistanceType
336
338
  parameters = parametersOrAbility
337
339
  else
@@ -340,7 +342,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
340
342
  end
341
343
  end
342
344
  self.typeId = typeId
343
- if not __TS__InstanceOf(ability, Ability) then
345
+ if not (__TS__InstanceOf(ability, Ability) or ability == nil) then
344
346
  parameters = ability
345
347
  ability = nil
346
348
  end
@@ -371,7 +373,7 @@ function Buff.prototype.____constructor(self, _unit, typeIdOrTypeIds, polarityOr
371
373
  local missProbability = parameters and parameters.missProbability or defaultParameters.missProbability
372
374
  if missProbability ~= nil then
373
375
  missProbability = resolveNumberValue(ability, level, missProbability)
374
- self[141] = missProbability
376
+ self[142] = missProbability
375
377
  end
376
378
  local buffByTypeId = buffByTypeIdByUnit[_unit]
377
379
  if buffByTypeId == nil then
@@ -592,11 +594,11 @@ function Buff.prototype.onDestroy(self)
592
594
  behavior:destroy()
593
595
  end
594
596
  end
595
- if self[137] then
597
+ if self[138] then
596
598
  unit:decrementDisableAutoAttackCounter()
597
599
  end
598
- if self[135] then
599
- if self[136] then
600
+ if self[136] then
601
+ if self[137] then
600
602
  unit:decrementStunCounter()
601
603
  end
602
604
  unit:decrementStunCounter()
@@ -655,9 +657,9 @@ function Buff.prototype.onExpiration(self)
655
657
  if self[121] ~= nil then
656
658
  (self[102] or unit):healTarget(unit, self[120] or 0)
657
659
  end
658
- if self[140] then
660
+ if self[141] then
659
661
  unit:explode()
660
- elseif self[139] then
662
+ elseif self[140] then
661
663
  unit:kill()
662
664
  end
663
665
  end
@@ -963,7 +965,7 @@ __TS__SetDescriptor(
963
965
  )
964
966
  __TS__SetDescriptor(
965
967
  Buff.prototype,
966
- "stuns",
968
+ "turnsIntoGhost",
967
969
  {
968
970
  get = function(self)
969
971
  local ____self__135_54 = self[135]
@@ -972,18 +974,12 @@ __TS__SetDescriptor(
972
974
  end
973
975
  return ____self__135_54
974
976
  end,
975
- set = function(self, stuns)
976
- if not stuns and self[135] then
977
- if self[136] then
978
- self.object:decrementStunCounter()
979
- end
980
- self.object:decrementStunCounter()
977
+ set = function(self, turnsIntoGhost)
978
+ if not turnsIntoGhost and self[135] then
979
+ self.object:decrementGhostCounter()
981
980
  self[135] = nil
982
- elseif stuns and not self[135] then
983
- if self[136] then
984
- self.object:incrementStunCounter()
985
- end
986
- self.object:incrementStunCounter()
981
+ elseif turnsIntoGhost and not self[135] then
982
+ self.object:incrementGhostCounter()
987
983
  self[135] = true
988
984
  end
989
985
  end
@@ -992,7 +988,7 @@ __TS__SetDescriptor(
992
988
  )
993
989
  __TS__SetDescriptor(
994
990
  Buff.prototype,
995
- "ignoresStunImmunity",
991
+ "stuns",
996
992
  {
997
993
  get = function(self)
998
994
  local ____self__136_55 = self[136]
@@ -1001,16 +997,18 @@ __TS__SetDescriptor(
1001
997
  end
1002
998
  return ____self__136_55
1003
999
  end,
1004
- set = function(self, ignoresStunImmunity)
1005
- if not ignoresStunImmunity and self[136] then
1006
- if self[135] then
1000
+ set = function(self, stuns)
1001
+ if not stuns and self[136] then
1002
+ if self[137] then
1007
1003
  self.object:decrementStunCounter()
1008
1004
  end
1005
+ self.object:decrementStunCounter()
1009
1006
  self[136] = nil
1010
- elseif ignoresStunImmunity and not self[136] then
1011
- if self[135] then
1007
+ elseif stuns and not self[136] then
1008
+ if self[137] then
1012
1009
  self.object:incrementStunCounter()
1013
1010
  end
1011
+ self.object:incrementStunCounter()
1014
1012
  self[136] = true
1015
1013
  end
1016
1014
  end
@@ -1019,7 +1017,7 @@ __TS__SetDescriptor(
1019
1017
  )
1020
1018
  __TS__SetDescriptor(
1021
1019
  Buff.prototype,
1022
- "disablesAutoAttack",
1020
+ "ignoresStunImmunity",
1023
1021
  {
1024
1022
  get = function(self)
1025
1023
  local ____self__137_56 = self[137]
@@ -1028,12 +1026,16 @@ __TS__SetDescriptor(
1028
1026
  end
1029
1027
  return ____self__137_56
1030
1028
  end,
1031
- set = function(self, disablesAutoAttack)
1032
- if not disablesAutoAttack and self[137] then
1033
- self.object:decrementDisableAutoAttackCounter()
1029
+ set = function(self, ignoresStunImmunity)
1030
+ if not ignoresStunImmunity and self[137] then
1031
+ if self[136] then
1032
+ self.object:decrementStunCounter()
1033
+ end
1034
1034
  self[137] = nil
1035
- elseif disablesAutoAttack and not self[137] then
1036
- self.object:incrementDisableAutoAttackCounter()
1035
+ elseif ignoresStunImmunity and not self[137] then
1036
+ if self[136] then
1037
+ self.object:incrementStunCounter()
1038
+ end
1037
1039
  self[137] = true
1038
1040
  end
1039
1041
  end
@@ -1042,7 +1044,7 @@ __TS__SetDescriptor(
1042
1044
  )
1043
1045
  __TS__SetDescriptor(
1044
1046
  Buff.prototype,
1045
- "providesInvulnerability",
1047
+ "disablesAutoAttack",
1046
1048
  {
1047
1049
  get = function(self)
1048
1050
  local ____self__138_57 = self[138]
@@ -1051,12 +1053,12 @@ __TS__SetDescriptor(
1051
1053
  end
1052
1054
  return ____self__138_57
1053
1055
  end,
1054
- set = function(self, providesInvulnerability)
1055
- if not providesInvulnerability and self[138] then
1056
- self.object:decrementInvulnerabilityCounter()
1056
+ set = function(self, disablesAutoAttack)
1057
+ if not disablesAutoAttack and self[138] then
1058
+ self.object:decrementDisableAutoAttackCounter()
1057
1059
  self[138] = nil
1058
- elseif providesInvulnerability and not self[138] then
1059
- self.object:incrementInvulnerabilityCounter()
1060
+ elseif disablesAutoAttack and not self[138] then
1061
+ self.object:incrementDisableAutoAttackCounter()
1060
1062
  self[138] = true
1061
1063
  end
1062
1064
  end
@@ -1065,7 +1067,7 @@ __TS__SetDescriptor(
1065
1067
  )
1066
1068
  __TS__SetDescriptor(
1067
1069
  Buff.prototype,
1068
- "killsOnExpiration",
1070
+ "providesInvulnerability",
1069
1071
  {
1070
1072
  get = function(self)
1071
1073
  local ____self__139_58 = self[139]
@@ -1074,10 +1076,12 @@ __TS__SetDescriptor(
1074
1076
  end
1075
1077
  return ____self__139_58
1076
1078
  end,
1077
- set = function(self, killsOnExpiration)
1078
- if not killsOnExpiration and self[139] then
1079
+ set = function(self, providesInvulnerability)
1080
+ if not providesInvulnerability and self[139] then
1081
+ self.object:decrementInvulnerabilityCounter()
1079
1082
  self[139] = nil
1080
- elseif killsOnExpiration and not self[139] then
1083
+ elseif providesInvulnerability and not self[139] then
1084
+ self.object:incrementInvulnerabilityCounter()
1081
1085
  self[139] = true
1082
1086
  end
1083
1087
  end
@@ -1086,7 +1090,7 @@ __TS__SetDescriptor(
1086
1090
  )
1087
1091
  __TS__SetDescriptor(
1088
1092
  Buff.prototype,
1089
- "explodesOnExpiration",
1093
+ "killsOnExpiration",
1090
1094
  {
1091
1095
  get = function(self)
1092
1096
  local ____self__140_59 = self[140]
@@ -1105,6 +1109,27 @@ __TS__SetDescriptor(
1105
1109
  },
1106
1110
  true
1107
1111
  )
1112
+ __TS__SetDescriptor(
1113
+ Buff.prototype,
1114
+ "explodesOnExpiration",
1115
+ {
1116
+ get = function(self)
1117
+ local ____self__141_60 = self[141]
1118
+ if ____self__141_60 == nil then
1119
+ ____self__141_60 = false
1120
+ end
1121
+ return ____self__141_60
1122
+ end,
1123
+ set = function(self, killsOnExpiration)
1124
+ if not killsOnExpiration and self[141] then
1125
+ self[141] = nil
1126
+ elseif killsOnExpiration and not self[141] then
1127
+ self[141] = true
1128
+ end
1129
+ end
1130
+ },
1131
+ true
1132
+ )
1108
1133
  __TS__SetDescriptor(
1109
1134
  Buff.prototype,
1110
1135
  "maximumDamageDealtEventCount",
@@ -1221,13 +1246,13 @@ __TS__SetDescriptor(
1221
1246
  "remainingDuration",
1222
1247
  {
1223
1248
  get = function(self)
1224
- local ____opt_60 = self._timer
1225
- return ____opt_60 and ____opt_60.remaining or 0
1249
+ local ____opt_61 = self._timer
1250
+ return ____opt_61 and ____opt_61.remaining or 0
1226
1251
  end,
1227
1252
  set = function(self, remainingDuration)
1228
- local ____remainingDuration_64 = remainingDuration
1229
- local ____opt_62 = self._timer
1230
- local remainingDurationDelta = ____remainingDuration_64 - (____opt_62 and ____opt_62.remaining or 0)
1253
+ local ____remainingDuration_65 = remainingDuration
1254
+ local ____opt_63 = self._timer
1255
+ local remainingDurationDelta = ____remainingDuration_65 - (____opt_63 and ____opt_63.remaining or 0)
1231
1256
  if remainingDurationDelta ~= 0 then
1232
1257
  self[103] = self[103] + remainingDurationDelta
1233
1258
  if remainingDuration <= 0 then
@@ -1242,7 +1267,7 @@ __TS__SetDescriptor(
1242
1267
  remainingDuration,
1243
1268
  self._spellStealPriority,
1244
1269
  self._learnLevelMinimum,
1245
- self[141]
1270
+ self[142]
1246
1271
  ) then
1247
1272
  local timer = self._timer
1248
1273
  if timer == nil then
@@ -100,7 +100,9 @@ declare const enum UnitPropertyKey {
100
100
  DELAY_HEALTH_CHECKS_COUNTER = 103,
101
101
  DELAY_HEALTH_CHECKS_HEALTH_BONUS = 104,
102
102
  PREVENT_DEATH_HEALTH_BONUS = 105,
103
- IS_TEAM_GLOW_HIDDEN = 106
103
+ IS_TEAM_GLOW_HIDDEN = 106,
104
+ LAST_X = 107,
105
+ LAST_Y = 108
104
106
  }
105
107
  export type UnitSyncId = number & {
106
108
  readonly __unitSyncId: unique symbol;
@@ -113,6 +115,8 @@ export declare class Unit extends Handle<junit> {
113
115
  private [UnitPropertyKey.DELAY_HEALTH_CHECKS_HEALTH_BONUS]?;
114
116
  private [UnitPropertyKey.PREVENT_DEATH_HEALTH_BONUS]?;
115
117
  private [UnitPropertyKey.IS_TEAM_GLOW_HIDDEN]?;
118
+ private [UnitPropertyKey.LAST_X]?;
119
+ private [UnitPropertyKey.LAST_Y]?;
116
120
  private _owner?;
117
121
  private _timeScale?;
118
122
  private events?;
@@ -148,6 +152,7 @@ export declare class Unit extends Handle<junit> {
148
152
  isEnemyOf(unit: Unit): boolean;
149
153
  playAnimation(animation: string, rarity?: jraritycontrol): void;
150
154
  playAnimation(animation: number): void;
155
+ resetAnimation(): void;
151
156
  queueAnimation(animation: string): void;
152
157
  get weapons(): [UnitWeapon, UnitWeapon];
153
158
  get firstWeapon(): UnitWeapon;
@@ -58,6 +58,7 @@ local ____tostring = _G.tostring
58
58
  local setUnitAnimation = SetUnitAnimation
59
59
  local setUnitAnimationWithRarity = SetUnitAnimationWithRarity
60
60
  local setUnitAnimationByIndex = SetUnitAnimationByIndex
61
+ local resetUnitAnimation = ResetUnitAnimation
61
62
  local queueUnitAnimation = QueueUnitAnimation
62
63
  local getUnitIntegerField = BlzGetUnitIntegerField
63
64
  local getUnitRealField = BlzGetUnitRealField
@@ -680,6 +681,8 @@ function Unit.prototype.getEvent(self, event, collector)
680
681
  end
681
682
  function Unit.prototype.onDestroy(self)
682
683
  local handle = self.handle
684
+ self[107] = getUnitX(handle)
685
+ self[108] = getUnitY(handle)
683
686
  if not self._owner then
684
687
  self._owner = Player:of(getOwningPlayer(handle))
685
688
  end
@@ -795,6 +798,9 @@ function Unit.prototype.playAnimation(self, animation, rarity)
795
798
  setUnitAnimation(self.handle, animation)
796
799
  end
797
800
  end
801
+ function Unit.prototype.resetAnimation(self)
802
+ resetUnitAnimation(self.handle)
803
+ end
798
804
  function Unit.prototype.queueAnimation(self, animation)
799
805
  queueUnitAnimation(self.handle, animation)
800
806
  end
@@ -1597,7 +1603,7 @@ __TS__SetDescriptor(
1597
1603
  "x",
1598
1604
  {
1599
1605
  get = function(self)
1600
- return getUnitX(self.handle)
1606
+ return self[107] or getUnitX(self.handle)
1601
1607
  end,
1602
1608
  set = function(self, v)
1603
1609
  SetUnitX(self.handle, v)
@@ -1610,7 +1616,7 @@ __TS__SetDescriptor(
1610
1616
  "y",
1611
1617
  {
1612
1618
  get = function(self)
1613
- return getUnitY(self.handle)
1619
+ return self[108] or getUnitY(self.handle)
1614
1620
  end,
1615
1621
  set = function(self, v)
1616
1622
  SetUnitY(self.handle, v)
@@ -0,0 +1,17 @@
1
+ /** @noSelfInFile */
2
+ import { AbilityType, AbilityTypeId } from "../ability-type";
3
+ import { ObjectDataEntryLevelFieldValueSupplier } from "../../entry";
4
+ import { UnitTypeId } from "../unit-type";
5
+ export declare class RaiseDeadAbilityType extends AbilityType {
6
+ static readonly BASE_ID: AbilityTypeId;
7
+ get firstSummonedUnitCount(): number[];
8
+ set firstSummonedUnitCount(firstSummonedUnitCount: ObjectDataEntryLevelFieldValueSupplier<number>);
9
+ get secondSummonedUnitCount(): number[];
10
+ set secondSummonedUnitCount(secondSummonedUnitCount: ObjectDataEntryLevelFieldValueSupplier<number>);
11
+ get firstSummonedUnitTypeId(): UnitTypeId[];
12
+ set firstSummonedUnitTypeId(firstSummonedUnitTypeId: ObjectDataEntryLevelFieldValueSupplier<UnitTypeId>);
13
+ get secondSummonedUnitTypeId(): UnitTypeId[];
14
+ set secondSummonedUnitTypeId(secondSummonedUnitTypeId: ObjectDataEntryLevelFieldValueSupplier<UnitTypeId>);
15
+ get limitCheckUnitTypeId(): UnitTypeId[];
16
+ set limitCheckUnitTypeId(limitCheckUnitTypeId: ObjectDataEntryLevelFieldValueSupplier<UnitTypeId>);
17
+ }
@@ -0,0 +1,78 @@
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.RaiseDeadAbilityType = __TS__Class()
9
+ local RaiseDeadAbilityType = ____exports.RaiseDeadAbilityType
10
+ RaiseDeadAbilityType.name = "RaiseDeadAbilityType"
11
+ __TS__ClassExtends(RaiseDeadAbilityType, AbilityType)
12
+ RaiseDeadAbilityType.BASE_ID = fourCC("Arai")
13
+ __TS__SetDescriptor(
14
+ RaiseDeadAbilityType.prototype,
15
+ "firstSummonedUnitCount",
16
+ {
17
+ get = function(self)
18
+ return self:getNumberLevelField("Rai1")
19
+ end,
20
+ set = function(self, firstSummonedUnitCount)
21
+ self:setNumberLevelField("Rai1", firstSummonedUnitCount)
22
+ end
23
+ },
24
+ true
25
+ )
26
+ __TS__SetDescriptor(
27
+ RaiseDeadAbilityType.prototype,
28
+ "secondSummonedUnitCount",
29
+ {
30
+ get = function(self)
31
+ return self:getNumberLevelField("Rai2")
32
+ end,
33
+ set = function(self, secondSummonedUnitCount)
34
+ self:setNumberLevelField("Rai2", secondSummonedUnitCount)
35
+ end
36
+ },
37
+ true
38
+ )
39
+ __TS__SetDescriptor(
40
+ RaiseDeadAbilityType.prototype,
41
+ "firstSummonedUnitTypeId",
42
+ {
43
+ get = function(self)
44
+ return self:getObjectDataEntryNumericIdLevelField("Rai3")
45
+ end,
46
+ set = function(self, firstSummonedUnitTypeId)
47
+ self:setObjectDataEntryNumericIdLevelField("Rai3", firstSummonedUnitTypeId)
48
+ end
49
+ },
50
+ true
51
+ )
52
+ __TS__SetDescriptor(
53
+ RaiseDeadAbilityType.prototype,
54
+ "secondSummonedUnitTypeId",
55
+ {
56
+ get = function(self)
57
+ return self:getObjectDataEntryNumericIdLevelField("Rai4")
58
+ end,
59
+ set = function(self, secondSummonedUnitTypeId)
60
+ self:setObjectDataEntryNumericIdLevelField("Rai4", secondSummonedUnitTypeId)
61
+ end
62
+ },
63
+ true
64
+ )
65
+ __TS__SetDescriptor(
66
+ RaiseDeadAbilityType.prototype,
67
+ "limitCheckUnitTypeId",
68
+ {
69
+ get = function(self)
70
+ return self:getObjectDataEntryNumericIdLevelField("Raiu")
71
+ end,
72
+ set = function(self, limitCheckUnitTypeId)
73
+ self:setObjectDataEntryNumericIdLevelField("Raiu", limitCheckUnitTypeId)
74
+ end
75
+ },
76
+ true
77
+ )
78
+ return ____exports
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "warscript",
4
- "version": "0.0.1-dev.ff5dbcd",
4
+ "version": "0.0.1-dev.ffaa090",
5
5
  "description": "A typescript library for Warcraft III using Warpack.",
6
6
  "keywords": [
7
7
  "warcraft",