Added missing Move Effect TODO tests - Volume F (#7605)

This commit is contained in:
Eduardo Quezada 2025-08-23 16:25:19 -04:00 committed by GitHub
parent f009550137
commit 8febd24604
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
60 changed files with 218 additions and 76 deletions

View File

@ -59,7 +59,7 @@ DOUBLE_BATTLE_TEST("Bad Dreams does not activate if only the partner Pokemon is
}
}
DOUBLE_BATTLE_TEST("Bad Dreams activates for both sleeping pokemon on the player side")
DOUBLE_BATTLE_TEST("Bad Dreams activates for both sleeping Pokémon on the player side")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET) {Status1(STATUS1_SLEEP);}

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(!IsBattleMoveStatus(MOVE_WATER_GUN));
}
// Battle Bond transforms the pokemon when fainting any battler(opposing or partner), unless it's the last pokemon and the battle ends.
// Battle Bond transforms the Pokémon when fainting any battler(opposing or partner), unless it's the last Pokémon and the battle ends.
SINGLE_BATTLE_TEST("Battle Bond transforms player's Greninja - Singles")
{
u32 monsCountPlayer, monsCountOpponent;

View File

@ -199,7 +199,7 @@ SINGLE_BATTLE_TEST("Defiant correctly activates after Sticky Web lowers Speed if
}
}
DOUBLE_BATTLE_TEST("Defiant is activated by Cotton Down for non-ally pokemon")
DOUBLE_BATTLE_TEST("Defiant is activated by Cotton Down for non-ally Pokémon")
{
GIVEN {
PLAYER(SPECIES_MANKEY) { Ability(ABILITY_DEFIANT); }
@ -301,7 +301,7 @@ SINGLE_BATTLE_TEST("Defiant activates for each stat that is lowered")
}
}
SINGLE_BATTLE_TEST("Defiant doesn't activate if the pokemon lowers it's own stats")
SINGLE_BATTLE_TEST("Defiant doesn't activate if the Pokémon lowers it's own stats")
{
u32 move;

View File

@ -53,7 +53,7 @@ DOUBLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves and prints th
}
}
SINGLE_BATTLE_TEST("Desolate Land does not block a move if pokemon is asleep and uses a Water-type move") // Sleep/confusion/paralysis all happen before the check for primal weather
SINGLE_BATTLE_TEST("Desolate Land does not block a move if Pokémon is asleep and uses a Water-type move") // Sleep/confusion/paralysis all happen before the check for primal weather
{
GIVEN {
PLAYER(SPECIES_GROUDON) {Item(ITEM_RED_ORB);}

View File

@ -1,7 +1,7 @@
#include "global.h"
#include "test/battle.h"
DOUBLE_BATTLE_TEST("Frisk does not trigger when pokemon hold no items")
DOUBLE_BATTLE_TEST("Frisk does not trigger when Pokémon hold no items")
{
GIVEN {
PLAYER(SPECIES_FURRET) { Ability(ABILITY_FRISK); };

View File

@ -47,7 +47,7 @@ SINGLE_BATTLE_TEST("Immunity prevents Toxic Spikes poison")
}
}
SINGLE_BATTLE_TEST("Immunity doesn't prevent pokemon from being poisoned by Toxic Spikes on switch-in if forced in by phazing with Mold Breaker, but it cures it immediately")
SINGLE_BATTLE_TEST("Immunity doesn't prevent Pokémon from being poisoned by Toxic Spikes on switch-in if forced in by phazing with Mold Breaker, but it cures it immediately")
{
GIVEN {
ASSUME(GetMoveEffect(MOVE_DRAGON_TAIL) == EFFECT_HIT_SWITCH_TARGET);

View File

@ -1,7 +1,7 @@
#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Mirror Armor lowers a stat of the attacking pokemon")
SINGLE_BATTLE_TEST("Mirror Armor lowers a stat of the attacking Pokémon")
{
u16 move, statId;

View File

@ -212,7 +212,7 @@ DOUBLE_BATTLE_TEST("Opportunist copies the stat increase of each opposing mon")
}
DOUBLE_BATTLE_TEST("Opportunist copies the stat of each pokemon that were raised at the same time")
DOUBLE_BATTLE_TEST("Opportunist copies the stat of each Pokémon that were raised at the same time")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);

View File

@ -52,7 +52,7 @@ DOUBLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves and prints th
}
}
SINGLE_BATTLE_TEST("Primordial Sea does not block a move if pokemon is asleep and uses a Fire-type move") // Sleep/confusion/paralysis all happen before the check for primal weather
SINGLE_BATTLE_TEST("Primordial Sea does not block a move if Pokémon is asleep and uses a Fire-type move") // Sleep/confusion/paralysis all happen before the check for primal weather
{
GIVEN {
PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB);}
@ -63,4 +63,4 @@ SINGLE_BATTLE_TEST("Primordial Sea does not block a move if pokemon is asleep an
NOT MESSAGE("The Fire-type attack fizzled out in the heavy rain!");
MESSAGE("The opposing Wobbuffet is fast asleep.");
}
}
}

View File

