Added missing Move Effect TODO tests - Volume E (#5915)
Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
This commit is contained in:
parent
6b8665d08f
commit
55f0d3aad5
28 changed files with 341 additions and 243 deletions
4
test/battle/ability/electric_surge.c
Normal file
4
test/battle/ability/electric_surge.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Electric Surge creates Electric Terrain when entering the battle");
|
4
test/battle/ability/grassy_surge.c
Normal file
4
test/battle/ability/grassy_surge.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Grassy Surge creates Grassy Terrain when entering the battle");
|
72
test/battle/ability/mimicry.c
Normal file
72
test/battle/ability/mimicry.c
Normal file
|
@ -0,0 +1,72 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
static const u16 terrainData[][2] =
|
||||
{
|
||||
{ MOVE_ELECTRIC_TERRAIN, TYPE_ELECTRIC, },
|
||||
{ MOVE_PSYCHIC_TERRAIN, TYPE_PSYCHIC, },
|
||||
{ MOVE_GRASSY_TERRAIN, TYPE_GRASS, },
|
||||
{ MOVE_MISTY_TERRAIN, TYPE_FAIRY, },
|
||||
};
|
||||
|
||||
SINGLE_BATTLE_TEST("Mimicry changes the battler's type based on Terrain")
|
||||
{
|
||||
u32 j;
|
||||
u32 terrainMove = MOVE_NONE;
|
||||
u32 terrainType = TYPE_NONE;
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(terrainData); j++)
|
||||
PARAMETRIZE { terrainMove = terrainData[j][0]; terrainType = terrainData[j][1]; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, terrainMove); }
|
||||
} SCENE {
|
||||
ABILITY_POPUP(opponent);
|
||||
switch (terrainMove)
|
||||
{
|
||||
case MOVE_ELECTRIC_TERRAIN: MESSAGE("The opposing Stunfisk's type changed to Electric!"); break;
|
||||
case MOVE_PSYCHIC_TERRAIN: MESSAGE("The opposing Stunfisk's type changed to Psychic!"); break;
|
||||
case MOVE_GRASSY_TERRAIN: MESSAGE("The opposing Stunfisk's type changed to Grass!"); break;
|
||||
case MOVE_MISTY_TERRAIN: MESSAGE("The opposing Stunfisk's type changed to Fairy!"); break;
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], terrainType);
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[1], terrainType);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Mimicry restores the battler's types when terrain is removed by Steel Roller and Ice Spinner")
|
||||
{
|
||||
u32 j;
|
||||
u32 terrainMove = MOVE_NONE;
|
||||
u32 removeTerrainMove = MOVE_NONE;
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(terrainData); j++)
|
||||
{
|
||||
PARAMETRIZE { removeTerrainMove = MOVE_STEEL_ROLLER; terrainMove = terrainData[j][0]; }
|
||||
PARAMETRIZE { removeTerrainMove = MOVE_ICE_SPINNER; terrainMove = terrainData[j][0]; }
|
||||
}
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gSpeciesInfo[SPECIES_STUNFISK_GALAR].types[0] == TYPE_GROUND);
|
||||
ASSUME(gSpeciesInfo[SPECIES_STUNFISK_GALAR].types[1] == TYPE_STEEL);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, terrainMove); MOVE(player, removeTerrainMove); }
|
||||
} SCENE {
|
||||
switch (terrainMove)
|
||||
{
|
||||
case MOVE_ELECTRIC_TERRAIN: MESSAGE("The electricity disappeared from the battlefield."); break;
|
||||
case MOVE_PSYCHIC_TERRAIN: MESSAGE("The weirdness disappeared from the battlefield!"); break;
|
||||
case MOVE_GRASSY_TERRAIN: MESSAGE("The grass disappeared from the battlefield."); break;
|
||||
case MOVE_MISTY_TERRAIN: MESSAGE("The mist disappeared from the battlefield."); break;
|
||||
}
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], TYPE_GROUND);
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[1], TYPE_STEEL);
|
||||
}
|
||||
}
|
4
test/battle/ability/misty_surge.c
Normal file
4
test/battle/ability/misty_surge.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Misty Surge creates Misty Terrain when entering the battle");
|
4
test/battle/ability/psychic_surge.c
Normal file
4
test/battle/ability/psychic_surge.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Psychic Surge creates Psychic Terrain when entering the battle");
|
|
@ -227,41 +227,6 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon can have their ability changed o
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are immune to Encore")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TACKLE, gimmick: GIMMICK_DYNAMAX); MOVE(opponent, MOVE_ENCORE); }
|
||||
TURN { MOVE(player, MOVE_EMBER); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet used Max Strike!");
|
||||
MESSAGE("The opposing Wobbuffet used Encore!");
|
||||
MESSAGE("But it failed!");
|
||||
MESSAGE("Wobbuffet used Max Flare!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon can be encored immediately after reverting")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(50); }; // yes, this speed is necessary
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(100); };
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST, gimmick: GIMMICK_DYNAMAX); }
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST); }
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST); }
|
||||
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("The opposing Wobbuffet used Encore!");
|
||||
MESSAGE("Wobbuffet used Arm Thrust!");
|
||||
}
|
||||
}
|
||||
|
||||
// Max Moves don't make contact, so Cursed Body doesn't need to be tested, but it is coded for.
|
||||
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon's Max Moves cannot be disabled")
|
||||
{
|
||||
|
|
62
test/battle/hold_effect/seeds.c
Normal file
62
test/battle/hold_effect/seeds.c
Normal file
|
@ -0,0 +1,62 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
SINGLE_BATTLE_TEST("Electric Seed raises the holder's Defense on Electric Terrain")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ELECTRIC_SEED); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Electric Seed, the Defense of Wobbuffet rose!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Grassy Seed raises the holder's Defense on Grassy Terrain")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_GRASSY_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_GRASSY_SEED); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_GRASSY_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Grassy Seed, the Defense of Wobbuffet rose!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Misty Seed raises the holder's Sp. Defense on Misty Terrain")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_MISTY_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_MISTY_SEED); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_MISTY_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Misty Seed, the Sp. Def of Wobbuffet rose!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Seed raises the holder's Sp. Defense on Psychic Terrain")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_PSYCHIC_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PSYCHIC_SEED); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Psychic Seed, the Sp. Def of Wobbuffet rose!");
|
||||
}
|
||||
}
|
|
@ -113,4 +113,5 @@ SINGLE_BATTLE_TEST("Beak Blast burns only when contact moves are used")
|
|||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Beak Blast's charging message is shown regardless if it would've missed");
|
||||
TO_DO_BATTLE_TEST("Beak Blast fails if it's forced by Encore after choosing a different move");
|
||||
TO_DO_BATTLE_TEST("Bulletproof is immune to Beak Blast but not to the burn it causes");
|
||||
|
|
7
test/battle/move_effect/echoed_voice.c
Normal file
7
test/battle/move_effect/echoed_voice.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Echoed Voice's power is multiplied for every consecutive turn used, capped at 5");
|
||||
TO_DO_BATTLE_TEST("Echoed Voice's power is reset when using a different move");
|
||||
TO_DO_BATTLE_TEST("Echoed Voice's power is increased even if it misses");
|
||||
TO_DO_BATTLE_TEST("Echoed Voice's power is increased even if it's blocked by Protect");
|
|
@ -19,25 +19,6 @@ SINGLE_BATTLE_TEST("Electric Terrain protects grounded battlers from falling asl
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Electric Terrain activates Electric Seed and Mimicry")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ELECTRIC_SEED); }
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ELECTRIC_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Electric Seed, the Defense of Wobbuffet rose!");
|
||||
ABILITY_POPUP(opponent);
|
||||
MESSAGE("The opposing Stunfisk's type changed to Electric!");
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], TYPE_ELECTRIC);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Electric Terrain increases power of Electric-type moves by 30/50 percent", s16 damage)
|
||||
{
|
||||
bool32 terrain;
|
5
test/battle/move_effect/electrify.c
Normal file
5
test/battle/move_effect/electrify.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Electrify makes the target's move Electric-type for the remainder of the turn");
|
||||
TO_DO_BATTLE_TEST("Electrify can change status moves to Electric-type"); // Test type immunity
|
5
test/battle/move_effect/electro_ball.c
Normal file
5
test/battle/move_effect/electro_ball.c
Normal file
|
@ -0,0 +1,5 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Electro Ball inflicts more damage the faster the user is compared to the target");
|
||||
TO_DO_BATTLE_TEST("Electro Ball considers speed modifiers"); // Stat modifiers, paralysis, Iron Ball, Abilities
|
|
@ -6,91 +6,56 @@ ASSUMPTIONS
|
|||
ASSUME(gMovesInfo[MOVE_ENCORE].effect == EFFECT_ENCORE);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for player: Encore used before move")
|
||||
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns: Encore used before move")
|
||||
{
|
||||
struct BattlePokemon *encoreUser = NULL;
|
||||
struct BattlePokemon *encoreTarget = NULL;
|
||||
u32 speedPlayer, speedOpponent;
|
||||
PARAMETRIZE { encoreUser = opponent; encoreTarget = player; speedPlayer = 10; speedOpponent = 20; }
|
||||
PARAMETRIZE { encoreUser = player; encoreTarget = opponent; speedPlayer = 20; speedOpponent = 10; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(10); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(20); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(speedPlayer); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(speedOpponent); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_CELEBRATE); }
|
||||
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_CELEBRATE); }
|
||||
// TURN { FORCED_MOVE(player); }
|
||||
TURN { FORCED_MOVE(player); }
|
||||
TURN { FORCED_MOVE(player); }
|
||||
TURN { MOVE(player, MOVE_SPLASH); }
|
||||
TURN { MOVE(encoreUser, MOVE_CELEBRATE); MOVE(encoreTarget, MOVE_CELEBRATE); }
|
||||
TURN { MOVE(encoreUser, MOVE_ENCORE); MOVE(encoreTarget, MOVE_CELEBRATE); }
|
||||
TURN { FORCED_MOVE(encoreTarget); }
|
||||
TURN { FORCED_MOVE(encoreTarget); }
|
||||
TURN { MOVE(encoreTarget, MOVE_SPLASH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreUser);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, encoreUser);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, encoreTarget);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for player: Encore used after move")
|
||||
{
|
||||
struct BattlePokemon *encoreUser = NULL;
|
||||
struct BattlePokemon *encoreTarget = NULL;
|
||||
u32 speedPlayer, speedOpponent;
|
||||
PARAMETRIZE { encoreUser = opponent; encoreTarget = player; speedPlayer = 20; speedOpponent = 10; }
|
||||
PARAMETRIZE { encoreUser = player; encoreTarget = opponent; speedPlayer = 10; speedOpponent = 20; }
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(20); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(10); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(speedPlayer); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(speedOpponent); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_ENCORE); }
|
||||
TURN { FORCED_MOVE(player); }
|
||||
TURN { FORCED_MOVE(player); }
|
||||
TURN { FORCED_MOVE(player); }
|
||||
TURN { MOVE(player, MOVE_SPLASH); }
|
||||
TURN { MOVE(encoreTarget, MOVE_CELEBRATE); MOVE(encoreUser, MOVE_ENCORE); }
|
||||
TURN { FORCED_MOVE(encoreTarget); }
|
||||
TURN { FORCED_MOVE(encoreTarget); }
|
||||
TURN { FORCED_MOVE(encoreTarget); }
|
||||
TURN { MOVE(encoreTarget, MOVE_SPLASH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, player);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for opponent: Encore used before move")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(20); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(10); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_CELEBRATE); MOVE(opponent, MOVE_CELEBRATE); }
|
||||
TURN { MOVE(player, MOVE_ENCORE); MOVE(opponent, MOVE_CELEBRATE); }
|
||||
// TURN { FORCED_MOVE(opponent); }
|
||||
TURN { FORCED_MOVE(opponent); }
|
||||
TURN { FORCED_MOVE(opponent); }
|
||||
TURN { MOVE(opponent, MOVE_SPLASH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Encore forces consecutive move uses for 3 turns for opponent: Encore used after move")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(10); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(20); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_CELEBRATE); MOVE(player, MOVE_ENCORE); }
|
||||
TURN { FORCED_MOVE(opponent); }
|
||||
TURN { FORCED_MOVE(opponent); }
|
||||
TURN { FORCED_MOVE(opponent); }
|
||||
TURN { MOVE(opponent, MOVE_SPLASH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENCORE, encoreUser);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, encoreTarget);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SPLASH, encoreTarget);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -121,3 +86,44 @@ SINGLE_BATTLE_TEST("Encore overrides the chosen move if it occurs first")
|
|||
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are immune to Encore")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_TACKLE, gimmick: GIMMICK_DYNAMAX); MOVE(opponent, MOVE_ENCORE); }
|
||||
TURN { MOVE(player, MOVE_EMBER); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet used Max Strike!");
|
||||
MESSAGE("The opposing Wobbuffet used Encore!");
|
||||
MESSAGE("But it failed!");
|
||||
MESSAGE("Wobbuffet used Max Flare!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon can be encored immediately after reverting")
|
||||
{
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(50); }; // yes, this speed is necessary
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(100); };
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST, gimmick: GIMMICK_DYNAMAX); }
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST); }
|
||||
TURN { MOVE(player, MOVE_ARM_THRUST); }
|
||||
TURN { MOVE(opponent, MOVE_ENCORE); MOVE(player, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("Wobbuffet used Max Knuckle!");
|
||||
MESSAGE("The opposing Wobbuffet used Encore!");
|
||||
MESSAGE("Wobbuffet used Arm Thrust!");
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Encore's effect ends if the encored move runs out of PP");
|
||||
TO_DO_BATTLE_TEST("Encore lasts for 2-6 turns (Gen 2-3)");
|
||||
TO_DO_BATTLE_TEST("Encore lasts for 4-8 turns (Gen 4)");
|
||||
TO_DO_BATTLE_TEST("Encore lasts for 3 turns (Gen 5+)");
|
||||
TO_DO_BATTLE_TEST("Encore randomly chooses an opponent target");
|
||||
|
|
6
test/battle/move_effect/endeavor.c
Normal file
6
test/battle/move_effect/endeavor.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Endeavor sets the the target's HP to the user's current HP");
|
||||
TO_DO_BATTLE_TEST("Endeavor doesn't fail if the user's HP is greater or equal than the target, but it doesn't heal the target");
|
||||
TO_DO_BATTLE_TEST("Endeavor fails on Ghost-type Pokémon");
|
35
test/battle/move_effect/endure.c
Normal file
35
test/battle/move_effect/endure.c
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Endure allows the user to survive any attack with 1 HP left");
|
||||
|
||||
SINGLE_BATTLE_TEST("Endure does not prevent multiple hits and stat changes occur at the end of the turn")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SCALE_SHOT].effect == EFFECT_MULTI_HIT);
|
||||
ASSUME(gMovesInfo[MOVE_ENDURE].effect == EFFECT_ENDURE);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_ENDURE); MOVE(player, MOVE_SCALE_SHOT); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENDURE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
MESSAGE("The Pokémon was hit 5 time(s)!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Defense fell!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Speed rose!");
|
||||
}
|
||||
}
|
||||
|
||||
TO_DO_BATTLE_TEST("Endure's success rate decreases for every consecutively used turn");
|
||||
TO_DO_BATTLE_TEST("Endure uses the same counter as Protect");
|
||||
TO_DO_BATTLE_TEST("Endure doesn't trigger effects that require damage to be done to the Pokémon (Gen 2-4)"); // Eg. Rough Skin
|
||||
TO_DO_BATTLE_TEST("Endure triggers effects that require damage to be done to the Pokémon (Gen 5+)"); // Eg. Rough Skin
|
||||
TO_DO_BATTLE_TEST("Endure doesn't protect against Future Sight (Gen 2-4)");
|
||||
TO_DO_BATTLE_TEST("Endure protects against Future Sight (Gen 5+)");
|
6
test/battle/move_effect/entrainment.c
Normal file
6
test/battle/move_effect/entrainment.c
Normal file
|
@ -0,0 +1,6 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Entrainment changes the target's Ability to match the user's");
|
||||
TO_DO_BATTLE_TEST("Entrainment fails if the user's ability has cantBeCopied flag");
|
||||
TO_DO_BATTLE_TEST("Entrainment fails if the targets's ability has cantBeOverwritten flag");
|
4
test/battle/move_effect/evasion_down.c
Normal file
4
test/battle/move_effect/evasion_down.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Sweet Scent lowers evasion by 1 stage (Gen 2-5)");
|
4
test/battle/move_effect/evasion_down_2.c
Normal file
4
test/battle/move_effect/evasion_down_2.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Sweet Scent lowers evasion by 1 stage (Gen 6+)");
|
|
@ -6,7 +6,7 @@ ASSUMPTIONS
|
|||
ASSUME(gMovesInfo[MOVE_DOUBLE_TEAM].effect == EFFECT_EVASION_UP);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Double Team raises Evasion")
|
||||
SINGLE_BATTLE_TEST("Double Team raises Evasion by 1 stage")
|
||||
{
|
||||
PASSES_RANDOMLY(gMovesInfo[MOVE_SCRATCH].accuracy * 3 / 4, 100, RNG_ACCURACY);
|
||||
GIVEN {
|
||||
|
|
28
test/battle/move_effect/evasion_up_2.c
Normal file
28
test/battle/move_effect/evasion_up_2.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
// There's no move with EFFECT_EVASION_UP_2 effect. Below is a theoretical test.
|
||||
|
||||
/*
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_X].effect == EFFECT_EVASION_UP_2);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Double Team raises Evasion by 1 stage")
|
||||
{
|
||||
PASSES_RANDOMLY(gMovesInfo[MOVE_SCRATCH].accuracy * 3 / 5, 100, RNG_ACCURACY);
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SCRATCH].accuracy == 100);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_X); MOVE(opponent, MOVE_SCRATCH); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_X, player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's evasiveness sharply rose!");
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCRATCH, opponent);
|
||||
}
|
||||
}
|
||||
*/
|
4
test/battle/move_effect/expanding_force.c
Normal file
4
test/battle/move_effect/expanding_force.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Expanding Force's power increases by 50% if the user is affected by Psychic Terrain");
|
4
test/battle/move_effect/extreme_evoboost.c
Normal file
4
test/battle/move_effect/extreme_evoboost.c
Normal file
|
@ -0,0 +1,4 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
TO_DO_BATTLE_TEST("Extreme Evoboost increases the user's Attack, Defense, Special Attack, Special Defense, and Speed stats by 2 stages each");
|
|
@ -18,25 +18,6 @@ SINGLE_BATTLE_TEST("Grassy Terrain recovers 1/16th HP at end of turn")
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Grassy Terrain activates Grassy Seed and Mimicry")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_GRASSY_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_GRASSY_SEED); }
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_GRASSY_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Grassy Seed, the Defense of Wobbuffet rose!");
|
||||
ABILITY_POPUP(opponent);
|
||||
MESSAGE("The opposing Stunfisk's type changed to Grass!");
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], TYPE_GRASS);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Grassy Terrain increases power of Grass-type moves by 30/50 percent", s16 damage)
|
||||
{
|
||||
bool32 terrain;
|
|
@ -83,7 +83,7 @@ SINGLE_BATTLE_TEST("Ice Spinner doesn't fail if there is no terrain on the field
|
|||
}
|
||||
}
|
||||
|
||||
AI_SINGLE_BATTLE_TEST("Steel Roller will not be chosen by the AI if it might fail")
|
||||
AI_SINGLE_BATTLE_TEST("AI will not choose Steel Roller if it might fail")
|
||||
{
|
||||
u32 move;
|
||||
|
||||
|
@ -104,7 +104,7 @@ AI_SINGLE_BATTLE_TEST("Steel Roller will not be chosen by the AI if it might fai
|
|||
}
|
||||
}
|
||||
|
||||
AI_SINGLE_BATTLE_TEST("Ice Spinner can be chosen by the AI regardless if there is a terrain or not")
|
||||
AI_SINGLE_BATTLE_TEST("AI will can choose Ice Spinner regardless if there is a terrain or not")
|
||||
{
|
||||
u32 move;
|
||||
|
||||
|
@ -124,35 +124,3 @@ AI_SINGLE_BATTLE_TEST("Ice Spinner can be chosen by the AI regardless if there i
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Steel Roller and Ice Spinner reverts typing on Mimicry users")
|
||||
{
|
||||
u32 j;
|
||||
static const u16 terrainMoves[] =
|
||||
{
|
||||
MOVE_ELECTRIC_TERRAIN,
|
||||
MOVE_PSYCHIC_TERRAIN,
|
||||
MOVE_GRASSY_TERRAIN,
|
||||
MOVE_MISTY_TERRAIN,
|
||||
};
|
||||
|
||||
u16 terrainMove = MOVE_NONE;
|
||||
u16 removeTerrainMove = MOVE_NONE;
|
||||
|
||||
for (j = 0; j < ARRAY_COUNT(terrainMoves); j++)
|
||||
{
|
||||
PARAMETRIZE { removeTerrainMove = MOVE_STEEL_ROLLER; terrainMove = terrainMoves[j]; }
|
||||
PARAMETRIZE { removeTerrainMove = MOVE_ICE_SPINNER; terrainMove = terrainMoves[j]; }
|
||||
}
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gSpeciesInfo[SPECIES_STUNFISK_GALAR].types[1] == TYPE_STEEL);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, terrainMove); MOVE(player, removeTerrainMove); }
|
||||
TURN { MOVE(player, MOVE_TOXIC); }
|
||||
} SCENE {
|
||||
MESSAGE("It doesn't affect the opposing Stunfisk…");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,25 +19,6 @@ SINGLE_BATTLE_TEST("Misty Terrain protects grounded battlers from non-volatile s
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Misty Terrain activates Misty Seed and Mimicry")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_MISTY_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_MISTY_SEED); }
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_MISTY_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Misty Seed, the Sp. Def of Wobbuffet rose!");
|
||||
ABILITY_POPUP(opponent);
|
||||
MESSAGE("The opposing Stunfisk's type changed to Fairy!");
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], TYPE_FAIRY);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Misty Terrain does not increase the power of Fairy-type moves", s16 damage)
|
||||
{
|
||||
bool32 terrain;
|
|
@ -200,30 +200,6 @@ DOUBLE_BATTLE_TEST("Scale Shot does not corrupt the next turn move used")
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Endure does not prevent multiple hits and stat changes occur at the end of the turn")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SCALE_SHOT].effect == EFFECT_MULTI_HIT);
|
||||
ASSUME(gMovesInfo[MOVE_ENDURE].effect == EFFECT_ENDURE);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_ENDURE); MOVE(player, MOVE_SCALE_SHOT); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ENDURE, opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_SCALE_SHOT, player);
|
||||
MESSAGE("The Pokémon was hit 5 time(s)!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Defense fell!");
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Wobbuffet's Speed rose!");
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Scale Shot decreases defense and increases speed after the 4th hit of Loaded Dice")
|
||||
{
|
||||
PASSES_RANDOMLY(50, 100, RNG_LOADED_DICE);
|
||||
|
|
|
@ -18,25 +18,6 @@ SINGLE_BATTLE_TEST("Psychic Terrain protects grounded battlers from priority mov
|
|||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Terrain activates Psychic Seed and Mimicry")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
|
||||
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_PSYCHIC_TERRAIN);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PSYCHIC_SEED); }
|
||||
OPPONENT(SPECIES_STUNFISK_GALAR) { Ability(ABILITY_MIMICRY); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_PSYCHIC_TERRAIN); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
||||
MESSAGE("Using Psychic Seed, the Sp. Def of Wobbuffet rose!");
|
||||
ABILITY_POPUP(opponent);
|
||||
MESSAGE("The opposing Stunfisk's type changed to Psychic!");
|
||||
} THEN {
|
||||
EXPECT_EQ(gBattleMons[B_POSITION_OPPONENT_LEFT].types[0], TYPE_PSYCHIC);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Psychic Terrain increases power of Psychic-type moves by 30/50 percent", s16 damage)
|
||||
{
|
||||
bool32 terrain;
|
Loading…
Reference in a new issue