warscript 0.0.1-dev.ee2345e → 0.0.1-dev.f0a9ffe

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 (239) hide show
  1. package/attributes.d.ts +5 -1
  2. package/attributes.lua +8 -1
  3. package/binaryreader.d.ts +1 -0
  4. package/binaryreader.lua +3 -0
  5. package/config.d.ts +5 -0
  6. package/config.lua +10 -0
  7. package/core/types/effect.d.ts +14 -6
  8. package/core/types/effect.lua +131 -35
  9. package/core/types/frame.d.ts +8 -1
  10. package/core/types/frame.lua +93 -1
  11. package/core/types/group.d.ts +0 -1
  12. package/core/types/image.d.ts +0 -1
  13. package/core/types/missile.d.ts +2 -2
  14. package/core/types/missile.lua +8 -2
  15. package/core/types/sound.d.ts +17 -24
  16. package/core/types/sound.lua +99 -24
  17. package/core/types/timer.d.ts +8 -8
  18. package/core/types/timer.lua +25 -23
  19. package/core/types/unit.lua +8 -0
  20. package/core/util.d.ts +1 -1
  21. package/core/util.lua +18 -1
  22. package/decl/index.d.ts +1 -0
  23. package/decl/native.d.ts +844 -788
  24. package/engine/ability.d.ts +1 -1
  25. package/engine/behavior.d.ts +12 -10
  26. package/engine/behavior.lua +59 -33
  27. package/engine/behaviour/ability/always-enabled.d.ts +7 -0
  28. package/engine/behaviour/ability/always-enabled.lua +31 -0
  29. package/engine/behaviour/ability/apply-buff.d.ts +8 -5
  30. package/engine/behaviour/ability/apply-buff.lua +32 -0
  31. package/engine/behaviour/ability/apply-unit-behavior.d.ts +6 -1
  32. package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
  33. package/engine/behaviour/ability/damage.d.ts +39 -11
  34. package/engine/behaviour/ability/damage.lua +83 -37
  35. package/engine/behaviour/ability/emulate-impact.d.ts +6 -0
  36. package/engine/behaviour/ability/emulate-impact.lua +43 -0
  37. package/engine/behaviour/ability/heal.d.ts +33 -6
  38. package/engine/behaviour/ability/heal.lua +89 -10
  39. package/engine/behaviour/ability/instant-impact.d.ts +2 -2
  40. package/engine/behaviour/ability/instant-impact.lua +4 -15
  41. package/engine/behaviour/ability/on-command-impact.d.ts +8 -0
  42. package/engine/behaviour/ability/on-command-impact.lua +25 -0
  43. package/engine/behaviour/ability/remove-buffs.d.ts +16 -0
  44. package/engine/behaviour/ability/remove-buffs.lua +28 -0
  45. package/engine/behaviour/ability/restore-mana.d.ts +15 -0
  46. package/engine/behaviour/ability/restore-mana.lua +29 -0
  47. package/engine/behaviour/ability.d.ts +27 -4
  48. package/engine/behaviour/ability.lua +152 -26
  49. package/engine/behaviour/unit/stun-immunity.d.ts +5 -4
  50. package/engine/behaviour/unit/stun-immunity.lua +43 -27
  51. package/engine/behaviour/unit.d.ts +36 -2
  52. package/engine/behaviour/unit.lua +186 -0
  53. package/engine/buff.d.ts +104 -41
  54. package/engine/buff.lua +471 -212
  55. package/engine/game-map.d.ts +7 -0
  56. package/engine/game-map.lua +32 -0
  57. package/engine/internal/ability.d.ts +20 -13
  58. package/engine/internal/ability.lua +103 -76
  59. package/engine/internal/item/ability.lua +162 -4
  60. package/engine/internal/item+owner.lua +2 -2
  61. package/engine/internal/item.d.ts +7 -4
  62. package/engine/internal/item.lua +131 -28
  63. package/engine/internal/mechanics/ability-duration.lua +1 -1
  64. package/engine/internal/misc/ability-disable-counter.d.ts +2 -0
  65. package/engine/internal/misc/ability-disable-counter.lua +13 -0
  66. package/engine/internal/misc/damage-metadata-by-target.d.ts +2 -0
  67. package/engine/internal/misc/damage-metadata-by-target.lua +5 -0
  68. package/engine/internal/object-data/auto-attack-speed-increase.d.ts +1 -1
  69. package/engine/internal/object-data/auto-attack-speed-increase.lua +2 -0
  70. package/engine/internal/object-data/evasion-probability.d.ts +2 -0
  71. package/engine/internal/object-data/evasion-probability.lua +16 -0
  72. package/engine/internal/unit/ability.d.ts +45 -1
  73. package/engine/internal/unit/ability.lua +98 -14
  74. package/engine/internal/unit/add-item-to-slot-init.d.ts +2 -0
  75. package/engine/internal/unit/add-item-to-slot-init.lua +23 -0
  76. package/engine/internal/unit/add-item-to-slot.d.ts +2 -0
  77. package/engine/internal/unit/add-item-to-slot.lua +52 -0
  78. package/engine/internal/unit/allowed-targets.d.ts +1 -1
  79. package/engine/internal/unit/allowed-targets.lua +9 -1
  80. package/engine/internal/unit/bonus.d.ts +11 -8
  81. package/engine/internal/unit/bonus.lua +23 -1
  82. package/engine/internal/unit/ignore-events-items.d.ts +2 -0
  83. package/engine/internal/unit/ignore-events-items.lua +5 -0
  84. package/engine/internal/unit/item.d.ts +24 -0
  85. package/engine/internal/unit/item.lua +78 -0
  86. package/engine/internal/unit/main-selected.d.ts +13 -0
  87. package/engine/internal/unit/main-selected.lua +51 -0
  88. package/engine/internal/unit/order.d.ts +20 -0
  89. package/engine/internal/unit/order.lua +136 -0
  90. package/engine/internal/unit+ability.lua +2 -2
  91. package/engine/internal/unit+damage.d.ts +2 -11
  92. package/engine/internal/unit+damage.lua +10 -14
  93. package/engine/internal/unit+spellSteal.lua +1 -2
  94. package/engine/internal/unit+transport.lua +4 -10
  95. package/engine/internal/unit-missile-launch.lua +33 -7
  96. package/engine/internal/unit.d.ts +87 -22
  97. package/engine/internal/unit.lua +580 -194
  98. package/engine/internal/utility.lua +12 -0
  99. package/engine/lightning.d.ts +12 -5
  100. package/engine/lightning.lua +48 -14
  101. package/engine/local-client.d.ts +7 -2
  102. package/engine/local-client.lua +82 -0
  103. package/engine/object-data/auxiliary/animation-name.d.ts +1 -0
  104. package/engine/object-data/auxiliary/animation-name.lua +16 -0
  105. package/engine/object-data/auxiliary/armor-type.d.ts +11 -0
  106. package/engine/object-data/auxiliary/armor-type.lua +46 -0
  107. package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -3
  108. package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
  109. package/engine/object-data/auxiliary/attack-type.d.ts +7 -8
  110. package/engine/object-data/auxiliary/attack-type.lua +42 -0
  111. package/engine/object-data/auxiliary/combat-classification.d.ts +0 -2
  112. package/engine/object-data/auxiliary/movement-type.d.ts +7 -7
  113. package/engine/object-data/auxiliary/movement-type.lua +22 -0
  114. package/engine/object-data/auxiliary/sound-eax.d.ts +10 -0
  115. package/engine/object-data/auxiliary/sound-eax.lua +2 -0
  116. package/engine/object-data/auxiliary/sound-preset-name.d.ts +5 -1
  117. package/engine/object-data/auxiliary/tech-tree-dependency.d.ts +1 -1
  118. package/engine/object-data/auxiliary/unit-attribute.d.ts +6 -0
  119. package/engine/object-data/auxiliary/unit-attribute.lua +9 -0
  120. package/engine/object-data/entry/ability-type/berserk.d.ts +2 -0
  121. package/engine/object-data/entry/ability-type/berserk.lua +13 -0
  122. package/engine/object-data/entry/ability-type/blank-configurable.d.ts +0 -1
  123. package/engine/object-data/entry/ability-type/blank-configurable.lua +12 -1
  124. package/engine/object-data/entry/ability-type/blank-passive.d.ts +0 -1
  125. package/engine/object-data/entry/ability-type/carrion-swarm.d.ts +14 -0
  126. package/engine/object-data/entry/ability-type/carrion-swarm.lua +65 -0
  127. package/engine/object-data/entry/ability-type/channel.d.ts +0 -1
  128. package/engine/object-data/entry/ability-type/disease-cloud.lua +2 -2
  129. package/engine/object-data/entry/ability-type/engineering-upgrade.lua +2 -2
  130. package/engine/object-data/entry/ability-type/ensnare.d.ts +12 -0
  131. package/engine/object-data/entry/ability-type/ensnare.lua +52 -0
  132. package/engine/object-data/entry/ability-type/feral-spirit.lua +2 -2
  133. package/engine/object-data/entry/ability-type/mine.d.ts +10 -0
  134. package/engine/object-data/entry/ability-type/mine.lua +39 -0
  135. package/engine/object-data/entry/ability-type/permanent-invisibility.d.ts +8 -0
  136. package/engine/object-data/entry/ability-type/permanent-invisibility.lua +26 -0
  137. package/engine/object-data/entry/ability-type/phase-shift.d.ts +10 -0
  138. package/engine/object-data/entry/ability-type/phase-shift.lua +39 -0
  139. package/engine/object-data/entry/ability-type/phoenix-morph.lua +4 -4
  140. package/engine/object-data/entry/ability-type/raise-dead.d.ts +17 -0
  141. package/engine/object-data/entry/ability-type/raise-dead.lua +78 -0
  142. package/engine/object-data/entry/ability-type/shock-wave.d.ts +4 -0
  143. package/engine/object-data/entry/ability-type/shock-wave.lua +26 -0
  144. package/engine/object-data/entry/ability-type/slow-poison.d.ts +10 -0
  145. package/engine/object-data/entry/ability-type/slow-poison.lua +58 -0
  146. package/engine/object-data/entry/ability-type/spirit-touch.d.ts +2 -2
  147. package/engine/object-data/entry/ability-type/spirit-touch.lua +6 -6
  148. package/engine/object-data/entry/ability-type/summon-quilbeast.lua +2 -2
  149. package/engine/object-data/entry/ability-type/summon-water-elemental.lua +2 -2
  150. package/engine/object-data/entry/ability-type/web.d.ts +12 -0
  151. package/engine/object-data/entry/ability-type/web.lua +52 -0
  152. package/engine/object-data/entry/ability-type.d.ts +19 -18
  153. package/engine/object-data/entry/ability-type.lua +90 -36
  154. package/engine/object-data/entry/buff-type/applicable.d.ts +0 -1
  155. package/engine/object-data/entry/buff-type/applicable.lua +18 -37
  156. package/engine/object-data/entry/buff-type/blank.d.ts +0 -1
  157. package/engine/object-data/entry/buff-type.d.ts +6 -13
  158. package/engine/object-data/entry/buff-type.lua +13 -29
  159. package/engine/object-data/entry/destructible-type.d.ts +1 -2
  160. package/engine/object-data/entry/item-type/blank.d.ts +0 -1
  161. package/engine/object-data/entry/item-type.d.ts +15 -2
  162. package/engine/object-data/entry/item-type.lua +93 -2
  163. package/engine/object-data/entry/lightning-type.d.ts +1 -2
  164. package/engine/object-data/entry/sound-preset.d.ts +33 -0
  165. package/engine/object-data/entry/sound-preset.lua +140 -0
  166. package/engine/object-data/entry/unit-type.d.ts +58 -7
  167. package/engine/object-data/entry/unit-type.lua +480 -75
  168. package/engine/object-data/entry/upgrade/blank.d.ts +0 -1
  169. package/engine/object-data/entry/upgrade.d.ts +1 -2
  170. package/engine/object-data/entry/upgrade.lua +4 -4
  171. package/engine/object-data/entry.d.ts +18 -17
  172. package/engine/object-data/entry.lua +60 -32
  173. package/engine/object-data/utility/object-data-entry-id-generator.lua +7 -0
  174. package/engine/object-field/ability.d.ts +26 -3
  175. package/engine/object-field/ability.lua +54 -1
  176. package/engine/object-field/unit.d.ts +57 -3
  177. package/engine/object-field/unit.lua +207 -7
  178. package/engine/object-field.d.ts +17 -7
  179. package/engine/object-field.lua +187 -89
  180. package/engine/random.d.ts +1 -0
  181. package/engine/random.lua +9 -0
  182. package/engine/standard/entries/buff-type.d.ts +3 -0
  183. package/engine/standard/entries/buff-type.lua +3 -0
  184. package/engine/standard/entries/sound-preset.d.ts +10 -0
  185. package/engine/standard/entries/sound-preset.lua +10 -0
  186. package/engine/standard/entries/unit-type.d.ts +39 -1
  187. package/engine/standard/entries/unit-type.lua +39 -1
  188. package/engine/standard/fields/ability.d.ts +3 -1
  189. package/engine/standard/fields/ability.lua +3 -1
  190. package/engine/standard/fields/unit.d.ts +4 -0
  191. package/engine/standard/fields/unit.lua +7 -0
  192. package/engine/text-tag.d.ts +36 -2
  193. package/engine/text-tag.lua +175 -10
  194. package/engine/unit.d.ts +4 -0
  195. package/engine/unit.lua +13 -2
  196. package/event.d.ts +2 -3
  197. package/event.lua +9 -5
  198. package/index.d.ts +1 -0
  199. package/index.lua +1 -0
  200. package/lualib_bundle.lua +146 -42
  201. package/math/vec2.d.ts +2 -9
  202. package/math.d.ts +0 -2
  203. package/net/socket.d.ts +7 -1
  204. package/net/socket.lua +45 -4
  205. package/network.d.ts +1 -0
  206. package/network.lua +3 -2
  207. package/objutil/ability.d.ts +0 -1
  208. package/objutil/buff.d.ts +0 -1
  209. package/objutil/buff.lua +2 -3
  210. package/objutil/object.d.ts +0 -1
  211. package/objutil/unit.d.ts +0 -1
  212. package/objutil/unit.lua +8 -0
  213. package/package.json +13 -14
  214. package/patch-lua.d.ts +0 -0
  215. package/patch-lua.lua +10 -0
  216. package/property.d.ts +55 -0
  217. package/property.lua +374 -0
  218. package/string.d.ts +30 -0
  219. package/string.lua +14 -0
  220. package/util/stream.d.ts +0 -1
  221. package/utility/arrays.d.ts +12 -5
  222. package/utility/arrays.lua +37 -3
  223. package/utility/bit-set.d.ts +0 -2
  224. package/utility/functions.d.ts +8 -0
  225. package/utility/functions.lua +13 -0
  226. package/utility/lazy.d.ts +2 -0
  227. package/utility/lazy.lua +14 -0
  228. package/utility/linked-set.d.ts +12 -3
  229. package/utility/linked-set.lua +8 -2
  230. package/utility/lua-maps.d.ts +5 -2
  231. package/utility/lua-maps.lua +20 -0
  232. package/utility/lua-sets.d.ts +3 -2
  233. package/utility/lua-sets.lua +7 -0
  234. package/utility/reflection.lua +11 -7
  235. package/utility/types.d.ts +1 -0
  236. package/core/mapbounds.d.ts +0 -8
  237. package/core/mapbounds.lua +0 -12
  238. package/core/types/order.d.ts +0 -25
  239. package/core/types/order.lua +0 -55