@ -105,7 +105,7 @@ SINGLE_BATTLE_TEST("Purifying Salt user can't be poisoned by Toxic Spikes")
}
}
SINGLE_BATTLE_TEST("Purifying Salt doesn't prevent pokemon from being poisoned by Toxic Spikes on switch-in if forced in by phazing with Mold Breaker")
SINGLE_BATTLE_TEST("Purifying Salt doesn't prevent Pokémon from being poisoned by Toxic Spikes on switch-in if forced in by phazing with Mold Breaker")
{
GIVEN {
ASSUME(GetMoveEffect(MOVE_DRAGON_TAIL) == EFFECT_HIT_SWITCH_TARGET);

View File

@ -61,7 +61,7 @@ SINGLE_BATTLE_TEST("Volt Absorb is only triggered once on multi strike moves")
}
}
DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other pokemon") // Fixed issue #1961
DOUBLE_BATTLE_TEST("Volt Absorb does not stop Electric Typed Explosion from damaging other Pokémon") // Fixed issue #1961
{
s16 damage1, damage2;
GIVEN {

View File

@ -40,7 +40,7 @@ AI_SINGLE_BATTLE_TEST("AI switches if Perish Song is about to kill")
}
}
AI_DOUBLE_BATTLE_TEST("AI will not try to switch for the same pokemon for 2 spots in a double battle (all bad moves)")
AI_DOUBLE_BATTLE_TEST("AI will not try to switch for the same Pokémon for 2 spots in a double battle (all bad moves)")
{
u32 flags;
@ -98,7 +98,7 @@ AI_SINGLE_BATTLE_TEST("When AI switches out due to having no move that affects t
}
}
AI_DOUBLE_BATTLE_TEST("AI will not try to switch for the same pokemon for 2 spots in a double battle (Wonder Guard)")
AI_DOUBLE_BATTLE_TEST("AI will not try to switch for the same Pokémon for 2 spots in a double battle (Wonder Guard)")
{
PASSES_RANDOMLY(SHOULD_SWITCH_WONDER_GUARD_PERCENTAGE, 100, RNG_AI_SWITCH_WONDER_GUARD);
GIVEN {

View File

@ -601,7 +601,7 @@ SINGLE_BATTLE_TEST("Dynamax: Dynamaxed Pokemon cannot use Max Guard while holdin
// Almost anything that calculates damage based on HP has been changed to non-Dynamax HP.
// This includes Leftovers, Life Orb, Heal Pulse, Rocky Helmet, Sandstorm, etc. etc.
// There are some redundant cases (i.e Substitute) that can never be used by a Dynamaxed pokemon.
// There are some redundant cases (i.e Substitute) that can never be used by a Dynamaxed Pokémon.
// Anything that is conditional based off max HP still uses gBattleMons[battler].maxHP.
// Below are some tests, but very far from all encompassing:

View File

@ -755,7 +755,7 @@ SINGLE_BATTLE_TEST("(TERA) Terapagos retains its base defensive profile when Ter
}
}
SINGLE_BATTLE_TEST("(TERA) Illusion breaks if the pokemon Terastallizes when illusioned as a mon that changes forms by Terastallizing")
SINGLE_BATTLE_TEST("(TERA) Illusion breaks if the Pokémon Terastallizes when illusioned as a mon that changes forms by Terastallizing")
{
u32 species;
PARAMETRIZE { species = SPECIES_TERAPAGOS; }
@ -791,19 +791,16 @@ SINGLE_BATTLE_TEST("(TERA) Illusion doesn't break upon Terastallizing when illus
}
}
/*
// This test freezes the emulator
SINGLE_BATTLE_TEST("(TERA) Transformed pokemon can't Terastalize")
SINGLE_BATTLE_TEST("(TERA) Transformed Pokémon can't Terastalize")
{
GIVEN {
PLAYER(SPECIES_DITTO);
OPPONENT(SPECIES_TERAPAGOS) { Moves(MOVE_CELEBRATE); }
PLAYER(SPECIES_DITTO) { Moves(MOVE_TRANSFORM, MOVE_CELEBRATE); }
OPPONENT(SPECIES_TERAPAGOS) { Moves(MOVE_TRANSFORM, MOVE_CELEBRATE); }
} WHEN {
TURN { MOVE(player, MOVE_TRANSFORM); }
TURN { MOVE(player, MOVE_CELEBRATE, gimmick: GIMMICK_TERA); }
}
}
*/
SINGLE_BATTLE_TEST("(TERA) Pokemon with Tera forms change upon Terastallizing")
{

View File

@ -160,7 +160,7 @@ SINGLE_BATTLE_TEST("Perism and Lum Berries cure confusion")
}
}
SINGLE_BATTLE_TEST("Berry hold effect cures status if a pokemon enters a battle")
SINGLE_BATTLE_TEST("Berry hold effect cures status if a Pokémon enters a battle")
{
u16 status;
u16 item;

View File

@ -226,7 +226,7 @@ DOUBLE_BATTLE_TEST("Moves do not fail if an alive partner is the target")
}
}
DOUBLE_BATTLE_TEST("Moves fail if they target into a pokemon that was fainted by the previous move")
DOUBLE_BATTLE_TEST("Moves fail if they target into a Pokémon that was fainted by the previous move")
{
GIVEN {
ASSUME(GetMoveTarget(MOVE_HYPER_VOICE) == MOVE_TARGET_BOTH);

View File

@ -52,7 +52,7 @@ DOUBLE_BATTLE_TEST("After You does nothing if the target has already moved")
}
}
DOUBLE_BATTLE_TEST("After You calculates correct turn order if only one pokemon is left on the opposing side")
DOUBLE_BATTLE_TEST("After You calculates correct turn order if only one Pokémon is left on the opposing side")
{
GIVEN {
PLAYER(SPECIES_GRENINJA) { Speed(120); }

View File

@ -90,7 +90,7 @@ DOUBLE_BATTLE_TEST("Ally Switch does not redirect the target of Snipe Shot")
}
}
DOUBLE_BATTLE_TEST("Ally Switch does not redirect moves done by pokemon with Stalwart and Propeller Tail")
DOUBLE_BATTLE_TEST("Ally Switch does not redirect moves done by Pokémon with Stalwart and Propeller Tail")
{
u16 ability;
PARAMETRIZE { ability = ABILITY_STALWART; }

View File

@ -33,7 +33,7 @@ DOUBLE_BATTLE_TEST("Beak Blast's charging message is shown before other moves ar
}
}
DOUBLE_BATTLE_TEST("Beak Blast burns all who make contact with the pokemon")
DOUBLE_BATTLE_TEST("Beak Blast burns all who make contact with the Pokémon")
{
GIVEN {
ASSUME(GetMovePriority(MOVE_BEAK_BLAST) < 0);

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Facade (Move Effect) test titles")
TO_DO_BATTLE_TEST("Facade doubles in power when the user is Paralyzed and Poisoned")
TO_DO_BATTLE_TEST("Facade does not ignore burn's attack-halving effect, cancelling out its power (Gen3-5)")
TO_DO_BATTLE_TEST("Facade ignores burn's attack-halving effect, making it double in power (Gen3-5)")

View File

@ -32,12 +32,33 @@ SINGLE_BATTLE_TEST("Burn Up fails if the user isn't a Fire-type")
} WHEN {
TURN { MOVE(player, MOVE_BURN_UP); }
} SCENE {
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); }
MESSAGE("Wobbuffet used Burn Up!");
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); }
MESSAGE("But it failed!");
}
}
TO_DO_BATTLE_TEST("Burn Up doesn't thaw the user if it fails due to the user not being Fire-type")
SINGLE_BATTLE_TEST("Burn Up fails if the user has Protean/Libero and is not a Fire-type")
{
KNOWN_FAILING;
GIVEN {
WITH_CONFIG(GEN_PROTEAN_LIBERO, GEN_6);
PLAYER(SPECIES_REGIROCK);
OPPONENT(SPECIES_KECLEON) { Ability(ABILITY_PROTEAN); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponent, MOVE_BURN_UP); }
} SCENE {
MESSAGE("The opposing Kecleon used Burn Up!");
NONE_OF { ANIMATION(ANIM_TYPE_MOVE, MOVE_BURN_UP, player); }
MESSAGE("But it failed!");
}
}
TO_DO_BATTLE_TEST("(TERA) Burn Up user does not lose their Fire type if they've Terastallized into Fire type")
SINGLE_BATTLE_TEST("Burn Up user loses its Fire-type if enemy faints")
{
GIVEN {

View File

@ -1,4 +1,9 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Fairy Lock (Move Effect) test titles")
TO_DO_BATTLE_TEST("Fairy Lock prevents all Pokémon from switching out on their next turn")
TO_DO_BATTLE_TEST("Fairy Lock does not prevent switch out via Dragon Tail")
TO_DO_BATTLE_TEST("Fairy Lock does not prevent switch out via Whirlwind")
TO_DO_BATTLE_TEST("Fairy Lock does not prevent switch out via Eject Button")
TO_DO_BATTLE_TEST("Fairy Lock does not prevent switch out via Red Card")
TO_DO_BATTLE_TEST("Fairy Lock prevents a Pokémon from switching out on the following turn after replacing a fainted mon")

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write False Swipe (Move Effect) test titles")
TO_DO_BATTLE_TEST("False Swipe always leaves the target with at least 1 HP")
TO_DO_BATTLE_TEST("False Swipe still hits the target if it has 1 HP") // Test with Rocky Helmet or something
TO_DO_BATTLE_TEST("False Swipe does not reduce its damage when hitting a substitute")

View File

@ -1,7 +1,7 @@
#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Fell Stinger raises user's Attack by 3 stages if it faints target")
SINGLE_BATTLE_TEST("Fell Stinger raises user's Attack by 2 stages (Gen6) or 3 stages (Gen7+) if it faints target")
{
u32 config;

View File

@ -72,3 +72,5 @@ SINGLE_BATTLE_TEST("Fillet Away's HP cost doesn't trigger effects that trigger o
NOT MESSAGE("Wobbuffet's Air Balloon popped!");
}
}
TO_DO_BATTLE_TEST("Fillet Away fails if the user's Attack, Sp. Atk and Speed are all maxed out")

View File

@ -1,4 +1,16 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Final Gambit (Move Effect) test titles")
TO_DO_BATTLE_TEST("Final Gambit faints the user, and the target receives damage equal to the user's HP") // User should faint before the target
TO_DO_BATTLE_TEST("Final Gambit doesn't faint the user if it misses")
TO_DO_BATTLE_TEST("Final Gambit doesn't faint the user if the target is immune")
TO_DO_BATTLE_TEST("Final Gambit doesn't faint the user if the target is protected")
TO_DO_BATTLE_TEST("Final Gambit doesn't trigger the user's Focus Band")
TO_DO_BATTLE_TEST("Final Gambit doesn't trigger the user's Focus Sash")
TO_DO_BATTLE_TEST("Final Gambit doesn't trigger the user's Sturdy")
TO_DO_BATTLE_TEST("Final Gambit triggers the target's Focus Band")
TO_DO_BATTLE_TEST("Final Gambit triggers the target's Focus Sash")
TO_DO_BATTLE_TEST("Final Gambit triggers the target's Sturdy")
TO_DO_BATTLE_TEST("Final Gambit triggers the target's Endure")
TO_DO_BATTLE_TEST("Final Gambit fails in Max Raids")
TO_DO_BATTLE_TEST("Final Gambit fails in Tera Raids")

View File

@ -1,4 +1,8 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Fake Out/First Impression (Move Effect) test titles")
TO_DO_BATTLE_TEST("Fake Out can only be used on the user's first turn")
TO_DO_BATTLE_TEST("Fake Out fails if it's called via Instruct")
TO_DO_BATTLE_TEST("First Impression can only be used on the user's first turn")
TO_DO_BATTLE_TEST("First Impression fails if it's called via Instruct")

View File

@ -27,7 +27,9 @@ SINGLE_BATTLE_TEST("Sonic Boom deals fixed damage", s16 damage)
}
}
SINGLE_BATTLE_TEST("Sonic Boom doesn't affect ghost types")
TO_DO_BATTLE_TEST("Sonic Boom affects ghost types (Gen1)")
SINGLE_BATTLE_TEST("Sonic Boom doesn't affect ghost types (Gen2+)")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);

