warscript 0.0.1-dev.f1df135 → 0.0.1-dev.f26a113
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/order.d.ts +1 -0
- package/core/types/order.lua +11 -1
- package/core/types/sound.lua +5 -0
- package/decl/native.d.ts +840 -786
- package/engine/behaviour/ability/damage.d.ts +6 -3
- package/engine/behaviour/ability/damage.lua +24 -36
- package/engine/behaviour/ability/emulate-impact.lua +7 -0
- package/engine/behaviour/unit.d.ts +6 -0
- package/engine/behaviour/unit.lua +64 -0
- package/engine/internal/ability.d.ts +2 -0
- package/engine/internal/ability.lua +7 -0
- package/engine/internal/item.d.ts +2 -1
- 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/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.d.ts +16 -3
- package/engine/internal/unit.lua +126 -37
- 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/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/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.lua +7 -0
- 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 +2 -2
- package/engine/object-data/entry/unit-type.lua +94 -84
- package/engine/object-field/ability.d.ts +1 -1
- package/engine/object-field/unit.d.ts +46 -3
- package/engine/object-field/unit.lua +173 -7
- package/engine/object-field.d.ts +9 -1
- package/engine/object-field.lua +158 -76
- package/engine/standard/entries/buff-type.d.ts +3 -0
- package/engine/standard/entries/buff-type.lua +3 -0
- package/objutil/buff.lua +1 -2
- package/package.json +2 -2
- package/utility/arrays.d.ts +1 -0
- package/utility/arrays.lua +3 -0
- package/utility/functions.d.ts +1 -0
- package/utility/functions.lua +1 -0
- package/utility/linked-set.d.ts +1 -0
- package/utility/linked-set.lua +3 -0
- package/utility/lua-maps.d.ts +3 -0
- package/utility/lua-maps.lua +16 -0
- package/utility/lua-sets.d.ts +1 -0
- package/utility/lua-sets.lua +3 -0
|
@@ -3,12 +3,16 @@ import { TupleOf } from "../../../utility/types";
|
|
|
3
3
|
import { AttachmentPreset, AttachmentPresetInput } from "../auxiliary/attachment-preset";
|
|
4
4
|
import { Race } from "../auxiliary/race";
|
|
5
5
|
import { SoundPresetName } from "../auxiliary/sound-preset-name";
|
|
6
|
-
import { ObjectDataEntry, ObjectDataEntryId } from "../entry";
|
|
6
|
+
import { ObjectDataEntry, ObjectDataEntryConstructor, ObjectDataEntryId } from "../entry";
|
|
7
7
|
import { LightningTypeId } from "./lightning-type";
|
|
8
8
|
export type BuffTypeId = ObjectDataEntryId & number & {
|
|
9
9
|
readonly __buffTypeId: unique symbol;
|
|
10
10
|
};
|
|
11
|
+
export type StandardBuffTypeId = BuffTypeId & {
|
|
12
|
+
readonly __standardBuffTypeId: unique symbol;
|
|
13
|
+
};
|
|
11
14
|
export declare abstract class BuffType<Id extends BuffTypeId = BuffTypeId> extends ObjectDataEntry<Id> {
|
|
15
|
+
static readonly [id: StandardBuffTypeId]: ObjectDataEntryConstructor<BuffType>;
|
|
12
16
|
private static readonly idGenerator;
|
|
13
17
|
protected static generateId(): number;
|
|
14
18
|
protected static getObjectData(map: WarMap): WarObjects;
|
|
@@ -51,13 +55,3 @@ export declare abstract class BuffType<Id extends BuffTypeId = BuffTypeId> exten
|
|
|
51
55
|
get tooltipExtendedText(): string;
|
|
52
56
|
set tooltipExtendedText(tooltipText: string);
|
|
53
57
|
}
|
|
54
|
-
declare const AvatarBuffType_base: typeof BuffType;
|
|
55
|
-
export declare class AvatarBuffType extends AvatarBuffType_base {
|
|
56
|
-
}
|
|
57
|
-
declare const DevotionAuraBuffType_base: typeof BuffType;
|
|
58
|
-
export declare class DevotionAuraBuffType extends DevotionAuraBuffType_base {
|
|
59
|
-
}
|
|
60
|
-
declare const DivineShieldBuffType_base: typeof BuffType;
|
|
61
|
-
export declare class DivineShieldBuffType extends DivineShieldBuffType_base {
|
|
62
|
-
}
|
|
63
|
-
export {};
|
|
@@ -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
|
|
@@ -23,8 +23,8 @@ export declare class UnitTypeWeapon {
|
|
|
23
23
|
private readonly unitType;
|
|
24
24
|
private readonly index;
|
|
25
25
|
private constructor();
|
|
26
|
-
get attackType(): AttackType;
|
|
27
|
-
set attackType(attackType: AttackType);
|
|
26
|
+
get attackType(): AttackType | undefined;
|
|
27
|
+
set attackType(attackType: AttackType | undefined);
|
|
28
28
|
get backSwingDuration(): number;
|
|
29
29
|
set backSwingDuration(backSwingDuration: number);
|
|
30
30
|
get cooldown(): 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,6 +22,9 @@ 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
|
|
24
30
|
local getOrCreateUnitTypeWeapons
|
|
@@ -34,18 +40,19 @@ __TS__SetDescriptor(
|
|
|
34
40
|
"attackType",
|
|
35
41
|
{
|
|
36
42
|
get = function(self)
|
|
43
|
+
local ____stringToAttackType_1 = stringToAttackType
|
|
37
44
|
local ____self_0 = self.unitType
|
|
38
|
-
return ____self_0.getStringField(
|
|
45
|
+
return ____stringToAttackType_1(____self_0.getStringField(
|
|
39
46
|
____self_0,
|
|
40
47
|
("ua" .. tostring(self.index)) .. "t"
|
|
41
|
-
)
|
|
48
|
+
))
|
|
42
49
|
end,
|
|
43
50
|
set = function(self, attackType)
|
|
44
|
-
local
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
local ____self_2 = self.unitType
|
|
52
|
+
____self_2.setStringField(
|
|
53
|
+
____self_2,
|
|
47
54
|
("ua" .. tostring(self.index)) .. "t",
|
|
48
|
-
attackType
|
|
55
|
+
attackTypeToString(attackType)
|
|
49
56
|
)
|
|
50
57
|
end
|
|
51
58
|
},
|
|
@@ -56,16 +63,16 @@ __TS__SetDescriptor(
|
|
|
56
63
|
"backSwingDuration",
|
|
57
64
|
{
|
|
58
65
|
get = function(self)
|
|
59
|
-
local
|
|
60
|
-
return
|
|
61
|
-
|
|
66
|
+
local ____self_3 = self.unitType
|
|
67
|
+
return ____self_3.getNumberField(
|
|
68
|
+
____self_3,
|
|
62
69
|
"ubs" .. tostring(self.index)
|
|
63
70
|
)
|
|
64
71
|
end,
|
|
65
72
|
set = function(self, backSwingDuration)
|
|
66
|
-
local
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
local ____self_4 = self.unitType
|
|
74
|
+
____self_4.setNumberField(
|
|
75
|
+
____self_4,
|
|
69
76
|
"ubs" .. tostring(self.index),
|
|
70
77
|
backSwingDuration
|
|
71
78
|
)
|
|
@@ -78,16 +85,16 @@ __TS__SetDescriptor(
|
|
|
78
85
|
"cooldown",
|
|
79
86
|
{
|
|
80
87
|
get = function(self)
|
|
81
|
-
local
|
|
82
|
-
return
|
|
83
|
-
|
|
88
|
+
local ____self_5 = self.unitType
|
|
89
|
+
return ____self_5.getNumberField(
|
|
90
|
+
____self_5,
|
|
84
91
|
("ua" .. tostring(self.index)) .. "c"
|
|
85
92
|
)
|
|
86
93
|
end,
|
|
87
94
|
set = function(self, cooldown)
|
|
88
|
-
local
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
local ____self_6 = self.unitType
|
|
96
|
+
____self_6.setNumberField(
|
|
97
|
+
____self_6,
|
|
91
98
|
("ua" .. tostring(self.index)) .. "c",
|
|
92
99
|
cooldown
|
|
93
100
|
)
|
|
@@ -121,16 +128,16 @@ __TS__SetDescriptor(
|
|
|
121
128
|
"damageBase",
|
|
122
129
|
{
|
|
123
130
|
get = function(self)
|
|
124
|
-
local
|
|
125
|
-
return
|
|
126
|
-
|
|
131
|
+
local ____self_7 = self.unitType
|
|
132
|
+
return ____self_7.getNumberField(
|
|
133
|
+
____self_7,
|
|
127
134
|
("ua" .. tostring(self.index)) .. "b"
|
|
128
135
|
)
|
|
129
136
|
end,
|
|
130
137
|
set = function(self, damageBase)
|
|
131
|
-
local
|
|
132
|
-
|
|
133
|
-
|
|
138
|
+
local ____self_8 = self.unitType
|
|
139
|
+
____self_8.setNumberField(
|
|
140
|
+
____self_8,
|
|
134
141
|
("ua" .. tostring(self.index)) .. "b",
|
|
135
142
|
damageBase
|
|
136
143
|
)
|
|
@@ -143,16 +150,16 @@ __TS__SetDescriptor(
|
|
|
143
150
|
"damageDiceCount",
|
|
144
151
|
{
|
|
145
152
|
get = function(self)
|
|
146
|
-
local
|
|
147
|
-
return
|
|
148
|
-
|
|
153
|
+
local ____self_9 = self.unitType
|
|
154
|
+
return ____self_9.getNumberField(
|
|
155
|
+
____self_9,
|
|
149
156
|
("ua" .. tostring(self.index)) .. "d"
|
|
150
157
|
)
|
|
151
158
|
end,
|
|
152
159
|
set = function(self, damageDiceNumber)
|
|
153
|
-
local
|
|
154
|
-
|
|
155
|
-
|
|
160
|
+
local ____self_10 = self.unitType
|
|
161
|
+
____self_10.setNumberField(
|
|
162
|
+
____self_10,
|
|
156
163
|
("ua" .. tostring(self.index)) .. "d",
|
|
157
164
|
damageDiceNumber
|
|
158
165
|
)
|
|
@@ -165,16 +172,16 @@ __TS__SetDescriptor(
|
|
|
165
172
|
"damageDiceSideCount",
|
|
166
173
|
{
|
|
167
174
|
get = function(self)
|
|
168
|
-
local
|
|
169
|
-
return
|
|
170
|
-
|
|
175
|
+
local ____self_11 = self.unitType
|
|
176
|
+
return ____self_11.getNumberField(
|
|
177
|
+
____self_11,
|
|
171
178
|
("ua" .. tostring(self.index)) .. "s"
|
|
172
179
|
)
|
|
173
180
|
end,
|
|
174
181
|
set = function(self, damageDiceSideCount)
|
|
175
|
-
local
|
|
176
|
-
|
|
177
|
-
|
|
182
|
+
local ____self_12 = self.unitType
|
|
183
|
+
____self_12.setNumberField(
|
|
184
|
+
____self_12,
|
|
178
185
|
("ua" .. tostring(self.index)) .. "s",
|
|
179
186
|
damageDiceSideCount
|
|
180
187
|
)
|
|
@@ -187,16 +194,16 @@ __TS__SetDescriptor(
|
|
|
187
194
|
"impactDelay",
|
|
188
195
|
{
|
|
189
196
|
get = function(self)
|
|
190
|
-
local
|
|
191
|
-
return
|
|
192
|
-
|
|
197
|
+
local ____self_13 = self.unitType
|
|
198
|
+
return ____self_13.getNumberField(
|
|
199
|
+
____self_13,
|
|
193
200
|
"udp" .. tostring(self.index)
|
|
194
201
|
)
|
|
195
202
|
end,
|
|
196
203
|
set = function(self, impactDelay)
|
|
197
|
-
local
|
|
198
|
-
|
|
199
|
-
|
|
204
|
+
local ____self_14 = self.unitType
|
|
205
|
+
____self_14.setNumberField(
|
|
206
|
+
____self_14,
|
|
200
207
|
"udp" .. tostring(self.index),
|
|
201
208
|
impactDelay
|
|
202
209
|
)
|
|
@@ -209,16 +216,16 @@ __TS__SetDescriptor(
|
|
|
209
216
|
"missileModelPath",
|
|
210
217
|
{
|
|
211
218
|
get = function(self)
|
|
212
|
-
local
|
|
213
|
-
return
|
|
214
|
-
|
|
219
|
+
local ____self_15 = self.unitType
|
|
220
|
+
return ____self_15.getStringField(
|
|
221
|
+
____self_15,
|
|
215
222
|
("ua" .. tostring(self.index)) .. "m"
|
|
216
223
|
)
|
|
217
224
|
end,
|
|
218
225
|
set = function(self, missileModelPath)
|
|
219
|
-
local
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
local ____self_16 = self.unitType
|
|
227
|
+
____self_16.setStringField(
|
|
228
|
+
____self_16,
|
|
222
229
|
("ua" .. tostring(self.index)) .. "m",
|
|
223
230
|
missileModelPath
|
|
224
231
|
)
|
|
@@ -231,16 +238,16 @@ __TS__SetDescriptor(
|
|
|
231
238
|
"range",
|
|
232
239
|
{
|
|
233
240
|
get = function(self)
|
|
234
|
-
local
|
|
235
|
-
return
|
|
236
|
-
|
|
241
|
+
local ____self_17 = self.unitType
|
|
242
|
+
return ____self_17.getNumberField(
|
|
243
|
+
____self_17,
|
|
237
244
|
("ua" .. tostring(self.index)) .. "r"
|
|
238
245
|
)
|
|
239
246
|
end,
|
|
240
247
|
set = function(self, range)
|
|
241
|
-
local
|
|
242
|
-
|
|
243
|
-
|
|
248
|
+
local ____self_18 = self.unitType
|
|
249
|
+
____self_18.setNumberField(
|
|
250
|
+
____self_18,
|
|
244
251
|
("ua" .. tostring(self.index)) .. "r",
|
|
245
252
|
range
|
|
246
253
|
)
|
|
@@ -253,16 +260,16 @@ __TS__SetDescriptor(
|
|
|
253
260
|
"soundType",
|
|
254
261
|
{
|
|
255
262
|
get = function(self)
|
|
256
|
-
local
|
|
257
|
-
return
|
|
258
|
-
|
|
263
|
+
local ____self_19 = self.unitType
|
|
264
|
+
return ____self_19.getStringField(
|
|
265
|
+
____self_19,
|
|
259
266
|
"ucs" .. tostring(self.index)
|
|
260
267
|
)
|
|
261
268
|
end,
|
|
262
269
|
set = function(self, soundType)
|
|
263
|
-
local
|
|
264
|
-
|
|
265
|
-
|
|
270
|
+
local ____self_20 = self.unitType
|
|
271
|
+
____self_20.setStringField(
|
|
272
|
+
____self_20,
|
|
266
273
|
"ucs" .. tostring(self.index),
|
|
267
274
|
soundType
|
|
268
275
|
)
|
|
@@ -275,16 +282,16 @@ __TS__SetDescriptor(
|
|
|
275
282
|
"soundTypeSD",
|
|
276
283
|
{
|
|
277
284
|
get = function(self)
|
|
278
|
-
local
|
|
279
|
-
return
|
|
280
|
-
|
|
285
|
+
local ____self_21 = self.unitType
|
|
286
|
+
return ____self_21.getStringField(
|
|
287
|
+
____self_21,
|
|
281
288
|
("ucs" .. tostring(self.index)) .. ":sd"
|
|
282
289
|
)
|
|
283
290
|
end,
|
|
284
291
|
set = function(self, soundTypeSD)
|
|
285
|
-
local
|
|
286
|
-
|
|
287
|
-
|
|
292
|
+
local ____self_22 = self.unitType
|
|
293
|
+
____self_22.setStringField(
|
|
294
|
+
____self_22,
|
|
288
295
|
("ucs" .. tostring(self.index)) .. ":sd",
|
|
289
296
|
soundTypeSD
|
|
290
297
|
)
|
|
@@ -297,16 +304,16 @@ __TS__SetDescriptor(
|
|
|
297
304
|
"soundTypeHD",
|
|
298
305
|
{
|
|
299
306
|
get = function(self)
|
|
300
|
-
local
|
|
301
|
-
return
|
|
302
|
-
|
|
307
|
+
local ____self_23 = self.unitType
|
|
308
|
+
return ____self_23.getStringField(
|
|
309
|
+
____self_23,
|
|
303
310
|
("ucs" .. tostring(self.index)) .. ":hd"
|
|
304
311
|
)
|
|
305
312
|
end,
|
|
306
313
|
set = function(self, soundTypeHD)
|
|
307
|
-
local
|
|
308
|
-
|
|
309
|
-
|
|
314
|
+
local ____self_24 = self.unitType
|
|
315
|
+
____self_24.setStringField(
|
|
316
|
+
____self_24,
|
|
310
317
|
("ucs" .. tostring(self.index)) .. ":hd",
|
|
311
318
|
soundTypeHD
|
|
312
319
|
)
|
|
@@ -1341,10 +1348,13 @@ __TS__SetDescriptor(
|
|
|
1341
1348
|
"movementType",
|
|
1342
1349
|
{
|
|
1343
1350
|
get = function(self)
|
|
1344
|
-
return self:getStringField("umvt")
|
|
1351
|
+
return stringToMovementType(self:getStringField("umvt"))
|
|
1345
1352
|
end,
|
|
1346
1353
|
set = function(self, movementType)
|
|
1347
|
-
self:setStringField(
|
|
1354
|
+
self:setStringField(
|
|
1355
|
+
"umvt",
|
|
1356
|
+
movementTypeToString(movementType)
|
|
1357
|
+
)
|
|
1348
1358
|
end
|
|
1349
1359
|
},
|
|
1350
1360
|
true
|
|
@@ -1612,11 +1622,11 @@ __TS__SetDescriptor(
|
|
|
1612
1622
|
implementReadonlyNumberIndexSupplier(
|
|
1613
1623
|
____exports.UnitType,
|
|
1614
1624
|
function(id)
|
|
1615
|
-
local
|
|
1616
|
-
|
|
1617
|
-
__TS__ClassExtends(
|
|
1618
|
-
|
|
1619
|
-
return
|
|
1625
|
+
local ____class_25 = __TS__Class()
|
|
1626
|
+
____class_25.name = ____class_25.name
|
|
1627
|
+
__TS__ClassExtends(____class_25, ____exports.UnitType)
|
|
1628
|
+
____class_25.BASE_ID = id
|
|
1629
|
+
return ____class_25
|
|
1620
1630
|
end
|
|
1621
1631
|
)
|
|
1622
1632
|
____exports.HeroUnitType = __TS__Class()
|
|
@@ -1677,11 +1687,11 @@ __TS__SetDescriptor(
|
|
|
1677
1687
|
implementReadonlyNumberIndexSupplier(
|
|
1678
1688
|
____exports.HeroUnitType,
|
|
1679
1689
|
function(id)
|
|
1680
|
-
local
|
|
1681
|
-
|
|
1682
|
-
__TS__ClassExtends(
|
|
1683
|
-
|
|
1684
|
-
return
|
|
1690
|
+
local ____class_26 = __TS__Class()
|
|
1691
|
+
____class_26.name = ____class_26.name
|
|
1692
|
+
__TS__ClassExtends(____class_26, ____exports.HeroUnitType)
|
|
1693
|
+
____class_26.BASE_ID = id
|
|
1694
|
+
return ____class_26
|
|
1685
1695
|
end
|
|
1686
1696
|
)
|
|
1687
1697
|
return ____exports
|
|
@@ -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>;
|
|
@@ -1,16 +1,59 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
2
|
import { Unit } from "../internal/unit";
|
|
3
|
-
import { ObjectField } from "../object-field";
|
|
3
|
+
import { ObjectField, ObjectLevelField, ObjectLevelFieldValueChangeEvent, ReadonlyObjectLevelFieldType } from "../object-field";
|
|
4
4
|
import { UnitType, UnitTypeId } from "../object-data/entry/unit-type";
|
|
5
|
+
import { ReadonlyNonEmptyLinkedSet } from "../../utility/linked-set";
|
|
6
|
+
import { AttackType } from "../object-data/auxiliary/attack-type";
|
|
5
7
|
export declare abstract class UnitField<ValueType extends number | string | boolean = number | string | boolean, NativeFieldType = any> extends ObjectField<UnitType, Unit, ValueType, NativeFieldType> {
|
|
6
8
|
protected get instanceClass(): typeof Unit;
|
|
7
9
|
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
10
|
+
protected hasNativeFieldValue(): boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare class UnitBooleanField extends UnitField<boolean, junitbooleanfield> {
|
|
13
|
+
protected get defaultValue(): boolean;
|
|
14
|
+
protected getNativeFieldById(id: number): junitbooleanfield;
|
|
15
|
+
protected getNativeFieldValue(instance: Unit): boolean;
|
|
16
|
+
protected setNativeFieldValue(instance: Unit, value: boolean): boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare class UnitFloatField extends UnitField<number, junitrealfield> {
|
|
19
|
+
protected get defaultValue(): number;
|
|
20
|
+
protected getNativeFieldById(id: number): junitrealfield;
|
|
21
|
+
protected getNativeFieldValue(instance: Unit): number;
|
|
22
|
+
protected setNativeFieldValue(instance: Unit, value: number): boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare class UnitIntegerField extends UnitField<number, junitintegerfield> {
|
|
25
|
+
protected get defaultValue(): number;
|
|
26
|
+
protected getNativeFieldById(id: number): junitintegerfield;
|
|
27
|
+
protected getNativeFieldValue(instance: Unit): number;
|
|
28
|
+
protected setNativeFieldValue(instance: Unit, value: number): boolean;
|
|
8
29
|
}
|
|
9
30
|
export declare class UnitStringField extends UnitField<string, junitstringfield> {
|
|
10
31
|
protected get defaultValue(): string;
|
|
11
32
|
protected getNativeFieldById(id: number): junitstringfield;
|
|
12
|
-
protected hasNativeFieldValue(): boolean;
|
|
13
33
|
protected getNativeFieldValue(instance: Unit): string;
|
|
14
|
-
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
15
34
|
protected setNativeFieldValue(instance: Unit, value: string): boolean;
|
|
16
35
|
}
|
|
36
|
+
type junitweaponfield = junitweaponbooleanfield | junitweaponintegerfield | junitweaponrealfield | junitweaponstringfield;
|
|
37
|
+
export declare abstract class UnitWeaponField<ValueType extends number | string | boolean = number | string | boolean, InputValueType extends ValueType = never, NativeFieldType extends junitweaponfield = junitweaponfield> extends ObjectLevelField<UnitType, Unit, ValueType, InputValueType, NativeFieldType> {
|
|
38
|
+
protected get instanceClass(): typeof Unit;
|
|
39
|
+
protected getLevelCount(): number;
|
|
40
|
+
protected getObjectDataEntryId(instance: Unit): UnitTypeId;
|
|
41
|
+
protected hasNativeFieldValue(): boolean;
|
|
42
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<ReadonlyObjectLevelFieldType<UnitWeaponField>>;
|
|
43
|
+
}
|
|
44
|
+
export declare abstract class UnitNumberWeaponField<NativeFieldType extends junitweaponintegerfield | junitweaponrealfield = junitweaponintegerfield | junitweaponrealfield> extends UnitWeaponField<number, number, NativeFieldType> {
|
|
45
|
+
protected get defaultValue(): number;
|
|
46
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<UnitNumberWeaponField>;
|
|
47
|
+
}
|
|
48
|
+
export declare abstract class UnitEnumWeaponField<T extends number> extends UnitWeaponField<T, T, junitweaponintegerfield> {
|
|
49
|
+
protected abstract values: ReadonlyNonEmptyLinkedSet<T>;
|
|
50
|
+
protected get defaultValue(): T;
|
|
51
|
+
protected getNativeFieldById(id: number): junitweaponintegerfield;
|
|
52
|
+
protected getNativeFieldValue(instance: Unit, index: number): T;
|
|
53
|
+
protected setNativeFieldValue(instance: Unit, index: number, value: T): boolean;
|
|
54
|
+
static get valueChangeEvent(): ObjectLevelFieldValueChangeEvent<UnitEnumWeaponField<number>>;
|
|
55
|
+
}
|
|
56
|
+
export declare class UnitAttackTypeWeaponField extends UnitEnumWeaponField<AttackType> {
|
|
57
|
+
protected values: ReadonlyNonEmptyLinkedSet<AttackType>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|