Skip to content

Commit ed6ffd4

Browse files
author
github-actions-bot
committed
Fix the moves tests
1 parent 18a615c commit ed6ffd4

File tree

3 files changed

+62
-15
lines changed

3 files changed

+62
-15
lines changed

plugins/pokedex-data-plugin/dex/__snapshots__/moves.test.js.snap

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
99
"desc": "The user tucks in its head to raise its Defense stat on the first turn, then rams the target on the next turn.",
1010
"maxPP": 16,
1111
"moveId": 130,
12+
"movePath": "skull-bash",
1213
"name": "Skull Bash",
1314
"power": 130,
1415
"type": 0,
@@ -25,6 +26,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
2526
"desc": "The user attacks the target by scattering petals for two to three turns. The user then becomes confused.",
2627
"maxPP": 16,
2728
"moveId": 80,
29+
"movePath": "petal-dance",
2830
"name": "Petal Dance",
2931
"power": 120,
3032
"type": 11,
@@ -41,6 +43,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
4143
"desc": "A move that works differently for the Ghost type than for all other types.",
4244
"maxPP": 16,
4345
"moveId": 174,
46+
"movePath": "curse",
4447
"name": "Curse",
4548
"power": 0,
4649
"type": 7,
@@ -57,6 +60,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
5760
"desc": "The user lays roots that restore its HP on every turn. Because it’s rooted, it can’t switch out.",
5861
"maxPP": 32,
5962
"moveId": 275,
63+
"movePath": "ingrain",
6064
"name": "Ingrain",
6165
"power": 0,
6266
"type": 11,
@@ -73,6 +77,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
7377
"desc": "This attack makes use of nature’s power. Its effects vary depending on the user’s environment.",
7478
"maxPP": 32,
7579
"moveId": 267,
80+
"movePath": "nature-power",
7681
"name": "Nature Power",
7782
"power": 0,
7883
"type": 0,
@@ -89,6 +94,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
8994
"desc": "The user gazes at the target rather charmingly, making it less wary. This harshly lowers the target’s Attack stat.",
9095
"maxPP": 32,
9196
"moveId": 204,
97+
"movePath": "charm",
9298
"name": "Charm",
9399
"power": 0,
94100
"type": 17,
@@ -105,6 +111,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
105111
"desc": "The user scatters curious leaves that chase the target. This attack never misses.",
106112
"maxPP": 32,
107113
"moveId": 345,
114+
"movePath": "magical-leaf",
108115
"name": "Magical Leaf",
109116
"power": 60,
110117
"type": 11,
@@ -121,6 +128,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
121128
"desc": "The user temporarily empties its mind to forget its concerns. This sharply raises the user’s Sp. Def stat.",
122129
"maxPP": 32,
123130
"moveId": 133,
131+
"movePath": "amnesia",
124132
"name": "Amnesia",
125133
"power": 0,
126134
"type": 13,
@@ -137,6 +145,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
137145
"desc": "The user whips up a storm of leaves around the target. The attack’s recoil harshly lowers the user’s Sp. Atk stat.",
138146
"maxPP": 8,
139147
"moveId": 437,
148+
"movePath": "leaf-storm",
140149
"name": "Leaf Storm",
141150
"power": 130,
142151
"type": 11,
@@ -153,6 +162,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
153162
"desc": "The user violently whirls its vines, tentacles, or the like to harshly lash the target.",
154163
"maxPP": 16,
155164
"moveId": 438,
165+
"movePath": "power-whip",
156166
"name": "Power Whip",
157167
"power": 120,
158168
"type": 11,
@@ -169,6 +179,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
169179
"desc": "Unsanitary sludge is hurled at the target. This may also poison the target.",
170180
"maxPP": 24,
171181
"moveId": 124,
182+
"movePath": "sludge",
172183
"name": "Sludge",
173184
"power": 75,
174185
"type": 3,
@@ -185,6 +196,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
185196
"desc": "The user turns the ground to grass for five turns. This restores the HP of Pokémon on the ground a little every turn and powers up Grass-type moves.",
186197
"maxPP": 16,
187198
"moveId": 580,
199+
"movePath": "grassy-terrain",
188200
"name": "Grassy Terrain",
189201
"power": 0,
190202
"type": 11,
@@ -201,6 +213,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
201213
"desc": "The user plays a pleasant melody that lulls the target into a deep sleep.",
202214
"maxPP": 24,
203215
"moveId": 320,
216+
"movePath": "grass-whistle",
204217
"name": "Grass Whistle",
205218
"power": 0,
206219
"type": 11,
@@ -217,6 +230,7 @@ exports[`Dex Utils Move Getters getEggMoves returns an array of egg moves for a
217230
"desc": "In this two-turn attack, blades of wind hit opposing Pokémon on the second turn. Critical hits land more easily.",
218231
"maxPP": 16,
219232
"moveId": 13,
233+
"movePath": "razor-wind",
220234
"name": "Razor Wind",
221235
"power": 80,
222236
"type": 0,
@@ -233,6 +247,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
233247
"desc": "A move that leaves the target badly poisoned. Its poison damage worsens every turn.",
234248
"maxPP": 16,
235249
"moveId": 92,
250+
"movePath": "toxic",
236251
"name": "Toxic",
237252
"power": 0,
238253
"type": 3,
@@ -249,6 +264,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
249264
"desc": "The user forcefully shoots seeds at the target two to five times in a row.",
250265
"maxPP": 48,
251266
"moveId": 331,
267+
"movePath": "bullet-seed",
252268
"name": "Bullet Seed",
253269
"power": 25,
254270
"type": 11,
@@ -265,6 +281,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
265281
"desc": "A unique attack that varies in type depending on the Pokémon using it.",
266282
"maxPP": 24,
267283
"moveId": 237,
284+
"movePath": "hidden-power",
268285
"name": "Hidden Power",
269286
"power": 60,
270287
"type": 0,
@@ -281,6 +298,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
281298
"desc": "The user intensifies the sun for five turns, powering up Fire-type moves. It lowers the power of Water-type moves.",
282299
"maxPP": 8,
283300
"moveId": 241,
301+
"movePath": "sunny-day",
284302
"name": "Sunny Day",
285303
"power": 0,
286304
"type": 9,
@@ -297,6 +315,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
297315
"desc": "A wondrous wall of light is put up to reduce damage from special attacks for five turns.",
298316
"maxPP": 48,
299317
"moveId": 113,
318+
"movePath": "light-screen",
300319
"name": "Light Screen",
301320
"power": 0,
302321
"type": 13,
@@ -313,6 +332,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
313332
"desc": "This move enables the user to protect itself from all attacks. Its chance of failing rises if it is used in succession.",
314333
"maxPP": 16,
315334
"moveId": 182,
335+
"movePath": "protect",
316336
"name": "Protect",
317337
"power": 0,
318338
"type": 0,
@@ -329,6 +349,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
329349
"desc": "A nutrient-draining attack. The user’s HP is restored by half the damage taken by the target.",
330350
"maxPP": 16,
331351
"moveId": 202,
352+
"movePath": "giga-drain",
332353
"name": "Giga Drain",
333354
"power": 75,
334355
"type": 11,
@@ -345,6 +366,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
345366
"desc": "The user creates a protective field that prevents status conditions for five turns.",
346367
"maxPP": 40,
347368
"moveId": 219,
369+
"movePath": "safeguard",
348370
"name": "Safeguard",
349371
"power": 0,
350372
"type": 0,
@@ -361,6 +383,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
361383
"desc": "In this two-turn attack, the user gathers light, then blasts a bundled beam on the next turn.",
362384
"maxPP": 16,
363385
"moveId": 76,
386+
"movePath": "solar-beam",
364387
"name": "Solar Beam",
365388
"power": 120,
366389
"type": 11,
@@ -377,6 +400,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
377400
"desc": "By moving rapidly, the user makes illusory copies of itself to raise its evasiveness.",
378401
"maxPP": 24,
379402
"moveId": 104,
403+
"movePath": "double-team",
380404
"name": "Double Team",
381405
"power": 0,
382406
"type": 0,
@@ -393,6 +417,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
393417
"desc": "Unsanitary sludge is hurled at the target. This may also poison the target.",
394418
"maxPP": 16,
395419
"moveId": 188,
420+
"movePath": "sludge-bomb",
396421
"name": "Sludge Bomb",
397422
"power": 90,
398423
"type": 3,
@@ -409,6 +434,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
409434
"desc": "This attack move doubles its power if the user is poisoned, burned, or paralyzed.",
410435
"maxPP": 32,
411436
"moveId": 263,
437+
"movePath": "facade",
412438
"name": "Facade",
413439
"power": 70,
414440
"type": 0,
@@ -425,6 +451,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
425451
"desc": "The user goes to sleep for two turns. This fully restores the user’s HP and heals any status conditions.",
426452
"maxPP": 16,
427453
"moveId": 156,
454+
"movePath": "rest",
428455
"name": "Rest",
429456
"power": 0,
430457
"type": 13,
@@ -441,6 +468,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
441468
"desc": "If it is the opposite gender of the user, the target becomes infatuated and less likely to attack.",
442469
"maxPP": 24,
443470
"moveId": 213,
471+
"movePath": "attract",
444472
"name": "Attract",
445473
"power": 0,
446474
"type": 0,
@@ -457,6 +485,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
457485
"desc": "The user draws power from nature and fires it at the target. This may also lower the target’s Sp. Def stat.",
458486
"maxPP": 16,
459487
"moveId": 412,
488+
"movePath": "energy-ball",
460489
"name": "Energy Ball",
461490
"power": 90,
462491
"type": 11,
@@ -473,6 +502,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
473502
"desc": "A restrained attack that prevents the target from fainting. The target is left with at least 1 HP.",
474503
"maxPP": 64,
475504
"moveId": 206,
505+
"movePath": "false-swipe",
476506
"name": "False Swipe",
477507
"power": 40,
478508
"type": 0,
@@ -489,6 +519,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
489519
"desc": "The user endures any attack with at least 1 HP. Its chance of failing rises if it is used in succession.",
490520
"maxPP": 16,
491521
"moveId": 203,
522+
"movePath": "endure",
492523
"name": "Endure",
493524
"power": 0,
494525
"type": 0,
@@ -505,6 +536,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
505536
"desc": "The user flashes a light that lowers the target’s accuracy. It can also be used to illuminate caves.",
506537
"maxPP": 32,
507538
"moveId": 148,
539+
"movePath": "flash",
508540
"name": "Flash",
509541
"power": 0,
510542
"type": 0,
@@ -521,6 +553,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
521553
"desc": "A frenetic dance to uplift the fighting spirit. This sharply raises the user’s Attack stat.",
522554
"maxPP": 32,
523555
"moveId": 14,
556+
"movePath": "swords-dance",
524557
"name": "Swords Dance",
525558
"power": 0,
526559
"type": 0,
@@ -537,6 +570,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
537570
"desc": "While it is asleep, the user randomly uses one of the moves it knows.",
538571
"maxPP": 16,
539572
"moveId": 214,
573+
"movePath": "sleep-talk",
540574
"name": "Sleep Talk",
541575
"power": 0,
542576
"type": 0,
@@ -553,6 +587,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
553587
"desc": "The user snares the target with grass and trips it. The heavier the target, the greater the move’s power.",
554588
"maxPP": 32,
555589
"moveId": 447,
590+
"movePath": "grass-knot",
556591
"name": "Grass Knot",
557592
"power": 1,
558593
"type": 11,
@@ -569,6 +604,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
569604
"desc": "The user enrages and confuses the target. However, this also sharply raises the target’s Attack stat.",
570605
"maxPP": 24,
571606
"moveId": 207,
607+
"movePath": "swagger",
572608
"name": "Swagger",
573609
"power": 0,
574610
"type": 0,
@@ -585,6 +621,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
585621
"desc": "The user creates a substitute for itself using some of its HP. The substitute serves as the user’s decoy.",
586622
"maxPP": 16,
587623
"moveId": 164,
624+
"movePath": "substitute",
588625
"name": "Substitute",
589626
"power": 0,
590627
"type": 0,
@@ -601,6 +638,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
601638
"desc": "The target is cut with a scythe or claw. It’s also one of the Pokétch’s hidden moves.",
602639
"maxPP": 40,
603640
"moveId": 15,
641+
"movePath": "cut",
604642
"name": "Cut",
605643
"power": 60,
606644
"type": 11,
@@ -617,6 +655,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
617655
"desc": "The target is slugged with a punch thrown at maximum power. It’s also one of the Pokétch’s hidden moves.",
618656
"maxPP": 24,
619657
"moveId": 70,
658+
"movePath": "strength",
620659
"name": "Strength",
621660
"power": 100,
622661
"type": 0,
@@ -633,6 +672,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
633672
"desc": "The user attacks with a punch that may lower the target’s Defense stat. It’s also one of the Pokétch’s hidden moves.",
634673
"maxPP": 24,
635674
"moveId": 249,
675+
"movePath": "rock-smash",
636676
"name": "Rock Smash",
637677
"power": 60,
638678
"type": 1,
@@ -649,6 +689,7 @@ exports[`Dex Utils Move Getters getTechMachineLearnset returns an array of TM mo
649689
"desc": "The user is roused, and its Attack and Sp. Atk stats increase.",
650690
"maxPP": 48,
651691
"moveId": 526,
692+
"movePath": "work-up",
652693
"name": "Work Up",
653694
"power": 0,
654695
"type": 0,

plugins/pokedex-data-plugin/dex/moves.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ function getMoveProperties(moveId = 0, mode = GAMEDATA2, extendedDetails = false
118118
throw Error("There's a problem, move doesn't exist", moveId, mode);
119119
}
120120

121-
const moveName = getMoveString(moveId, mode);
121+
const moveName = moveId === 0 ? "———" : getMoveString(moveId, mode);
122122
const type = move.type;
123123
const damageType = move.damageType;
124124
const power = move.power;

0 commit comments

Comments
 (0)