View File

@ -1,4 +1,21 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Flail (Move Effect) test titles")
TO_DO_BATTLE_TEST("Flail has 20 power when HP is greater or equal than 68.8% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 20 power when HP is greater or equal than 67.2% (Gen4+)")
TO_DO_BATTLE_TEST("Flail has 40 power when HP is greater or equal than 35.4% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 40 power when HP is greater or equal than 34.4% (Gen4+)")
TO_DO_BATTLE_TEST("Flail has 80 power when HP is greater or equal than 20.8% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 80 power when HP is greater or equal than 20.3% (Gen4+)")
TO_DO_BATTLE_TEST("Flail has 100 power when HP is greater or equal than 10.4% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 100 power when HP is greater or equal than 9.4% (Gen4+)")
TO_DO_BATTLE_TEST("Flail has 150 power when HP is greater or equal than 4.2% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 150 power when HP is greater or equal than 3.1% (Gen4+)")
TO_DO_BATTLE_TEST("Flail has 200 power when HP is less than 4.2% (Gen2-3)")
TO_DO_BATTLE_TEST("Flail has 200 power when HP is less than 3.1% (Gen4+)")
TO_DO_BATTLE_TEST("Flail cannot get a Critical Hit (Gen2)")
TO_DO_BATTLE_TEST("Flail can get a Critical Hit (Gen3+)")
TO_DO_BATTLE_TEST("Flail's damage doesn't vary by a random factor (Gen2)")
TO_DO_BATTLE_TEST("Flail's damage varies by a random factor (Gen3+)")

