@pkmn/engine 0.1.0-dev.fb5bf955 → 0.1.0-dev.fc150752
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/README.md +71 -60
- package/build/pkg/addon.d.ts +2 -2
- package/build/pkg/addon.js +8 -7
- package/build/pkg/addon.js.map +1 -1
- package/build/pkg/data/layout.json +25 -3
- package/build/pkg/gen1.d.ts +5 -4
- package/build/pkg/gen1.js +47 -31
- package/build/pkg/gen1.js.map +1 -1
- package/build/pkg/index.d.ts +15 -12
- package/build/pkg/index.js.map +1 -1
- package/build/pkg/protocol.d.ts +4 -2
- package/build/pkg/protocol.js +4 -2
- package/build/pkg/protocol.js.map +1 -1
- package/build/test/display.js +31 -13
- package/build/test/display.js.map +1 -1
- package/build.zig +95 -76
- package/package.json +26 -16
- package/src/bin/install-pkmn-engine +11 -6
- package/src/bin/pkmn-debug +29 -6
- package/src/lib/binding/node.zig +46 -141
- package/src/lib/binding/wasm.zig +6 -4
- package/src/lib/common/battle.zig +17 -0
- package/src/lib/common/data.zig +14 -26
- package/src/lib/common/debug.zig +21 -11
- package/src/lib/common/js.zig +118 -0
- package/src/lib/common/optional.zig +60 -0
- package/src/lib/common/options.zig +12 -3
- package/src/lib/common/protocol.zig +315 -197
- package/src/lib/common/rational.zig +353 -0
- package/src/lib/common/rng.zig +11 -11
- package/src/lib/common/util.zig +12 -0
- package/src/lib/gen1/README.md +265 -155
- package/src/lib/gen1/calc.zig +426 -0
- package/src/lib/gen1/chance.zig +1036 -0
- package/src/lib/gen1/data/moves.zig +178 -180
- package/src/lib/gen1/data/species.zig +2 -2
- package/src/lib/gen1/data/types.zig +3 -3
- package/src/lib/gen1/data.zig +73 -59
- package/src/lib/gen1/helpers.zig +592 -32
- package/src/lib/gen1/mechanics.zig +994 -641
- package/src/lib/gen2/README.md +87 -13
- package/src/lib/gen2/data/items.zig +3 -3
- package/src/lib/gen2/data/moves.zig +635 -563
- package/src/lib/gen2/data/species.zig +1 -1
- package/src/lib/gen2/data/types.zig +3 -3
- package/src/lib/gen2/data.zig +104 -74
- package/src/lib/gen2/helpers.zig +16 -22
- package/src/lib/gen2/mechanics.zig +916 -11
- package/src/lib/pkmn.zig +68 -9
|
@@ -1094,12 +1094,12 @@ pub const Species = enum(u8) {
|
|
|
1094
1094
|
/// The Pokémon's critical hit rate=io out of 256.
|
|
1095
1095
|
pub inline fn chance(id: Species) u8 {
|
|
1096
1096
|
assert(id != .None);
|
|
1097
|
-
return CHANCES[@
|
|
1097
|
+
return CHANCES[@intFromEnum(id) - 1];
|
|
1098
1098
|
}
|
|
1099
1099
|
|
|
1100
1100
|
/// Returns the `Data` corresponding to the species.
|
|
1101
1101
|
pub fn get(id: Species) Data {
|
|
1102
1102
|
assert(id != .None);
|
|
1103
|
-
return DATA[@
|
|
1103
|
+
return DATA[@intFromEnum(id) - 1];
|
|
1104
1104
|
}
|
|
1105
1105
|
};
|
|
@@ -91,18 +91,18 @@ pub const Type = enum(u4) {
|
|
|
91
91
|
|
|
92
92
|
/// Whether or not this type is considered to be special as opposed to physical.
|
|
93
93
|
pub inline fn special(self: Type) bool {
|
|
94
|
-
return @
|
|
94
|
+
return @intFromEnum(self) >= @intFromEnum(Type.Fire);
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/// The `Effectiveness` of type `t2` vs. type `t1`.
|
|
98
98
|
pub inline fn effectiveness(t1: Type, t2: Type) Effectiveness {
|
|
99
|
-
return CHART[@
|
|
99
|
+
return CHART[@intFromEnum(t1)][@intFromEnum(t2)];
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/// The precedence order of type `t2` vs. type `t1`.
|
|
103
103
|
pub fn precedence(t1: Type, t2: Type) u8 {
|
|
104
104
|
for (PRECEDENCE, 0..) |matchup, i| {
|
|
105
|
-
if (matchup.type1 == t1 and matchup.type2 == t2) return @intCast(
|
|
105
|
+
if (matchup.type1 == t1 and matchup.type2 == t2) return @intCast(i);
|
|
106
106
|
}
|
|
107
107
|
unreachable;
|
|
108
108
|
}
|
package/src/lib/gen1/data.zig
CHANGED
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
const std = @import("std");
|
|
2
2
|
const builtin = @import("builtin");
|
|
3
3
|
|
|
4
|
+
const pkmn = @import("../pkmn.zig");
|
|
5
|
+
|
|
4
6
|
const data = @import("../common/data.zig");
|
|
5
|
-
const options = @import("../common/options.zig");
|
|
6
7
|
const protocol = @import("../common/protocol.zig");
|
|
7
8
|
const rng = @import("../common/rng.zig");
|
|
9
|
+
const util = @import("../common/util.zig");
|
|
8
10
|
|
|
9
11
|
const moves = @import("data/moves.zig");
|
|
10
12
|
const species = @import("data/species.zig");
|
|
11
13
|
const types = @import("data/types.zig");
|
|
12
14
|
|
|
15
|
+
const calc = @import("calc.zig");
|
|
16
|
+
const chance = @import("chance.zig");
|
|
13
17
|
const mechanics = @import("mechanics.zig");
|
|
14
18
|
|
|
15
19
|
const assert = std.debug.assert;
|
|
@@ -17,16 +21,16 @@ const expectEqual = std.testing.expectEqual;
|
|
|
17
21
|
const expect = std.testing.expect;
|
|
18
22
|
|
|
19
23
|
/// The minimum size in bytes required to hold all Generation I choice options.
|
|
20
|
-
pub const
|
|
24
|
+
pub const MAX_CHOICES: usize = 9; // move 1..4, switch 2..6
|
|
21
25
|
/// The optimal size in bytes required to hold all Generation I choice options.
|
|
22
|
-
/// At least as large as
|
|
26
|
+
/// At least as large as MAX_CHOICES.
|
|
23
27
|
pub const MAX_LOGS: usize = 180;
|
|
24
28
|
|
|
25
29
|
/// The maximum number of bytes possibly logged by a single Generation I update.
|
|
26
|
-
pub const
|
|
27
|
-
|
|
30
|
+
pub const CHOICES_SIZE = if (builtin.mode == .ReleaseSmall)
|
|
31
|
+
MAX_CHOICES
|
|
28
32
|
else
|
|
29
|
-
std.math.ceilPowerOfTwo(usize,
|
|
33
|
+
std.math.ceilPowerOfTwo(usize, MAX_CHOICES) catch unreachable;
|
|
30
34
|
/// The optimal size in bytes required to hold the largest amount of log data possible from a
|
|
31
35
|
/// single Generation I update. At least as large as MAX_LOGS.
|
|
32
36
|
pub const LOGS_SIZE = if (builtin.mode == .ReleaseSmall)
|
|
@@ -34,12 +38,17 @@ pub const LOGS_SIZE = if (builtin.mode == .ReleaseSmall)
|
|
|
34
38
|
else
|
|
35
39
|
std.math.ceilPowerOfTwo(usize, MAX_LOGS) catch unreachable;
|
|
36
40
|
|
|
41
|
+
/// Null object pattern implementation of pkmn.battle.Options for Generation I.
|
|
42
|
+
pub const NULL = pkmn.battle.options(protocol.NULL, chance.NULL, calc.NULL);
|
|
43
|
+
|
|
37
44
|
const Choice = data.Choice;
|
|
38
45
|
const ID = data.ID;
|
|
39
46
|
const Player = data.Player;
|
|
40
47
|
const Result = data.Result;
|
|
41
48
|
|
|
42
|
-
const
|
|
49
|
+
const PointerType = util.PointerType;
|
|
50
|
+
|
|
51
|
+
const showdown = pkmn.options.showdown;
|
|
43
52
|
|
|
44
53
|
/// The pseudo random number generator used by Generation I.
|
|
45
54
|
pub const PRNG = rng.PRNG(1);
|
|
@@ -55,30 +64,42 @@ pub fn Battle(comptime RNG: anytype) type {
|
|
|
55
64
|
turn: u16 = 0,
|
|
56
65
|
/// The last damage dealt by either side.
|
|
57
66
|
last_damage: u16 = 0,
|
|
58
|
-
///
|
|
59
|
-
|
|
67
|
+
/// Details about the last move selected/used by each player required to detect desyncs.
|
|
68
|
+
last_moves: [2]MoveDetails = [_]MoveDetails{.{}} ** 2,
|
|
60
69
|
/// The pseudo random number generator.
|
|
61
70
|
rng: RNG,
|
|
62
71
|
|
|
63
72
|
/// Returns the `Side` for the given `player`.
|
|
64
|
-
pub inline fn side(self:
|
|
65
|
-
|
|
73
|
+
pub inline fn side(self: anytype, player: Player) PointerType(@TypeOf(self), Side) {
|
|
74
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Self);
|
|
75
|
+
return &self.sides[@intFromEnum(player)];
|
|
66
76
|
}
|
|
67
77
|
|
|
68
78
|
/// Returns the `Side` of the opponent for the given `player`
|
|
69
|
-
pub inline fn foe(self:
|
|
70
|
-
|
|
79
|
+
pub inline fn foe(self: anytype, player: Player) PointerType(@TypeOf(self), Side) {
|
|
80
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Self);
|
|
81
|
+
return &self.sides[@intFromEnum(player.foe())];
|
|
71
82
|
}
|
|
72
83
|
|
|
73
84
|
/// Returns an identifier for the active Pokémon of `player`.
|
|
74
|
-
pub inline fn active(self: *Self, player: Player) ID {
|
|
75
|
-
return player.ident(@intCast(
|
|
85
|
+
pub inline fn active(self: *const Self, player: Player) ID {
|
|
86
|
+
return player.ident(@intCast(self.side(player).order[0]));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/// Returns the `MoveDetails` for the given `player`.
|
|
90
|
+
pub inline fn lastMove(
|
|
91
|
+
self: anytype,
|
|
92
|
+
player: Player,
|
|
93
|
+
) PointerType(@TypeOf(self), MoveDetails) {
|
|
94
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Self);
|
|
95
|
+
return &self.last_moves[@intFromEnum(player)];
|
|
76
96
|
}
|
|
77
97
|
|
|
78
98
|
/// Returns the result of applying Player 1's choice `c1` and Player 2's choice `c2` to the
|
|
79
|
-
/// battle, optionally writing protocol logs to `log` if `options.
|
|
80
|
-
|
|
81
|
-
|
|
99
|
+
/// battle, optionally writing protocol message logs to `options.log` if `pkmn.options.log`
|
|
100
|
+
/// is enabled.
|
|
101
|
+
pub fn update(self: *Self, c1: Choice, c2: Choice, options: anytype) !Result {
|
|
102
|
+
return mechanics.update(self, c1, c2, options);
|
|
82
103
|
}
|
|
83
104
|
|
|
84
105
|
/// Fills in at most `out.len` possible choices for the `player` given the previous `result`
|
|
@@ -90,7 +111,7 @@ pub fn Battle(comptime RNG: anytype) type {
|
|
|
90
111
|
/// interacts with Disable, in which case there are no possible choices for the player to
|
|
91
112
|
/// make (i.e. on the cartridge a soft-lock occurs).
|
|
92
113
|
///
|
|
93
|
-
/// This function will always return
|
|
114
|
+
/// This function will always return choices > 0 if `pkmn.options.showdown` is true.
|
|
94
115
|
pub fn choices(self: *Self, player: Player, request: Choice.Type, out: []Choice) u8 {
|
|
95
116
|
return mechanics.choices(self, player, request, out);
|
|
96
117
|
}
|
|
@@ -120,7 +141,8 @@ pub const Side = extern struct {
|
|
|
120
141
|
}
|
|
121
142
|
|
|
122
143
|
/// Returns the stored `Pokemon` corresponding to the one-indexed party `slot`.
|
|
123
|
-
pub inline fn get(self:
|
|
144
|
+
pub inline fn get(self: anytype, slot: u8) PointerType(@TypeOf(self), Pokemon) {
|
|
145
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Side);
|
|
124
146
|
assert(slot > 0 and slot <= 6);
|
|
125
147
|
const id = self.order[slot - 1];
|
|
126
148
|
assert(id > 0 and id <= 6);
|
|
@@ -128,7 +150,8 @@ pub const Side = extern struct {
|
|
|
128
150
|
}
|
|
129
151
|
|
|
130
152
|
/// Returns the stored `Pokemon` corresponding to the `active` Pokémon (slot 1).
|
|
131
|
-
pub inline fn stored(self:
|
|
153
|
+
pub inline fn stored(self: anytype) PointerType(@TypeOf(self), Pokemon) {
|
|
154
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Side);
|
|
132
155
|
return self.get(1);
|
|
133
156
|
}
|
|
134
157
|
};
|
|
@@ -153,7 +176,8 @@ pub const ActivePokemon = extern struct {
|
|
|
153
176
|
}
|
|
154
177
|
|
|
155
178
|
/// Returns the active Pokémon's current move slot located at the one-indexed `mslot`.
|
|
156
|
-
pub inline fn move(self:
|
|
179
|
+
pub inline fn move(self: anytype, mslot: u8) PointerType(@TypeOf(self), MoveSlot) {
|
|
180
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == ActivePokemon);
|
|
157
181
|
assert(mslot > 0 and mslot <= 4);
|
|
158
182
|
assert(self.moves[mslot - 1].id != .None);
|
|
159
183
|
return &self.moves[mslot - 1];
|
|
@@ -182,14 +206,15 @@ pub const Pokemon = extern struct {
|
|
|
182
206
|
}
|
|
183
207
|
|
|
184
208
|
/// Returns the Pokémon's original move slot located at the one-indexed `mslot`.
|
|
185
|
-
pub inline fn move(self:
|
|
209
|
+
pub inline fn move(self: anytype, mslot: u8) PointerType(@TypeOf(self), MoveSlot) {
|
|
210
|
+
assert(@typeInfo(@TypeOf(self)).Pointer.child == Pokemon);
|
|
186
211
|
assert(mslot > 0 and mslot <= 4);
|
|
187
212
|
assert(self.moves[mslot - 1].id != .None);
|
|
188
213
|
return &self.moves[mslot - 1];
|
|
189
214
|
}
|
|
190
215
|
};
|
|
191
216
|
|
|
192
|
-
/// Representation of a Generation I
|
|
217
|
+
/// Representation of a Generation I Pokémon's move slot in a battle.
|
|
193
218
|
pub const MoveSlot = extern struct {
|
|
194
219
|
/// The identifier for the move.
|
|
195
220
|
id: Move = .None,
|
|
@@ -197,22 +222,16 @@ pub const MoveSlot = extern struct {
|
|
|
197
222
|
pp: u8 = 0,
|
|
198
223
|
|
|
199
224
|
comptime {
|
|
200
|
-
assert(@sizeOf(MoveSlot) ==
|
|
225
|
+
assert(@sizeOf(MoveSlot) == 2);
|
|
201
226
|
}
|
|
202
227
|
};
|
|
203
228
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
///
|
|
207
|
-
|
|
208
|
-
///
|
|
209
|
-
|
|
210
|
-
/// Player 1's move index.
|
|
211
|
-
p2: uindex = 0,
|
|
212
|
-
|
|
213
|
-
comptime {
|
|
214
|
-
assert(@sizeOf(MoveIndexes) == if (showdown) 4 else 1);
|
|
215
|
-
}
|
|
229
|
+
/// Details required to detect desyncs based on the move last selected/executed by players.
|
|
230
|
+
pub const MoveDetails = packed struct(if (showdown) u16 else u8) {
|
|
231
|
+
/// The move slot index of the last move selected in the battle menu.
|
|
232
|
+
index: if (showdown) u8 else u4 = 0,
|
|
233
|
+
/// Whether the last move executed was counterable.
|
|
234
|
+
counterable: if (showdown) u8 else u4 = 0,
|
|
216
235
|
};
|
|
217
236
|
|
|
218
237
|
/// Bitfield representation of a Generation I & II Pokémon's major status condition.
|
|
@@ -241,13 +260,13 @@ pub const Status = enum(u8) {
|
|
|
241
260
|
/// Whether or not the status `num` is the same as `status`.
|
|
242
261
|
pub inline fn is(num: u8, status: Status) bool {
|
|
243
262
|
if (status == .SLP) return Status.duration(num) > 0;
|
|
244
|
-
return ((num >> @intCast(
|
|
263
|
+
return ((num >> @intCast(@intFromEnum(status))) & 1) != 0;
|
|
245
264
|
}
|
|
246
265
|
|
|
247
266
|
/// Initializes a non-sleep `status`. Use `slp` or `slf` to initialize a sleep status.
|
|
248
267
|
pub inline fn init(status: Status) u8 {
|
|
249
268
|
assert(status != .SLP and status != .EXT);
|
|
250
|
-
return @as(u8, 1) << @intCast(
|
|
269
|
+
return @as(u8, 1) << @intCast(@intFromEnum(status));
|
|
251
270
|
}
|
|
252
271
|
|
|
253
272
|
/// Initializes a non self-inflicted sleep status with duration `dur`.
|
|
@@ -264,7 +283,7 @@ pub const Status = enum(u8) {
|
|
|
264
283
|
|
|
265
284
|
/// Returns the duration of a sleep status.
|
|
266
285
|
pub inline fn duration(num: u8) u3 {
|
|
267
|
-
return @intCast(
|
|
286
|
+
return @intCast(num & SLP);
|
|
268
287
|
}
|
|
269
288
|
|
|
270
289
|
/// Returns whether `num` reflects any status.
|
|
@@ -306,7 +325,7 @@ test Status {
|
|
|
306
325
|
}
|
|
307
326
|
|
|
308
327
|
/// Bitfield representation of volatile statuses and associated data in Generation I.
|
|
309
|
-
pub const Volatiles = packed struct {
|
|
328
|
+
pub const Volatiles = packed struct(u64) {
|
|
310
329
|
/// Whether the "Bide" volatile status is present.
|
|
311
330
|
Bide: bool = false,
|
|
312
331
|
/// Whether the "Thrashing" volatile status is present.
|
|
@@ -364,10 +383,6 @@ pub const Volatiles = packed struct {
|
|
|
364
383
|
disabled_move: u3 = 0,
|
|
365
384
|
/// The number of turns toxic damage has been accumulating.
|
|
366
385
|
toxic: u5 = 0,
|
|
367
|
-
|
|
368
|
-
comptime {
|
|
369
|
-
assert(@sizeOf(Volatiles) == 8);
|
|
370
|
-
}
|
|
371
386
|
};
|
|
372
387
|
|
|
373
388
|
test Volatiles {
|
|
@@ -411,10 +426,11 @@ pub fn Stats(comptime T: type) type {
|
|
|
411
426
|
/// Computes the value of `stat` given a `base`, `dv`, stat `exp` and `level`.
|
|
412
427
|
pub fn calc(comptime stat: []const u8, base: T, dv: u4, exp: u16, level: u8) T {
|
|
413
428
|
assert(level > 0 and level <= 100);
|
|
414
|
-
const
|
|
429
|
+
const float: f32 = @floatFromInt(exp);
|
|
430
|
+
const evs: u16 = @min(255, @as(u16, @intFromFloat(@ceil(@sqrt(float)))));
|
|
415
431
|
const core: u32 = (2 *% (@as(u32, base) +% dv)) +% (evs / 4);
|
|
416
432
|
const factor: u32 = if (std.mem.eql(u8, stat, "hp")) level + 10 else 5;
|
|
417
|
-
return @intCast(
|
|
433
|
+
return @intCast(core *% @as(u32, level) / 100 +% factor);
|
|
418
434
|
}
|
|
419
435
|
};
|
|
420
436
|
}
|
|
@@ -432,7 +448,7 @@ test Stats {
|
|
|
432
448
|
}
|
|
433
449
|
|
|
434
450
|
/// Representation of a Pokémon's boosts in Generation I.
|
|
435
|
-
pub const Boosts = packed struct {
|
|
451
|
+
pub const Boosts = packed struct(u32) {
|
|
436
452
|
/// A Pokémon's Attack boosts.
|
|
437
453
|
atk: i4 = 0,
|
|
438
454
|
/// A Pokémon's Defense boosts.
|
|
@@ -447,10 +463,6 @@ pub const Boosts = packed struct {
|
|
|
447
463
|
evasion: i4 = 0,
|
|
448
464
|
|
|
449
465
|
_: u8 = 0,
|
|
450
|
-
|
|
451
|
-
comptime {
|
|
452
|
-
assert(@sizeOf(Boosts) == 4);
|
|
453
|
-
}
|
|
454
466
|
};
|
|
455
467
|
|
|
456
468
|
test Boosts {
|
|
@@ -463,10 +475,10 @@ test Boosts {
|
|
|
463
475
|
pub const Move = moves.Move;
|
|
464
476
|
|
|
465
477
|
test Move {
|
|
466
|
-
try expectEqual(2, @
|
|
478
|
+
try expectEqual(2, @intFromEnum(Move.KarateChop));
|
|
467
479
|
const move = Move.get(.Fissure);
|
|
468
480
|
try expectEqual(Move.Effect.OHKO, move.effect);
|
|
469
|
-
try expectEqual(
|
|
481
|
+
try expectEqual(rng.Gen12.percent(30), move.accuracy);
|
|
470
482
|
try expectEqual(Type.Ground, move.type);
|
|
471
483
|
|
|
472
484
|
try expect(!Move.Effect.onBegin(.None));
|
|
@@ -524,7 +536,7 @@ test Move {
|
|
|
524
536
|
pub const Species = species.Species;
|
|
525
537
|
|
|
526
538
|
test Species {
|
|
527
|
-
try expectEqual(2, @
|
|
539
|
+
try expectEqual(2, @intFromEnum(Species.Ivysaur));
|
|
528
540
|
try expectEqual(@as(u8, 100), Species.get(.Mew).stats.def);
|
|
529
541
|
}
|
|
530
542
|
|
|
@@ -541,9 +553,11 @@ pub const Effectiveness = enum(u8) {
|
|
|
541
553
|
Super = 20,
|
|
542
554
|
|
|
543
555
|
/// Used to determine the effectiness of a neutral damage hit.
|
|
544
|
-
pub const neutral: u16 =
|
|
556
|
+
pub const neutral: u16 =
|
|
557
|
+
@intFromEnum(Effectiveness.Neutral) * @intFromEnum(Effectiveness.Neutral);
|
|
545
558
|
/// Used to detect whether there is a mismatch in type effectivness (relevant for precedence).
|
|
546
|
-
pub const mismatch: u16 =
|
|
559
|
+
pub const mismatch: u16 =
|
|
560
|
+
@intFromEnum(Effectiveness.Resisted) + @intFromEnum(Effectiveness.Super);
|
|
547
561
|
|
|
548
562
|
comptime {
|
|
549
563
|
assert(@sizeOf(Effectiveness) == 1);
|
|
@@ -551,8 +565,8 @@ pub const Effectiveness = enum(u8) {
|
|
|
551
565
|
};
|
|
552
566
|
|
|
553
567
|
test Types {
|
|
554
|
-
try expectEqual(14, @
|
|
555
|
-
try expectEqual(20, @
|
|
568
|
+
try expectEqual(14, @intFromEnum(Type.Dragon));
|
|
569
|
+
try expectEqual(20, @intFromEnum(Effectiveness.Super));
|
|
556
570
|
|
|
557
571
|
try expect(!Type.Ghost.special());
|
|
558
572
|
try expect(Type.Dragon.special());
|