warscript 0.0.1-dev.ccd5725 → 0.0.1-dev.cdcfbc9

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