View File

@ -1,4 +1,9 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Flatter (Move Effect) test titles")
TO_DO_BATTLE_TEST("Flatter raises the target's Sp. Atk and confuses them")
TO_DO_BATTLE_TEST("Flatter raises the target's Sp. Atk even if they're already confused")
TO_DO_BATTLE_TEST("Flatter raises the target's Sp. Atk even when protected by Safeguard")
TO_DO_BATTLE_TEST("Flatter raises the target's Sp. Atk even when protected Own Tempo")
TO_DO_BATTLE_TEST("Flatter confuses the target even when they have their Sp. Atk maxed")
TO_DO_BATTLE_TEST("Flatter confuses the target even when at -6 Sp. Atk and has Contrary")

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_FLING) == EFFECT_FLING);
}
SINGLE_BATTLE_TEST("Fling fails if pokemon holds no item")
SINGLE_BATTLE_TEST("Fling fails if Pokémon holds no item")
{
u16 item;
@ -29,7 +29,7 @@ SINGLE_BATTLE_TEST("Fling fails if pokemon holds no item")
}
}
SINGLE_BATTLE_TEST("Fling fails if pokemon is under the effects of Embargo or Magic Room")
SINGLE_BATTLE_TEST("Fling fails if Pokémon is under the effects of Embargo or Magic Room")
{
u16 move;
@ -56,7 +56,7 @@ SINGLE_BATTLE_TEST("Fling fails if pokemon is under the effects of Embargo or Ma
}
}
SINGLE_BATTLE_TEST("Fling fails for pokemon with Klutz ability")
SINGLE_BATTLE_TEST("Fling fails for Pokémon with Klutz ability")
{
u16 ability;
@ -80,6 +80,9 @@ SINGLE_BATTLE_TEST("Fling fails for pokemon with Klutz ability")
}
}
TO_DO_BATTLE_TEST("Fling fails if the item changes the Pokémon's form")
TO_DO_BATTLE_TEST("Fling works if the item changes a Pokémon's form but not the one holding it") //Eg. non-matching Mega Stones
SINGLE_BATTLE_TEST("Fling's thrown item can be regained with Recycle")
{
GIVEN {
@ -150,7 +153,7 @@ SINGLE_BATTLE_TEST("Fling - Item is lost when target protects itself")
}
}
SINGLE_BATTLE_TEST("Fling doesn't consume the item if pokemon is asleep/frozen/paralyzed")
SINGLE_BATTLE_TEST("Fling doesn't consume the item if Pokémon is asleep/frozen/paralyzed")
{
u32 status;
u16 item;
@ -457,3 +460,5 @@ SINGLE_BATTLE_TEST("Fling deals damage based on items fling power")
EXPECT_EQ(damage[0], damage[1]);
}
}
TO_DO_BATTLE_TEST("Fling deals damage based on a TM's move power")

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_FLOWER_SHIELD) == EFFECT_FLOWER_SHIELD);
}
DOUBLE_BATTLE_TEST("Flower Shield raises the defense of all grass type pokemon")
DOUBLE_BATTLE_TEST("Flower Shield raises the defense of all Grass-type Pokémon")
{
GIVEN {
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);
@ -35,3 +35,5 @@ DOUBLE_BATTLE_TEST("Flower Shield raises the defense of all grass type pokemon")
MESSAGE("The opposing Sunflora's Defense rose!");
}
}
TO_DO_BATTLE_TEST("Flower Shield fails if there's no Grass-type Pokémon on the field")

