warscript 0.0.1-dev.9ee7706 → 0.0.1-dev.9f30788
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 -0
- package/attributes.lua +8 -1
- package/core/types/effect.d.ts +1 -3
- package/core/types/effect.lua +26 -29
- package/core/types/frame.lua +24 -21
- package/core/types/player.lua +3 -1
- package/core/types/playerCamera.d.ts +2 -0
- package/core/types/playerCamera.lua +123 -5
- package/core/types/sound.lua +5 -0
- package/core/types/tileCell.d.ts +9 -0
- package/core/types/tileCell.lua +92 -0
- package/core/types/timer.d.ts +9 -8
- package/core/types/timer.lua +45 -23
- package/decl/native.d.ts +846 -790
- package/engine/behavior.d.ts +5 -0
- package/engine/behavior.lua +106 -27
- package/engine/behaviour/ability/apply-buff.lua +1 -1
- package/engine/behaviour/ability/damage.d.ts +6 -3
- package/engine/behaviour/ability/damage.lua +24 -36
- package/engine/behaviour/ability/emulate-impact.d.ts +1 -1
- package/engine/behaviour/ability/emulate-impact.lua +18 -3
- package/engine/behaviour/ability/restore-mana.d.ts +1 -1
- package/engine/behaviour/ability/restore-mana.lua +6 -6
- package/engine/behaviour/ability.d.ts +4 -1
- package/engine/behaviour/ability.lua +14 -21
- package/engine/behaviour/unit/stun-immunity.d.ts +7 -3
- package/engine/behaviour/unit/stun-immunity.lua +52 -27
- package/engine/behaviour/unit.d.ts +33 -1
- package/engine/behaviour/unit.lua +190 -4
- package/engine/buff.d.ts +2 -4
- package/engine/buff.lua +68 -83
- package/engine/internal/ability.d.ts +7 -1
- package/engine/internal/ability.lua +49 -9
- package/engine/internal/item/ability.lua +63 -11
- package/engine/internal/item+owner.lua +12 -6
- package/engine/internal/item.d.ts +18 -17
- package/engine/internal/item.lua +135 -49
- 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/unit/ability.d.ts +35 -0
- package/engine/internal/unit/ability.lua +98 -9
- package/engine/internal/unit/allowed-targets.d.ts +1 -1
- package/engine/internal/unit/allowed-targets.lua +9 -1
- package/engine/internal/unit/order.d.ts +20 -0
- package/engine/internal/unit/order.lua +136 -0
- package/engine/internal/unit+ability.lua +10 -1
- 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-missile-launch.lua +45 -8
- package/engine/internal/unit.d.ts +26 -9
- package/engine/internal/unit.lua +251 -110
- 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 -2
- 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/movement-type.d.ts +7 -7
- package/engine/object-data/auxiliary/movement-type.lua +22 -0
- 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/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/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.d.ts +11 -11
- package/engine/object-data/entry/ability-type.lua +31 -9
- package/engine/object-data/entry/buff-type/applicable.lua +5 -0
- package/engine/object-data/entry/buff-type.d.ts +5 -11
- package/engine/object-data/entry/buff-type.lua +11 -27
- package/engine/object-data/entry/unit-type.d.ts +13 -4
- package/engine/object-data/entry/unit-type.lua +153 -85
- package/engine/object-field/ability.d.ts +4 -4
- package/engine/object-field/ability.lua +7 -6
- package/engine/object-field/unit.d.ts +57 -3
- package/engine/object-field/unit.lua +207 -7
- package/engine/object-field.d.ts +17 -6
- package/engine/object-field.lua +188 -92
- package/engine/random.d.ts +9 -0
- package/engine/random.lua +13 -0
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- 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 +1 -0
- package/engine/unit.lua +1 -0
- package/objutil/buff.lua +2 -3
- package/package.json +2 -2
- package/patch-lualib.lua +1 -1
- package/utility/arrays.d.ts +2 -0
- package/utility/arrays.lua +11 -0
- package/utility/callback-array.d.ts +17 -0
- package/utility/callback-array.lua +61 -0
- package/utility/functions.d.ts +8 -0
- package/utility/functions.lua +13 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +3 -0
- package/utility/lua-maps.d.ts +15 -2
- package/utility/lua-maps.lua +53 -2
- package/utility/lua-sets.d.ts +2 -0
- package/utility/lua-sets.lua +7 -0
- package/utility/types.d.ts +3 -0
- package/core/types/order.d.ts +0 -25
- package/core/types/order.lua +0 -55
|
@@ -6,6 +6,8 @@ local __TS__SetDescriptor = ____lualib.__TS__SetDescriptor
|
|
|
6
6
|
local ____exports = {}
|
|
7
7
|
local ____arrays = require("utility.arrays")
|
|
8
8
|
local array = ____arrays.array
|
|
9
|
+
local ____reflection = require("utility.reflection")
|
|
10
|
+
local implementReadonlyNumberIndexSupplier = ____reflection.implementReadonlyNumberIndexSupplier
|
|
9
11
|
local ____entry = require("engine.object-data.entry")
|
|
10
12
|
local ObjectDataEntry = ____entry.ObjectDataEntry
|
|
11
13
|
local ____object_2Ddata_2Dentry_2Did_2Dgenerator = require("engine.object-data.utility.object-data-entry-id-generator")
|
|
@@ -285,32 +287,14 @@ __TS__SetDescriptor(
|
|
|
285
287
|
},
|
|
286
288
|
true
|
|
287
289
|
)
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
AvatarBuffType.name = "AvatarBuffType"
|
|
298
|
-
__TS__ClassExtends(
|
|
299
|
-
AvatarBuffType,
|
|
300
|
-
makeBaseBuffType(fourCC("BHav"))
|
|
301
|
-
)
|
|
302
|
-
____exports.DevotionAuraBuffType = __TS__Class()
|
|
303
|
-
local DevotionAuraBuffType = ____exports.DevotionAuraBuffType
|
|
304
|
-
DevotionAuraBuffType.name = "DevotionAuraBuffType"
|
|
305
|
-
__TS__ClassExtends(
|
|
306
|
-
DevotionAuraBuffType,
|
|
307
|
-
makeBaseBuffType(fourCC("BHad"))
|
|
308
|
-
)
|
|
309
|
-
____exports.DivineShieldBuffType = __TS__Class()
|
|
310
|
-
local DivineShieldBuffType = ____exports.DivineShieldBuffType
|
|
311
|
-
DivineShieldBuffType.name = "DivineShieldBuffType"
|
|
312
|
-
__TS__ClassExtends(
|
|
313
|
-
DivineShieldBuffType,
|
|
314
|
-
makeBaseBuffType(fourCC("BHds"))
|
|
290
|
+
implementReadonlyNumberIndexSupplier(
|
|
291
|
+
____exports.BuffType,
|
|
292
|
+
function(id)
|
|
293
|
+
local ____class_0 = __TS__Class()
|
|
294
|
+
____class_0.name = ____class_0.name
|
|
295
|
+
__TS__ClassExtends(____class_0, ____exports.BuffType)
|
|
296
|
+
____class_0.BASE_ID = id
|
|
297
|
+
return ____class_0
|
|
298
|
+
end
|
|
315
299
|
)
|
|
316
300
|
return ____exports
|
|
@@ -13,6 +13,7 @@ import type { AbilityTypeId } from "./ability-type";
|
|
|
13
13
|
import type { UpgradeId } from "./upgrade";
|
|
14
14
|
import { AnimationQualifier } from "../auxiliary/animation-qualifier";
|
|
15
15
|
import { AttackType } from "../auxiliary/attack-type";
|
|
16
|
+
import { ArmorType } from "../auxiliary/armor-type";
|
|
16
17
|
export type UnitTypeId = ObjectDataEntryId & number & {
|
|
17
18
|
readonly __unitTypeId: unique symbol;
|
|
18
19
|
};
|
|
@@ -23,8 +24,8 @@ export declare class UnitTypeWeapon {
|
|
|
23
24
|
private readonly unitType;
|
|
24
25
|
private readonly index;
|
|
25
26
|
private constructor();
|
|
26
|
-
get attackType(): AttackType;
|
|
27
|
-
set attackType(attackType: AttackType);
|
|
27
|
+
get attackType(): AttackType | undefined;
|
|
28
|
+
set attackType(attackType: AttackType | undefined);
|
|
28
29
|
get backSwingDuration(): number;
|
|
29
30
|
set backSwingDuration(backSwingDuration: number);
|
|
30
31
|
get cooldown(): number;
|
|
@@ -144,6 +145,8 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
|
|
|
144
145
|
set runSpeedSD(runSpeedSD: number);
|
|
145
146
|
get runSpeedHD(): number;
|
|
146
147
|
set runSpeedHD(runSpeedHD: number);
|
|
148
|
+
get selectionCircleHeight(): number;
|
|
149
|
+
set selectionCircleHeight(height: number);
|
|
147
150
|
get selectionCircleScale(): number;
|
|
148
151
|
set selectionCircleScale(selectionCircleScale: number);
|
|
149
152
|
get selectionCircleScaleSD(): number;
|
|
@@ -182,16 +185,20 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
|
|
|
182
185
|
set walkSpeedSD(walkSpeedSD: number);
|
|
183
186
|
get walkSpeedHD(): number;
|
|
184
187
|
set walkSpeedHD(walkSpeedHD: number);
|
|
188
|
+
get armor(): number;
|
|
189
|
+
set armor(armor: number);
|
|
185
190
|
get armorSoundType(): ArmorSoundType;
|
|
186
191
|
set armorSoundType(armorSoundType: ArmorSoundType);
|
|
187
192
|
get armorSoundTypeSD(): ArmorSoundType;
|
|
188
193
|
set armorSoundTypeSD(armorSoundTypeSD: ArmorSoundType);
|
|
189
194
|
get armorSoundTypeHD(): ArmorSoundType;
|
|
190
195
|
set armorSoundTypeHD(armorSoundTypeHD: ArmorSoundType);
|
|
196
|
+
get armorType(): ArmorType;
|
|
197
|
+
set armorType(armorType: ArmorType);
|
|
191
198
|
get combatClassifications(): CombatClassifications;
|
|
192
199
|
set combatClassifications(combatClassifications: CombatClassifications);
|
|
193
|
-
get
|
|
194
|
-
set
|
|
200
|
+
get classifications(): UnitClassifications;
|
|
201
|
+
set classifications(unitClassifications: UnitClassifications);
|
|
195
202
|
get weapons(): TupleOf<UnitTypeWeapon, 2>;
|
|
196
203
|
get firstWeapon(): UnitTypeWeapon;
|
|
197
204
|
get secondWeapon(): UnitTypeWeapon;
|
|
@@ -225,6 +232,8 @@ export declare abstract class UnitType<Id extends UnitTypeId = UnitTypeId> exten
|
|
|
225
232
|
set goldCost(goldCost: number);
|
|
226
233
|
get healthRegenerationRate(): number;
|
|
227
234
|
set healthRegenerationRate(healthRegenerationRate: number);
|
|
235
|
+
get level(): number;
|
|
236
|
+
set level(level: number);
|
|
228
237
|
get manaRegenerationRate(): number;
|
|
229
238
|
set manaRegenerationRate(manaRegenerationRate: number);
|
|
230
239
|
get maximumHealth(): number;
|
|
@@ -12,6 +12,9 @@ local implementReadonlyNumberIndexSupplier = ____reflection.implementReadonlyNum
|
|
|
12
12
|
local ____combat_2Dclassification = require("engine.object-data.auxiliary.combat-classification")
|
|
13
13
|
local combatClassificationsToStringArray = ____combat_2Dclassification.combatClassificationsToStringArray
|
|
14
14
|
local stringArrayToCombatClassifications = ____combat_2Dclassification.stringArrayToCombatClassifications
|
|
15
|
+
local ____movement_2Dtype = require("engine.object-data.auxiliary.movement-type")
|
|
16
|
+
local movementTypeToString = ____movement_2Dtype.movementTypeToString
|
|
17
|
+
local stringToMovementType = ____movement_2Dtype.stringToMovementType
|
|
15
18
|
local ____unit_2Dclassification = require("engine.object-data.auxiliary.unit-classification")
|
|
16
19
|
local stringArrayToUnitClassifications = ____unit_2Dclassification.stringArrayToUnitClassifications
|
|
17
20
|
local unitClassificationsToStringArray = ____unit_2Dclassification.unitClassificationsToStringArray
|
|
@@ -19,8 +22,14 @@ local ____entry = require("engine.object-data.entry")
|
|
|
19
22
|
local ObjectDataEntry = ____entry.ObjectDataEntry
|
|
20
23
|
local ____object_2Ddata_2Dentry_2Did_2Dgenerator = require("engine.object-data.utility.object-data-entry-id-generator")
|
|
21
24
|
local ObjectDataEntryIdGenerator = ____object_2Ddata_2Dentry_2Did_2Dgenerator.ObjectDataEntryIdGenerator
|
|
25
|
+
local ____attack_2Dtype = require("engine.object-data.auxiliary.attack-type")
|
|
26
|
+
local attackTypeToString = ____attack_2Dtype.attackTypeToString
|
|
27
|
+
local stringToAttackType = ____attack_2Dtype.stringToAttackType
|
|
22
28
|
local ____config = require("config")
|
|
23
29
|
local WarscriptConfig = ____config.WarscriptConfig
|
|
30
|
+
local ____armor_2Dtype = require("engine.object-data.auxiliary.armor-type")
|
|
31
|
+
local armorTypeToString = ____armor_2Dtype.armorTypeToString
|
|
32
|
+
local stringToArmorType = ____armor_2Dtype.stringToArmorType
|
|
24
33
|
local getOrCreateUnitTypeWeapons
|
|
25
34
|
____exports.UnitTypeWeapon = __TS__Class()
|
|
26
35
|
local UnitTypeWeapon = ____exports.UnitTypeWeapon
|
|
@@ -34,18 +43,19 @@ __TS__SetDescriptor(
|
|
|
34
43
|
"attackType",
|
|
35
44
|
{
|
|
36
45
|
get = function(self)
|
|
46
|
+
local ____stringToAttackType_1 = stringToAttackType
|
|
37
47
|
local ____self_0 = self.unitType
|
|
38
|
-
return ____self_0.getStringField(
|
|
48
|
+
return ____stringToAttackType_1(____self_0.getStringField(
|
|
39
49
|
____self_0,
|
|
40
50
|
("ua" .. tostring(self.index)) .. "t"
|
|
41
|
-
)
|
|
51
|
+
))
|
|
42
52
|
end,
|
|
43
53
|
set = function(self, attackType)
|
|
44
|
-
local
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
local ____self_2 = self.unitType
|
|
55
|
+
____self_2.setStringField(
|
|
56
|
+
____self_2,
|
|
47
57
|
("ua" .. tostring(self.index)) .. "t",
|
|
48
|
-
attackType
|
|
58
|
+
attackTypeToString(attackType)
|
|
49
59
|
)
|
|
50
60
|
end
|
|
51
61
|
},
|
|
@@ -56,16 +66,16 @@ __TS__SetDescriptor(
|
|
|
56
66
|
"backSwingDuration",
|
|
57
67
|
{
|
|
58
68
|
get = function(self)
|
|
59
|
-
local
|
|
60
|
-
return
|
|
61
|
-
|
|
69
|
+
local ____self_3 = self.unitType
|
|
70
|
+
return ____self_3.getNumberField(
|
|
71
|
+
____self_3,
|
|
62
72
|
"ubs" .. tostring(self.index)
|
|
63
73
|
)
|
|
64
74
|
end,
|
|
65
75
|
set = function(self, backSwingDuration)
|
|
66
|
-
local
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
local ____self_4 = self.unitType
|
|
77
|
+
____self_4.setNumberField(
|
|
78
|
+
____self_4,
|
|
69
79
|
"ubs" .. tostring(self.index),
|
|
70
80
|
backSwingDuration
|
|
71
81
|
)
|
|
@@ -78,16 +88,16 @@ __TS__SetDescriptor(
|
|
|
78
88
|
"cooldown",
|
|
79
89
|
{
|
|
80
90
|
get = function(self)
|
|
81
|
-
local
|
|
82
|
-
return
|
|
83
|
-
|
|
91
|
+
local ____self_5 = self.unitType
|
|
92
|
+
return ____self_5.getNumberField(
|
|
93
|
+
____self_5,
|
|
84
94
|
("ua" .. tostring(self.index)) .. "c"
|
|
85
95
|
)
|
|
86
96
|
end,
|
|
87
97
|
set = function(self, cooldown)
|
|
88
|
-
local
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
local ____self_6 = self.unitType
|
|
99
|
+
____self_6.setNumberField(
|
|
100
|
+
____self_6,
|
|
91
101
|
("ua" .. tostring(self.index)) .. "c",
|
|
92
102
|
cooldown
|
|
93
103
|
)
|
|
@@ -121,16 +131,16 @@ __TS__SetDescriptor(
|
|
|
121
131
|
"damageBase",
|
|
122
132
|
{
|
|
123
133
|
get = function(self)
|
|
124
|
-
local
|
|
125
|
-
return
|
|
126
|
-
|
|
134
|
+
local ____self_7 = self.unitType
|
|
135
|
+
return ____self_7.getNumberField(
|
|
136
|
+
____self_7,
|
|
127
137
|
("ua" .. tostring(self.index)) .. "b"
|
|
128
138
|
)
|
|
129
139
|
end,
|
|
130
140
|
set = function(self, damageBase)
|
|
131
|
-
local
|
|
132
|
-
|
|
133
|
-
|
|
141
|
+
local ____self_8 = self.unitType
|
|
142
|
+
____self_8.setNumberField(
|
|
143
|
+
____self_8,
|
|
134
144
|
("ua" .. tostring(self.index)) .. "b",
|
|
135
145
|
damageBase
|
|
136
146
|
)
|
|
@@ -143,16 +153,16 @@ __TS__SetDescriptor(
|
|
|
143
153
|
"damageDiceCount",
|
|
144
154
|
{
|
|
145
155
|
get = function(self)
|
|
146
|
-
local
|
|
147
|
-
return
|
|
148
|
-
|
|
156
|
+
local ____self_9 = self.unitType
|
|
157
|
+
return ____self_9.getNumberField(
|
|
158
|
+
____self_9,
|
|
149
159
|
("ua" .. tostring(self.index)) .. "d"
|
|
150
160
|
)
|
|
151
161
|
end,
|
|
152
162
|
set = function(self, damageDiceNumber)
|
|
153
|
-
local
|
|
154
|
-
|
|
155
|
-
|
|
163
|
+
local ____self_10 = self.unitType
|
|
164
|
+
____self_10.setNumberField(
|
|
165
|
+
____self_10,
|
|
156
166
|
("ua" .. tostring(self.index)) .. "d",
|
|
157
167
|
damageDiceNumber
|
|
158
168
|
)
|
|
@@ -165,16 +175,16 @@ __TS__SetDescriptor(
|
|
|
165
175
|
"damageDiceSideCount",
|
|
166
176
|
{
|
|
167
177
|
get = function(self)
|
|
168
|
-
local
|
|
169
|
-
return
|
|
170
|
-
|
|
178
|
+
local ____self_11 = self.unitType
|
|
179
|
+
return ____self_11.getNumberField(
|
|
180
|
+
____self_11,
|
|
171
181
|
("ua" .. tostring(self.index)) .. "s"
|
|
172
182
|
)
|
|
173
183
|
end,
|
|
174
184
|
set = function(self, damageDiceSideCount)
|
|
175
|
-
local
|
|
176
|
-
|
|
177
|
-
|
|
185
|
+
local ____self_12 = self.unitType
|
|
186
|
+
____self_12.setNumberField(
|
|
187
|
+
____self_12,
|
|
178
188
|
("ua" .. tostring(self.index)) .. "s",
|
|
179
189
|
damageDiceSideCount
|
|
180
190
|
)
|
|
@@ -187,16 +197,16 @@ __TS__SetDescriptor(
|
|
|
187
197
|
"impactDelay",
|
|
188
198
|
{
|
|
189
199
|
get = function(self)
|
|
190
|
-
local
|
|
191
|
-
return
|
|
192
|
-
|
|
200
|
+
local ____self_13 = self.unitType
|
|
201
|
+
return ____self_13.getNumberField(
|
|
202
|
+
____self_13,
|
|
193
203
|
"udp" .. tostring(self.index)
|
|
194
204
|
)
|
|
195
205
|
end,
|
|
196
206
|
set = function(self, impactDelay)
|
|
197
|
-
local
|
|
198
|
-
|
|
199
|
-
|
|
207
|
+
local ____self_14 = self.unitType
|
|
208
|
+
____self_14.setNumberField(
|
|
209
|
+
____self_14,
|
|
200
210
|
"udp" .. tostring(self.index),
|
|
201
211
|
impactDelay
|
|
202
212
|
)
|
|
@@ -209,16 +219,16 @@ __TS__SetDescriptor(
|
|
|
209
219
|
"missileModelPath",
|
|
210
220
|
{
|
|
211
221
|
get = function(self)
|
|
212
|
-
local
|
|
213
|
-
return
|
|
214
|
-
|
|
222
|
+
local ____self_15 = self.unitType
|
|
223
|
+
return ____self_15.getStringField(
|
|
224
|
+
____self_15,
|
|
215
225
|
("ua" .. tostring(self.index)) .. "m"
|
|
216
226
|
)
|
|
217
227
|
end,
|
|
218
228
|
set = function(self, missileModelPath)
|
|
219
|
-
local
|
|
220
|
-
|
|
221
|
-
|
|
229
|
+
local ____self_16 = self.unitType
|
|
230
|
+
____self_16.setStringField(
|
|
231
|
+
____self_16,
|
|
222
232
|
("ua" .. tostring(self.index)) .. "m",
|
|
223
233
|
missileModelPath
|
|
224
234
|
)
|
|
@@ -231,16 +241,16 @@ __TS__SetDescriptor(
|
|
|
231
241
|
"range",
|
|
232
242
|
{
|
|
233
243
|
get = function(self)
|
|
234
|
-
local
|
|
235
|
-
return
|
|
236
|
-
|
|
244
|
+
local ____self_17 = self.unitType
|
|
245
|
+
return ____self_17.getNumberField(
|
|
246
|
+
____self_17,
|
|
237
247
|
("ua" .. tostring(self.index)) .. "r"
|
|
238
248
|
)
|
|
239
249
|
end,
|
|
240
250
|
set = function(self, range)
|
|
241
|
-
local
|
|
242
|
-
|
|
243
|
-
|
|
251
|
+
local ____self_18 = self.unitType
|
|
252
|
+
____self_18.setNumberField(
|
|
253
|
+
____self_18,
|
|
244
254
|
("ua" .. tostring(self.index)) .. "r",
|
|
245
255
|
range
|
|
246
256
|
)
|
|
@@ -253,16 +263,16 @@ __TS__SetDescriptor(
|
|
|
253
263
|
"soundType",
|
|
254
264
|
{
|
|
255
265
|
get = function(self)
|
|
256
|
-
local
|
|
257
|
-
return
|
|
258
|
-
|
|
266
|
+
local ____self_19 = self.unitType
|
|
267
|
+
return ____self_19.getStringField(
|
|
268
|
+
____self_19,
|
|
259
269
|
"ucs" .. tostring(self.index)
|
|
260
270
|
)
|
|
261
271
|
end,
|
|
262
272
|
set = function(self, soundType)
|
|
263
|
-
local
|
|
264
|
-
|
|
265
|
-
|
|
273
|
+
local ____self_20 = self.unitType
|
|
274
|
+
____self_20.setStringField(
|
|
275
|
+
____self_20,
|
|
266
276
|
"ucs" .. tostring(self.index),
|
|
267
277
|
soundType
|
|
268
278
|
)
|
|
@@ -275,16 +285,16 @@ __TS__SetDescriptor(
|
|
|
275
285
|
"soundTypeSD",
|
|
276
286
|
{
|
|
277
287
|
get = function(self)
|
|
278
|
-
local
|
|
279
|
-
return
|
|
280
|
-
|
|
288
|
+
local ____self_21 = self.unitType
|
|
289
|
+
return ____self_21.getStringField(
|
|
290
|
+
____self_21,
|
|
281
291
|
("ucs" .. tostring(self.index)) .. ":sd"
|
|
282
292
|
)
|
|
283
293
|
end,
|
|
284
294
|
set = function(self, soundTypeSD)
|
|
285
|
-
local
|
|
286
|
-
|
|
287
|
-
|
|
295
|
+
local ____self_22 = self.unitType
|
|
296
|
+
____self_22.setStringField(
|
|
297
|
+
____self_22,
|
|
288
298
|
("ucs" .. tostring(self.index)) .. ":sd",
|
|
289
299
|
soundTypeSD
|
|
290
300
|
)
|
|
@@ -297,16 +307,16 @@ __TS__SetDescriptor(
|
|
|
297
307
|
"soundTypeHD",
|
|
298
308
|
{
|
|
299
309
|
get = function(self)
|
|
300
|
-
local
|
|
301
|
-
return
|
|
302
|
-
|
|
310
|
+
local ____self_23 = self.unitType
|
|
311
|
+
return ____self_23.getStringField(
|
|
312
|
+
____self_23,
|
|
303
313
|
("ucs" .. tostring(self.index)) .. ":hd"
|
|
304
314
|
)
|
|
305
315
|
end,
|
|
306
316
|
set = function(self, soundTypeHD)
|
|
307
|
-
local
|
|
308
|
-
|
|
309
|
-
|
|
317
|
+
local ____self_24 = self.unitType
|
|
318
|
+
____self_24.setStringField(
|
|
319
|
+
____self_24,
|
|
310
320
|
("ucs" .. tostring(self.index)) .. ":hd",
|
|
311
321
|
soundTypeHD
|
|
312
322
|
)
|
|
@@ -929,6 +939,19 @@ __TS__SetDescriptor(
|
|
|
929
939
|
},
|
|
930
940
|
true
|
|
931
941
|
)
|
|
942
|
+
__TS__SetDescriptor(
|
|
943
|
+
UnitType.prototype,
|
|
944
|
+
"selectionCircleHeight",
|
|
945
|
+
{
|
|
946
|
+
get = function(self)
|
|
947
|
+
return self:getNumberField("uslz")
|
|
948
|
+
end,
|
|
949
|
+
set = function(self, height)
|
|
950
|
+
self:setNumberField("uslz", height)
|
|
951
|
+
end
|
|
952
|
+
},
|
|
953
|
+
true
|
|
954
|
+
)
|
|
932
955
|
__TS__SetDescriptor(
|
|
933
956
|
UnitType.prototype,
|
|
934
957
|
"selectionCircleScale",
|
|
@@ -1176,6 +1199,19 @@ __TS__SetDescriptor(
|
|
|
1176
1199
|
},
|
|
1177
1200
|
true
|
|
1178
1201
|
)
|
|
1202
|
+
__TS__SetDescriptor(
|
|
1203
|
+
UnitType.prototype,
|
|
1204
|
+
"armor",
|
|
1205
|
+
{
|
|
1206
|
+
get = function(self)
|
|
1207
|
+
return self:getNumberField("udef")
|
|
1208
|
+
end,
|
|
1209
|
+
set = function(self, armor)
|
|
1210
|
+
self:setNumberField("udef", armor)
|
|
1211
|
+
end
|
|
1212
|
+
},
|
|
1213
|
+
true
|
|
1214
|
+
)
|
|
1179
1215
|
__TS__SetDescriptor(
|
|
1180
1216
|
UnitType.prototype,
|
|
1181
1217
|
"armorSoundType",
|
|
@@ -1215,6 +1251,22 @@ __TS__SetDescriptor(
|
|
|
1215
1251
|
},
|
|
1216
1252
|
true
|
|
1217
1253
|
)
|
|
1254
|
+
__TS__SetDescriptor(
|
|
1255
|
+
UnitType.prototype,
|
|
1256
|
+
"armorType",
|
|
1257
|
+
{
|
|
1258
|
+
get = function(self)
|
|
1259
|
+
return stringToArmorType(self:getStringField("udty"))
|
|
1260
|
+
end,
|
|
1261
|
+
set = function(self, armorType)
|
|
1262
|
+
self:setStringField(
|
|
1263
|
+
"udty",
|
|
1264
|
+
armorTypeToString(armorType)
|
|
1265
|
+
)
|
|
1266
|
+
end
|
|
1267
|
+
},
|
|
1268
|
+
true
|
|
1269
|
+
)
|
|
1218
1270
|
__TS__SetDescriptor(
|
|
1219
1271
|
UnitType.prototype,
|
|
1220
1272
|
"combatClassifications",
|
|
@@ -1233,7 +1285,7 @@ __TS__SetDescriptor(
|
|
|
1233
1285
|
)
|
|
1234
1286
|
__TS__SetDescriptor(
|
|
1235
1287
|
UnitType.prototype,
|
|
1236
|
-
"
|
|
1288
|
+
"classifications",
|
|
1237
1289
|
{
|
|
1238
1290
|
get = function(self)
|
|
1239
1291
|
return stringArrayToUnitClassifications(self:getStringsField("utyp"))
|
|
@@ -1341,10 +1393,13 @@ __TS__SetDescriptor(
|
|
|
1341
1393
|
"movementType",
|
|
1342
1394
|
{
|
|
1343
1395
|
get = function(self)
|
|
1344
|
-
return self:getStringField("umvt")
|
|
1396
|
+
return stringToMovementType(self:getStringField("umvt"))
|
|
1345
1397
|
end,
|
|
1346
1398
|
set = function(self, movementType)
|
|
1347
|
-
self:setStringField(
|
|
1399
|
+
self:setStringField(
|
|
1400
|
+
"umvt",
|
|
1401
|
+
movementTypeToString(movementType)
|
|
1402
|
+
)
|
|
1348
1403
|
end
|
|
1349
1404
|
},
|
|
1350
1405
|
true
|
|
@@ -1466,6 +1521,19 @@ __TS__SetDescriptor(
|
|
|
1466
1521
|
},
|
|
1467
1522
|
true
|
|
1468
1523
|
)
|
|
1524
|
+
__TS__SetDescriptor(
|
|
1525
|
+
UnitType.prototype,
|
|
1526
|
+
"level",
|
|
1527
|
+
{
|
|
1528
|
+
get = function(self)
|
|
1529
|
+
return self:getNumberField("ulev")
|
|
1530
|
+
end,
|
|
1531
|
+
set = function(self, level)
|
|
1532
|
+
self:setNumberField("ulev", level)
|
|
1533
|
+
end
|
|
1534
|
+
},
|
|
1535
|
+
true
|
|
1536
|
+
)
|
|
1469
1537
|
__TS__SetDescriptor(
|
|
1470
1538
|
UnitType.prototype,
|
|
1471
1539
|
"manaRegenerationRate",
|
|
@@ -1612,11 +1680,11 @@ __TS__SetDescriptor(
|
|
|
1612
1680
|
implementReadonlyNumberIndexSupplier(
|
|
1613
1681
|
____exports.UnitType,
|
|
1614
1682
|
function(id)
|
|
1615
|
-
local
|
|
1616
|
-
|
|
1617
|
-
__TS__ClassExtends(
|
|
1618
|
-
|
|
1619
|
-
return
|
|
1683
|
+
local ____class_25 = __TS__Class()
|
|
1684
|
+
____class_25.name = ____class_25.name
|
|
1685
|
+
__TS__ClassExtends(____class_25, ____exports.UnitType)
|
|
1686
|
+
____class_25.BASE_ID = id
|
|
1687
|
+
return ____class_25
|
|
1620
1688
|
end
|
|
1621
1689
|
)
|
|
1622
1690
|
____exports.HeroUnitType = __TS__Class()
|
|
@@ -1677,11 +1745,11 @@ __TS__SetDescriptor(
|
|
|
1677
1745
|
implementReadonlyNumberIndexSupplier(
|
|
1678
1746
|
____exports.HeroUnitType,
|
|
1679
1747
|
function(id)
|
|
1680
|
-
local
|
|
1681
|
-
|
|
1682
|
-
__TS__ClassExtends(
|
|
1683
|
-
|
|
1684
|
-
return
|
|
1748
|
+
local ____class_26 = __TS__Class()
|
|
1749
|
+
____class_26.name = ____class_26.name
|
|
1750
|
+
__TS__ClassExtends(____class_26, ____exports.HeroUnitType)
|
|
1751
|
+
____class_26.BASE_ID = id
|
|
1752
|
+
return ____class_26
|
|
1685
1753
|
end
|
|
1686
1754
|
)
|
|
1687
1755
|
return ____exports
|
|
@@ -12,7 +12,7 @@ import { ReadonlyNonEmptyLinkedSet } from "../../utility/linked-set";
|
|
|
12
12
|
export declare abstract class AbilityField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType extends jabilityfield = jabilityfield> extends ObjectField<AbilityType, Ability, ValueType, NativeFieldType> {
|
|
13
13
|
protected get instanceClass(): typeof Ability;
|
|
14
14
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
15
|
-
protected hasNativeFieldValue(
|
|
15
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
16
16
|
static get valueChangeEvent(): ObjectFieldValueChangeEvent<ReadonlyObjectFieldType<AbilityField>>;
|
|
17
17
|
}
|
|
18
18
|
export declare class AbilityBooleanField extends AbilityField<boolean, jabilitybooleanfield> {
|
|
@@ -48,7 +48,7 @@ export declare class AbilityStringField extends AbilityField<string, jabilitystr
|
|
|
48
48
|
export declare abstract class AbilityArrayField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType extends jabilityfield = jabilityfield> extends ObjectArrayField<AbilityType, Ability, ValueType, NativeFieldType> {
|
|
49
49
|
protected get instanceClass(): typeof Ability;
|
|
50
50
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
51
|
-
protected hasNativeFieldValue(
|
|
51
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
52
52
|
}
|
|
53
53
|
export declare class AbilityStringArrayField extends AbilityArrayField<string, jabilitystringlevelfield> {
|
|
54
54
|
protected get defaultValue(): string;
|
|
@@ -68,7 +68,7 @@ export declare abstract class AbilityLevelField<ValueType extends number | strin
|
|
|
68
68
|
protected get instanceClass(): typeof Ability;
|
|
69
69
|
protected getLevelCount(entry: AbilityType | Ability): number;
|
|
70
70
|
protected getObjectDataEntryId(instance: Ability): AbilityTypeId;
|
|
71
|
-
protected hasNativeFieldValue(
|
|
71
|
+
protected hasNativeFieldValue(abilityTypeId: AbilityTypeId): boolean;
|
|
72
72
|
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<ReadonlyObjectLevelFieldType<AbilityLevelField>>;
|
|
73
73
|
}
|
|
74
74
|
export declare class AbilityBooleanLevelField extends AbilityLevelField<boolean, boolean, jabilityintegerlevelfield> {
|
|
@@ -117,7 +117,7 @@ export declare abstract class AbilityEnumLevelField<T extends number> extends Ab
|
|
|
117
117
|
protected getNativeFieldById(id: number): jabilityintegerlevelfield;
|
|
118
118
|
protected getNativeFieldValue(instance: Ability, level: number): T;
|
|
119
119
|
protected setNativeFieldValue(instance: Ability, level: number, value: T): boolean;
|
|
120
|
-
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<
|
|
120
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<AbilityEnumLevelField<number>>;
|
|
121
121
|
}
|
|
122
122
|
export declare class AbilityBuffPolarityLevelField extends AbilityEnumLevelField<BuffPolarity> {
|
|
123
123
|
protected values: ReadonlyNonEmptyLinkedSet<BuffPolarity>;
|
|
@@ -7,6 +7,7 @@ local __TS__InstanceOf = ____lualib.__TS__InstanceOf
|
|
|
7
7
|
local ____exports = {}
|
|
8
8
|
local ____ability = require("engine.internal.ability")
|
|
9
9
|
local Ability = ____ability.Ability
|
|
10
|
+
local abilityTypeHasField = ____ability.abilityTypeHasField
|
|
10
11
|
local ____object_2Dfield = require("engine.object-field")
|
|
11
12
|
local ObjectArrayField = ____object_2Dfield.ObjectArrayField
|
|
12
13
|
local ObjectField = ____object_2Dfield.ObjectField
|
|
@@ -29,8 +30,8 @@ __TS__ClassExtends(AbilityField, ObjectField)
|
|
|
29
30
|
function AbilityField.prototype.getObjectDataEntryId(self, instance)
|
|
30
31
|
return instance.typeId
|
|
31
32
|
end
|
|
32
|
-
function AbilityField.prototype.hasNativeFieldValue(self,
|
|
33
|
-
return
|
|
33
|
+
function AbilityField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
34
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
34
35
|
end
|
|
35
36
|
__TS__SetDescriptor(
|
|
36
37
|
AbilityField.prototype,
|
|
@@ -197,8 +198,8 @@ __TS__ClassExtends(AbilityArrayField, ObjectArrayField)
|
|
|
197
198
|
function AbilityArrayField.prototype.getObjectDataEntryId(self, instance)
|
|
198
199
|
return instance.typeId
|
|
199
200
|
end
|
|
200
|
-
function AbilityArrayField.prototype.hasNativeFieldValue(self,
|
|
201
|
-
return
|
|
201
|
+
function AbilityArrayField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
202
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
202
203
|
end
|
|
203
204
|
__TS__SetDescriptor(
|
|
204
205
|
AbilityArrayField.prototype,
|
|
@@ -269,8 +270,8 @@ end
|
|
|
269
270
|
function AbilityLevelField.prototype.getObjectDataEntryId(self, instance)
|
|
270
271
|
return instance.typeId
|
|
271
272
|
end
|
|
272
|
-
function AbilityLevelField.prototype.hasNativeFieldValue(self,
|
|
273
|
-
return
|
|
273
|
+
function AbilityLevelField.prototype.hasNativeFieldValue(self, abilityTypeId)
|
|
274
|
+
return abilityTypeHasField(abilityTypeId, self.nativeField)
|
|
274
275
|
end
|
|
275
276
|
__TS__SetDescriptor(
|
|
276
277
|
AbilityLevelField.prototype,
|