forked from DizzyEggg/pokeemerald
-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More weather and type-specific tests (#3260)
Co-authored-by: Eduardo Quezada D'Ottone <[email protected]>
- Loading branch information
1 parent
0f3971a
commit 28c6a1a
Showing
21 changed files
with
757 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
TO_DO_BATTLE_TEST("Harvest has a 50% chance to restore a Berry at the end of the turn"); | ||
TO_DO_BATTLE_TEST("Harvest always restores a Berry in Sunlight"); | ||
TO_DO_BATTLE_TEST("Harvest restores a Berry even after being switched out and back in"); | ||
TO_DO_BATTLE_TEST("Harvest restores a Berry consumed by Fling"); | ||
TO_DO_BATTLE_TEST("Harvest restores a Berry consumed by Natural Gift"); | ||
TO_DO_BATTLE_TEST("Harvest only works once per turn"); // Check for berries that are consumed immediately, like Pecha Berry | ||
TO_DO_BATTLE_TEST("Harvest doesn't restore a Berry when destroyed by Incinerate"); | ||
TO_DO_BATTLE_TEST("Harvest doesn't restore a Berry when knocked off by Knock Off"); | ||
TO_DO_BATTLE_TEST("Harvest doesn't restore a Berry when eaten by Bug Bite/Pluck"); | ||
TO_DO_BATTLE_TEST("Harvest doesn't restore a Berry that's collected via Pickup"); | ||
TO_DO_BATTLE_TEST("Harvest order is affected by speed"); | ||
TO_DO_BATTLE_TEST("Harvest doesn't restore a Berry when transfered to another Pokémon"); | ||
TO_DO_BATTLE_TEST("Harvest can restore a Berry that was transferred from another Pokémon"); | ||
TO_DO_BATTLE_TEST("Harvest can only restore the newest berry consumed that was transferred from another Pokémon instead of its original Berry"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
SINGLE_BATTLE_TEST("Prankster-affected moves don't affect Dark-type Pokémon") | ||
{ | ||
GIVEN { | ||
ASSUME(gSpeciesInfo[SPECIES_UMBREON].types[0] == TYPE_DARK); | ||
PLAYER(SPECIES_UMBREON); | ||
OPPONENT(SPECIES_MURKROW) { Ability(ABILITY_PRANKSTER); } | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_CONFUSE_RAY); } | ||
} SCENE { | ||
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_CONFUSE_RAY, player); | ||
MESSAGE("It doesn't affect Umbreon…"); | ||
} | ||
} | ||
TO_DO_BATTLE_TEST("Prankster-affected moves affect Ally Dark-type Pokémon") | ||
TO_DO_BATTLE_TEST("Prankster-affected moves called via Assist don't affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves called via Nature Power don't affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves called via Instruct affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves called via After you affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves that are bounced back by Magic Bounce/Coat can affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves that are bounced back by Magic Coat from a Pokémon with Prankster can't affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves that target all Pokémon are successful regardless of the presence of Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected moves that target all Pokémon are successful regardless of the presence of Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster-affected move effects don't affect Dark-type Pokémon"); | ||
TO_DO_BATTLE_TEST("Prankster increases the priority of moves by 1"); | ||
TO_DO_BATTLE_TEST("Prankster increases the priority of status Z-Moves by 1"); | ||
TO_DO_BATTLE_TEST("Prankster increases the priority of Extreme Evoboost by 1"); | ||
TO_DO_BATTLE_TEST("Prankster is blocked by Quick Guard in Gen5+"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_AURORA_VEIL].effect == EFFECT_AURORA_VEIL); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Aurora Veil can only be used in Hail and Snow") | ||
{ | ||
u32 move; | ||
PARAMETRIZE { move = MOVE_CELEBRATE; } | ||
PARAMETRIZE { move = MOVE_HAIL; } | ||
PARAMETRIZE { move = MOVE_SNOWSCAPE; } | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, move); MOVE(player, MOVE_AURORA_VEIL); } | ||
} SCENE { | ||
if (move == MOVE_CELEBRATE) | ||
MESSAGE("But it failed!"); | ||
else | ||
NOT MESSAGE("But it failed!"); | ||
} | ||
} | ||
|
||
TO_DO_BATTLE_TEST("Aurora Veil reduces damage done to the user by half in singles") | ||
TO_DO_BATTLE_TEST("Aurora Veil reduces damage done to the user by roughly a third in doubles") | ||
TO_DO_BATTLE_TEST("Aurora Veil's damage reduction is ignored by Critical Hits") | ||
TO_DO_BATTLE_TEST("Aurora Veil's damage reduction doesn't stack with Reflect or Light Screen") | ||
TO_DO_BATTLE_TEST("Aurora Veil doesn't reduce confusion damage") | ||
TO_DO_BATTLE_TEST("Aurora Veil doesn't reduce damage done by moves that do direct damage") // Bide, Counter, Endeavor, Final Gambit, Metal Burst, Mirror Coat, Psywave, Seismic Toss, Sonic Boom, Super Fang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_HURRICANE].effect == EFFECT_HURRICANE); | ||
ASSUME(gBattleMoves[MOVE_HURRICANE].accuracy == 70); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Hurricane's accuracy is lowered to 50% in Sunlight") | ||
{ | ||
PASSES_RANDOMLY(50, 100, RNG_ACCURACY); | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SUNNY_DAY); MOVE(opponent, MOVE_HURRICANE); } | ||
} SCENE { | ||
ANIMATION(ANIM_TYPE_MOVE, MOVE_HURRICANE, opponent); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Hurricane bypasses accuracy checks in Rain") | ||
{ | ||
PASSES_RANDOMLY(100, 100, RNG_ACCURACY); | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET); | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_RAIN_DANCE); MOVE(player, MOVE_HURRICANE); } | ||
} SCENE { | ||
NONE_OF { MESSAGE("Wobbuffet's attack missed!"); } | ||
} | ||
} | ||
TO_DO_BATTLE_TEST("Hurricane Veil can hit airborne targets") // Fly, Bounce, Sky Drop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_LEECH_SEED].effect == EFFECT_LEECH_SEED); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Leech Seed doesn't affect Grass-type Pokémon") | ||
{ | ||
PASSES_RANDOMLY(90, 100, RNG_ACCURACY); | ||
GIVEN { | ||
ASSUME(gSpeciesInfo[SPECIES_ODDISH].types[0] == TYPE_GRASS); | ||
PLAYER(SPECIES_WYNAUT); | ||
OPPONENT(SPECIES_ODDISH); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_LEECH_SEED); } | ||
} SCENE { | ||
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_LEECH_SEED, player); | ||
MESSAGE("It doesn't affect Foe Oddish…"); | ||
} | ||
} | ||
TO_DO_BATTLE_TEST("Leech Seed doesn't affect already seeded targets") | ||
TO_DO_BATTLE_TEST("Leech Seeded targets lose 1/8 of its max HP every turn and give it to the user") | ||
TO_DO_BATTLE_TEST("Leech Seed's effect is paused until a new battler replaces the original user's position") // Faint, can't be replaced, then revived. | ||
TO_DO_BATTLE_TEST("Leech Seed's effect pause still prevents it from being seeded again") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_MOONLIGHT].effect == EFFECT_MOONLIGHT); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Moonlight recovers 1/2 of the user's max HP") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(200); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_MOONLIGHT); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(200 / 2)); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Moonlight recovers 2/3 of the user's max HP in Sunlight") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_SUNNY_DAY); MOVE(player, MOVE_MOONLIGHT); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(300 / 1.5)); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Moonlight recovers 1/4 of the user's max HP in Rain, Sandstorm, Hail, and Snow") | ||
{ | ||
u32 move; | ||
PARAMETRIZE { move = MOVE_RAIN_DANCE; } | ||
PARAMETRIZE { move = MOVE_SANDSTORM; } | ||
PARAMETRIZE { move = MOVE_HAIL; } | ||
PARAMETRIZE { move = MOVE_SNOWSCAPE; } | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, move); MOVE(player, MOVE_MOONLIGHT); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(400 / 4)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_MORNING_SUN].effect == EFFECT_MORNING_SUN); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Morning Sun recovers 1/2 of the user's max HP") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(200); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_MORNING_SUN); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(200 / 2)); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Morning Sun recovers 2/3 of the user's max HP in Sunlight") | ||
{ | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, MOVE_SUNNY_DAY); MOVE(player, MOVE_MORNING_SUN); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(300 / 1.5)); | ||
} | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Morning Sun recovers 1/4 of the user's max HP in Rain, Sandstorm, Hail, and Snow") | ||
{ | ||
u32 move; | ||
PARAMETRIZE { move = MOVE_RAIN_DANCE; } | ||
PARAMETRIZE { move = MOVE_SANDSTORM; } | ||
PARAMETRIZE { move = MOVE_HAIL; } | ||
PARAMETRIZE { move = MOVE_SNOWSCAPE; } | ||
GIVEN { | ||
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); } | ||
OPPONENT(SPECIES_WOBBUFFET); | ||
} WHEN { | ||
TURN { MOVE(opponent, move); MOVE(player, MOVE_MORNING_SUN); } | ||
} SCENE { | ||
HP_BAR(player, damage: -(400 / 4)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#include "global.h" | ||
#include "test/battle.h" | ||
|
||
ASSUMPTIONS | ||
{ | ||
ASSUME(gBattleMoves[MOVE_SHEER_COLD].effect == EFFECT_OHKO); | ||
} | ||
|
||
SINGLE_BATTLE_TEST("Sheer Cold doesn't affect Ice-type Pokémon") | ||
{ | ||
GIVEN { | ||
ASSUME(B_SHEER_COLD_IMMUNITY >= GEN_7); | ||
ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE); | ||
PLAYER(SPECIES_WYNAUT); | ||
OPPONENT(SPECIES_GLALIE); | ||
} WHEN { | ||
TURN { MOVE(player, MOVE_SHEER_COLD); } | ||
} SCENE { | ||
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_SHEER_COLD, player); | ||
MESSAGE("It doesn't affect Foe Glalie…"); | ||
} | ||
} | ||
TO_DO_BATTLE_TEST("Fissure faints the target, skipping regular damage calculations") | ||
TO_DO_BATTLE_TEST("Fissure always fails if the target has a higher level than the user") | ||
TO_DO_BATTLE_TEST("Fissure's accuracy increases by 1% for every level the user has over the target") | ||
TO_DO_BATTLE_TEST("Fissure's ignores non-stage accuracy modifiers") // Gravity, Wide Lens, Compound Eyes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.