warscript 0.0.1-dev.c59dd14 → 0.0.1-dev.c74bdbb
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 +0 -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 +93 -1
- package/core/types/group.d.ts +0 -1
- package/core/types/image.d.ts +0 -1
- package/core/types/sound.d.ts +17 -24
- package/core/types/sound.lua +99 -24
- package/core/types/timer.d.ts +6 -7
- package/core/types/timer.lua +18 -21
- 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/engine/ability.d.ts +1 -1
- package/engine/behavior.d.ts +10 -10
- package/engine/behavior.lua +6 -6
- 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 +36 -11
- package/engine/behaviour/ability/damage.lua +90 -32
- package/engine/behaviour/ability/emulate-impact.d.ts +6 -0
- package/engine/behaviour/ability/emulate-impact.lua +35 -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 -19
- 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 +20 -4
- package/engine/behaviour/ability.lua +111 -38
- package/engine/behaviour/unit/stun-immunity.d.ts +0 -1
- package/engine/behaviour/unit.d.ts +10 -2
- package/engine/behaviour/unit.lua +27 -0
- package/engine/buff.d.ts +103 -41
- package/engine/buff.lua +465 -212
- package/engine/game-map.d.ts +7 -0
- package/engine/game-map.lua +32 -0
- package/engine/internal/ability.d.ts +16 -13
- package/engine/internal/ability.lua +80 -76
- package/engine/internal/item/ability.lua +106 -0
- package/engine/internal/item+owner.lua +2 -2
- package/engine/internal/item.d.ts +2 -2
- package/engine/internal/item.lua +56 -25
- 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/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 +10 -1
- package/engine/internal/unit/ability.lua +36 -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/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+ability.lua +2 -2
- package/engine/internal/unit+transport.lua +4 -10
- package/engine/internal/unit-missile-launch.lua +24 -5
- package/engine/internal/unit.d.ts +32 -12
- package/engine/internal/unit.lua +183 -88
- 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/attachment-preset.d.ts +7 -3
- package/engine/object-data/auxiliary/attachment-preset.lua +4 -3
- package/engine/object-data/auxiliary/combat-classification.d.ts +0 -2
- 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/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/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/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 +89 -33
- 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 +1 -2
- package/engine/object-data/entry/buff-type.lua +2 -2
- 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 +8 -2
- package/engine/object-data/entry/unit-type.lua +61 -8
- 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.d.ts +2 -3
- package/engine/object-field.lua +4 -0
- package/engine/random.d.ts +1 -5
- package/engine/standard/entries/sound-preset.d.ts +10 -0
- package/engine/standard/entries/sound-preset.lua +10 -0
- package/engine/standard/fields/ability.d.ts +2 -0
- package/engine/standard/fields/ability.lua +2 -0
- package/engine/unit.d.ts +3 -0
- package/engine/unit.lua +12 -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 +1 -1
- package/objutil/object.d.ts +0 -1
- package/objutil/unit.d.ts +0 -1
- package/objutil/unit.lua +8 -0
- package/package.json +13 -13
- 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 +16 -0
- package/string.lua +5 -0
- package/util/stream.d.ts +0 -1
- package/utility/arrays.d.ts +11 -5
- package/utility/arrays.lua +34 -3
- package/utility/bit-set.d.ts +0 -2
- package/utility/lazy.d.ts +2 -0
- package/utility/lazy.lua +14 -0
- package/utility/linked-set.d.ts +11 -3
- package/utility/linked-set.lua +5 -2
- package/utility/lua-maps.d.ts +1 -2
- package/utility/lua-sets.d.ts +1 -2
- 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
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="@typescript-to-lua/language-extensions" />
|
|
2
1
|
/** @noSelfInFile */
|
|
3
2
|
import { Handle, HandleDestructor } from "../../core/types/handle";
|
|
4
3
|
import { Player } from "../../core/types/player";
|
|
@@ -43,6 +42,7 @@ export interface DamagingEvent {
|
|
|
43
42
|
damageType: jdamagetype;
|
|
44
43
|
weaponType: jweapontype;
|
|
45
44
|
readonly isAttack: boolean;
|
|
45
|
+
readonly originalAmount: number;
|
|
46
46
|
}
|
|
47
47
|
export type DamageEvent = DamagingEvent & {
|
|
48
48
|
preventDeath<P extends any[]>(this: DamageEvent, callback: (this: void, ...parameters: P) => any, ...parameters: P): void;
|
|
@@ -94,20 +94,29 @@ export declare class UnitWeapon {
|
|
|
94
94
|
set missileSpeed(missileSpeed: number);
|
|
95
95
|
}
|
|
96
96
|
declare const enum UnitPropertyKey {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
97
|
+
SYNC_ID = 100,
|
|
98
|
+
IS_PAUSED = 101,
|
|
99
|
+
STUN_COUNTER = 102,
|
|
100
|
+
DELAY_HEALTH_CHECKS_COUNTER = 103,
|
|
101
|
+
DELAY_HEALTH_CHECKS_HEALTH_BONUS = 104,
|
|
102
|
+
PREVENT_DEATH_HEALTH_BONUS = 105,
|
|
103
|
+
IS_TEAM_GLOW_HIDDEN = 106,
|
|
104
|
+
LAST_X = 107,
|
|
105
|
+
LAST_Y = 108
|
|
103
106
|
}
|
|
107
|
+
export type UnitSyncId = number & {
|
|
108
|
+
readonly __unitSyncId: unique symbol;
|
|
109
|
+
};
|
|
104
110
|
export declare class Unit extends Handle<junit> {
|
|
111
|
+
readonly syncId: UnitSyncId;
|
|
105
112
|
private [UnitPropertyKey.IS_PAUSED]?;
|
|
106
113
|
private [UnitPropertyKey.STUN_COUNTER]?;
|
|
107
114
|
private [UnitPropertyKey.DELAY_HEALTH_CHECKS_COUNTER]?;
|
|
108
115
|
private [UnitPropertyKey.DELAY_HEALTH_CHECKS_HEALTH_BONUS]?;
|
|
109
116
|
private [UnitPropertyKey.PREVENT_DEATH_HEALTH_BONUS]?;
|
|
110
117
|
private [UnitPropertyKey.IS_TEAM_GLOW_HIDDEN]?;
|
|
118
|
+
private [UnitPropertyKey.LAST_X]?;
|
|
119
|
+
private [UnitPropertyKey.LAST_Y]?;
|
|
111
120
|
private _owner?;
|
|
112
121
|
private _timeScale?;
|
|
113
122
|
private events?;
|
|
@@ -128,6 +137,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
128
137
|
get isAlive(): boolean;
|
|
129
138
|
get isDead(): boolean;
|
|
130
139
|
get isIllusion(): boolean;
|
|
140
|
+
get isStunned(): boolean;
|
|
131
141
|
get combatClassifications(): CombatClassifications;
|
|
132
142
|
set combatClassifications(combatClassifications: CombatClassifications);
|
|
133
143
|
hasCombatClassification(combatClassification: CombatClassification): boolean;
|
|
@@ -142,6 +152,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
142
152
|
isEnemyOf(unit: Unit): boolean;
|
|
143
153
|
playAnimation(animation: string, rarity?: jraritycontrol): void;
|
|
144
154
|
playAnimation(animation: number): void;
|
|
155
|
+
resetAnimation(): void;
|
|
145
156
|
queueAnimation(animation: string): void;
|
|
146
157
|
get weapons(): [UnitWeapon, UnitWeapon];
|
|
147
158
|
get firstWeapon(): UnitWeapon;
|
|
@@ -228,7 +239,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
228
239
|
isSelected(player: Player): boolean;
|
|
229
240
|
explode(): void;
|
|
230
241
|
kill(): void;
|
|
231
|
-
revive(
|
|
242
|
+
revive(x: number, y: number, doEffect?: boolean): void;
|
|
232
243
|
healTarget(target: Widget, amount: number): void;
|
|
233
244
|
useItem(item: Item): boolean;
|
|
234
245
|
issueImmediateOrder(order: number): boolean;
|
|
@@ -288,7 +299,7 @@ export declare class Unit extends Handle<junit> {
|
|
|
288
299
|
static getInRange(x: number, y: number, range: number, predicate?: (unit: Unit) => boolean): Unit[];
|
|
289
300
|
static getInCollisionRange(x: number, y: number, range: number, predicate?: (unit: Unit) => boolean): Unit[];
|
|
290
301
|
static getInSector(pos: Vec2, range: number, offsetAngle: number, centralAngle: number): Unit[];
|
|
291
|
-
static getSelectionOf(player: Player): Unit[];
|
|
302
|
+
static getSelectionOf(player: Player, target?: Unit[]): Unit[];
|
|
292
303
|
static readonly deathEvent: UnitTriggerEvent<[Unit]>;
|
|
293
304
|
static readonly onDecay: UnitTriggerEvent<[]>;
|
|
294
305
|
static readonly onResurrect: InitializingEvent<[Unit], void>;
|
|
@@ -323,9 +334,17 @@ export declare class Unit extends Handle<junit> {
|
|
|
323
334
|
static readonly autoAttackStartEvent: UnitTriggerEvent<[Unit]>;
|
|
324
335
|
static readonly onDamaging: Event<[source: Unit | undefined, target: Unit, event: DamagingEvent]>;
|
|
325
336
|
static readonly onDamage: InitializingEvent<[source: Unit | undefined, target: Unit, event: DamageEvent], jtrigger>;
|
|
326
|
-
static
|
|
327
|
-
static
|
|
328
|
-
static
|
|
337
|
+
static itemDroppedEvent: UnitTriggerEvent<[Item]>;
|
|
338
|
+
static itemPickedUpEvent: UnitTriggerEvent<[Item]>;
|
|
339
|
+
static itemUsedEvent: UnitTriggerEvent<[Item]>;
|
|
340
|
+
static itemStackedEvent: UnitTriggerEvent<[Item]>;
|
|
341
|
+
static get itemUseOrderEvent(): Event<[unit: Unit, item: Item]>;
|
|
342
|
+
static get itemMoveOrderEvent(): Event<[
|
|
343
|
+
unit: Unit,
|
|
344
|
+
item: Item,
|
|
345
|
+
slotFrom: 0 | 1 | 2 | 3 | 4 | 5,
|
|
346
|
+
slotTo: 0 | 1 | 2 | 3 | 4 | 5
|
|
347
|
+
]>;
|
|
329
348
|
static get onCreate(): EventDispatcher<[Unit], [Unit]>;
|
|
330
349
|
static get destroyEvent(): EventDispatcher<[Unit], [Unit]>;
|
|
331
350
|
getField(field: junitintegerfield | junitrealfield): number;
|
|
@@ -336,5 +355,6 @@ export declare class Unit extends Handle<junit> {
|
|
|
336
355
|
setField(field: junitbooleanfield, value: boolean): boolean;
|
|
337
356
|
setField(field: junitstringfield, value: string): boolean;
|
|
338
357
|
toString(): string;
|
|
358
|
+
static getBySyncId(syncId: UnitSyncId): Unit | undefined;
|
|
339
359
|
}
|
|
340
360
|
export {};
|