View File

@ -12,7 +12,7 @@ SINGLE_BATTLE_TEST("Focus Energy increases the user's critical hit ratio by 1 st
u32 genConfig = 0, chance = 0;
for (u32 j = GEN_1; j <= GEN_9; j++) {
PARAMETRIZE { genConfig = j; useFocusEnergy = FALSE; chance = j >= GEN_7 ? 24 : 16; } // ~4.16%/6.25% with Wobbuffet's base speed
PARAMETRIZE { genConfig = j; useFocusEnergy = TRUE;
PARAMETRIZE { genConfig = j; useFocusEnergy = TRUE;
if (j >= GEN_6)
chance = 2; // 50% / 25%
else if (j >= GEN_3)
@ -39,3 +39,6 @@ SINGLE_BATTLE_TEST("Focus Energy increases the user's critical hit ratio by 1 st
MESSAGE("A critical hit!");
}
}
TO_DO_BATTLE_TEST("Focus Energy fails if critical hit stage was already increased by Dragon Cheer")
TO_DO_BATTLE_TEST("Baton Pass passes Focus Energy's effect");

View File

@ -75,6 +75,18 @@ DOUBLE_BATTLE_TEST("Focus Punch activation is based on Speed")
}
}
TO_DO_BATTLE_TEST("Focus Punch activates when the user's Substitute is hit");
TO_DO_BATTLE_TEST("Focus Punch activates when the user is hit by a status move");
TO_DO_BATTLE_TEST("Focus Punch uses PP when losing focus (Gen 3-4)");
TO_DO_BATTLE_TEST("Focus Punch doesn't use PP when losing focus (Gen 5+)");
TO_DO_BATTLE_TEST("Focus Punch losing focus is considered as the last move used (Gen 3-4)"); //Eg. Encore
TO_DO_BATTLE_TEST("Focus Punch losing focus is not considered as the last move used (Gen 5+)"); //Eg. Encore
TO_DO_BATTLE_TEST("Focus Punch's initial message is not considered as using the move for Zoom Lens");
TO_DO_BATTLE_TEST("Focus Punch's initial message is not shown if the user selected a different move and was Encored into using Focus Punch");
TO_DO_BATTLE_TEST("Focus Punch will use the selected move's priority when being Encored into Focus Punch");
TO_DO_BATTLE_TEST("Focus Punch will lose focus if damaged when used by selecting a different move and being Encored (Gen 3-4)");
TO_DO_BATTLE_TEST("Focus Punch will NOT lose focus if damaged when used by selecting a different move and being Encored (Gen 5+)");
AI_SINGLE_BATTLE_TEST("AI won't use Focus Punch if it predicts a damaging move")
{
GIVEN {

View File

@ -34,6 +34,19 @@ DOUBLE_BATTLE_TEST("Follow Me redirects single target moves used by opponents to
}
}
TO_DO_BATTLE_TEST("Follow Me doesn't redirect opponent moves that can't affect opponents") //Eg. Helping Hand
TO_DO_BATTLE_TEST("Follow Me no longer redirects if the center of attention faints mid-turn")
TO_DO_BATTLE_TEST("Follow Me can only redirect charging moves on the turn that they would hit")
TO_DO_BATTLE_TEST("Follow Me can only redirect Future Sight/Doom Desire on the turn they were selected (Gen3-5)")
TO_DO_BATTLE_TEST("Follow Me does not redirect Future Sight/Doom Desire (Gen 6+)")
TO_DO_BATTLE_TEST("Follow Me draws Electric/Water moves even if there's a Pokémon with Lightning Rod/Storm Drain")
TO_DO_BATTLE_TEST("Follow Me prioritizes the first Pokémon that used it") // There can be 2 centers of attention. If the first is gone, the 2nd is used
//TO_DO_BATTLE_TEST("Triples: Follow Me can only draw non-adjacent moves if they use a long-range move")
TO_DO_BATTLE_TEST("Follow Me can be used in Single Battles (Gen3-SwSh)")
TO_DO_BATTLE_TEST("Follow Me fails in Single Battles (BDSP+)")
TO_DO_BATTLE_TEST("Follow Me cannot redirect Sky Drop")
TO_DO_BATTLE_TEST("Follow Me does not draw attack when the user is being Sky-Dropped")
DOUBLE_BATTLE_TEST("Spotlight redirects single target moves used by the opposing side to Spotlight's target")
{
struct BattlePokemon *moveTarget = NULL;

View File

@ -1,4 +1,14 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Foresight (Move Effect) test titles")
TO_DO_BATTLE_TEST("Foresight removes Ghost's type immunity to Normal and Fighting types")
TO_DO_BATTLE_TEST("Foresight causes accuracy/evasion stat changes only between the user/target when the user's accuracy stage is less than the target's evasion stage (Gen 2)")
TO_DO_BATTLE_TEST("Foresight causes all moves against the target to ignore evasion stat changes (Gen 3)")
TO_DO_BATTLE_TEST("Foresight causes all moves against the target to ignore only positive evasion stat changes (Gen 4+)") // Eg. Doesn't ignore Sweet Scent
TO_DO_BATTLE_TEST("Foresight doesn't cause moves used against the target to always hit (Gen 2-3)")
TO_DO_BATTLE_TEST("Foresight causes moves used against the target to always hit (Gen 4+)")
TO_DO_BATTLE_TEST("Foresight does not make moves hit semi-invulnerable targets")
TO_DO_BATTLE_TEST("Foresight fails if the target is already under its effect (Gen 2 and Gen5+)")
TO_DO_BATTLE_TEST("Foresight doesn't fail if the target is already under its effect (Gen 3-4)")
TO_DO_BATTLE_TEST("Baton Pass passes Foresight's effect (Gen 2)");
TO_DO_BATTLE_TEST("Baton Pass doesn't pass Foresight's effect (Gen 3+)");

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_FOUL_PLAY) == EFFECT_FOUL_PLAY);
}
SINGLE_BATTLE_TEST("Foul Play uses physical attack stat of target", s16 damage)
SINGLE_BATTLE_TEST("Foul Play uses the target's Attack stat and stat stages of target", s16 damage)
{
u32 move;
@ -27,3 +27,7 @@ SINGLE_BATTLE_TEST("Foul Play uses physical attack stat of target", s16 damage)
EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage);
}
}
TO_DO_BATTLE_TEST("Foul Play uses the user's attack modifiers - Held Item")
TO_DO_BATTLE_TEST("Foul Play uses the user's attack modifiers - Ability")
TO_DO_BATTLE_TEST("Foul Play uses the user's attack modifiers - Burn")

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Frustration (Move Effect) test titles")
TO_DO_BATTLE_TEST("Frustration's power increases the lower friendship of the user is")
TO_DO_BATTLE_TEST("Frustration does 0 damage at max Friendship (Gen2)")
TO_DO_BATTLE_TEST("Frustration does 1 damage at max Friendship (Gen3+)")

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_FURY_CUTTER) == EFFECT_FURY_CUTTER);
}
SINGLE_BATTLE_TEST("Fury Cutter power doubles with each use, up to 160 power")
SINGLE_BATTLE_TEST("Fury Cutter's power doubles with each use, up to 160 power")
{
s16 damage[6];
int turn;
@ -37,6 +37,10 @@ SINGLE_BATTLE_TEST("Fury Cutter power doubles with each use, up to 160 power")
}
}
TO_DO_BATTLE_TEST("Fury Cutter's power is reset if the user misses")
TO_DO_BATTLE_TEST("Fury Cutter's power is reset if the user is switched out")
TO_DO_BATTLE_TEST("Fury Cutter's power is reset if the trainer uses an item")
SINGLE_BATTLE_TEST("Fury Cutter counter is the same for both hits of Parental Bond")
{
s16 damage[4];

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Fusion Flare/Bolt (Move Effect) test titles")
TO_DO_BATTLE_TEST("Fusion Flare and Fusion Bolt double in power if the other move was immediately used in the same turn")
TO_DO_BATTLE_TEST("Fusion Flare and Fusion Bolt do not double in power if there was a move used in-between the two of them")
TO_DO_BATTLE_TEST("Fusion Flare and Fusion Bolt double in power if used by the same Pokémon in the same turn") // Use Instruct to replicate this

View File

@ -66,7 +66,8 @@ SINGLE_BATTLE_TEST("Future Sight is not boosted by Life Orb is original user if
}
}
SINGLE_BATTLE_TEST("Future Sight receives STAB from party mon")
TO_DO_BATTLE_TEST("Future Sight does not receive STAB from party mon (Gen 2-4)")
SINGLE_BATTLE_TEST("Future Sight receives STAB from party mon (Gen 5+)")
{
s16 seedFlareDmg;
s16 futureSightDmg;
@ -91,7 +92,8 @@ SINGLE_BATTLE_TEST("Future Sight receives STAB from party mon")
}
}
SINGLE_BATTLE_TEST("Future Sight is affected by type effectiveness")
TO_DO_BATTLE_TEST("Future Sight is not affected by type effectiveness (Gen 2-4)")
SINGLE_BATTLE_TEST("Future Sight is affected by type effectiveness (Gen 5+)")
{
GIVEN {
PLAYER(SPECIES_PIKACHU);
@ -113,6 +115,9 @@ SINGLE_BATTLE_TEST("Future Sight is affected by type effectiveness")
}
}
TO_DO_BATTLE_TEST("Future Sight ignores Wonder Guard (Gen 2-4)")
TO_DO_BATTLE_TEST("Future Sight doesn't ignore Wonder Guard (Gen 5+)")
SINGLE_BATTLE_TEST("Future Sight will miss timing if target faints before it is about to get hit")
{
GIVEN {

View File

@ -81,7 +81,7 @@ SINGLE_BATTLE_TEST("Grassy Terrain lasts for 5 turns")
}
}
SINGLE_BATTLE_TEST("Grassy Terrain heals the pokemon on the field for the duration of the terrain, including last turn")
SINGLE_BATTLE_TEST("Grassy Terrain heals the Pokémon on the field for the duration of the terrain, including last turn")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);

