@pkmn/engine 0.1.0-dev.00879b8b

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.
Files changed (60) hide show
  1. package/LICENSE +18 -0
  2. package/README.md +368 -0
  3. package/build/pkg/addon.d.ts +7 -0
  4. package/build/pkg/addon.js +111 -0
  5. package/build/pkg/addon.js.map +1 -0
  6. package/build/pkg/data/ids.json +240 -0
  7. package/build/pkg/data/layout.json +108 -0
  8. package/build/pkg/data/protocol.json +230 -0
  9. package/build/pkg/data.d.ts +91 -0
  10. package/build/pkg/data.js +150 -0
  11. package/build/pkg/data.js.map +1 -0
  12. package/build/pkg/gen1.d.ts +110 -0
  13. package/build/pkg/gen1.js +684 -0
  14. package/build/pkg/gen1.js.map +1 -0
  15. package/build/pkg/index.d.ts +387 -0
  16. package/build/pkg/index.js +122 -0
  17. package/build/pkg/index.js.map +1 -0
  18. package/build/pkg/protocol.d.ts +73 -0
  19. package/build/pkg/protocol.js +473 -0
  20. package/build/pkg/protocol.js.map +1 -0
  21. package/build/test/display.js +400 -0
  22. package/build/test/display.js.map +1 -0
  23. package/build/tools/debug.js +134 -0
  24. package/build/tools/debug.js.map +1 -0
  25. package/build.zig +363 -0
  26. package/package.json +232 -0
  27. package/src/bin/install-pkmn-engine +404 -0
  28. package/src/bin/pkmn-debug +62 -0
  29. package/src/lib/common/battle.zig +17 -0
  30. package/src/lib/common/data.zig +117 -0
  31. package/src/lib/common/debug.zig +74 -0
  32. package/src/lib/common/js.zig +118 -0
  33. package/src/lib/common/optional.zig +67 -0
  34. package/src/lib/common/options.zig +51 -0
  35. package/src/lib/common/protocol.zig +1836 -0
  36. package/src/lib/common/rational.zig +357 -0
  37. package/src/lib/common/rng.zig +243 -0
  38. package/src/lib/common/util.zig +12 -0
  39. package/src/lib/gen1/calc.zig +507 -0
  40. package/src/lib/gen1/chance.zig +1063 -0
  41. package/src/lib/gen1/data/moves.zig +1866 -0
  42. package/src/lib/gen1/data/species.zig +1105 -0
  43. package/src/lib/gen1/data/types.zig +131 -0
  44. package/src/lib/gen1/data.zig +634 -0
  45. package/src/lib/gen1/helpers.zig +866 -0
  46. package/src/lib/gen1/mechanics.zig +3156 -0
  47. package/src/lib/gen2/calc.zig +143 -0
  48. package/src/lib/gen2/chance.zig +1315 -0
  49. package/src/lib/gen2/data/items.zig +230 -0
  50. package/src/lib/gen2/data/moves.zig +2878 -0
  51. package/src/lib/gen2/data/species.zig +1798 -0
  52. package/src/lib/gen2/data/types.zig +226 -0
  53. package/src/lib/gen2/data.zig +463 -0
  54. package/src/lib/gen2/generated.zig +806 -0
  55. package/src/lib/gen2/helpers.zig +249 -0
  56. package/src/lib/gen2/mechanics.zig +3632 -0
  57. package/src/lib/node.zig +131 -0
  58. package/src/lib/pkmn.zig +128 -0
  59. package/src/lib/wasm.zig +13 -0
  60. package/src/test/display/pkmn.html.tmpl +368 -0