@@ -1,4 +1,3 @@
1
- /// <reference types="warpack-types/warpack" />
2
1
  /** @noSelfInFile */
3
2
  import { TupleOf } from "../../../utility/types";
4
3
  import { ArmorSoundType } from "../auxiliary/armor-sound-type";
@@ -14,7 +13,8 @@ import type { AbilityTypeId } from "./ability-type";
14
13
  import type { UpgradeId } from "./upgrade";
15
14
  import { AnimationQualifier } from "../auxiliary/animation-qualifier";
16
15
  import { AttackType } from "../auxiliary/attack-type";
17
- export type UnitTypeId = ObjectDataEntryId & {
16
+ import { ArmorType } from "../auxiliary/armor-type";
17
+ export type UnitTypeId = ObjectDataEntryId & number & {
18
18
  readonly __unitTypeId: unique symbol;
19
19
  };
20
20
  export type StandardUnitTypeId = UnitTypeId & {
@@ -24,10 +24,20 @@ export declare class UnitTypeWeapon {
24
24
  private readonly unitType;
25
25
  private readonly index;
26
26
  private constructor();
27
- get attackType(): AttackType;
28
- set attackType(attackType: AttackType);
27
+ get attackType(): AttackType | undefined;
28
+ set attackType(attackType: AttackType | undefined);
29
29
  get backSwingDuration(): number;
30
30
  set backSwingDuration(backSwingDuration: number);
31
+ get cooldown(): number;
32
+ set cooldown(cooldown: number);
33
+ get damage(): [minimumDamage: number, maximumDamage: number];
34
+ set damage([minimumDamage, maximumDamage]: [number, number]);
35
+ get damageBase(): number;
36
+ set damageBase(damageBase: number);
37
+ get damageDiceCount(): number;
38
+ set damageDiceCount(damageDiceNumber: number);
39
+ get damageDiceSideCount(): number;
40
+ set damageDiceSideCount(damageDiceSideCount: number);
31
41
  get impactDelay(): number;
32
42
  set impactDelay(impactDelay: number);
33
43
  get missileModelPath(): string;
@@ -46,6 +56,7 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
46
56
  protected static readonly idGenerator: ObjectDataEntryIdGenerator;
47
57
  protected static generateId(): number;
48
58
  protected static getObjectData(map: WarMap): WarObjects;
59
+ private isPortraitModelPathSet?;
49
60
  get abilityTypeIds(): AbilityTypeId[];
50
61
  set abilityTypeIds(abilityTypeIds: AbilityTypeId[]);
51
62
  get defaultActiveAbilityTypeId(): AbilityTypeId | undefined;
@@ -122,6 +133,20 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
122
133
  set modelPathSD(modelPathSD: string);
123
134
  get modelPathHD(): string;
124
135
  set modelPathHD(modelPathHD: string);
136
+ get portraitModelPath(): string;
137
+ set portraitModelPath(portraitModelPath: string);
138
+ get portraitModelPathSD(): string;
139
+ set portraitModelPathSD(portraitModelPathSD: string);
140
+ get portraitModelPathHD(): string;
141
+ set portraitModelPathHD(portraitModelPathHD: string);
142
+ get runSpeed(): number;
143
+ set runSpeed(runSpeed: number);
144
+ get runSpeedSD(): number;
145
+ set runSpeedSD(runSpeedSD: number);
146
+ get runSpeedHD(): number;
147
+ set runSpeedHD(runSpeedHD: number);
148
+ get selectionCircleHeight(): number;
149
+ set selectionCircleHeight(height: number);
125
150
  get selectionCircleScale(): number;
126
151
  set selectionCircleScale(selectionCircleScale: number);
127
152
  get selectionCircleScaleSD(): number;
@@ -154,19 +179,29 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
154
179
  set shadowImageXOffset(shadowImageXOffset: number);
155
180
  get shadowImageYOffset(): number;
156
181
  set shadowImageYOffset(shadowImageYOffset: number);
182
+ get walkSpeed(): number;
183
+ set walkSpeed(walkSpeed: number);
184
+ get walkSpeedSD(): number;
185
+ set walkSpeedSD(walkSpeedSD: number);
186
+ get walkSpeedHD(): number;
187
+ set walkSpeedHD(walkSpeedHD: number);
188
+ get armor(): number;
189
+ set armor(armor: number);
157
190
  get armorSoundType(): ArmorSoundType;
158
191
  set armorSoundType(armorSoundType: ArmorSoundType);
159
192
  get armorSoundTypeSD(): ArmorSoundType;
160
193
  set armorSoundTypeSD(armorSoundTypeSD: ArmorSoundType);
161
194
  get armorSoundTypeHD(): ArmorSoundType;
162
195
  set armorSoundTypeHD(armorSoundTypeHD: ArmorSoundType);
196
+ get armorType(): ArmorType;
197
+ set armorType(armorType: ArmorType);
163
198
  get combatClassifications(): CombatClassifications;
164
199
  set combatClassifications(combatClassifications: CombatClassifications);
165
- get unitClassifications(): UnitClassifications;
166
- set unitClassifications(unitClassifications: UnitClassifications);
200
+ get classifications(): UnitClassifications;
201
+ set classifications(unitClassifications: UnitClassifications);
202
+ get weapons(): TupleOf<UnitTypeWeapon, 2>;
167
203
  get firstWeapon(): UnitTypeWeapon;
168
204
  get secondWeapon(): UnitTypeWeapon;
169
- get weapons(): TupleOf<UnitTypeWeapon, 2>;
170
205
  get flyHeight(): number;
171
206
  set flyHeight(flyHeight: number);
172
207
  get flyHeightMinimum(): number;
@@ -195,6 +230,18 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
195
230
  set formationRank(formationRank: number);
196
231
  get goldCost(): number;
197
232
  set goldCost(goldCost: number);
233
+ get healthRegenerationRate(): number;
234
+ set healthRegenerationRate(healthRegenerationRate: number);
235
+ get level(): number;
236
+ set level(level: number);
237
+ get manaRegenerationRate(): number;
238
+ set manaRegenerationRate(manaRegenerationRate: number);
239
+ get maximumHealth(): number;
240
+ set maximumHealth(maximumHealth: number);
241
+ get maximumMana(): number;
242
+ set maximumMana(maximumMana: number);
243
+ get initialMana(): number;
244
+ set initialMana(initialMana: number);
198
245
  get isStructure(): boolean;
199
246
  set isStructure(isStructure: boolean);
200
247
  get race(): Race;
@@ -220,4 +267,8 @@ export declare abstract class HeroUnitType<Id extends HeroUnitTypeId = HeroUnitT
220
267
  protected static generateId(): number;
221
268
  get heroAbilityTypeIds(): AbilityTypeId[];
222
269
  set heroAbilityTypeIds(heroAbilityTypeIds: AbilityTypeId[]);
270
+ get properNames(): string[];
271
+ set properNames(properNames: string | string[]);
272
+ get properNameCount(): number;
273
+ set properNameCount(properNameCount: number);
223
274
  }