View File

@ -30,3 +30,6 @@ SINGLE_BATTLE_TEST("Haze resets stat changes", s16 damage)
EXPECT_EQ(results[0].damage, results[1].damage);
}
}
TO_DO_BATTLE_TEST("Haze resets Focus Energy (Gen 1 and 4)")
TO_DO_BATTLE_TEST("Haze doesn't reset Focus Energy (Gen 2-3 and 5+)")

View File

@ -49,7 +49,7 @@ DOUBLE_BATTLE_TEST("Lunar Dance causes the user to faint and fully heals the rep
}
}
SINGLE_BATTLE_TEST("Healing Wish effect activates only if the switched pokemon can be healed")
SINGLE_BATTLE_TEST("Healing Wish effect activates only if the switched Pokémon can be healed")
{
GIVEN {
ASSUME(B_HEALING_WISH_SWITCH >= GEN_8);

View File

@ -159,7 +159,7 @@ SINGLE_BATTLE_TEST("Hit Escape: Held items are consumed immediately after a mon
}
}
SINGLE_BATTLE_TEST("Hit Escape: Electric Seed boost is received by the right pokemon after U-turn and Intimidate")
SINGLE_BATTLE_TEST("Hit Escape: Electric Seed boost is received by the right Pokémon after U-turn and Intimidate")
{
GIVEN {
PLAYER(SPECIES_TAPU_KOKO) { Ability(ABILITY_ELECTRIC_SURGE); };

View File

@ -162,7 +162,7 @@ SINGLE_BATTLE_TEST("Protect: Spiky Shield does 1/8 dmg of max hp of attackers ma
}
}
SINGLE_BATTLE_TEST("Protect: Baneful Bunker poisons pokemon for moves making contact")
SINGLE_BATTLE_TEST("Protect: Baneful Bunker poisons Pokémon for moves making contact")
{
u16 usedMove = MOVE_NONE;
@ -194,7 +194,7 @@ SINGLE_BATTLE_TEST("Protect: Baneful Bunker poisons pokemon for moves making con
}
}
SINGLE_BATTLE_TEST("Protect: Baneful Bunker can't poison pokemon if they are already statused")
SINGLE_BATTLE_TEST("Protect: Baneful Bunker can't poison Pokémon if they are already statused")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -215,7 +215,7 @@ SINGLE_BATTLE_TEST("Protect: Baneful Bunker can't poison pokemon if they are alr
}
}
SINGLE_BATTLE_TEST("Protect: Burning Bulwark burns pokemon for moves making contact")
SINGLE_BATTLE_TEST("Protect: Burning Bulwark burns Pokémon for moves making contact")
{
u16 usedMove = MOVE_NONE;
@ -247,7 +247,7 @@ SINGLE_BATTLE_TEST("Protect: Burning Bulwark burns pokemon for moves making cont
}
}
SINGLE_BATTLE_TEST("Protect: Burning Bulwark can't burn pokemon if they are already statused")
SINGLE_BATTLE_TEST("Protect: Burning Bulwark can't burn Pokémon if they are already statused")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);

