warscript 0.0.1-dev.ee2345e → 0.0.1-dev.f024cc2
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.
- package/attributes.d.ts +5 -1
- package/attributes.lua +8 -1
- package/binaryreader.d.ts +1 -0
- package/binaryreader.lua +3 -0
- package/config.d.ts +5 -0
- package/config.lua +10 -0
- package/core/types/effect.d.ts +14 -6
- package/core/types/effect.lua +131 -35
- package/core/types/frame.d.ts +8 -1
- package/core/types/frame.lua +103 -13
- package/core/types/group.d.ts +0 -1
- package/core/types/image.d.ts +0 -1
- package/core/types/missile.d.ts +2 -2
- package/core/types/missile.lua +8 -2
- package/core/types/player.lua +3 -1
- package/core/types/playerCamera.d.ts +2 -0
- package/core/types/playerCamera.lua +79 -5
- package/core/types/sound.d.ts +17 -24
- package/core/types/sound.lua +99 -24
- package/core/types/timer.d.ts +8 -8
- package/core/types/timer.lua +25 -23
- package/core/types/unit.lua +8 -0
- package/core/util.d.ts +1 -1
- package/core/util.lua +18 -1
- package/decl/index.d.ts +1 -0
- package/decl/native.d.ts +844 -788
- package/engine/ability.d.ts +1 -1
- package/engine/behavior.d.ts +12 -10
- package/engine/behavior.lua +59 -33
- package/engine/behaviour/ability/always-enabled.d.ts +7 -0
- package/engine/behaviour/ability/always-enabled.lua +31 -0
- package/engine/behaviour/ability/apply-buff.d.ts +8 -5
- package/engine/behaviour/ability/apply-buff.lua +32 -0
- package/engine/behaviour/ability/apply-unit-behavior.d.ts +6 -1
- package/engine/behaviour/ability/apply-unit-behavior.lua +1 -0
- package/engine/behaviour/ability/damage.d.ts +39 -11
- package/engine/behaviour/ability/damage.lua +83 -37
- package/engine/behaviour/ability/emulate-impact.d.ts +6 -0
- package/engine/behaviour/ability/emulate-impact.lua +43 -0
- package/engine/behaviour/ability/heal.d.ts +33 -6
- package/engine/behaviour/ability/heal.lua +89 -10
- package/engine/behaviour/ability/instant-impact.d.ts +2 -2
- package/engine/behaviour/ability/instant-impact.lua +4 -15
- package/engine/behaviour/ability/on-command-impact.d.ts +8 -0
- package/engine/behaviour/ability/on-command-impact.lua +25 -0
- package/engine/behaviour/ability/remove-buffs.d.ts +16 -0
- package/engine/behaviour/ability/remove-buffs.lua +28 -0
- package/engine/behaviour/ability/restore-mana.d.ts +15 -0
- package/engine/behaviour/ability/restore-mana.lua +29 -0
- package/engine/behaviour/ability.d.ts +27 -4
- package/engine/behaviour/ability.lua +152 -26
- package/engine/behaviour/unit/stun-immunity.d.ts +5 -4
- package/engine/behaviour/unit/stun-immunity.lua +43 -27
- package/engine/behaviour/unit.d.ts +36 -2
- package/engine/behaviour/unit.lua +186 -0
- package/engine/buff.d.ts +104 -41
- package/engine/buff.lua +471 -212
- package/engine/game-map.d.ts +7 -0
- package/engine/game-map.lua +32 -0
- package/engine/internal/ability.d.ts +20 -13
- package/engine/internal/ability.lua +103 -76
- package/engine/internal/item/ability.lua +162 -4
- package/engine/internal/item+owner.lua +12 -6
- package/engine/internal/item.d.ts +7 -4
- package/engine/internal/item.lua +131 -28
- package/engine/internal/mechanics/ability-duration.lua +1 -1
- package/engine/internal/misc/ability-disable-counter.d.ts +2 -0
- package/engine/internal/misc/ability-disable-counter.lua +13 -0
- package/engine/internal/misc/damage-metadata-by-target.d.ts +2 -0
- package/engine/internal/misc/damage-metadata-by-target.lua +5 -0
- package/engine/internal/misc/frame-coordinates.d.ts +2 -0
- package/engine/internal/misc/frame-coordinates.lua +21 -0
- package/engine/internal/misc/get-terrain-z.d.ts +2 -0
- package/engine/internal/misc/get-terrain-z.lua +11 -0
- package/engine/internal/misc/player-local-handle.d.ts +2 -0
- package/engine/internal/misc/player-local-handle.lua +5 -0
- package/engine/internal/object-data/auto-attack-speed-increase.d.ts +1 -1
- package/engine/internal/object-data/auto-attack-speed-increase.lua +2 -0
- package/engine/internal/object-data/evasion-probability.d.ts +2 -0
- package/engine/internal/object-data/evasion-probability.lua +16 -0
- package/engine/internal/unit/ability.d.ts +45 -1
- package/engine/internal/unit/ability.lua +98 -14
- package/engine/internal/unit/add-item-to-slot-init.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot-init.lua +23 -0
- package/engine/internal/unit/add-item-to-slot.d.ts +2 -0
- package/engine/internal/unit/add-item-to-slot.lua +52 -0
- package/engine/internal/unit/allowed-targets.d.ts +1 -1
- package/engine/internal/unit/allowed-targets.lua +9 -1
- package/engine/internal/unit/bonus.d.ts +11 -8
- package/engine/internal/unit/bonus.lua +23 -1
- package/engine/internal/unit/ignore-events-items.d.ts +2 -0
- package/engine/internal/unit/ignore-events-items.lua +5 -0
- package/engine/internal/unit/item.d.ts +24 -0
- package/engine/internal/unit/item.lua +78 -0
- package/engine/internal/unit/main-selected.d.ts +13 -0
- package/engine/internal/unit/main-selected.lua +51 -0
- package/engine/internal/unit/order.d.ts +20 -0
- package/engine/internal/unit/order.lua +136 -0
- package/engine/internal/unit+ability.lua +3 -3
- package/engine/internal/unit+damage.d.ts +2 -11
- package/engine/internal/unit+damage.lua +10 -14
- package/engine/internal/unit+spellSteal.lua +1 -2
- package/engine/internal/unit+transport.lua +4 -10
- package/engine/internal/unit-missile-launch.lua +33 -7
- package/engine/internal/unit.d.ts +87 -22
- package/engine/internal/unit.lua +585 -195
- package/engine/internal/utility.lua +12 -0
- package/engine/lightning.d.ts +12 -5
- package/engine/lightning.lua +48 -14
- package/engine/local-client.d.ts +7 -2
- package/engine/local-client.lua +82 -0
- package/engine/object-data/auxiliary/animation-name.d.ts +1 -0
- package/engine/object-data/auxiliary/animation-name.lua +16 -0
- package/engine/object-data/auxiliary/armor-type.d.ts +11 -0
- package/engine/object-data/auxiliary/armor-type.lua +46 -0
- package/engine/object-data/auxiliary/attachment-preset.d.ts +7 -3
- package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
- package/engine/object-data/auxiliary/attack-type.d.ts +7 -8
- package/engine/object-data/auxiliary/attack-type.lua +42 -0
- package/engine/object-data/auxiliary/combat-classification.d.ts +0 -2
- package/engine/object-data/auxiliary/movement-type.d.ts +7 -7
- package/engine/object-data/auxiliary/movement-type.lua +22 -0
- package/engine/object-data/auxiliary/sound-eax.d.ts +10 -0
- package/engine/object-data/auxiliary/sound-eax.lua +2 -0
- package/engine/object-data/auxiliary/sound-preset-name.d.ts +5 -1
- package/engine/object-data/auxiliary/tech-tree-dependency.d.ts +1 -1
- package/engine/object-data/auxiliary/unit-attribute.d.ts +6 -0
- package/engine/object-data/auxiliary/unit-attribute.lua +9 -0
- package/engine/object-data/entry/ability-type/berserk.d.ts +2 -0
- package/engine/object-data/entry/ability-type/berserk.lua +13 -0
- package/engine/object-data/entry/ability-type/blank-configurable.d.ts +0 -1
- package/engine/object-data/entry/ability-type/blank-configurable.lua +12 -1
- package/engine/object-data/entry/ability-type/blank-passive.d.ts +0 -1
- package/engine/object-data/entry/ability-type/carrion-swarm.d.ts +14 -0
- package/engine/object-data/entry/ability-type/carrion-swarm.lua +65 -0
- package/engine/object-data/entry/ability-type/channel.d.ts +0 -1
- package/engine/object-data/entry/ability-type/disease-cloud.lua +2 -2
- package/engine/object-data/entry/ability-type/engineering-upgrade.lua +2 -2
- package/engine/object-data/entry/ability-type/ensnare.d.ts +12 -0
- package/engine/object-data/entry/ability-type/ensnare.lua +52 -0
- package/engine/object-data/entry/ability-type/feral-spirit.lua +2 -2
- package/engine/object-data/entry/ability-type/mine.d.ts +10 -0
- package/engine/object-data/entry/ability-type/mine.lua +39 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.d.ts +8 -0
- package/engine/object-data/entry/ability-type/permanent-invisibility.lua +26 -0
- package/engine/object-data/entry/ability-type/phase-shift.d.ts +10 -0
- package/engine/object-data/entry/ability-type/phase-shift.lua +39 -0
- package/engine/object-data/entry/ability-type/phoenix-morph.lua +4 -4
- package/engine/object-data/entry/ability-type/raise-dead.d.ts +17 -0
- package/engine/object-data/entry/ability-type/raise-dead.lua +78 -0
- package/engine/object-data/entry/ability-type/shock-wave.d.ts +4 -0
- package/engine/object-data/entry/ability-type/shock-wave.lua +26 -0
- package/engine/object-data/entry/ability-type/slow-poison.d.ts +10 -0
- package/engine/object-data/entry/ability-type/slow-poison.lua +58 -0
- package/engine/object-data/entry/ability-type/spirit-touch.d.ts +2 -2
- package/engine/object-data/entry/ability-type/spirit-touch.lua +6 -6
- package/engine/object-data/entry/ability-type/summon-quilbeast.lua +2 -2
- package/engine/object-data/entry/ability-type/summon-water-elemental.lua +2 -2
- package/engine/object-data/entry/ability-type/web.d.ts +12 -0
- package/engine/object-data/entry/ability-type/web.lua +52 -0
- package/engine/object-data/entry/ability-type.d.ts +19 -18
- package/engine/object-data/entry/ability-type.lua +90 -36
- package/engine/object-data/entry/buff-type/applicable.d.ts +0 -1
- package/engine/object-data/entry/buff-type/applicable.lua +18 -37
- package/engine/object-data/entry/buff-type/blank.d.ts +0 -1
- package/engine/object-data/entry/buff-type.d.ts +6 -13
- package/engine/object-data/entry/buff-type.lua +13 -29
- package/engine/object-data/entry/destructible-type.d.ts +1 -2
- package/engine/object-data/entry/item-type/blank.d.ts +0 -1
- package/engine/object-data/entry/item-type.d.ts +15 -2
- package/engine/object-data/entry/item-type.lua +93 -2
- package/engine/object-data/entry/lightning-type.d.ts +1 -2
- package/engine/object-data/entry/sound-preset.d.ts +33 -0
- package/engine/object-data/entry/sound-preset.lua +140 -0
- package/engine/object-data/entry/unit-type.d.ts +58 -7
- package/engine/object-data/entry/unit-type.lua +480 -75
- package/engine/object-data/entry/upgrade/blank.d.ts +0 -1
- package/engine/object-data/entry/upgrade.d.ts +1 -2
- package/engine/object-data/entry/upgrade.lua +4 -4
- package/engine/object-data/entry.d.ts +18 -17
- package/engine/object-data/entry.lua +60 -32
- package/engine/object-data/utility/object-data-entry-id-generator.lua +7 -0
- package/engine/object-field/ability.d.ts +26 -3
- package/engine/object-field/ability.lua +54 -1
- package/engine/object-field/unit.d.ts +57 -3
- package/engine/object-field/unit.lua +207 -7
- package/engine/object-field.d.ts +17 -7
- package/engine/object-field.lua +187 -89
- package/engine/random.d.ts +1 -0
- package/engine/random.lua +9 -0
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/engine/standard/entries/sound-preset.d.ts +10 -0
- package/engine/standard/entries/sound-preset.lua +10 -0
- package/engine/standard/entries/unit-type.d.ts +39 -1
- package/engine/standard/entries/unit-type.lua +39 -1
- package/engine/standard/fields/ability.d.ts +3 -1
- package/engine/standard/fields/ability.lua +3 -1
- package/engine/standard/fields/unit.d.ts +4 -0
- package/engine/standard/fields/unit.lua +7 -0
- package/engine/text-tag.d.ts +36 -2
- package/engine/text-tag.lua +249 -10
- package/engine/unit.d.ts +4 -0
- package/engine/unit.lua +13 -2
- package/event.d.ts +2 -3
- package/event.lua +9 -5
- package/index.d.ts +1 -0
- package/index.lua +1 -0
- package/lualib_bundle.lua +146 -42
- package/math/vec2.d.ts +2 -9
- package/math.d.ts +0 -2
- package/net/socket.d.ts +7 -1
- package/net/socket.lua +45 -4
- package/network.d.ts +1 -0
- package/network.lua +3 -2
- package/objutil/ability.d.ts +0 -1
- package/objutil/buff.d.ts +0 -1
- package/objutil/buff.lua +2 -3
- package/objutil/object.d.ts +0 -1
- package/objutil/unit.d.ts +0 -1
- package/objutil/unit.lua +8 -0
- package/package.json +13 -14
- package/patch-lua.d.ts +0 -0
- package/patch-lua.lua +10 -0
- package/property.d.ts +55 -0
- package/property.lua +374 -0
- package/string.d.ts +30 -0
- package/string.lua +14 -0
- package/util/stream.d.ts +0 -1
- package/utility/arrays.d.ts +12 -5
- package/utility/arrays.lua +37 -3
- package/utility/bit-set.d.ts +0 -2
- package/utility/functions.d.ts +8 -0
- package/utility/functions.lua +13 -0
- package/utility/lazy.d.ts +2 -0
- package/utility/lazy.lua +14 -0
- package/utility/linked-set.d.ts +12 -3
- package/utility/linked-set.lua +8 -2
- package/utility/lua-maps.d.ts +5 -2
- package/utility/lua-maps.lua +20 -0
- package/utility/lua-sets.d.ts +3 -2
- package/utility/lua-sets.lua +7 -0
- package/utility/reflection.lua +11 -7
- package/utility/types.d.ts +1 -0
- package/core/mapbounds.d.ts +0 -8
- package/core/mapbounds.lua +0 -12
- package/core/types/order.d.ts +0 -25
- 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
|
-
|
|
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
|
|
166
|
-
set
|
|
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
|
}
|