@@ -0,0 +1,2878 @@
1
+ //! Code generated by `tools/generate` - manual edits will be overwritten.
2
+
3
+ const std = @import("std");
4
+
5
+ const rng = @import("../../common/rng.zig");
6
+ const gen2 = @import("../../gen2/data.zig");
7
+
8
+ const assert = std.debug.assert;
9
+
10
+ const percent = rng.Gen12.percent;
11
+ const Type = gen2.Type;
12
+
13
+ /// Representation of a Generation II Pokémon move.
14
+ pub const Move = enum(u8) {
15
+ None,
16
+ Pound,
17
+ KarateChop,
18
+ DoubleSlap,
19
+ CometPunch,
20
+ MegaPunch,
21
+ PayDay,
22
+ FirePunch,
23
+ IcePunch,
24
+ ThunderPunch,
25
+ Scratch,
26
+ ViseGrip,
27
+ Guillotine,
28
+ RazorWind,
29
+ SwordsDance,
30
+ Cut,
31
+ Gust,
32
+ WingAttack,
33
+ Whirlwind,
34
+ Fly,
35
+ Bind,
36
+ Slam,
37
+ VineWhip,
38
+ Stomp,
39
+ DoubleKick,
40
+ MegaKick,
41
+ JumpKick,
42
+ RollingKick,
43
+ SandAttack,
44
+ Headbutt,
45
+ HornAttack,
46
+ FuryAttack,
47
+ HornDrill,
48
+ Tackle,
49
+ BodySlam,
50
+ Wrap,
51
+ TakeDown,
52
+ Thrash,
53
+ DoubleEdge,
54
+ TailWhip,
55
+ PoisonSting,
56
+ Twineedle,
57
+ PinMissile,
58
+ Leer,
59
+ Bite,
60
+ Growl,
61
+ Roar,
62
+ Sing,
63
+ Supersonic,
64
+ SonicBoom,
65
+ Disable,
66
+ Acid,
67
+ Ember,
68
+ Flamethrower,
69
+ Mist,
70
+ WaterGun,
71
+ HydroPump,
72
+ Surf,
73
+ IceBeam,
74
+ Blizzard,
75
+ Psybeam,
76
+ BubbleBeam,
77
+ AuroraBeam,
78
+ HyperBeam,
79
+ Peck,
80
+ DrillPeck,
81
+ Submission,
82
+ LowKick,
83
+ Counter,
84
+ SeismicToss,
85
+ Strength,
86
+ Absorb,
87
+ MegaDrain,
88
+ LeechSeed,
89
+ Growth,
90
+ RazorLeaf,
91
+ SolarBeam,
92
+ PoisonPowder,
93
+ StunSpore,
94
+ SleepPowder,
95
+ PetalDance,
96
+ StringShot,
97
+ DragonRage,
98
+ FireSpin,
99
+ ThunderShock,
100
+ Thunderbolt,
101
+ ThunderWave,
102
+ Thunder,
103
+ RockThrow,
104
+ Earthquake,
105
+ Fissure,
106
+ Dig,
107
+ Toxic,
108
+ Confusion,
109
+ Psychic,
110
+ Hypnosis,
111
+ Meditate,
112
+ Agility,
113
+ QuickAttack,
114
+ Rage,
115
+ Teleport,
116
+ NightShade,
117
+ Mimic,
118
+ Screech,
119
+ DoubleTeam,
120
+ Recover,
121
+ Harden,
122
+ Minimize,
123
+ Smokescreen,
124
+ ConfuseRay,
125
+ Withdraw,
126
+ DefenseCurl,
127
+ Barrier,
128
+ LightScreen,
129
+ Haze,
130
+ Reflect,
131
+ FocusEnergy,
132
+ Bide,
133
+ Metronome,
134
+ MirrorMove,
135
+ SelfDestruct,
136
+ EggBomb,
137
+ Lick,
138
+ Smog,
139
+ Sludge,
140
+ BoneClub,
141
+ FireBlast,
142
+ Waterfall,
143
+ Clamp,
144
+ Swift,
145
+ SkullBash,
146
+ SpikeCannon,
147
+ Constrict,
148
+ Amnesia,
149
+ Kinesis,
150
+ SoftBoiled,
151
+ HighJumpKick,
152
+ Glare,
153
+ DreamEater,
154
+ PoisonGas,
155
+ Barrage,
156
+ LeechLife,
157
+ LovelyKiss,
158
+ SkyAttack,
159
+ Transform,
160
+ Bubble,
161
+ DizzyPunch,
162
+ Spore,
163
+ Flash,
164
+ Psywave,
165
+ Splash,
166
+ AcidArmor,
167
+ Crabhammer,
168
+ Explosion,
169
+ FurySwipes,
170
+ Bonemerang,
171
+ Rest,
172
+ RockSlide,
173
+ HyperFang,
174
+ Sharpen,
175
+ Conversion,
176
+ TriAttack,
177
+ SuperFang,
178
+ Slash,
179
+ Substitute,
180
+ Struggle,
181
+ Sketch,
182
+ TripleKick,
183
+ Thief,
184
+ SpiderWeb,
185
+ MindReader,
186
+ Nightmare,
187
+ FlameWheel,
188
+ Snore,
189
+ Curse,
190
+ Flail,
191
+ Conversion2,
192
+ Aeroblast,
193
+ CottonSpore,
194
+ Reversal,
195
+ Spite,
196
+ PowderSnow,
197
+ Protect,
198
+ MachPunch,
199
+ ScaryFace,
200
+ FeintAttack,
201
+ SweetKiss,
202
+ BellyDrum,
203
+ SludgeBomb,
204
+ MudSlap,
205
+ Octazooka,
206
+ Spikes,
207
+ ZapCannon,
208
+ Foresight,
209
+ DestinyBond,
210
+ PerishSong,
211
+ IcyWind,
212
+ Detect,
213
+ BoneRush,
214
+ LockOn,
215
+ Outrage,
216
+ Sandstorm,
217
+ GigaDrain,
218
+ Endure,
219
+ Charm,
220
+ Rollout,
221
+ FalseSwipe,
222
+ Swagger,
223
+ MilkDrink,
224
+ Spark,
225
+ FuryCutter,
226
+ SteelWing,
227
+ MeanLook,
228
+ Attract,
229
+ SleepTalk,
230
+ HealBell,
231
+ Return,
232
+ Present,
233
+ Frustration,
234
+ Safeguard,
235
+ PainSplit,
236
+ SacredFire,
237
+ Magnitude,
238
+ DynamicPunch,
239
+ Megahorn,
240
+ DragonBreath,
241
+ BatonPass,
242
+ Encore,
243
+ Pursuit,
244
+ RapidSpin,
245
+ SweetScent,
246
+ IronTail,
247
+ MetalClaw,
248
+ VitalThrow,
249
+ MorningSun,
250
+ Synthesis,
251
+ Moonlight,
252
+ HiddenPower,
253
+ CrossChop,
254
+ Twister,
255
+ RainDance,
256
+ SunnyDay,
257
+ Crunch,
258
+ MirrorCoat,
259
+ PsychUp,
260
+ ExtremeSpeed,
261
+ AncientPower,
262
+ ShadowBall,
263
+ FutureSight,
264
+ RockSmash,
265
+ Whirlpool,
266
+ BeatUp,
267
+
268
+ /// Data associated with a Pokémon move.
269
+ pub const Data = extern struct {
270
+ /// The move's effect.
271
+ effect: Effect,
272
+ /// The move's base power.
273
+ bp: u8,
274
+ /// The move's type.
275
+ type: Type,
276
+ /// The move's accuracy percentage.
277
+ accuracy: u8,
278
+ /// The move's targeting behavior.
279
+ target: Target,
280
+ /// The chance of the move's secondary effect occurring.
281
+ chance: u8 = 0,
282
+ /// The priority of the move.
283
+ priority: i8 = 0,
284
+ /// Miscellaneous extra data/flags.
285
+ extra: Extra = .{},
286
+
287
+ /// Miscellaneous extra move related data/flags.
288
+ const Extra = packed struct(u8) {
289
+ /// Whether this move can be called via Metronome.
290
+ metronome: bool = true,
291
+ /// Whether this move can be called via Sleep Talk.
292
+ sleep_talk: bool = true,
293
+ /// Whether this move is considered to be "continuous".
294
+ continuous: bool = false,
295
+ /// Whether this move can hit a flying target.
296
+ flying: bool = false,
297
+ /// Whether this move can hit an underground target.
298
+ underground: bool = false,
299
+ /// Protocol reason offset associated with this move.
300
+ protocol: u3 = 0,
301
+ };
302
+
303
+ comptime {
304
+ assert(@sizeOf(Data) == 8);
305
+ }
306
+ };
307
+
308
+ const DATA = [_]Data{
309
+ // Pound
310
+ .{
311
+ .effect = .None,
312
+ .bp = 40,
313
+ .type = .Normal,
314
+ .accuracy = percent(100),
315
+ .target = .Other,
316
+ },
317
+ // KarateChop
318
+ .{
319
+ .effect = .HighCritical,
320
+ .bp = 50,
321
+ .type = .Fighting,
322
+ .accuracy = percent(100),
323
+ .target = .Other,
324
+ },
325
+ // DoubleSlap
326
+ .{
327
+ .effect = .MultiHit,
328
+ .bp = 15,
329
+ .type = .Normal,
330
+ .accuracy = percent(85),
331
+ .target = .Other,
332
+ },
333
+ // CometPunch
334
+ .{
335
+ .effect = .MultiHit,
336
+ .bp = 18,
337
+ .type = .Normal,
338
+ .accuracy = percent(85),
339
+ .target = .Other,
340
+ },
341
+ // MegaPunch
342
+ .{
343
+ .effect = .None,
344
+ .bp = 80,
345
+ .type = .Normal,
346
+ .accuracy = percent(85),
347
+ .target = .Other,
348
+ },
349
+ // PayDay
350
+ .{
351
+ .effect = .PayDay,
352
+ .bp = 40,
353
+ .type = .Normal,
354
+ .accuracy = percent(100),
355
+ .target = .Other,
356
+ },
357
+ // FirePunch
358
+ .{
359
+ .effect = .BurnChance,
360
+ .bp = 75,
361
+ .type = .Fire,
362
+ .accuracy = percent(100),
363
+ .target = .Other,
364
+ .chance = percent(10),
365
+ },
366
+ // IcePunch
367
+ .{
368
+ .effect = .FreezeChance,
369
+ .bp = 75,
370
+ .type = .Ice,
371
+ .accuracy = percent(100),
372
+ .target = .Other,
373
+ .chance = percent(10),
374
+ },
375
+ // ThunderPunch
376
+ .{
377
+ .effect = .ParalyzeChance,
378
+ .bp = 75,
379
+ .type = .Electric,
380
+ .accuracy = percent(100),
381
+ .target = .Other,
382
+ .chance = percent(10),
383
+ },
384
+ // Scratch
385
+ .{
386
+ .effect = .None,
387
+ .bp = 40,
388
+ .type = .Normal,
389
+ .accuracy = percent(100),
390
+ .target = .Other,
391
+ },
392
+ // ViseGrip
393
+ .{
394
+ .effect = .None,
395
+ .bp = 55,
396
+ .type = .Normal,
397
+ .accuracy = percent(100),
398
+ .target = .Other,
399
+ },
400
+ // Guillotine
401
+ .{
402
+ .effect = .OHKO,
403
+ .bp = 0,
404
+ .type = .Normal,
405
+ .accuracy = percent(30),
406
+ .target = .Other,
407
+ },
408
+ // RazorWind
409
+ .{
410
+ .effect = .RazorWind,
411
+ .bp = 80,
412
+ .type = .Normal,
413
+ .accuracy = percent(75),
414
+ .target = .Foes,
415
+ .extra = .{ .sleep_talk = false, .continuous = true },
416
+ },
417
+ // SwordsDance
418
+ .{
419
+ .effect = .AttackUp2,
420
+ .bp = 0,
421
+ .type = .Normal,
422
+ .accuracy = percent(100),
423
+ .target = .Self,
424
+ },
425
+ // Cut
426
+ .{
427
+ .effect = .None,
428
+ .bp = 50,
429
+ .type = .Normal,
430
+ .accuracy = percent(95),
431
+ .target = .Other,
432
+ },
433
+ // Gust
434
+ .{
435
+ .effect = .Gust,
436
+ .bp = 40,
437
+ .type = .Flying,
438
+ .accuracy = percent(100),
439
+ .target = .Any,
440
+ .extra = .{ .flying = true },
441
+ },
442
+ // WingAttack
443
+ .{
444
+ .effect = .None,
445
+ .bp = 60,
446
+ .type = .Flying,
447
+ .accuracy = percent(100),
448
+ .target = .Any,
449
+ },
450
+ // Whirlwind
451
+ .{
452
+ .effect = .ForceSwitch,
453
+ .bp = 0,
454
+ .type = .Normal,
455
+ .accuracy = percent(100),
456
+ .target = .Other,
457
+ .priority = -1,
458
+ .extra = .{ .flying = true },
459
+ },
460
+ // Fly
461
+ .{
462
+ .effect = .FlyDig,
463
+ .bp = 70,
464
+ .type = .Flying,
465
+ .accuracy = percent(95),
466
+ .target = .Any,
467
+ .extra = .{ .sleep_talk = false, .continuous = true },
468
+ },
469
+ // Bind
470
+ .{
471
+ .effect = .Binding,
472
+ .bp = 15,
473
+ .type = .Normal,
474
+ .accuracy = percent(75),
475
+ .target = .Other,
476
+ .extra = .{ .protocol = 1 },
477
+ },
478
+ // Slam
479
+ .{
480
+ .effect = .None,
481
+ .bp = 80,
482
+ .type = .Normal,
483
+ .accuracy = percent(75),
484
+ .target = .Other,
485
+ },
486
+ // VineWhip
487
+ .{
488
+ .effect = .None,
489
+ .bp = 35,
490
+ .type = .Grass,
491
+ .accuracy = percent(100),
492
+ .target = .Other,
493
+ },
494
+ // Stomp
495
+ .{
496
+ .effect = .Stomp,
497
+ .bp = 65,
498
+ .type = .Normal,
499
+ .accuracy = percent(100),
500
+ .target = .Other,
501
+ .chance = percent(30),
502
+ },
503
+ // DoubleKick
504
+ .{
505
+ .effect = .DoubleHit,
506
+ .bp = 30,
507
+ .type = .Fighting,
508
+ .accuracy = percent(100),
509
+ .target = .Other,
510
+ },
511
+ // MegaKick
512
+ .{
513
+ .effect = .None,
514
+ .bp = 120,
515
+ .type = .Normal,
516
+ .accuracy = percent(75),
517
+ .target = .Other,
518
+ },
519
+ // JumpKick
520
+ .{
521
+ .effect = .JumpKick,
522
+ .bp = 70,
523
+ .type = .Fighting,
524
+ .accuracy = percent(95),
525
+ .target = .Other,
526
+ },
527
+ // RollingKick
528
+ .{
529
+ .effect = .FlinchChance,
530
+ .bp = 60,
531
+ .type = .Fighting,
532
+ .accuracy = percent(85),
533
+ .target = .Other,
534
+ .chance = percent(30),
535
+ },
536
+ // SandAttack
537
+ .{
538
+ .effect = .AccuracyDown1,
539
+ .bp = 0,
540
+ .type = .Ground,
541
+ .accuracy = percent(100),
542
+ .target = .Other,
543
+ },
544
+ // Headbutt
545
+ .{
546
+ .effect = .FlinchChance,
547
+ .bp = 70,
548
+ .type = .Normal,
549
+ .accuracy = percent(100),
550
+ .target = .Other,
551
+ .chance = percent(30),
552
+ },
553
+ // HornAttack
554
+ .{
555
+ .effect = .None,
556
+ .bp = 65,
557
+ .type = .Normal,
558
+ .accuracy = percent(100),
559
+ .target = .Other,
560
+ },
561
+ // FuryAttack
562
+ .{
563
+ .effect = .MultiHit,
564
+ .bp = 15,
565
+ .type = .Normal,
566
+ .accuracy = percent(85),
567
+ .target = .Other,
568
+ },
569
+ // HornDrill
570
+ .{
571
+ .effect = .OHKO,
572
+ .bp = 0,
573
+ .type = .Normal,
574
+ .accuracy = percent(30),
575
+ .target = .Other,
576
+ },
577
+ // Tackle
578
+ .{
579
+ .effect = .None,
580
+ .bp = 35,
581
+ .type = .Normal,
582
+ .accuracy = percent(95),
583
+ .target = .Other,
584
+ },
585
+ // BodySlam
586
+ .{
587
+ .effect = .ParalyzeChance,
588
+ .bp = 85,
589
+ .type = .Normal,
590
+ .accuracy = percent(100),
591
+ .target = .Other,
592
+ .chance = percent(30),
593
+ },
594
+ // Wrap
595
+ .{
596
+ .effect = .Binding,
597
+ .bp = 15,
598
+ .type = .Normal,
599
+ .accuracy = percent(85),
600
+ .target = .Other,
601
+ .extra = .{ .protocol = 2 },
602
+ },
603
+ // TakeDown
604
+ .{
605
+ .effect = .Recoil,
606
+ .bp = 90,
607
+ .type = .Normal,
608
+ .accuracy = percent(85),
609
+ .target = .Other,
610
+ },
611
+ // Thrash
612
+ .{
613
+ .effect = .Thrashing,
614
+ .bp = 90,
615
+ .type = .Normal,
616
+ .accuracy = percent(100),
617
+ .target = .RandomFoe,
618
+ .extra = .{ .continuous = true },
619
+ },
620
+ // DoubleEdge
621
+ .{
622
+ .effect = .Recoil,
623
+ .bp = 120,
624
+ .type = .Normal,
625
+ .accuracy = percent(100),
626
+ .target = .Other,
627
+ },
628
+ // TailWhip
629
+ .{
630
+ .effect = .DefenseDown1,
631
+ .bp = 0,
632
+ .type = .Normal,
633
+ .accuracy = percent(100),
634
+ .target = .Foes,
635
+ },
636
+ // PoisonSting
637
+ .{
638
+ .effect = .PoisonChance,
639
+ .bp = 15,
640
+ .type = .Poison,
641
+ .accuracy = percent(100),
642
+ .target = .Other,
643
+ .chance = percent(30),
644
+ },
645
+ // Twineedle
646
+ .{
647
+ .effect = .Twineedle,
648
+ .bp = 25,
649
+ .type = .Bug,
650
+ .accuracy = percent(100),
651
+ .target = .Other,
652
+ .chance = percent(20),
653
+ },
654
+ // PinMissile
655
+ .{
656
+ .effect = .MultiHit,
657
+ .bp = 14,
658
+ .type = .Bug,
659
+ .accuracy = percent(85),
660
+ .target = .Other,
661
+ },
662
+ // Leer
663
+ .{
664
+ .effect = .DefenseDown1,
665
+ .bp = 0,
666
+ .type = .Normal,
667
+ .accuracy = percent(100),
668
+ .target = .Foes,
669
+ },
670
+ // Bite
671
+ .{
672
+ .effect = .FlinchChance,
673
+ .bp = 60,
674
+ .type = .Dark,
675
+ .accuracy = percent(100),
676
+ .target = .Other,
677
+ .chance = percent(30),
678
+ },
679
+ // Growl
680
+ .{
681
+ .effect = .AttackDown1,
682
+ .bp = 0,
683
+ .type = .Normal,
684
+ .accuracy = percent(100),
685
+ .target = .Foes,
686
+ },
687
+ // Roar
688
+ .{
689
+ .effect = .ForceSwitch,
690
+ .bp = 0,
691
+ .type = .Normal,
692
+ .accuracy = percent(100),
693
+ .target = .Other,
694
+ .priority = -1,
695
+ },
696
+ // Sing
697
+ .{
698
+ .effect = .Sleep,
699
+ .bp = 0,
700
+ .type = .Normal,
701
+ .accuracy = percent(55),
702
+ .target = .Other,
703
+ },
704
+ // Supersonic
705
+ .{
706
+ .effect = .Confusion,
707
+ .bp = 0,
708
+ .type = .Normal,
709
+ .accuracy = percent(55),
710
+ .target = .Other,
711
+ },
712
+ // SonicBoom
713
+ .{
714
+ .effect = .FixedDamage,
715
+ .bp = 0,
716
+ .type = .Normal,
717
+ .accuracy = percent(90),
718
+ .target = .Other,
719
+ },
720
+ // Disable
721
+ .{
722
+ .effect = .Disable,
723
+ .bp = 0,
724
+ .type = .Normal,
725
+ .accuracy = percent(55),
726
+ .target = .Other,
727
+ },
728
+ // Acid
729
+ .{
730
+ .effect = .DefenseDownChance,
731
+ .bp = 40,
732
+ .type = .Poison,
733
+ .accuracy = percent(100),
734
+ .target = .Foes,
735
+ .chance = percent(10),
736
+ },
737
+ // Ember
738
+ .{
739
+ .effect = .BurnChance,
740
+ .bp = 40,
741
+ .type = .Fire,
742
+ .accuracy = percent(100),
743
+ .target = .Other,
744
+ .chance = percent(10),
745
+ },
746
+ // Flamethrower
747
+ .{
748
+ .effect = .BurnChance,
749
+ .bp = 95,
750
+ .type = .Fire,
751
+ .accuracy = percent(100),
752
+ .target = .Other,
753
+ .chance = percent(10),
754
+ },
755
+ // Mist
756
+ .{
757
+ .effect = .Mist,
758
+ .bp = 0,
759
+ .type = .Ice,
760
+ .accuracy = percent(100),
761
+ .target = .Self,
762
+ },
763
+ // WaterGun
764
+ .{
765
+ .effect = .None,
766
+ .bp = 40,
767
+ .type = .Water,
768
+ .accuracy = percent(100),
769
+ .target = .Other,
770
+ },
771
+ // HydroPump
772
+ .{
773
+ .effect = .None,
774
+ .bp = 120,
775
+ .type = .Water,
776
+ .accuracy = percent(80),
777
+ .target = .Other,
778
+ },
779
+ // Surf
780
+ .{
781
+ .effect = .None,
782
+ .bp = 95,
783
+ .type = .Water,
784
+ .accuracy = percent(100),
785
+ .target = .Foes,
786
+ },
787
+ // IceBeam
788
+ .{
789
+ .effect = .FreezeChance,
790
+ .bp = 95,
791
+ .type = .Ice,
792
+ .accuracy = percent(100),
793
+ .target = .Other,
794
+ .chance = percent(10),
795
+ },
796
+ // Blizzard
797
+ .{
798
+ .effect = .FreezeChance,
799
+ .bp = 120,
800
+ .type = .Ice,
801
+ .accuracy = percent(70),
802
+ .target = .Foes,
803
+ .chance = percent(10),
804
+ },
805
+ // Psybeam
806
+ .{
807
+ .effect = .ConfusionChance,
808
+ .bp = 65,
809
+ .type = .Psychic,
810
+ .accuracy = percent(100),
811
+ .target = .Other,
812
+ .chance = percent(10),
813
+ },
814
+ // BubbleBeam
815
+ .{
816
+ .effect = .SpeedDownChance,
817
+ .bp = 65,
818
+ .type = .Water,
819
+ .accuracy = percent(100),
820
+ .target = .Other,
821
+ .chance = percent(10),
822
+ },
823
+ // AuroraBeam
824
+ .{
825
+ .effect = .AttackDownChance,
826
+ .bp = 65,
827
+ .type = .Ice,
828
+ .accuracy = percent(100),
829
+ .target = .Other,
830
+ .chance = percent(10),
831
+ },
832
+ // HyperBeam
833
+ .{
834
+ .effect = .HyperBeam,
835
+ .bp = 150,
836
+ .type = .Normal,
837
+ .accuracy = percent(90),
838
+ .target = .Other,
839
+ },
840
+ // Peck
841
+ .{
842
+ .effect = .None,
843
+ .bp = 35,
844
+ .type = .Flying,
845
+ .accuracy = percent(100),
846
+ .target = .Any,
847
+ },
848
+ // DrillPeck
849
+ .{
850
+ .effect = .None,
851
+ .bp = 80,
852
+ .type = .Flying,
853
+ .accuracy = percent(100),
854
+ .target = .Any,
855
+ },
856
+ // Submission
857
+ .{
858
+ .effect = .Recoil,
859
+ .bp = 80,
860
+ .type = .Fighting,
861
+ .accuracy = percent(80),
862
+ .target = .Other,
863
+ },
864
+ // LowKick
865
+ .{
866
+ .effect = .FlinchChance,
867
+ .bp = 50,
868
+ .type = .Fighting,
869
+ .accuracy = percent(90),
870
+ .target = .Other,
871
+ .chance = percent(30),
872
+ },
873
+ // Counter
874
+ .{
875
+ .effect = .Counter,
876
+ .bp = 0,
877
+ .type = .Fighting,
878
+ .accuracy = percent(100),
879
+ .target = .Depends,
880
+ .priority = -1,
881
+ .extra = .{ .metronome = false },
882
+ },
883
+ // SeismicToss
884
+ .{
885
+ .effect = .LevelDamage,
886
+ .bp = 0,
887
+ .type = .Fighting,
888
+ .accuracy = percent(100),
889
+ .target = .Other,
890
+ },
891
+ // Strength
892
+ .{
893
+ .effect = .None,
894
+ .bp = 80,
895
+ .type = .Normal,
896
+ .accuracy = percent(100),
897
+ .target = .Other,
898
+ },
899
+ // Absorb
900
+ .{
901
+ .effect = .DrainHP,
902
+ .bp = 20,
903
+ .type = .Grass,
904
+ .accuracy = percent(100),
905
+ .target = .Other,
906
+ },
907
+ // MegaDrain
908
+ .{
909
+ .effect = .DrainHP,
910
+ .bp = 40,
911
+ .type = .Grass,
912
+ .accuracy = percent(100),
913
+ .target = .Other,
914
+ },
915
+ // LeechSeed
916
+ .{
917
+ .effect = .LeechSeed,
918
+ .bp = 0,
919
+ .type = .Grass,
920
+ .accuracy = percent(90),
921
+ .target = .Other,
922
+ },
923
+ // Growth
924
+ .{
925
+ .effect = .SpAtkUp1,
926
+ .bp = 0,
927
+ .type = .Normal,
928
+ .accuracy = percent(100),
929
+ .target = .Self,
930
+ },
931
+ // RazorLeaf
932
+ .{
933
+ .effect = .HighCritical,
934
+ .bp = 55,
935
+ .type = .Grass,
936
+ .accuracy = percent(95),
937
+ .target = .Foes,
938
+ },
939
+ // SolarBeam
940
+ .{
941
+ .effect = .SolarBeam,
942
+ .bp = 120,
943
+ .type = .Grass,
944
+ .accuracy = percent(100),
945
+ .target = .Other,
946
+ .extra = .{ .sleep_talk = false, .continuous = true },
947
+ },
948
+ // PoisonPowder
949
+ .{
950
+ .effect = .Poison,
951
+ .bp = 0,
952
+ .type = .Poison,
953
+ .accuracy = percent(75),
954
+ .target = .Other,
955
+ },
956
+ // StunSpore
957
+ .{
958
+ .effect = .Paralyze,
959
+ .bp = 0,
960
+ .type = .Grass,
961
+ .accuracy = percent(75),
962
+ .target = .Other,
963
+ },
964
+ // SleepPowder
965
+ .{
966
+ .effect = .Sleep,
967
+ .bp = 0,
968
+ .type = .Grass,
969
+ .accuracy = percent(75),
970
+ .target = .Other,
971
+ },
972
+ // PetalDance
973
+ .{
974
+ .effect = .Thrashing,
975
+ .bp = 70,
976
+ .type = .Grass,
977
+ .accuracy = percent(100),
978
+ .target = .RandomFoe,
979
+ .extra = .{ .continuous = true },
980
+ },
981
+ // StringShot
982
+ .{
983
+ .effect = .SpeedDown1,
984
+ .bp = 0,
985
+ .type = .Bug,
986
+ .accuracy = percent(95),
987
+ .target = .Foes,
988
+ },
989
+ // DragonRage
990
+ .{
991
+ .effect = .FixedDamage,
992
+ .bp = 0,
993
+ .type = .Dragon,
994
+ .accuracy = percent(100),
995
+ .target = .Other,
996
+ },
997
+ // FireSpin
998
+ .{
999
+ .effect = .Binding,
1000
+ .bp = 15,
1001
+ .type = .Fire,
1002
+ .accuracy = percent(70),
1003
+ .target = .Other,
1004
+ .extra = .{ .protocol = 3 },
1005
+ },
1006
+ // ThunderShock
1007
+ .{
1008
+ .effect = .ParalyzeChance,
1009
+ .bp = 40,
1010
+ .type = .Electric,
1011
+ .accuracy = percent(100),
1012
+ .target = .Other,
1013
+ .chance = percent(10),
1014
+ },
1015
+ // Thunderbolt
1016
+ .{
1017
+ .effect = .ParalyzeChance,
1018
+ .bp = 95,
1019
+ .type = .Electric,
1020
+ .accuracy = percent(100),
1021
+ .target = .Other,
1022
+ .chance = percent(10),
1023
+ },
1024
+ // ThunderWave
1025
+ .{
1026
+ .effect = .Paralyze,
1027
+ .bp = 0,
1028
+ .type = .Electric,
1029
+ .accuracy = percent(100),
1030
+ .target = .Other,
1031
+ },
1032
+ // Thunder
1033
+ .{
1034
+ .effect = .Thunder,
1035
+ .bp = 120,
1036
+ .type = .Electric,
1037
+ .accuracy = percent(70),
1038
+ .target = .Other,
1039
+ .chance = percent(30),
1040
+ .extra = .{ .flying = true },
1041
+ },
1042
+ // RockThrow
1043
+ .{
1044
+ .effect = .None,
1045
+ .bp = 50,
1046
+ .type = .Rock,
1047
+ .accuracy = percent(90),
1048
+ .target = .Other,
1049
+ },
1050
+ // Earthquake
1051
+ .{
1052
+ .effect = .Earthquake,
1053
+ .bp = 100,
1054
+ .type = .Ground,
1055
+ .accuracy = percent(100),
1056
+ .target = .AllOthers,
1057
+ .extra = .{ .underground = true },
1058
+ },
1059
+ // Fissure
1060
+ .{
1061
+ .effect = .OHKO,
1062
+ .bp = 0,
1063
+ .type = .Ground,
1064
+ .accuracy = percent(30),
1065
+ .target = .Other,
1066
+ .extra = .{ .underground = true },
1067
+ },
1068
+ // Dig
1069
+ .{
1070
+ .effect = .FlyDig,
1071
+ .bp = 60,
1072
+ .type = .Ground,
1073
+ .accuracy = percent(100),
1074
+ .target = .Other,
1075
+ .extra = .{ .sleep_talk = false },
1076
+ },
1077
+ // Toxic
1078
+ .{
1079
+ .effect = .Toxic,
1080
+ .bp = 0,
1081
+ .type = .Poison,
1082
+ .accuracy = percent(85),
1083
+ .target = .Other,
1084
+ },
1085
+ // Confusion
1086
+ .{
1087
+ .effect = .ConfusionChance,
1088
+ .bp = 50,
1089
+ .type = .Psychic,
1090
+ .accuracy = percent(100),
1091
+ .target = .Other,
1092
+ .chance = percent(10),
1093
+ },
1094
+ // Psychic
1095
+ .{
1096
+ .effect = .SpDefDownChance,
1097
+ .bp = 90,
1098
+ .type = .Psychic,
1099
+ .accuracy = percent(100),
1100
+ .target = .Other,
1101
+ .chance = percent(10),
1102
+ },
1103
+ // Hypnosis
1104
+ .{
1105
+ .effect = .Sleep,
1106
+ .bp = 0,
1107
+ .type = .Psychic,
1108
+ .accuracy = percent(60),
1109
+ .target = .Other,
1110
+ },
1111
+ // Meditate
1112
+ .{
1113
+ .effect = .AttackUp1,
1114
+ .bp = 0,
1115
+ .type = .Psychic,
1116
+ .accuracy = percent(100),
1117
+ .target = .Self,
1118
+ },
1119
+ // Agility
1120
+ .{
1121
+ .effect = .SpeedUp2,
1122
+ .bp = 0,
1123
+ .type = .Psychic,
1124
+ .accuracy = percent(100),
1125
+ .target = .Self,
1126
+ },
1127
+ // QuickAttack
1128
+ .{
1129
+ .effect = .Priority,
1130
+ .bp = 40,
1131
+ .type = .Normal,
1132
+ .accuracy = percent(100),
1133
+ .target = .Other,
1134
+ .priority = 1,
1135
+ },
1136
+ // Rage
1137
+ .{
1138
+ .effect = .Rage,
1139
+ .bp = 20,
1140
+ .type = .Normal,
1141
+ .accuracy = percent(100),
1142
+ .target = .Other,
1143
+ },
1144
+ // Teleport
1145
+ .{
1146
+ .effect = .Teleport,
1147
+ .bp = 0,
1148
+ .type = .Psychic,
1149
+ .accuracy = percent(100),
1150
+ .target = .Self,
1151
+ },
1152
+ // NightShade
1153
+ .{
1154
+ .effect = .LevelDamage,
1155
+ .bp = 0,
1156
+ .type = .Ghost,
1157
+ .accuracy = percent(100),
1158
+ .target = .Other,
1159
+ },
1160
+ // Mimic
1161
+ .{
1162
+ .effect = .Mimic,
1163
+ .bp = 0,
1164
+ .type = .Normal,
1165
+ .accuracy = percent(100),
1166
+ .target = .Other,
1167
+ .extra = .{ .metronome = false },
1168
+ },
1169
+ // Screech
1170
+ .{
1171
+ .effect = .DefenseDown2,
1172
+ .bp = 0,
1173
+ .type = .Normal,
1174
+ .accuracy = percent(85),
1175
+ .target = .Other,
1176
+ },
1177
+ // DoubleTeam
1178
+ .{
1179
+ .effect = .EvasionUp1,
1180
+ .bp = 0,
1181
+ .type = .Normal,
1182
+ .accuracy = percent(100),
1183
+ .target = .Self,
1184
+ },
1185
+ // Recover
1186
+ .{
1187
+ .effect = .Heal,
1188
+ .bp = 0,
1189
+ .type = .Normal,
1190
+ .accuracy = percent(100),
1191
+ .target = .Self,
1192
+ },
1193
+ // Harden
1194
+ .{
1195
+ .effect = .DefenseUp1,
1196
+ .bp = 0,
1197
+ .type = .Normal,
1198
+ .accuracy = percent(100),
1199
+ .target = .Self,
1200
+ },
1201
+ // Minimize
1202
+ .{
1203
+ .effect = .EvasionUp1,
1204
+ .bp = 0,
1205
+ .type = .Normal,
1206
+ .accuracy = percent(100),
1207
+ .target = .Self,
1208
+ },
1209
+ // Smokescreen
1210
+ .{
1211
+ .effect = .AccuracyDown1,
1212
+ .bp = 0,
1213
+ .type = .Normal,
1214
+ .accuracy = percent(100),
1215
+ .target = .Other,
1216
+ },
1217
+ // ConfuseRay
1218
+ .{
1219
+ .effect = .Confusion,
1220
+ .bp = 0,
1221
+ .type = .Ghost,
1222
+ .accuracy = percent(100),
1223
+ .target = .Other,
1224
+ },
1225
+ // Withdraw
1226
+ .{
1227
+ .effect = .DefenseUp1,
1228
+ .bp = 0,
1229
+ .type = .Water,
1230
+ .accuracy = percent(100),
1231
+ .target = .Self,
1232
+ },
1233
+ // DefenseCurl
1234
+ .{
1235
+ .effect = .DefenseCurl,
1236
+ .bp = 0,
1237
+ .type = .Normal,
1238
+ .accuracy = percent(100),
1239
+ .target = .Self,
1240
+ },
1241
+ // Barrier
1242
+ .{
1243
+ .effect = .DefenseUp2,
1244
+ .bp = 0,
1245
+ .type = .Psychic,
1246
+ .accuracy = percent(100),
1247
+ .target = .Self,
1248
+ },
1249
+ // LightScreen
1250
+ .{
1251
+ .effect = .LightScreen,
1252
+ .bp = 0,
1253
+ .type = .Psychic,
1254
+ .accuracy = percent(100),
1255
+ .target = .AllySide,
1256
+ },
1257
+ // Haze
1258
+ .{
1259
+ .effect = .Haze,
1260
+ .bp = 0,
1261
+ .type = .Ice,
1262
+ .accuracy = percent(100),
1263
+ .target = .All,
1264
+ },
1265
+ // Reflect
1266
+ .{
1267
+ .effect = .Reflect,
1268
+ .bp = 0,
1269
+ .type = .Psychic,
1270
+ .accuracy = percent(100),
1271
+ .target = .AllySide,
1272
+ },
1273
+ // FocusEnergy
1274
+ .{
1275
+ .effect = .FocusEnergy,
1276
+ .bp = 0,
1277
+ .type = .Normal,
1278
+ .accuracy = percent(100),
1279
+ .target = .Self,
1280
+ },
1281
+ // Bide
1282
+ .{
1283
+ .effect = .Bide,
1284
+ .bp = 0,
1285
+ .type = .Normal,
1286
+ .accuracy = percent(100),
1287
+ .target = .Self,
1288
+ .extra = .{ .sleep_talk = false, .continuous = true },
1289
+ },
1290
+ // Metronome
1291
+ .{
1292
+ .effect = .Metronome,
1293
+ .bp = 0,
1294
+ .type = .Normal,
1295
+ .accuracy = percent(100),
1296
+ .target = .Self,
1297
+ .extra = .{ .metronome = false },
1298
+ },
1299
+ // MirrorMove
1300
+ .{
1301
+ .effect = .MirrorMove,
1302
+ .bp = 0,
1303
+ .type = .Flying,
1304
+ .accuracy = percent(100),
1305
+ .target = .Self,
1306
+ },
1307
+ // SelfDestruct
1308
+ .{
1309
+ .effect = .Explode,
1310
+ .bp = 200,
1311
+ .type = .Normal,
1312
+ .accuracy = percent(100),
1313
+ .target = .AllOthers,
1314
+ },
1315
+ // EggBomb
1316
+ .{
1317
+ .effect = .None,
1318
+ .bp = 100,
1319
+ .type = .Normal,
1320
+ .accuracy = percent(75),
1321
+ .target = .Other,
1322
+ },
1323
+ // Lick
1324
+ .{
1325
+ .effect = .ParalyzeChance,
1326
+ .bp = 20,
1327
+ .type = .Ghost,
1328
+ .accuracy = percent(100),
1329
+ .target = .Other,
1330
+ .chance = percent(30),
1331
+ },
1332
+ // Smog
1333
+ .{
1334
+ .effect = .PoisonChance,
1335
+ .bp = 20,
1336
+ .type = .Poison,
1337
+ .accuracy = percent(70),
1338
+ .target = .Other,
1339
+ .chance = percent(40),
1340
+ },
1341
+ // Sludge
1342
+ .{
1343
+ .effect = .PoisonChance,
1344
+ .bp = 65,
1345
+ .type = .Poison,
1346
+ .accuracy = percent(100),
1347
+ .target = .Other,
1348
+ .chance = percent(30),
1349
+ },
1350
+ // BoneClub
1351
+ .{
1352
+ .effect = .FlinchChance,
1353
+ .bp = 65,
1354
+ .type = .Ground,
1355
+ .accuracy = percent(85),
1356
+ .target = .Other,
1357
+ .chance = percent(10),
1358
+ },
1359
+ // FireBlast
1360
+ .{
1361
+ .effect = .BurnChance,
1362
+ .bp = 120,
1363
+ .type = .Fire,
1364
+ .accuracy = percent(85),
1365
+ .target = .Other,
1366
+ .chance = percent(10),
1367
+ },
1368
+ // Waterfall
1369
+ .{
1370
+ .effect = .None,
1371
+ .bp = 80,
1372
+ .type = .Water,
1373
+ .accuracy = percent(100),
1374
+ .target = .Other,
1375
+ },
1376
+ // Clamp
1377
+ .{
1378
+ .effect = .Binding,
1379
+ .bp = 35,
1380
+ .type = .Water,
1381
+ .accuracy = percent(75),
1382
+ .target = .Other,
1383
+ .extra = .{ .protocol = 4 },
1384
+ },
1385
+ // Swift
1386
+ .{
1387
+ .effect = .AlwaysHit,
1388
+ .bp = 60,
1389
+ .type = .Normal,
1390
+ .accuracy = percent(100),
1391
+ .target = .Foes,
1392
+ },
1393
+ // SkullBash
1394
+ .{
1395
+ .effect = .SkullBash,
1396
+ .bp = 100,
1397
+ .type = .Normal,
1398
+ .accuracy = percent(100),
1399
+ .target = .Other,
1400
+ .extra = .{ .sleep_talk = false, .continuous = true },
1401
+ },
1402
+ // SpikeCannon
1403
+ .{
1404
+ .effect = .MultiHit,
1405
+ .bp = 20,
1406
+ .type = .Normal,
1407
+ .accuracy = percent(100),
1408
+ .target = .Other,
1409
+ },
1410
+ // Constrict
1411
+ .{
1412
+ .effect = .SpeedDownChance,
1413
+ .bp = 10,
1414
+ .type = .Normal,
1415
+ .accuracy = percent(100),
1416
+ .target = .Other,
1417
+ .chance = percent(10),
1418
+ },
1419
+ // Amnesia
1420
+ .{
1421
+ .effect = .SpDefUp2,
1422
+ .bp = 0,
1423
+ .type = .Psychic,
1424
+ .accuracy = percent(100),
1425
+ .target = .Self,
1426
+ },
1427
+ // Kinesis
1428
+ .{
1429
+ .effect = .AccuracyDown1,
1430
+ .bp = 0,
1431
+ .type = .Psychic,
1432
+ .accuracy = percent(80),
1433
+ .target = .Other,
1434
+ },
1435
+ // SoftBoiled
1436
+ .{
1437
+ .effect = .Heal,
1438
+ .bp = 0,
1439
+ .type = .Normal,
1440
+ .accuracy = percent(100),
1441
+ .target = .Self,
1442
+ },
1443
+ // HighJumpKick
1444
+ .{
1445
+ .effect = .JumpKick,
1446
+ .bp = 85,
1447
+ .type = .Fighting,
1448
+ .accuracy = percent(90),
1449
+ .target = .Other,
1450
+ },
1451
+ // Glare
1452
+ .{
1453
+ .effect = .Paralyze,
1454
+ .bp = 0,
1455
+ .type = .Normal,
1456
+ .accuracy = percent(75),
1457
+ .target = .Other,
1458
+ },
1459
+ // DreamEater
1460
+ .{
1461
+ .effect = .DreamEater,
1462
+ .bp = 100,
1463
+ .type = .Psychic,
1464
+ .accuracy = percent(100),
1465
+ .target = .Other,
1466
+ },
1467
+ // PoisonGas
1468
+ .{
1469
+ .effect = .Poison,
1470
+ .bp = 0,
1471
+ .type = .Poison,
1472
+ .accuracy = percent(55),
1473
+ .target = .Other,
1474
+ },
1475
+ // Barrage
1476
+ .{
1477
+ .effect = .MultiHit,
1478
+ .bp = 15,
1479
+ .type = .Normal,
1480
+ .accuracy = percent(85),
1481
+ .target = .Other,
1482
+ },
1483
+ // LeechLife
1484
+ .{
1485
+ .effect = .DrainHP,
1486
+ .bp = 20,
1487
+ .type = .Bug,
1488
+ .accuracy = percent(100),
1489
+ .target = .Other,
1490
+ },
1491
+ // LovelyKiss
1492
+ .{
1493
+ .effect = .Sleep,
1494
+ .bp = 0,
1495
+ .type = .Normal,
1496
+ .accuracy = percent(75),
1497
+ .target = .Other,
1498
+ },
1499
+ // SkyAttack
1500
+ .{
1501
+ .effect = .SkyAttack,
1502
+ .bp = 140,
1503
+ .type = .Flying,
1504
+ .accuracy = percent(90),
1505
+ .target = .Any,
1506
+ .extra = .{ .sleep_talk = false, .continuous = true },
1507
+ },
1508
+ // Transform
1509
+ .{
1510
+ .effect = .Transform,
1511
+ .bp = 0,
1512
+ .type = .Normal,
1513
+ .accuracy = percent(100),
1514
+ .target = .Other,
1515
+ },
1516
+ // Bubble
1517
+ .{
1518
+ .effect = .SpeedDownChance,
1519
+ .bp = 20,
1520
+ .type = .Water,
1521
+ .accuracy = percent(100),
1522
+ .target = .Foes,
1523
+ .chance = percent(10),
1524
+ },
1525
+ // DizzyPunch
1526
+ .{
1527
+ .effect = .ConfusionChance,
1528
+ .bp = 70,
1529
+ .type = .Normal,
1530
+ .accuracy = percent(100),
1531
+ .target = .Other,
1532
+ .chance = percent(20),
1533
+ },
1534
+ // Spore
1535
+ .{
1536
+ .effect = .Sleep,
1537
+ .bp = 0,
1538
+ .type = .Grass,
1539
+ .accuracy = percent(100),
1540
+ .target = .Other,
1541
+ },
1542
+ // Flash
1543
+ .{
1544
+ .effect = .AccuracyDown1,
1545
+ .bp = 0,
1546
+ .type = .Normal,
1547
+ .accuracy = percent(70),
1548
+ .target = .Other,
1549
+ },
1550
+ // Psywave
1551
+ .{
1552
+ .effect = .Psywave,
1553
+ .bp = 0,
1554
+ .type = .Psychic,
1555
+ .accuracy = percent(80),
1556
+ .target = .Other,
1557
+ },
1558
+ // Splash
1559
+ .{
1560
+ .effect = .Splash,
1561
+ .bp = 0,
1562
+ .type = .Normal,
1563
+ .accuracy = percent(100),
1564
+ .target = .Self,
1565
+ },
1566
+ // AcidArmor
1567
+ .{
1568
+ .effect = .DefenseUp2,
1569
+ .bp = 0,
1570
+ .type = .Poison,
1571
+ .accuracy = percent(100),
1572
+ .target = .Self,
1573
+ },
1574
+ // Crabhammer
1575
+ .{
1576
+ .effect = .HighCritical,
1577
+ .bp = 90,
1578
+ .type = .Water,
1579
+ .accuracy = percent(85),
1580
+ .target = .Other,
1581
+ },
1582
+ // Explosion
1583
+ .{
1584
+ .effect = .Explode,
1585
+ .bp = 250,
1586
+ .type = .Normal,
1587
+ .accuracy = percent(100),
1588
+ .target = .AllOthers,
1589
+ },
1590
+ // FurySwipes
1591
+ .{
1592
+ .effect = .MultiHit,
1593
+ .bp = 18,
1594
+ .type = .Normal,
1595
+ .accuracy = percent(80),
1596
+ .target = .Other,
1597
+ },
1598
+ // Bonemerang
1599
+ .{
1600
+ .effect = .DoubleHit,
1601
+ .bp = 50,
1602
+ .type = .Ground,
1603
+ .accuracy = percent(90),
1604
+ .target = .Other,
1605
+ },
1606
+ // Rest
1607
+ .{
1608
+ .effect = .Heal,
1609
+ .bp = 0,
1610
+ .type = .Psychic,
1611
+ .accuracy = percent(100),
1612
+ .target = .Self,
1613
+ },
1614
+ // RockSlide
1615
+ .{
1616
+ .effect = .FlinchChance,
1617
+ .bp = 75,
1618
+ .type = .Rock,
1619
+ .accuracy = percent(90),
1620
+ .target = .Foes,
1621
+ .chance = percent(30),
1622
+ },
1623
+ // HyperFang
1624
+ .{
1625
+ .effect = .FlinchChance,
1626
+ .bp = 80,
1627
+ .type = .Normal,
1628
+ .accuracy = percent(90),
1629
+ .target = .Other,
1630
+ .chance = percent(10),
1631
+ },
1632
+ // Sharpen
1633
+ .{
1634
+ .effect = .AttackUp1,
1635
+ .bp = 0,
1636
+ .type = .Normal,
1637
+ .accuracy = percent(100),
1638
+ .target = .Self,
1639
+ },
1640
+ // Conversion
1641
+ .{
1642
+ .effect = .Conversion,
1643
+ .bp = 0,
1644
+ .type = .Normal,
1645
+ .accuracy = percent(100),
1646
+ .target = .Self,
1647
+ },
1648
+ // TriAttack
1649
+ .{
1650
+ .effect = .TriAttack,
1651
+ .bp = 80,
1652
+ .type = .Normal,
1653
+ .accuracy = percent(100),
1654
+ .target = .Other,
1655
+ .chance = percent(20),
1656
+ },
1657
+ // SuperFang
1658
+ .{
1659
+ .effect = .SuperFang,
1660
+ .bp = 0,
1661
+ .type = .Normal,
1662
+ .accuracy = percent(90),
1663
+ .target = .Other,
1664
+ },
1665
+ // Slash
1666
+ .{
1667
+ .effect = .HighCritical,
1668
+ .bp = 70,
1669
+ .type = .Normal,
1670
+ .accuracy = percent(100),
1671
+ .target = .Other,
1672
+ },
1673
+ // Substitute
1674
+ .{
1675
+ .effect = .Substitute,
1676
+ .bp = 0,
1677
+ .type = .Normal,
1678
+ .accuracy = percent(100),
1679
+ .target = .Self,
1680
+ },
1681
+ // Struggle
1682
+ .{
1683
+ .effect = .Recoil,
1684
+ .bp = 50,
1685
+ .type = .Normal,
1686
+ .accuracy = percent(100),
1687
+ .target = .RandomFoe,
1688
+ .extra = .{ .metronome = false },
1689
+ },
1690
+ // Sketch
1691
+ .{
1692
+ .effect = .Sketch,
1693
+ .bp = 0,
1694
+ .type = .Normal,
1695
+ .accuracy = percent(100),
1696
+ .target = .Other,
1697
+ .extra = .{ .metronome = false },
1698
+ },
1699
+ // TripleKick
1700
+ .{
1701
+ .effect = .TripleKick,
1702
+ .bp = 10,
1703
+ .type = .Fighting,
1704
+ .accuracy = percent(90),
1705
+ .target = .Other,
1706
+ },
1707
+ // Thief
1708
+ .{
1709
+ .effect = .Thief,
1710
+ .bp = 40,
1711
+ .type = .Dark,
1712
+ .accuracy = percent(100),
1713
+ .target = .Other,
1714
+ .chance = percent(100),
1715
+ .extra = .{ .metronome = false },
1716
+ },
1717
+ // SpiderWeb
1718
+ .{
1719
+ .effect = .MeanLook,
1720
+ .bp = 0,
1721
+ .type = .Bug,
1722
+ .accuracy = percent(100),
1723
+ .target = .Other,
1724
+ },
1725
+ // MindReader
1726
+ .{
1727
+ .effect = .LockOn,
1728
+ .bp = 0,
1729
+ .type = .Normal,
1730
+ .accuracy = percent(100),
1731
+ .target = .Other,
1732
+ },
1733
+ // Nightmare
1734
+ .{
1735
+ .effect = .Nightmare,
1736
+ .bp = 0,
1737
+ .type = .Ghost,
1738
+ .accuracy = percent(100),
1739
+ .target = .Other,
1740
+ },
1741
+ // FlameWheel
1742
+ .{
1743
+ .effect = .FlameWheel,
1744
+ .bp = 60,
1745
+ .type = .Fire,
1746
+ .accuracy = percent(100),
1747
+ .target = .Other,
1748
+ .chance = percent(10),
1749
+ },
1750
+ // Snore
1751
+ .{
1752
+ .effect = .Snore,
1753
+ .bp = 40,
1754
+ .type = .Normal,
1755
+ .accuracy = percent(100),
1756
+ .target = .Other,
1757
+ .chance = percent(30),
1758
+ },
1759
+ // Curse
1760
+ .{
1761
+ .effect = .Curse,
1762
+ .bp = 0,
1763
+ .type = .@"???",
1764
+ .accuracy = percent(100),
1765
+ .target = .Other,
1766
+ },
1767
+ // Flail
1768
+ .{
1769
+ .effect = .Reversal,
1770
+ .bp = 0,
1771
+ .type = .Normal,
1772
+ .accuracy = percent(100),
1773
+ .target = .Other,
1774
+ },
1775
+ // Conversion2
1776
+ .{
1777
+ .effect = .Conversion2,
1778
+ .bp = 0,
1779
+ .type = .Normal,
1780
+ .accuracy = percent(100),
1781
+ .target = .Other,
1782
+ },
1783
+ // Aeroblast
1784
+ .{
1785
+ .effect = .HighCritical,
1786
+ .bp = 100,
1787
+ .type = .Flying,
1788
+ .accuracy = percent(95),
1789
+ .target = .Any,
1790
+ },
1791
+ // CottonSpore
1792
+ .{
1793
+ .effect = .SpeedDown2,
1794
+ .bp = 0,
1795
+ .type = .Grass,
1796
+ .accuracy = percent(85),
1797
+ .target = .Other,
1798
+ },
1799
+ // Reversal
1800
+ .{
1801
+ .effect = .Reversal,
1802
+ .bp = 0,
1803
+ .type = .Fighting,
1804
+ .accuracy = percent(100),
1805
+ .target = .Other,
1806
+ },
1807
+ // Spite
1808
+ .{
1809
+ .effect = .Spite,
1810
+ .bp = 0,
1811
+ .type = .Ghost,
1812
+ .accuracy = percent(100),
1813
+ .target = .Other,
1814
+ },
1815
+ // PowderSnow
1816
+ .{
1817
+ .effect = .FreezeChance,
1818
+ .bp = 40,
1819
+ .type = .Ice,
1820
+ .accuracy = percent(100),
1821
+ .target = .Foes,
1822
+ .chance = percent(10),
1823
+ },
1824
+ // Protect
1825
+ .{
1826
+ .effect = .Protect,
1827
+ .bp = 0,
1828
+ .type = .Normal,
1829
+ .accuracy = percent(100),
1830
+ .target = .Self,
1831
+ .priority = 2,
1832
+ .extra = .{ .metronome = false },
1833
+ },
1834
+ // MachPunch
1835
+ .{
1836
+ .effect = .Priority,
1837
+ .bp = 40,
1838
+ .type = .Fighting,
1839
+ .accuracy = percent(100),
1840
+ .target = .Other,
1841
+ .priority = 1,
1842
+ },
1843
+ // ScaryFace
1844
+ .{
1845
+ .effect = .SpeedDown2,
1846
+ .bp = 0,
1847
+ .type = .Normal,
1848
+ .accuracy = percent(90),
1849
+ .target = .Other,
1850
+ },
1851
+ // FeintAttack
1852
+ .{
1853
+ .effect = .AlwaysHit,
1854
+ .bp = 60,
1855
+ .type = .Dark,
1856
+ .accuracy = percent(100),
1857
+ .target = .Other,
1858
+ },
1859
+ // SweetKiss
1860
+ .{
1861
+ .effect = .Confusion,
1862
+ .bp = 0,
1863
+ .type = .Normal,
1864
+ .accuracy = percent(75),
1865
+ .target = .Other,
1866
+ },
1867
+ // BellyDrum
1868
+ .{
1869
+ .effect = .BellyDrum,
1870
+ .bp = 0,
1871
+ .type = .Normal,
1872
+ .accuracy = percent(100),
1873
+ .target = .Self,
1874
+ },
1875
+ // SludgeBomb
1876
+ .{
1877
+ .effect = .PoisonChance,
1878
+ .bp = 90,
1879
+ .type = .Poison,
1880
+ .accuracy = percent(100),
1881
+ .target = .Other,
1882
+ .chance = percent(30),
1883
+ },
1884
+ // MudSlap
1885
+ .{
1886
+ .effect = .AccuracyDownChance,
1887
+ .bp = 20,
1888
+ .type = .Ground,
1889
+ .accuracy = percent(100),
1890
+ .target = .Other,
1891
+ .chance = percent(100),
1892
+ },
1893
+ // Octazooka
1894
+ .{
1895
+ .effect = .AccuracyDownChance,
1896
+ .bp = 65,
1897
+ .type = .Water,
1898
+ .accuracy = percent(85),
1899
+ .target = .Other,
1900
+ .chance = percent(50),
1901
+ },
1902
+ // Spikes
1903
+ .{
1904
+ .effect = .Spikes,
1905
+ .bp = 0,
1906
+ .type = .Ground,
1907
+ .accuracy = percent(100),
1908
+ .target = .FoeSide,
1909
+ },
1910
+ // ZapCannon
1911
+ .{
1912
+ .effect = .ParalyzeChance,
1913
+ .bp = 100,
1914
+ .type = .Electric,
1915
+ .accuracy = percent(50),
1916
+ .target = .Other,
1917
+ .chance = percent(100),
1918
+ },
1919
+ // Foresight
1920
+ .{
1921
+ .effect = .Foresight,
1922
+ .bp = 0,
1923
+ .type = .Normal,
1924
+ .accuracy = percent(100),
1925
+ .target = .Other,
1926
+ },
1927
+ // DestinyBond
1928
+ .{
1929
+ .effect = .DestinyBond,
1930
+ .bp = 0,
1931
+ .type = .Ghost,
1932
+ .accuracy = percent(100),
1933
+ .target = .Self,
1934
+ .extra = .{ .metronome = false },
1935
+ },
1936
+ // PerishSong
1937
+ .{
1938
+ .effect = .PerishSong,
1939
+ .bp = 0,
1940
+ .type = .Normal,
1941
+ .accuracy = percent(100),
1942
+ .target = .All,
1943
+ },
1944
+ // IcyWind
1945
+ .{
1946
+ .effect = .SpeedDownChance,
1947
+ .bp = 55,
1948
+ .type = .Ice,
1949
+ .accuracy = percent(95),
1950
+ .target = .Foes,
1951
+ .chance = percent(100),
1952
+ },
1953
+ // Detect
1954
+ .{
1955
+ .effect = .Protect,
1956
+ .bp = 0,
1957
+ .type = .Fighting,
1958
+ .accuracy = percent(100),
1959
+ .target = .Self,
1960
+ .priority = 2,
1961
+ .extra = .{ .metronome = false },
1962
+ },
1963
+ // BoneRush
1964
+ .{
1965
+ .effect = .MultiHit,
1966
+ .bp = 25,
1967
+ .type = .Ground,
1968
+ .accuracy = percent(80),
1969
+ .target = .Other,
1970
+ },
1971
+ // LockOn
1972
+ .{
1973
+ .effect = .LockOn,
1974
+ .bp = 0,
1975
+ .type = .Normal,
1976
+ .accuracy = percent(100),
1977
+ .target = .Other,
1978
+ },
1979
+ // Outrage
1980
+ .{
1981
+ .effect = .Thrashing,
1982
+ .bp = 90,
1983
+ .type = .Dragon,
1984
+ .accuracy = percent(100),
1985
+ .target = .RandomFoe,
1986
+ .extra = .{ .continuous = true },
1987
+ },
1988
+ // Sandstorm
1989
+ .{
1990
+ .effect = .Sandstorm,
1991
+ .bp = 0,
1992
+ .type = .Rock,
1993
+ .accuracy = percent(100),
1994
+ .target = .All,
1995
+ },
1996
+ // GigaDrain
1997
+ .{
1998
+ .effect = .DrainHP,
1999
+ .bp = 60,
2000
+ .type = .Grass,
2001
+ .accuracy = percent(100),
2002
+ .target = .Other,
2003
+ },
2004
+ // Endure
2005
+ .{
2006
+ .effect = .Endure,
2007
+ .bp = 0,
2008
+ .type = .Normal,
2009
+ .accuracy = percent(100),
2010
+ .target = .Self,
2011
+ .priority = 2,
2012
+ .extra = .{ .metronome = false },
2013
+ },
2014
+ // Charm
2015
+ .{
2016
+ .effect = .AttackDown2,
2017
+ .bp = 0,
2018
+ .type = .Normal,
2019
+ .accuracy = percent(100),
2020
+ .target = .Other,
2021
+ },
2022
+ // Rollout
2023
+ .{
2024
+ .effect = .Rollout,
2025
+ .bp = 30,
2026
+ .type = .Rock,
2027
+ .accuracy = percent(90),
2028
+ .target = .Other,
2029
+ .extra = .{ .continuous = true },
2030
+ },
2031
+ // FalseSwipe
2032
+ .{
2033
+ .effect = .FalseSwipe,
2034
+ .bp = 40,
2035
+ .type = .Normal,
2036
+ .accuracy = percent(100),
2037
+ .target = .Other,
2038
+ },
2039
+ // Swagger
2040
+ .{
2041
+ .effect = .Swagger,
2042
+ .bp = 0,
2043
+ .type = .Normal,
2044
+ .accuracy = percent(90),
2045
+ .target = .Other,
2046
+ },
2047
+ // MilkDrink
2048
+ .{
2049
+ .effect = .Heal,
2050
+ .bp = 0,
2051
+ .type = .Normal,
2052
+ .accuracy = percent(100),
2053
+ .target = .Self,
2054
+ },
2055
+ // Spark
2056
+ .{
2057
+ .effect = .ParalyzeChance,
2058
+ .bp = 65,
2059
+ .type = .Electric,
2060
+ .accuracy = percent(100),
2061
+ .target = .Other,
2062
+ .chance = percent(30),
2063
+ },
2064
+ // FuryCutter
2065
+ .{
2066
+ .effect = .FuryCutter,
2067
+ .bp = 10,
2068
+ .type = .Bug,
2069
+ .accuracy = percent(95),
2070
+ .target = .Other,
2071
+ },
2072
+ // SteelWing
2073
+ .{
2074
+ .effect = .DefenseUpChance,
2075
+ .bp = 70,
2076
+ .type = .Steel,
2077
+ .accuracy = percent(90),
2078
+ .target = .Other,
2079
+ .chance = percent(10),
2080
+ },
2081
+ // MeanLook
2082
+ .{
2083
+ .effect = .MeanLook,
2084
+ .bp = 0,
2085
+ .type = .Normal,
2086
+ .accuracy = percent(100),
2087
+ .target = .Other,
2088
+ },
2089
+ // Attract
2090
+ .{
2091
+ .effect = .Attract,
2092
+ .bp = 0,
2093
+ .type = .Normal,
2094
+ .accuracy = percent(100),
2095
+ .target = .Other,
2096
+ },
2097
+ // SleepTalk
2098
+ .{
2099
+ .effect = .SleepTalk,
2100
+ .bp = 0,
2101
+ .type = .Normal,
2102
+ .accuracy = percent(100),
2103
+ .target = .Self,
2104
+ .extra = .{ .metronome = false },
2105
+ },
2106
+ // HealBell
2107
+ .{
2108
+ .effect = .HealBell,
2109
+ .bp = 0,
2110
+ .type = .Normal,
2111
+ .accuracy = percent(100),
2112
+ .target = .Self,
2113
+ },
2114
+ // Return
2115
+ .{
2116
+ .effect = .Return,
2117
+ .bp = 0,
2118
+ .type = .Normal,
2119
+ .accuracy = percent(100),
2120
+ .target = .Other,
2121
+ },
2122
+ // Present
2123
+ .{
2124
+ .effect = .Present,
2125
+ .bp = 0,
2126
+ .type = .Normal,
2127
+ .accuracy = percent(90),
2128
+ .target = .Other,
2129
+ },
2130
+ // Frustration
2131
+ .{
2132
+ .effect = .Frustration,
2133
+ .bp = 0,
2134
+ .type = .Normal,
2135
+ .accuracy = percent(100),
2136
+ .target = .Other,
2137
+ },
2138
+ // Safeguard
2139
+ .{
2140
+ .effect = .Safeguard,
2141
+ .bp = 0,
2142
+ .type = .Normal,
2143
+ .accuracy = percent(100),
2144
+ .target = .AllySide,
2145
+ },
2146
+ // PainSplit
2147
+ .{
2148
+ .effect = .PainSplit,
2149
+ .bp = 0,
2150
+ .type = .Normal,
2151
+ .accuracy = percent(100),
2152
+ .target = .Other,
2153
+ },
2154
+ // SacredFire
2155
+ .{
2156
+ .effect = .SacredFire,
2157
+ .bp = 100,
2158
+ .type = .Fire,
2159
+ .accuracy = percent(95),
2160
+ .target = .Other,
2161
+ .chance = percent(50),
2162
+ },
2163
+ // Magnitude
2164
+ .{
2165
+ .effect = .Magnitude,
2166
+ .bp = 0,
2167
+ .type = .Ground,
2168
+ .accuracy = percent(100),
2169
+ .target = .AllOthers,
2170
+ .extra = .{ .underground = true },
2171
+ },
2172
+ // DynamicPunch
2173
+ .{
2174
+ .effect = .ConfusionChance,
2175
+ .bp = 100,
2176
+ .type = .Fighting,
2177
+ .accuracy = percent(50),
2178
+ .target = .Other,
2179
+ .chance = percent(100),
2180
+ },
2181
+ // Megahorn
2182
+ .{
2183
+ .effect = .None,
2184
+ .bp = 120,
2185
+ .type = .Bug,
2186
+ .accuracy = percent(85),
2187
+ .target = .Other,
2188
+ },
2189
+ // DragonBreath
2190
+ .{
2191
+ .effect = .ParalyzeChance,
2192
+ .bp = 60,
2193
+ .type = .Dragon,
2194
+ .accuracy = percent(100),
2195
+ .target = .Other,
2196
+ .chance = percent(30),
2197
+ },
2198
+ // BatonPass
2199
+ .{
2200
+ .effect = .BatonPass,
2201
+ .bp = 0,
2202
+ .type = .Normal,
2203
+ .accuracy = percent(100),
2204
+ .target = .Self,
2205
+ },
2206
+ // Encore
2207
+ .{
2208
+ .effect = .Encore,
2209
+ .bp = 0,
2210
+ .type = .Normal,
2211
+ .accuracy = percent(100),
2212
+ .target = .Other,
2213
+ },
2214
+ // Pursuit
2215
+ .{
2216
+ .effect = .Pursuit,
2217
+ .bp = 40,
2218
+ .type = .Dark,
2219
+ .accuracy = percent(100),
2220
+ .target = .Other,
2221
+ },
2222
+ // RapidSpin
2223
+ .{
2224
+ .effect = .RapidSpin,
2225
+ .bp = 20,
2226
+ .type = .Normal,
2227
+ .accuracy = percent(100),
2228
+ .target = .Other,
2229
+ },
2230
+ // SweetScent
2231
+ .{
2232
+ .effect = .EvasionDown1,
2233
+ .bp = 0,
2234
+ .type = .Normal,
2235
+ .accuracy = percent(100),
2236
+ .target = .Foes,
2237
+ },
2238
+ // IronTail
2239
+ .{
2240
+ .effect = .DefenseDownChance,
2241
+ .bp = 100,
2242
+ .type = .Steel,
2243
+ .accuracy = percent(75),
2244
+ .target = .Other,
2245
+ .chance = percent(30),
2246
+ },
2247
+ // MetalClaw
2248
+ .{
2249
+ .effect = .AttackUpChance,
2250
+ .bp = 50,
2251
+ .type = .Steel,
2252
+ .accuracy = percent(95),
2253
+ .target = .Other,
2254
+ .chance = percent(10),
2255
+ },
2256
+ // VitalThrow
2257
+ .{
2258
+ .effect = .AlwaysHit,
2259
+ .bp = 70,
2260
+ .type = .Fighting,
2261
+ .accuracy = percent(100),
2262
+ .target = .Other,
2263
+ .priority = -1,
2264
+ },
2265
+ // MorningSun
2266
+ .{
2267
+ .effect = .MorningSun,
2268
+ .bp = 0,
2269
+ .type = .Normal,
2270
+ .accuracy = percent(100),
2271
+ .target = .Self,
2272
+ },
2273
+ // Synthesis
2274
+ .{
2275
+ .effect = .Synthesis,
2276
+ .bp = 0,
2277
+ .type = .Grass,
2278
+ .accuracy = percent(100),
2279
+ .target = .Self,
2280
+ },
2281
+ // Moonlight
2282
+ .{
2283
+ .effect = .Moonlight,
2284
+ .bp = 0,
2285
+ .type = .Normal,
2286
+ .accuracy = percent(100),
2287
+ .target = .Self,
2288
+ },
2289
+ // HiddenPower
2290
+ .{
2291
+ .effect = .HiddenPower,
2292
+ .bp = 0,
2293
+ .type = .Normal,
2294
+ .accuracy = percent(100),
2295
+ .target = .Other,
2296
+ },
2297
+ // CrossChop
2298
+ .{
2299
+ .effect = .HighCritical,
2300
+ .bp = 100,
2301
+ .type = .Fighting,
2302
+ .accuracy = percent(80),
2303
+ .target = .Other,
2304
+ },
2305
+ // Twister
2306
+ .{
2307
+ .effect = .Twister,
2308
+ .bp = 40,
2309
+ .type = .Dragon,
2310
+ .accuracy = percent(100),
2311
+ .target = .Foes,
2312
+ .chance = percent(20),
2313
+ .extra = .{ .flying = true },
2314
+ },
2315
+ // RainDance
2316
+ .{
2317
+ .effect = .RainDance,
2318
+ .bp = 0,
2319
+ .type = .Water,
2320
+ .accuracy = percent(100),
2321
+ .target = .All,
2322
+ },
2323
+ // SunnyDay
2324
+ .{
2325
+ .effect = .SunnyDay,
2326
+ .bp = 0,
2327
+ .type = .Fire,
2328
+ .accuracy = percent(100),
2329
+ .target = .All,
2330
+ },
2331
+ // Crunch
2332
+ .{
2333
+ .effect = .SpDefDownChance,
2334
+ .bp = 80,
2335
+ .type = .Dark,
2336
+ .accuracy = percent(100),
2337
+ .target = .Other,
2338
+ .chance = percent(20),
2339
+ },
2340
+ // MirrorCoat
2341
+ .{
2342
+ .effect = .MirrorCoat,
2343
+ .bp = 0,
2344
+ .type = .Psychic,
2345
+ .accuracy = percent(100),
2346
+ .target = .Depends,
2347
+ .priority = -1,
2348
+ .extra = .{ .metronome = false },
2349
+ },
2350
+ // PsychUp
2351
+ .{
2352
+ .effect = .PsychUp,
2353
+ .bp = 0,
2354
+ .type = .Normal,
2355
+ .accuracy = percent(100),
2356
+ .target = .Other,
2357
+ },
2358
+ // ExtremeSpeed
2359
+ .{
2360
+ .effect = .Priority,
2361
+ .bp = 80,
2362
+ .type = .Normal,
2363
+ .accuracy = percent(100),
2364
+ .target = .Other,
2365
+ .priority = 1,
2366
+ },
2367
+ // AncientPower
2368
+ .{
2369
+ .effect = .AllStatUpChance,
2370
+ .bp = 60,
2371
+ .type = .Rock,
2372
+ .accuracy = percent(100),
2373
+ .target = .Other,
2374
+ .chance = percent(10),
2375
+ },
2376
+ // ShadowBall
2377
+ .{
2378
+ .effect = .SpDefDownChance,
2379
+ .bp = 80,
2380
+ .type = .Ghost,
2381
+ .accuracy = percent(100),
2382
+ .target = .Other,
2383
+ .chance = percent(20),
2384
+ },
2385
+ // FutureSight
2386
+ .{
2387
+ .effect = .FutureSight,
2388
+ .bp = 80,
2389
+ .type = .Psychic,
2390
+ .accuracy = percent(90),
2391
+ .target = .Other,
2392
+ },
2393
+ // RockSmash
2394
+ .{
2395
+ .effect = .DefenseDownChance,
2396
+ .bp = 20,
2397
+ .type = .Fighting,
2398
+ .accuracy = percent(100),
2399
+ .target = .Other,
2400
+ .chance = percent(50),
2401
+ },
2402
+ // Whirlpool
2403
+ .{
2404
+ .effect = .Binding,
2405
+ .bp = 15,
2406
+ .type = .Water,
2407
+ .accuracy = percent(70),
2408
+ .target = .Other,
2409
+ .extra = .{ .protocol = 5 },
2410
+ },
2411
+ // BeatUp
2412
+ .{
2413
+ .effect = .BeatUp,
2414
+ .bp = 10,
2415
+ .type = .Dark,
2416
+ .accuracy = percent(100),
2417
+ .target = .Other,
2418
+ },
2419
+ };
2420
+
2421
+ /// Representation of a move's effect.
2422
+ pub const Effect = enum(u8) {
2423
+ None,
2424
+ AccuracyDown1,
2425
+ AccuracyDownChance,
2426
+ AllStatUpChance,
2427
+ AlwaysHit,
2428
+ AttackDown1,
2429
+ AttackDown2,
2430
+ AttackDownChance,
2431
+ AttackUp1,
2432
+ AttackUp2,
2433
+ AttackUpChance,
2434
+ Attract,
2435
+ BatonPass,
2436
+ BeatUp,
2437
+ BellyDrum,
2438
+ Bide,
2439
+ Binding,
2440
+ BurnChance,
2441
+ Confusion,
2442
+ ConfusionChance,
2443
+ Conversion,
2444
+ Conversion2,
2445
+ Counter,
2446
+ Curse,
2447
+ DefenseCurl,
2448
+ DefenseDown1,
2449
+ DefenseDown2,
2450
+ DefenseDownChance,
2451
+ DefenseUp1,
2452
+ DefenseUp2,
2453
+ DefenseUpChance,
2454
+ DestinyBond,
2455
+ Disable,
2456
+ DoubleHit,
2457
+ DrainHP,
2458
+ DreamEater,
2459
+ Earthquake,
2460
+ Encore,
2461
+ Endure,
2462
+ EvasionDown1,
2463
+ EvasionUp1,
2464
+ Explode,
2465
+ FalseSwipe,
2466
+ FixedDamage,
2467
+ FlameWheel,
2468
+ FlinchChance,
2469
+ FlyDig,
2470
+ FocusEnergy,
2471
+ ForceSwitch,
2472
+ Foresight,
2473
+ FreezeChance,
2474
+ Frustration,
2475
+ FuryCutter,
2476
+ FutureSight,
2477
+ Gust,
2478
+ Haze,
2479
+ Heal,
2480
+ HealBell,
2481
+ HiddenPower,
2482
+ HighCritical,
2483
+ HyperBeam,
2484
+ JumpKick,
2485
+ LeechSeed,
2486
+ LevelDamage,
2487
+ LightScreen,
2488
+ LockOn,
2489
+ Magnitude,
2490
+ MeanLook,
2491
+ Metronome,
2492
+ Mimic,
2493
+ MirrorCoat,
2494
+ MirrorMove,
2495
+ Mist,
2496
+ Moonlight,
2497
+ MorningSun,
2498
+ MultiHit,
2499
+ Nightmare,
2500
+ OHKO,
2501
+ PainSplit,
2502
+ Paralyze,
2503
+ ParalyzeChance,
2504
+ PayDay,
2505
+ PerishSong,
2506
+ Poison,
2507
+ PoisonChance,
2508
+ Present,
2509
+ Priority,
2510
+ Protect,
2511
+ PsychUp,
2512
+ Psywave,
2513
+ Pursuit,
2514
+ Rage,
2515
+ RainDance,
2516
+ RapidSpin,
2517
+ RazorWind,
2518
+ Recoil,
2519
+ Reflect,
2520
+ Return,
2521
+ Reversal,
2522
+ Rollout,
2523
+ SacredFire,
2524
+ Safeguard,
2525
+ Sandstorm,
2526
+ Sketch,
2527
+ SkullBash,
2528
+ SkyAttack,
2529
+ Sleep,
2530
+ SleepTalk,
2531
+ Snore,
2532
+ SolarBeam,
2533
+ SpAtkUp1,
2534
+ SpDefDownChance,
2535
+ SpDefUp2,
2536
+ SpeedDown1,
2537
+ SpeedDown2,
2538
+ SpeedDownChance,
2539
+ SpeedUp2,
2540
+ Spikes,
2541
+ Spite,
2542
+ Splash,
2543
+ Stomp,
2544
+ Substitute,
2545
+ SunnyDay,
2546
+ SuperFang,
2547
+ Swagger,
2548
+ Synthesis,
2549
+ Teleport,
2550
+ Thief,
2551
+ Thrashing,
2552
+ Thunder,
2553
+ Toxic,
2554
+ Transform,
2555
+ TriAttack,
2556
+ TripleKick,
2557
+ Twineedle,
2558
+ Twister,
2559
+
2560
+ comptime {
2561
+ assert(@sizeOf(Effect) == 1);
2562
+ }
2563
+
2564
+ /// Whether this effect has a high critical rate.
2565
+ pub fn isHighCritical(effect: Effect) bool {
2566
+ return effect == .HighCritical or effect == .RazorWind;
2567
+ }
2568
+ };
2569
+
2570
+ const Target = enum(u8) {
2571
+ // none
2572
+ All,
2573
+ AllySide,
2574
+ Field,
2575
+ Self,
2576
+ // resolve
2577
+ AllOthers,
2578
+ Depends,
2579
+ Other,
2580
+ Any,
2581
+ Allies,
2582
+ Ally,
2583
+ AllyOrSelf,
2584
+ Foe,
2585
+ // resolve + run
2586
+ Foes,
2587
+ FoeSide,
2588
+ RandomFoe,
2589
+ };
2590
+
2591
+ const PP = [_]u8{
2592
+ 35, // Pound
2593
+ 25, // KarateChop
2594
+ 10, // DoubleSlap
2595
+ 15, // CometPunch
2596
+ 20, // MegaPunch
2597
+ 20, // PayDay
2598
+ 15, // FirePunch
2599
+ 15, // IcePunch
2600
+ 15, // ThunderPunch
2601
+ 35, // Scratch
2602
+ 30, // ViseGrip
2603
+ 5, // Guillotine
2604
+ 10, // RazorWind
2605
+ 30, // SwordsDance
2606
+ 30, // Cut
2607
+ 35, // Gust
2608
+ 35, // WingAttack
2609
+ 20, // Whirlwind
2610
+ 15, // Fly
2611
+ 20, // Bind
2612
+ 20, // Slam
2613
+ 10, // VineWhip
2614
+ 20, // Stomp
2615
+ 30, // DoubleKick
2616
+ 5, // MegaKick
2617
+ 25, // JumpKick
2618
+ 15, // RollingKick
2619
+ 15, // SandAttack
2620
+ 15, // Headbutt
2621
+ 25, // HornAttack
2622
+ 20, // FuryAttack
2623
+ 5, // HornDrill
2624
+ 35, // Tackle
2625
+ 15, // BodySlam
2626
+ 20, // Wrap
2627
+ 20, // TakeDown
2628
+ 20, // Thrash
2629
+ 15, // DoubleEdge
2630
+ 30, // TailWhip
2631
+ 35, // PoisonSting
2632
+ 20, // Twineedle
2633
+ 20, // PinMissile
2634
+ 30, // Leer
2635
+ 25, // Bite
2636
+ 40, // Growl
2637
+ 20, // Roar
2638
+ 15, // Sing
2639
+ 20, // Supersonic
2640
+ 20, // SonicBoom
2641
+ 20, // Disable
2642
+ 30, // Acid
2643
+ 25, // Ember
2644
+ 15, // Flamethrower
2645
+ 30, // Mist
2646
+ 25, // WaterGun
2647
+ 5, // HydroPump
2648
+ 15, // Surf
2649
+ 10, // IceBeam
2650
+ 5, // Blizzard
2651
+ 20, // Psybeam
2652
+ 20, // BubbleBeam
2653
+ 20, // AuroraBeam
2654
+ 5, // HyperBeam
2655
+ 35, // Peck
2656
+ 20, // DrillPeck
2657
+ 25, // Submission
2658
+ 20, // LowKick
2659
+ 20, // Counter
2660
+ 20, // SeismicToss
2661
+ 15, // Strength
2662
+ 20, // Absorb
2663
+ 10, // MegaDrain
2664
+ 10, // LeechSeed
2665
+ 40, // Growth
2666
+ 25, // RazorLeaf
2667
+ 10, // SolarBeam
2668
+ 35, // PoisonPowder
2669
+ 30, // StunSpore
2670
+ 15, // SleepPowder
2671
+ 20, // PetalDance
2672
+ 40, // StringShot
2673
+ 10, // DragonRage
2674
+ 15, // FireSpin
2675
+ 30, // ThunderShock
2676
+ 15, // Thunderbolt
2677
+ 20, // ThunderWave
2678
+ 10, // Thunder
2679
+ 15, // RockThrow
2680
+ 10, // Earthquake
2681
+ 5, // Fissure
2682
+ 10, // Dig
2683
+ 10, // Toxic
2684
+ 25, // Confusion
2685
+ 10, // Psychic
2686
+ 20, // Hypnosis
2687
+ 40, // Meditate
2688
+ 30, // Agility
2689
+ 30, // QuickAttack
2690
+ 20, // Rage
2691
+ 20, // Teleport
2692
+ 15, // NightShade
2693
+ 10, // Mimic
2694
+ 40, // Screech
2695
+ 15, // DoubleTeam
2696
+ 20, // Recover
2697
+ 30, // Harden
2698
+ 20, // Minimize
2699
+ 20, // Smokescreen
2700
+ 10, // ConfuseRay
2701
+ 40, // Withdraw
2702
+ 40, // DefenseCurl
2703
+ 30, // Barrier
2704
+ 30, // LightScreen
2705
+ 30, // Haze
2706
+ 20, // Reflect
2707
+ 30, // FocusEnergy
2708
+ 10, // Bide
2709
+ 10, // Metronome
2710
+ 20, // MirrorMove
2711
+ 5, // SelfDestruct
2712
+ 10, // EggBomb
2713
+ 30, // Lick
2714
+ 20, // Smog
2715
+ 20, // Sludge
2716
+ 20, // BoneClub
2717
+ 5, // FireBlast
2718
+ 15, // Waterfall
2719
+ 10, // Clamp
2720
+ 20, // Swift
2721
+ 15, // SkullBash
2722
+ 15, // SpikeCannon
2723
+ 35, // Constrict
2724
+ 20, // Amnesia
2725
+ 15, // Kinesis
2726
+ 10, // SoftBoiled
2727
+ 20, // HighJumpKick
2728
+ 30, // Glare
2729
+ 15, // DreamEater
2730
+ 40, // PoisonGas
2731
+ 20, // Barrage
2732
+ 15, // LeechLife
2733
+ 10, // LovelyKiss
2734
+ 5, // SkyAttack
2735
+ 10, // Transform
2736
+ 30, // Bubble
2737
+ 10, // DizzyPunch
2738
+ 15, // Spore
2739
+ 20, // Flash
2740
+ 15, // Psywave
2741
+ 40, // Splash
2742
+ 40, // AcidArmor
2743
+ 10, // Crabhammer
2744
+ 5, // Explosion
2745
+ 15, // FurySwipes
2746
+ 10, // Bonemerang
2747
+ 10, // Rest
2748
+ 10, // RockSlide
2749
+ 15, // HyperFang
2750
+ 30, // Sharpen
2751
+ 30, // Conversion
2752
+ 10, // TriAttack
2753
+ 10, // SuperFang
2754
+ 20, // Slash
2755
+ 10, // Substitute
2756
+ 1, // Struggle
2757
+ 1, // Sketch
2758
+ 10, // TripleKick
2759
+ 10, // Thief
2760
+ 10, // SpiderWeb
2761
+ 5, // MindReader
2762
+ 15, // Nightmare
2763
+ 25, // FlameWheel
2764
+ 15, // Snore
2765
+ 10, // Curse
2766
+ 15, // Flail
2767
+ 30, // Conversion2
2768
+ 5, // Aeroblast
2769
+ 40, // CottonSpore
2770
+ 15, // Reversal
2771
+ 10, // Spite
2772
+ 25, // PowderSnow
2773
+ 10, // Protect
2774
+ 30, // MachPunch
2775
+ 10, // ScaryFace
2776
+ 20, // FeintAttack
2777
+ 10, // SweetKiss
2778
+ 10, // BellyDrum
2779
+ 10, // SludgeBomb
2780
+ 10, // MudSlap
2781
+ 10, // Octazooka
2782
+ 20, // Spikes
2783
+ 5, // ZapCannon
2784
+ 40, // Foresight
2785
+ 5, // DestinyBond
2786
+ 5, // PerishSong
2787
+ 15, // IcyWind
2788
+ 5, // Detect
2789
+ 10, // BoneRush
2790
+ 5, // LockOn
2791
+ 15, // Outrage
2792
+ 10, // Sandstorm
2793
+ 5, // GigaDrain
2794
+ 10, // Endure
2795
+ 20, // Charm
2796
+ 20, // Rollout
2797
+ 40, // FalseSwipe
2798
+ 15, // Swagger
2799
+ 10, // MilkDrink
2800
+ 20, // Spark
2801
+ 20, // FuryCutter
2802
+ 25, // SteelWing
2803
+ 5, // MeanLook
2804
+ 15, // Attract
2805
+ 10, // SleepTalk
2806
+ 5, // HealBell
2807
+ 20, // Return
2808
+ 15, // Present
2809
+ 20, // Frustration
2810
+ 25, // Safeguard
2811
+ 20, // PainSplit
2812
+ 5, // SacredFire
2813
+ 30, // Magnitude
2814
+ 5, // DynamicPunch
2815
+ 10, // Megahorn
2816
+ 20, // DragonBreath
2817
+ 40, // BatonPass
2818
+ 5, // Encore
2819
+ 20, // Pursuit
2820
+ 40, // RapidSpin
2821
+ 20, // SweetScent
2822
+ 15, // IronTail
2823
+ 35, // MetalClaw
2824
+ 10, // VitalThrow
2825
+ 5, // MorningSun
2826
+ 5, // Synthesis
2827
+ 5, // Moonlight
2828
+ 15, // HiddenPower
2829
+ 5, // CrossChop
2830
+ 20, // Twister
2831
+ 5, // RainDance
2832
+ 5, // SunnyDay
2833
+ 15, // Crunch
2834
+ 20, // MirrorCoat
2835
+ 10, // PsychUp
2836
+ 5, // ExtremeSpeed
2837
+ 5, // AncientPower
2838
+ 15, // ShadowBall
2839
+ 15, // FutureSight
2840
+ 15, // RockSmash
2841
+ 15, // Whirlpool
2842
+ 10, // BeatUp,
2843
+ };
2844
+
2845
+ comptime {
2846
+ assert(@sizeOf(Move) == 1);
2847
+ assert(@sizeOf(@TypeOf(DATA)) == 2008);
2848
+ }
2849
+
2850
+ /// The number of Pokémon moves in this generation.
2851
+ pub const size = 251;
2852
+
2853
+ /// Pokémon moves that can be called by Metronome in this generation.
2854
+ pub const METRONOME = init: {
2855
+ var num = 0;
2856
+ var moves: [239]Move = undefined;
2857
+ for (1..Move.size + 1) |i| {
2858
+ if (Move.get(@enumFromInt(i)).extra.metronome) {
2859
+ moves[num] = @enumFromInt(i);
2860
+ num += 1;
2861
+ }
2862
+ }
2863
+ assert(num == moves.len);
2864
+ break :init moves;
2865
+ };
2866
+
2867
+ /// Returns the `Data` corresponding to the move.
2868
+ pub fn get(id: Move) Data {
2869
+ assert(id != .None);
2870
+ return DATA[@intFromEnum(id) - 1];
2871
+ }
2872
+
2873
+ /// Returns the base PP of the move.
2874
+ pub fn pp(id: Move) u8 {
2875
+ assert(id != .None);
2876
+ return PP[@intFromEnum(id) - 1];
2877
+ }
2878
+ };