View File

@ -44,7 +44,7 @@ DOUBLE_BATTLE_TEST("Quash is not affected by dynamic speed")
}
}
DOUBLE_BATTLE_TEST("Quash calculates correct turn order if only one pokemon is left on the opposing side")
DOUBLE_BATTLE_TEST("Quash calculates correct turn order if only one Pokémon is left on the opposing side")
{
GIVEN {
PLAYER(SPECIES_GRENINJA) { Speed(120); }

View File

@ -1,4 +1,6 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Return (Move Effect) test titles")
TO_DO_BATTLE_TEST("Return's power increases the higher friendship of the user is")
TO_DO_BATTLE_TEST("Return does 0 damage at min Friendship (Gen2)")
TO_DO_BATTLE_TEST("Return does 1 damage at min Friendship (Gen3+)")

View File

@ -51,7 +51,7 @@ SINGLE_BATTLE_TEST("Rototiller fails if there are no valid targets")
}
}
SINGLE_BATTLE_TEST("Rototiller doesn't affect pokemon that are semi-invulnerable")
SINGLE_BATTLE_TEST("Rototiller doesn't affect Pokémon that are semi-invulnerable")
{
GIVEN {
ASSUME(gSpeciesInfo[SPECIES_TANGELA].types[0] == TYPE_GRASS);

View File

@ -94,7 +94,7 @@ DOUBLE_BATTLE_TEST("Round still preserves the turn order outside of the other Ro
}
}
DOUBLE_BATTLE_TEST("Round causes opposing pokemon to use Round immediately")
DOUBLE_BATTLE_TEST("Round causes opposing Pokémon to use Round immediately")
{
GIVEN {
ASSUME(gItemsInfo[ITEM_LAGGING_TAIL].holdEffect == HOLD_EFFECT_LAGGING_TAIL);

View File

@ -57,7 +57,7 @@ SINGLE_BATTLE_TEST("Shed Tail's HP cost can trigger a berry before the user swit
}
}
SINGLE_BATTLE_TEST("Shed Tail fails if there are no usable pokemon left")
SINGLE_BATTLE_TEST("Shed Tail fails if there are no usable Pokémon left")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET)

View File

@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Stealth Rock damage on switch in based on typing")
}
}
SINGLE_BATTLE_TEST("Stealth Rock damages the correct pokemon when Eject Button is triggered")
SINGLE_BATTLE_TEST("Stealth Rock damages the correct Pokémon when Eject Button is triggered")
{
GIVEN {
PLAYER(SPECIES_METAPOD) { Item(ITEM_EJECT_BUTTON); }
@ -53,7 +53,7 @@ SINGLE_BATTLE_TEST("Stealth Rock damages the correct pokemon when Eject Button i
}
}
DOUBLE_BATTLE_TEST("Stealth Rock damages the correct pokemon when Eject Button is triggered in double battle")
DOUBLE_BATTLE_TEST("Stealth Rock damages the correct Pokémon when Eject Button is triggered in double battle")
{
GIVEN {
PLAYER(SPECIES_METAPOD) { Item(ITEM_EJECT_BUTTON); }

View File

@ -1,4 +1,10 @@
#include "global.h"
#include "test/battle.h"
TO_DO_BATTLE_TEST("TODO: Write Swagger (Move Effect) test titles")
TO_DO_BATTLE_TEST("Swagger raises the target's Attack and confuses them")
TO_DO_BATTLE_TEST("Swagger raises the target's Attack even if they're already confused")
TO_DO_BATTLE_TEST("Swagger raises the target's Attack even when protected by Safeguard")
TO_DO_BATTLE_TEST("Swagger raises the target's Attack even when protected Own Tempo")
TO_DO_BATTLE_TEST("Swagger doesn't confuse the target when they have their Attack maxed (Gen2)")
TO_DO_BATTLE_TEST("Swagger confuses the target even when they have their Attack maxed (Gen3+)")
TO_DO_BATTLE_TEST("Swagger confuses the target even when at -6 Attack and has Contrary")

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_TELEPORT) == EFFECT_TELEPORT);
}
SINGLE_BATTLE_TEST("Teleport fails when there is no pokemon to switch in")
SINGLE_BATTLE_TEST("Teleport fails when there is no Pokémon to switch in")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -18,7 +18,7 @@ SINGLE_BATTLE_TEST("Teleport fails when there is no pokemon to switch in")
}
}
SINGLE_BATTLE_TEST("Teleport fails when there no alive pokemon left")
SINGLE_BATTLE_TEST("Teleport fails when there no alive Pokémon left")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Teleport fails when there no alive pokemon left")
}
}
SINGLE_BATTLE_TEST("Teleport forces the pokemon to switch out")
SINGLE_BATTLE_TEST("Teleport forces the Pokémon to switch out")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);

View File

@ -6,7 +6,7 @@ ASSUMPTIONS
ASSUME(GetMoveEffect(MOVE_UPROAR) == EFFECT_UPROAR);
}
DOUBLE_BATTLE_TEST("Uproar status causes sleeping pokemon to wake up during an attack")
DOUBLE_BATTLE_TEST("Uproar status causes sleeping Pokémon to wake up during an attack")
{
PASSES_RANDOMLY(1, 2, RNG_RANDOM_TARGET); // test fails if we target soundproof mon
GIVEN {

View File

@ -36,7 +36,7 @@ SINGLE_BATTLE_TEST("Bug Bite eats the target's berry and immediately gains its e
PLAYER(SPECIES_WOBBUFFET) { HP(399); MaxHP(400); Status1(status1); Moves(MOVE_SLEEP_TALK, MOVE_BUG_BITE); }
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
// Chesto Berry can only be applied if the pokemon is asleep and uses Sleep Talk.
// Chesto Berry can only be applied if the Pokémon is asleep and uses Sleep Talk.
if (item == ITEM_CHESTO_BERRY) {
TURN { MOVE(player, MOVE_SLEEP_TALK); }
} else {

View File

@ -62,7 +62,7 @@ SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze poison/electric types respe
}
}
SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep pokemon with abilities preventing respective statuses")
SINGLE_BATTLE_TEST("Dire Claw cannot poison/paralyze/cause to fall asleep Pokémon with abilities preventing respective statuses")
{
u8 statusAnim;
u16 species, ability;

View File

@ -74,9 +74,9 @@ SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze electric/fire/ice typ
}
#if B_USE_FROSTBITE == TRUE
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/frostbite pokemon with abilities preventing respective statuses")
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/frostbite Pokémon with abilities preventing respective statuses")
#else
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze pokemon with abilities preventing respective statuses")
SINGLE_BATTLE_TEST("Tri Attack cannot paralyze/burn/freeze Pokémon with abilities preventing respective statuses")
#endif
{
u8 statusAnim;

View File

@ -83,7 +83,7 @@ DOUBLE_BATTLE_TEST("Spread Moves: A spread move attack will activate both resist
}
}
DOUBLE_BATTLE_TEST("Spread Moves: If a spread move attack will activate a resist berries on one pokemon, only the damage for that mon will be reduced")
DOUBLE_BATTLE_TEST("Spread Moves: If a spread move attack will activate a resist berries on one Pokémon, only the damage for that mon will be reduced")
{
s16 opponentLeftDmg[2];
s16 opponentRightDmg[2];

View File

@ -23,7 +23,7 @@ SINGLE_BATTLE_TEST("Frostbite reduces the special attack by 50 percent")
} THEN { EXPECT_EQ(reducedDamage * 2, normaleDamage); }
}
SINGLE_BATTLE_TEST("Frostbite deals 1/16th (Gen7+) or 1/8th damage to affected pokemon")
SINGLE_BATTLE_TEST("Frostbite deals 1/16th (Gen7+) or 1/8th damage to affected Pokémon")
{
s16 frostbiteDamage;