diff --git a/test/battle/ability/adaptability.c b/test/battle/ability/adaptability.c new file mode 100644 index 000000000000..fecdc6b7e26f --- /dev/null +++ b/test/battle/ability/adaptability.c @@ -0,0 +1,46 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Adaptability increases same-type attack bonus from x1.5 to x2"); + +SINGLE_BATTLE_TEST("(TERA) Terastallizing into a different type with Adaptability gives 2.0x STAB", s16 damage) +{ + bool32 tera; + PARAMETRIZE { tera = GIMMICK_NONE; } + PARAMETRIZE { tera = GIMMICK_TERA; } + GIVEN { + PLAYER(SPECIES_CRAWDAUNT) { Ability(ABILITY_ADAPTABILITY); TeraType(TYPE_NORMAL); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_HEADBUTT, gimmick: tera); } + } SCENE { + MESSAGE("Crawdaunt used Headbutt!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_HEADBUTT, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + // The jump from no STAB to 2.0x STAB is a 2.0x boost. + EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); + } +} + +SINGLE_BATTLE_TEST("(TERA) Terastallizing into the same type with Adaptability gives 2.25x STAB", s16 damage) +{ + bool32 tera; + PARAMETRIZE { tera = GIMMICK_NONE; } + PARAMETRIZE { tera = GIMMICK_TERA; } + GIVEN { + PLAYER(SPECIES_CRAWDAUNT) { Ability(ABILITY_ADAPTABILITY); TeraType(TYPE_WATER); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(player, MOVE_WATER_PULSE, gimmick: tera); } + } SCENE { + MESSAGE("Crawdaunt used Water Pulse!"); + ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_PULSE, player); + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + // The jump from 2x STAB to 2.25x STAB is a 1.125x boost. + EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.125), results[1].damage); + } +} + +TO_DO_BATTLE_TEST("Adaptability does not affect Stellar-type moves"); diff --git a/test/battle/ability/aerilate.c b/test/battle/ability/aerilate.c new file mode 100644 index 000000000000..8a5f889a662a --- /dev/null +++ b/test/battle/ability/aerilate.c @@ -0,0 +1,33 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL); + ASSUME(gMovesInfo[MOVE_TACKLE].power > 0); +} + +SINGLE_BATTLE_TEST("Aerilate turns a Normal-type move into Flying-type move") +{ + GIVEN { + PLAYER(SPECIES_MEGANIUM); + OPPONENT(SPECIES_SALAMENCE) { Item(ITEM_SALAMENCITE); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE, gimmick: GIMMICK_MEGA); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("It's super effective!"); + } +} + +TO_DO_BATTLE_TEST("Aerilate can not turn certain moves into Flying type moves"); +TO_DO_BATTLE_TEST("Aerilate boosts power of affected moves by 20% (Gen7+)"); +TO_DO_BATTLE_TEST("Aerilate boosts power of affected moves by 30% (Gen6)"); + +// Gen 6-7 +TO_DO_BATTLE_TEST("Aerilate overrides Electrify (Gen6-7)"); +TO_DO_BATTLE_TEST("Aerilate overrides Ion Deluge (Gen6-7)"); +// Gen 8+ +//TO_DO_BATTLE_TEST("Aerilate doesn't override Electrify (Gen8+)"); // No mon with Aerilate exists in Gen8+, but probably behaves similar to Pixilate, which does. +//TO_DO_BATTLE_TEST("Aerilate doesn't override Ion Deluge (Gen8+)"); // Ion Deluge doesn't exist in Gen 8+, but we probably could assume it behaves similar to under Electrify. TODO: Test by hacking SV. diff --git a/test/battle/ability/aftermath.c b/test/battle/ability/aftermath.c new file mode 100644 index 000000000000..65c0be7dfd2f --- /dev/null +++ b/test/battle/ability/aftermath.c @@ -0,0 +1,4 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Aftermath damages the attacker by 1/4th of its max HP if they faint the target has this ability by a contact move"); diff --git a/test/battle/ability/air_lock.c b/test/battle/ability/air_lock.c new file mode 100644 index 000000000000..0201e86a20fb --- /dev/null +++ b/test/battle/ability/air_lock.c @@ -0,0 +1,4 @@ +#include "global.h" +#include "test/battle.h" + +// Tests for Air Lock are handled in test/battle/ability/cloud_nine.c diff --git a/test/battle/ability/analytic.c b/test/battle/ability/analytic.c new file mode 100644 index 000000000000..44c42ae2d59e --- /dev/null +++ b/test/battle/ability/analytic.c @@ -0,0 +1,11 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Analytic increases the power of moves by 30% if it's the last one that uses its move"); +TO_DO_BATTLE_TEST("Analytic takes into account modifications to speeed an priority (Gen 5-8)"); //Eg. Paralysis, Power Weight, Stall +TO_DO_BATTLE_TEST("Analytic does not take into account modifications to speeed an priority (Gen 8)"); //Eg. Paralysis, Power Weight, Stall +TO_DO_BATTLE_TEST("Analytic takes into account the turn order of what fainted Pokémon would've moved"); + +// Triple Battles needed to test +//TO_DO_BATTLE_TEST("If the Pokémon with Analytic is targeting a Pokémon in a flank position that chooses to switch with its ally in the middle, its move's power will always be normal when it attacks the Pokémon that is shifted into the flank position"); +//TO_DO_BATTLE_TEST("If the Pokémon with Analytic targets a Pokémon in the middle whose ally on a flank chooses to shift into the middle position, its move's power still depends on whether the Pokémon that was in the middle (and is now on a flank) has acted when the Pokémon with Analytic uses its move"); diff --git a/test/battle/ability/anger_point.c b/test/battle/ability/anger_point.c index 0b13b9df4bcf..7cb283426a0f 100644 --- a/test/battle/ability/anger_point.c +++ b/test/battle/ability/anger_point.c @@ -47,7 +47,9 @@ SINGLE_BATTLE_TEST("Anger Point does not trigger when already at maximum Attack } } -SINGLE_BATTLE_TEST("Anger Point does not trigger when a substitute takes the hit") +TO_DO_BATTLE_TEST("Anger Point triggers when a substitute takes the hit (Gen4)"); + +SINGLE_BATTLE_TEST("Anger Point does not trigger when a substitute takes the hit (Gen5+)") { ASSUME(gMovesInfo[MOVE_FROST_BREATH].alwaysCriticalHit); ASSUME(gMovesInfo[MOVE_SUBSTITUTE].effect == EFFECT_SUBSTITUTE); diff --git a/test/battle/ability/anger_shell.c b/test/battle/ability/anger_shell.c index f0d11d757649..c5b490216b2f 100644 --- a/test/battle/ability/anger_shell.c +++ b/test/battle/ability/anger_shell.c @@ -1,7 +1,7 @@ #include "global.h" #include "test/battle.h" -SINGLE_BATTLE_TEST("Anger Shell activates only if the target had more than 50% of its hp") +SINGLE_BATTLE_TEST("Anger Shell activates only if the target had more than 50% of its HP") { bool32 activates = FALSE; u16 maxHp = 500, hp = 0; diff --git a/test/battle/ability/anticipation.c b/test/battle/ability/anticipation.c new file mode 100644 index 000000000000..a15ff153d9a9 --- /dev/null +++ b/test/battle/ability/anticipation.c @@ -0,0 +1,24 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Anticipation causes notifies if an opponent has a super-effective move"); +TO_DO_BATTLE_TEST("Anticipation causes notifies if an opponent has a One-hit KO move"); +TO_DO_BATTLE_TEST("Anticipation causes notifies if an opponent has a Self-Destruct or Explosion (Gen4)"); +TO_DO_BATTLE_TEST("Anticipation treats Self-Destruct and Explosion like all other Normal types (Gen5+)"); + +TO_DO_BATTLE_TEST("Anticipation considers Scrappy and Normalize into their effectiveness (Gen4)"); +TO_DO_BATTLE_TEST("Anticipation doesn't consider Scrappy and Normalize into their effectiveness (Gen5+)"); +TO_DO_BATTLE_TEST("Anticipation considers Gravity into their effectiveness (Gen4)"); +TO_DO_BATTLE_TEST("Anticipation doesn't consider Gravity into their effectiveness (Gen5+)"); +TO_DO_BATTLE_TEST("Anticipation doesn't trigger from Counter, Metal Burst or Mirror Coat (Gen4)"); +TO_DO_BATTLE_TEST("Anticipation counts Counter, Metal Burst or Mirror Coat as attacking moves of their types (Gen5+)"); +TO_DO_BATTLE_TEST("Anticipation considers Synchronoise as an ordinary Psychic-type move"); +TO_DO_BATTLE_TEST("Anticipation considers Freeze-Dry as an ordinary Ice-type move"); +TO_DO_BATTLE_TEST("Anticipation considers Flying Press as an ordinary Fighting-type move"); +TO_DO_BATTLE_TEST("Anticipation considers Aura Wheel as an ordinary Electric-type move"); +TO_DO_BATTLE_TEST("Anticipation considers Inverse Battle types"); //Check with Normal-type moves +TO_DO_BATTLE_TEST("Anticipation treats dynamic move types as their base type (Normal)"); // Judgment, Weather Ball, Natural Gift, Techno Blast, Revelation Dance, Multi Attack +TO_DO_BATTLE_TEST("Anticipation treats Hidden Power as Normal Type (Gen4-5)"); +TO_DO_BATTLE_TEST("Anticipation treats Hidden Power as its dynamic type (Gen6+)"); +TO_DO_BATTLE_TEST("Anticipation does not consider Strong Winds on type matchups"); +TO_DO_BATTLE_TEST("Anticipation does not consider ate-abilities"); diff --git a/test/battle/ability/arena_trap.c b/test/battle/ability/arena_trap.c new file mode 100644 index 000000000000..ef0d5b7d8cb6 --- /dev/null +++ b/test/battle/ability/arena_trap.c @@ -0,0 +1,11 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Arena Trap prevents grounded adjacent opponents from switching out"); +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs if the Pokémon is switched in the same turn the opponent decided to switch out"); +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs via moves that switch out"); // Baton Pass, U-Turn, Volt Switch, Flip Turn, Parting Shot +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs via Shed Shell, but not via Teleport"); +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs via Run Away"); +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs via Smoke Ball"); +TO_DO_BATTLE_TEST("Arena Trap prevents switch outs from Ghost-type Pokémon (Gen3-5)"); +TO_DO_BATTLE_TEST("Arena Trap doesn't prevent switch outs from Ghost-type Pokémon (Gen6+)"); diff --git a/test/battle/ability/aroma_veil.c b/test/battle/ability/aroma_veil.c new file mode 100644 index 000000000000..dc53fa149225 --- /dev/null +++ b/test/battle/ability/aroma_veil.c @@ -0,0 +1,15 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Taunt"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Torment"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Encore"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Disable"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Cursed Body"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Heal Block"); +TO_DO_BATTLE_TEST("Aroma Veil protects the Pokémon's side from Infatuation"); +TO_DO_BATTLE_TEST("Aroma Veil does not protect the Pokémon's side from Imprison"); + +// Marked in Bulbapedia as need of research +//TO_DO_BATTLE_TEST("Aroma Veil prevents G-Max Meltdown's effect"); +//TO_DO_BATTLE_TEST("Aroma Veil prevents Psychic Noise's effect"); diff --git a/test/battle/ability/as_one.c b/test/battle/ability/as_one.c new file mode 100644 index 000000000000..0d5367bf378e --- /dev/null +++ b/test/battle/ability/as_one.c @@ -0,0 +1,7 @@ +#include "global.h" +#include "test/battle.h" + +// Tests for the individual ability effects are handled in the following times: +// - Unnerve: test/battle/ability/unnerve.c +// - Chilling Neigh: test/battle/ability/chilling_neigh.c +// - Grim Neigh: test/battle/ability/grim_neigh.c diff --git a/test/battle/ability/aura_break.c b/test/battle/ability/aura_break.c new file mode 100644 index 000000000000..93b21421e419 --- /dev/null +++ b/test/battle/ability/aura_break.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Aura Break inverts Fairy Aura's effect"); +TO_DO_BATTLE_TEST("Aura Break inverts Dark Aura's effect"); +TO_DO_BATTLE_TEST("Aura Break ignores Mold Breaker abilities"); diff --git a/test/battle/ability/chilling_neigh.c b/test/battle/ability/chilling_neigh.c new file mode 100644 index 000000000000..03be77000b76 --- /dev/null +++ b/test/battle/ability/chilling_neigh.c @@ -0,0 +1,4 @@ +#include "global.h" +#include "test/battle.h" + +// Tests for Chilling Neigh are handled in test/battle/ability/moxie.c diff --git a/test/battle/ability/chlorophyll.c b/test/battle/ability/chlorophyll.c new file mode 100644 index 000000000000..493a197638be --- /dev/null +++ b/test/battle/ability/chlorophyll.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Chlorophyll doubles speed if it's sunny"); +TO_DO_BATTLE_TEST("Chlorophyll doesn't double speed if Cloud Nine/Air Lock is on the field"); +TO_DO_BATTLE_TEST("Chlorophyll doesn't double speed if they have an Utility Umbrella"); diff --git a/test/battle/ability/cloud_nine.c b/test/battle/ability/cloud_nine.c index dfe5611fc4be..887769a5ec7b 100644 --- a/test/battle/ability/cloud_nine.c +++ b/test/battle/ability/cloud_nine.c @@ -1,16 +1,41 @@ #include "global.h" #include "test/battle.h" -SINGLE_BATTLE_TEST("Cloud Nine prevents weather effects") +SINGLE_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Sandstorm") { + u32 species = 0, ability = 0; + PARAMETRIZE { species = SPECIES_PSYDUCK; ability = ABILITY_CLOUD_NINE; } + PARAMETRIZE { species = SPECIES_RAYQUAZA; ability = ABILITY_AIR_LOCK; } GIVEN { ASSUME(gMovesInfo[MOVE_SANDSTORM].effect == EFFECT_SANDSTORM); - PLAYER(SPECIES_PSYDUCK) { Ability(ABILITY_CLOUD_NINE); } + PLAYER(species) { Ability(ability); } OPPONENT(SPECIES_WOBBUFFET); } WHEN { TURN { MOVE(opponent, MOVE_SANDSTORM); } TURN {} } SCENE { - NONE_OF { HP_BAR(player); } + ABILITY_POPUP(player, ability); + MESSAGE("The effects of weather disappeared."); + MESSAGE("Foe Wobbuffet used Sandstorm!"); + MESSAGE("The sandstorm rages."); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SANDSTORM_CONTINUES); + NONE_OF { + HP_BAR(player); + HP_BAR(opponent); + MESSAGE("Foe Wobbuffet is buffeted by the sandstorm!"); + } + MESSAGE("The sandstorm rages."); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_SANDSTORM_CONTINUES); } } + +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Sun"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Rain"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Hail"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Snow"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Fog"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Primal Sun"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Primal Rain"); +TO_DO_BATTLE_TEST("Cloud Nine/Air Lock prevent basic weather effects, but without them disappearing - Strong Winds"); + +// Moves and abilities that are affected by weather should have new tests that check for Clould Nine/Air Lock, like Mold-Breaker Abilities diff --git a/test/battle/ability/damp.c b/test/battle/ability/damp.c index 9a3b795f2ae1..b567293aa09b 100644 --- a/test/battle/ability/damp.c +++ b/test/battle/ability/damp.c @@ -57,7 +57,7 @@ SINGLE_BATTLE_TEST("Damp prevents explosion-like moves from self") } } -SINGLE_BATTLE_TEST("Damp prevents damage from aftermath") +SINGLE_BATTLE_TEST("Damp prevents damage from Aftermath") { GIVEN { ASSUME(gMovesInfo[MOVE_TACKLE].makesContact); diff --git a/test/battle/ability/drought.c b/test/battle/ability/drought.c new file mode 100644 index 000000000000..bbe4dbe853a1 --- /dev/null +++ b/test/battle/ability/drought.c @@ -0,0 +1,5 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Drought sets up sun for 5 turns (Gen6+)"); +TO_DO_BATTLE_TEST("Drought sets up permanent sun (Gen3-5)"); diff --git a/test/battle/ability/dry_skin.c b/test/battle/ability/dry_skin.c index 368e4b80470b..5709a58a9448 100644 --- a/test/battle/ability/dry_skin.c +++ b/test/battle/ability/dry_skin.c @@ -15,6 +15,8 @@ SINGLE_BATTLE_TEST("Dry Skin causes 1/8th Max HP damage in Sun") } } +TO_DO_BATTLE_TEST("Dry Skin doesn't get damaged in Sun if Cloud Nine/Air Lock is on the field"); + SINGLE_BATTLE_TEST("Dry Skin heals 1/8th Max HP in Rain") { GIVEN { @@ -29,6 +31,8 @@ SINGLE_BATTLE_TEST("Dry Skin heals 1/8th Max HP in Rain") } } +TO_DO_BATTLE_TEST("Dry Skin doesn't heal in Rain if Cloud Nine/Air Lock is on the field"); + SINGLE_BATTLE_TEST("Dry Skin increases damage taken from Fire-type moves by 25%", s16 damage) { u32 ability; diff --git a/test/battle/ability/flower_gift.c b/test/battle/ability/flower_gift.c index 69a76b8e816c..68712641e09d 100644 --- a/test/battle/ability/flower_gift.c +++ b/test/battle/ability/flower_gift.c @@ -17,6 +17,8 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim in harsh sunlight") } } +TO_DO_BATTLE_TEST("Flower Gift doesn't transform Cherrim if Cloud Nine/Air Lock is on the field"); + SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when weather changes") { GIVEN { @@ -61,6 +63,8 @@ SINGLE_BATTLE_TEST("Flower Gift transforms Cherrim back to normal when its abili } } +TO_DO_BATTLE_TEST("Forecast transforms Castform back to normal under Cloud Nine/Air Lock"); + DOUBLE_BATTLE_TEST("Flower Gift increases the attack of Cherrim and its allies by 1.5x", s16 damageL, s16 damageR) { bool32 sunny; diff --git a/test/battle/ability/forecast.c b/test/battle/ability/forecast.c index 427a8e6807e0..296c123dbd6e 100644 --- a/test/battle/ability/forecast.c +++ b/test/battle/ability/forecast.c @@ -264,12 +264,15 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal when Sandstorm i } } -SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Air Lock") +SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Cloud Nine/Air Lock") { + u32 species = 0, ability = 0; + PARAMETRIZE { species = SPECIES_PSYDUCK; ability = ABILITY_CLOUD_NINE; } + PARAMETRIZE { species = SPECIES_RAYQUAZA; ability = ABILITY_AIR_LOCK; } GIVEN { PLAYER(SPECIES_CASTFORM_NORMAL) { Ability(ABILITY_FORECAST); } OPPONENT(SPECIES_WOBBUFFET); - OPPONENT(SPECIES_RAYQUAZA); + OPPONENT(species) { Ability(ability); } } WHEN { TURN { MOVE(player, MOVE_RAIN_DANCE); } TURN { SWITCH(opponent, 1); } @@ -279,7 +282,7 @@ SINGLE_BATTLE_TEST("Forecast transforms Castform back to normal under Air Lock") ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); MESSAGE("Castform transformed!"); // back to normal - ABILITY_POPUP(opponent, ABILITY_AIR_LOCK); + ABILITY_POPUP(opponent, ability); ABILITY_POPUP(player, ABILITY_FORECAST); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_FORM_CHANGE, player); MESSAGE("Castform transformed!"); diff --git a/test/battle/ability/ate_abilities.c b/test/battle/ability/galvanize.c similarity index 50% rename from test/battle/ability/ate_abilities.c rename to test/battle/ability/galvanize.c index 203452cc0152..55dfd7287a33 100644 --- a/test/battle/ability/ate_abilities.c +++ b/test/battle/ability/galvanize.c @@ -7,6 +7,19 @@ ASSUMPTIONS ASSUME(gMovesInfo[MOVE_TACKLE].power > 0); } +SINGLE_BATTLE_TEST("Galvanize turns a normal type move into Electric") +{ + GIVEN { + PLAYER(SPECIES_KRABBY); + OPPONENT(SPECIES_GEODUDE_ALOLAN) { Ability(ABILITY_GALVANIZE); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("It's super effective!"); + } +} + SINGLE_BATTLE_TEST("Galvanize can not turn certain moves into Electric type moves") { u32 move; @@ -29,56 +42,7 @@ SINGLE_BATTLE_TEST("Galvanize can not turn certain moves into Electric type move } } -SINGLE_BATTLE_TEST("Galvanize turns a normal type move into Electric") -{ - GIVEN { - PLAYER(SPECIES_KRABBY); - OPPONENT(SPECIES_GEODUDE_ALOLAN) { Ability(ABILITY_GALVANIZE); } - } WHEN { - TURN { MOVE(opponent, MOVE_TACKLE); } - } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); - MESSAGE("It's super effective!"); - } -} - -SINGLE_BATTLE_TEST("Pixilate turns a normal type move into Fairy") -{ - GIVEN { - PLAYER(SPECIES_DRAGONITE); - OPPONENT(SPECIES_ALTARIA) { Item(ITEM_ALTARIANITE); } - } WHEN { - TURN { MOVE(opponent, MOVE_TACKLE, gimmick: GIMMICK_MEGA); } - } SCENE { - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); - MESSAGE("It's super effective!"); - } -} - -SINGLE_BATTLE_TEST("Refrigerate turns a normal type move into Ice") -{ - GIVEN { - PLAYER(SPECIES_MEGANIUM); - OPPONENT(SPECIES_AMAURA) { Ability(ABILITY_REFRIGERATE); } - } WHEN { - TURN { MOVE(opponent, MOVE_TACKLE); } - } SCENE { - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); - MESSAGE("It's super effective!"); - } -} - -SINGLE_BATTLE_TEST("Aerilate turns a normal type move into Flying") -{ - GIVEN { - PLAYER(SPECIES_MEGANIUM); - OPPONENT(SPECIES_SALAMENCE) { Item(ITEM_SALAMENCITE); } - } WHEN { - TURN { MOVE(opponent, MOVE_TACKLE, gimmick: GIMMICK_MEGA); } - } SCENE { - ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); - ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); - MESSAGE("It's super effective!"); - } -} +TO_DO_BATTLE_TEST("Galvanize boosts power of affected moves by 20% (Gen7+)"); +TO_DO_BATTLE_TEST("Galvanize boosts power of affected moves by 30% (Gen6)"); +TO_DO_BATTLE_TEST("(DYNAMAX) Galvanize turns Max Strike into Max Lightning when not used by Gigantamax Pikachu/Toxtricity"); +//TO_DO_BATTLE_TEST("(DYNAMAX) Galvanize doesn't turn Max Strike into Max Lightning when used by Gigantamax Pikachu/Toxtricity, instead becoming G-Max Volt Crash/Stun Shock"); // Marked in Bulbapedia as "needs research", so this assumes that it behaves like Pixilate. diff --git a/test/battle/ability/grim_neigh.c b/test/battle/ability/grim_neigh.c new file mode 100644 index 000000000000..b4d82487d83e --- /dev/null +++ b/test/battle/ability/grim_neigh.c @@ -0,0 +1,109 @@ +#include "global.h" +#include "test/battle.h" + +DOUBLE_BATTLE_TEST("Grim Neigh raises Sp. Attack by one stage after directly causing a Pokemon to faint") +{ + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SPECTRIER; ability = ABILITY_GRIM_NEIGH; abilityPopUp = ABILITY_GRIM_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW_RIDER; ability = ABILITY_AS_ONE_SHADOW_RIDER; abilityPopUp = ABILITY_GRIM_NEIGH; } + GIVEN { + ASSUME(gMovesInfo[MOVE_DISCHARGE].target == MOVE_TARGET_FOES_AND_ALLY); + PLAYER(species) { Ability(ability); } + PLAYER(SPECIES_SNORUNT) { HP(1); } + OPPONENT(SPECIES_GLALIE) { HP(1); } + OPPONENT(SPECIES_ABRA) { HP(1); } + OPPONENT(SPECIES_ABRA); + } WHEN { + TURN { MOVE(playerLeft, MOVE_DISCHARGE); SEND_OUT(opponentLeft, 2); } + } SCENE { + int i; + + ANIMATION(ANIM_TYPE_MOVE, MOVE_DISCHARGE, playerLeft); + for (i = 0; i < 3; i++) { + ONE_OF { + MESSAGE("Snorunt fainted!"); + MESSAGE("Foe Glalie fainted!"); + MESSAGE("Foe Abra fainted!"); + } + ABILITY_POPUP(playerLeft, abilityPopUp); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + if (species == SPECIES_SPECTRIER) + MESSAGE("Spectrier's Grim Neigh raised its Sp. Atk!"); + else + MESSAGE("Calyrex's Grim Neigh raised its Sp. Atk!"); + } + } THEN { + EXPECT_EQ(playerLeft->statStages[STAT_SPATK], DEFAULT_STAT_STAGE + 3); + } +} + +DOUBLE_BATTLE_TEST("Grim Neigh does not trigger if Pokemon faint to indirect damage or damage from other Pokemon") +{ + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SPECTRIER; ability = ABILITY_GRIM_NEIGH; abilityPopUp = ABILITY_GRIM_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW_RIDER; ability = ABILITY_AS_ONE_SHADOW_RIDER; abilityPopUp = ABILITY_GRIM_NEIGH; } + GIVEN { + PLAYER(species) { Ability(ability); } + PLAYER(SPECIES_SNORUNT) { HP(1); Status1(STATUS1_POISON); } + OPPONENT(SPECIES_GLALIE) { HP(1); Status1(STATUS1_BURN); } + OPPONENT(SPECIES_ABRA) { HP(1); } + OPPONENT(SPECIES_ABRA); + } WHEN { + TURN { MOVE(playerRight, MOVE_QUICK_ATTACK, target: opponentRight); SEND_OUT(opponentLeft, 2); } + } SCENE { + int i; + + ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_ATTACK, playerRight); + for (i = 0; i < 3; i++) { + ONE_OF { + MESSAGE("Snorunt fainted!"); + MESSAGE("Foe Glalie fainted!"); + MESSAGE("Foe Abra fainted!"); + } + NONE_OF { + ABILITY_POPUP(playerLeft, abilityPopUp); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + MESSAGE("Salamence's Moxie raised its Sp. Atk!"); + MESSAGE("Spectrier's Grim Neigh raised its Sp. Atk!"); + MESSAGE("Calyrex's Grim Neigh raised its Sp. Atk!"); + } + } + } THEN { + EXPECT_EQ(playerLeft->statStages[STAT_SPATK], DEFAULT_STAT_STAGE); + } +} + +DOUBLE_BATTLE_TEST("Grim Neigh does not increase damage done by the same move that causes another Pokemon to faint") +{ + s16 damage[2]; + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SPECTRIER; ability = ABILITY_GRIM_NEIGH; abilityPopUp = ABILITY_GRIM_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_SHADOW_RIDER; ability = ABILITY_AS_ONE_SHADOW_RIDER; abilityPopUp = ABILITY_GRIM_NEIGH; } + + KNOWN_FAILING; // Requires simultaneous damage implementation + GIVEN { + ASSUME(gMovesInfo[MOVE_DISCHARGE].target == MOVE_TARGET_FOES_AND_ALLY); + PLAYER(species) { Ability(ability); } + PLAYER(SPECIES_ABRA) { HP(1); } + OPPONENT(SPECIES_GLALIE); + OPPONENT(SPECIES_GLALIE); + OPPONENT(SPECIES_ABRA); + } WHEN { + TURN { MOVE(playerLeft, MOVE_DISCHARGE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_DISCHARGE, playerLeft); + HP_BAR(opponentLeft, captureDamage: &damage[0]); + HP_BAR(playerRight); + MESSAGE("Abra fainted!"); + ABILITY_POPUP(playerLeft, abilityPopUp); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); + if (species == SPECIES_SPECTRIER) + MESSAGE("Spectrier's Grim Neigh raised its Sp. Atk!"); + else + MESSAGE("Calyrex's Grim Neigh raised its Sp. Atk!"); + HP_BAR(opponentRight, captureDamage: &damage[1]); + } THEN { + EXPECT_EQ(playerLeft->statStages[STAT_SPATK], DEFAULT_STAT_STAGE + 1); + EXPECT_EQ(damage[0], damage[1]); + } +} diff --git a/test/battle/ability/harvest.c b/test/battle/ability/harvest.c index 9fb969b03621..b4783c4542fa 100644 --- a/test/battle/ability/harvest.c +++ b/test/battle/ability/harvest.c @@ -3,6 +3,7 @@ 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 doesn't always restore a Berry if Cloud Nine/Air Lock is on the field"); 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"); diff --git a/test/battle/ability/hydration.c b/test/battle/ability/hydration.c index 2dca490c02e5..7d16ad04ae8c 100644 --- a/test/battle/ability/hydration.c +++ b/test/battle/ability/hydration.c @@ -14,3 +14,5 @@ SINGLE_BATTLE_TEST("Hydration cures non-volatile Status conditions if it is rain STATUS_ICON(player, none: TRUE); } } + +TO_DO_BATTLE_TEST("Hydration doesn't cure status conditions if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/ice_body.c b/test/battle/ability/ice_body.c index 1aa7c80a4d98..304059a00e69 100644 --- a/test/battle/ability/ice_body.c +++ b/test/battle/ability/ice_body.c @@ -26,3 +26,5 @@ SINGLE_BATTLE_TEST("Ice Body recovers 1/16th of Max HP in hail.") MESSAGE("Glalie's Ice Body healed it a little bit!"); } } + +TO_DO_BATTLE_TEST("Sand Rush doesn't recover HP if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/ice_face.c b/test/battle/ability/ice_face.c new file mode 100644 index 000000000000..53917b5623a2 --- /dev/null +++ b/test/battle/ability/ice_face.c @@ -0,0 +1,9 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Ice Face blocks physical moves, changing Eiscue into its Noice Face form"); // Include Special move in test +TO_DO_BATTLE_TEST("Ice Face is restored if hail or snow begins while Noice Face Eiscue is out"); +TO_DO_BATTLE_TEST("Ice Face is restored if Noice Face Eiscue is sent in while hail or snow is active"); +TO_DO_BATTLE_TEST("Ice Face is not restored if Eiscue changes into Noice Face form while there's already hail"); +TO_DO_BATTLE_TEST("Ice Face form change persists after switching out"); +TO_DO_BATTLE_TEST("Ice Face doesn't transform Eiscue if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/leaf_guard.c b/test/battle/ability/leaf_guard.c index 6c559ea48a4e..2c55236defb8 100644 --- a/test/battle/ability/leaf_guard.c +++ b/test/battle/ability/leaf_guard.c @@ -27,6 +27,8 @@ SINGLE_BATTLE_TEST("Leaf Guard prevents non-volatile status conditions in sun") } } +TO_DO_BATTLE_TEST("Leaf Guard doesn't prevent non-volatile status conditions if Cloud Nine/Air Lock is on the field"); + SINGLE_BATTLE_TEST("Leaf Guard prevents status conditions from Flame Orb and Toxic Orb") { u32 item; @@ -49,6 +51,8 @@ SINGLE_BATTLE_TEST("Leaf Guard prevents status conditions from Flame Orb and Tox } } +TO_DO_BATTLE_TEST("Leaf Guard doesn't prevent status conditions from Flame Orb and Toxic Orb if Cloud Nine/Air Lock is on the field"); + SINGLE_BATTLE_TEST("Leaf Guard prevents Rest during sun") { GIVEN { @@ -66,3 +70,5 @@ SINGLE_BATTLE_TEST("Leaf Guard prevents Rest during sun") } } } + +TO_DO_BATTLE_TEST("Leaf Guard doesn't prevent Rest if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/moxie.c b/test/battle/ability/moxie.c index b60a11507acd..79b1fc989fa6 100644 --- a/test/battle/ability/moxie.c +++ b/test/battle/ability/moxie.c @@ -1,12 +1,15 @@ #include "global.h" #include "test/battle.h" -DOUBLE_BATTLE_TEST("Moxie raises Attack by one stage after directly causing a Pokemon to faint") +DOUBLE_BATTLE_TEST("Moxie/Chilling Neigh raises Attack by one stage after directly causing a Pokemon to faint") { - ASSUME(gMovesInfo[MOVE_EARTHQUAKE].target == MOVE_TARGET_FOES_AND_ALLY); - + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SALAMENCE; ability = ABILITY_MOXIE; abilityPopUp = ABILITY_MOXIE; } + PARAMETRIZE { species = SPECIES_GLASTRIER; ability = ABILITY_CHILLING_NEIGH; abilityPopUp = ABILITY_CHILLING_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE_RIDER; ability = ABILITY_AS_ONE_ICE_RIDER; abilityPopUp = ABILITY_CHILLING_NEIGH; } GIVEN { - PLAYER(SPECIES_SALAMENCE) { Ability(ABILITY_MOXIE); } + ASSUME(gMovesInfo[MOVE_EARTHQUAKE].target == MOVE_TARGET_FOES_AND_ALLY); + PLAYER(species) { Ability(ability); } PLAYER(SPECIES_SNORUNT) { HP(1); } OPPONENT(SPECIES_GLALIE) { HP(1); } OPPONENT(SPECIES_ABRA) { HP(1); } @@ -23,19 +26,28 @@ DOUBLE_BATTLE_TEST("Moxie raises Attack by one stage after directly causing a Po MESSAGE("Foe Glalie fainted!"); MESSAGE("Foe Abra fainted!"); } - ABILITY_POPUP(playerLeft, ABILITY_MOXIE); + ABILITY_POPUP(playerLeft, abilityPopUp); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Salamence's Moxie raised its Attack!"); + if (species == SPECIES_SALAMENCE) + MESSAGE("Salamence's Moxie raised its Attack!"); + else if (species == SPECIES_GLASTRIER) + MESSAGE("Glastrier's Chilling Neigh raised its Attack!"); + else + MESSAGE("Calyrex's Chilling Neigh raised its Attack!"); } } THEN { EXPECT_EQ(playerLeft->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 3); } } -DOUBLE_BATTLE_TEST("Moxie does not trigger if Pokemon faint to indirect damage or damage from other Pokemon") +DOUBLE_BATTLE_TEST("Moxie/Chilling Neigh does not trigger if Pokemon faint to indirect damage or damage from other Pokemon") { + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SALAMENCE; ability = ABILITY_MOXIE; abilityPopUp = ABILITY_MOXIE; } + PARAMETRIZE { species = SPECIES_GLASTRIER; ability = ABILITY_CHILLING_NEIGH; abilityPopUp = ABILITY_CHILLING_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE_RIDER; ability = ABILITY_AS_ONE_ICE_RIDER; abilityPopUp = ABILITY_CHILLING_NEIGH; } GIVEN { - PLAYER(SPECIES_SALAMENCE) { Ability(ABILITY_MOXIE); } + PLAYER(species) { Ability(ability); } PLAYER(SPECIES_SNORUNT) { HP(1); Status1(STATUS1_POISON); } OPPONENT(SPECIES_GLALIE) { HP(1); Status1(STATUS1_BURN); } OPPONENT(SPECIES_ABRA) { HP(1); } @@ -53,9 +65,11 @@ DOUBLE_BATTLE_TEST("Moxie does not trigger if Pokemon faint to indirect damage o MESSAGE("Foe Abra fainted!"); } NONE_OF { - ABILITY_POPUP(playerLeft, ABILITY_MOXIE); + ABILITY_POPUP(playerLeft, abilityPopUp); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); MESSAGE("Salamence's Moxie raised its Attack!"); + MESSAGE("Glastrier's Chilling Neigh raised its Attack!"); + MESSAGE("Calyrex's Chilling Neigh raised its Attack!"); } } } THEN { @@ -63,12 +77,15 @@ DOUBLE_BATTLE_TEST("Moxie does not trigger if Pokemon faint to indirect damage o } } -SINGLE_BATTLE_TEST("Moxie does not trigger when already at maximum Attack stage") +SINGLE_BATTLE_TEST("Moxie/Chilling Neigh does not trigger when already at maximum Attack stage") { - ASSUME(gMovesInfo[MOVE_BELLY_DRUM].effect == EFFECT_BELLY_DRUM); - + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SALAMENCE; ability = ABILITY_MOXIE; abilityPopUp = ABILITY_MOXIE; } + PARAMETRIZE { species = SPECIES_GLASTRIER; ability = ABILITY_CHILLING_NEIGH; abilityPopUp = ABILITY_CHILLING_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE_RIDER; ability = ABILITY_AS_ONE_ICE_RIDER; abilityPopUp = ABILITY_CHILLING_NEIGH; } GIVEN { - PLAYER(SPECIES_SALAMENCE) { Ability(ABILITY_MOXIE); } + ASSUME(gMovesInfo[MOVE_BELLY_DRUM].effect == EFFECT_BELLY_DRUM); + PLAYER(species) { Ability(ability); } OPPONENT(SPECIES_SNORUNT) { HP(1); } OPPONENT(SPECIES_SNORUNT); } WHEN { @@ -77,28 +94,38 @@ SINGLE_BATTLE_TEST("Moxie does not trigger when already at maximum Attack stage" } SCENE { ANIMATION(ANIM_TYPE_MOVE, MOVE_BELLY_DRUM, player); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); - MESSAGE("Salamence cut its own HP and maximized ATTACK!"); + if (species == SPECIES_SALAMENCE) + MESSAGE("Salamence cut its own HP and maximized ATTACK!"); + else if (species == SPECIES_GLASTRIER) + MESSAGE("Glastrier cut its own HP and maximized ATTACK!"); + else + MESSAGE("Calyrex cut its own HP and maximized ATTACK!"); ANIMATION(ANIM_TYPE_MOVE, MOVE_QUICK_ATTACK, player); MESSAGE("Foe Snorunt fainted!"); - NONE_OF { - ABILITY_POPUP(player, ABILITY_MOXIE); + NONE_OF { + ABILITY_POPUP(player, abilityPopUp); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); MESSAGE("Salamence's Moxie raised its Attack!"); + MESSAGE("Glastrier's Chilling Neigh raised its Attack!"); + MESSAGE("Calyrex's Chilling Neigh raised its Attack!"); } } THEN { EXPECT_EQ(player->statStages[STAT_ATK], MAX_STAT_STAGE); } } -DOUBLE_BATTLE_TEST("Moxie does not increase damage done by the same move that causes another Pokemon to faint") +DOUBLE_BATTLE_TEST("Moxie/Chilling Neigh does not increase damage done by the same move that causes another Pokemon to faint") { s16 damage[2]; - - ASSUME(gMovesInfo[MOVE_EARTHQUAKE].target == MOVE_TARGET_FOES_AND_ALLY); + u32 species = 0, ability = 0, abilityPopUp = 0; + PARAMETRIZE { species = SPECIES_SALAMENCE; ability = ABILITY_MOXIE; abilityPopUp = ABILITY_MOXIE; } + PARAMETRIZE { species = SPECIES_GLASTRIER; ability = ABILITY_CHILLING_NEIGH; abilityPopUp = ABILITY_CHILLING_NEIGH; } + PARAMETRIZE { species = SPECIES_CALYREX_ICE_RIDER; ability = ABILITY_AS_ONE_ICE_RIDER; abilityPopUp = ABILITY_CHILLING_NEIGH; } KNOWN_FAILING; // Requires simultaneous damage implementation GIVEN { - PLAYER(SPECIES_SALAMENCE) { Ability(ABILITY_MOXIE); } + ASSUME(gMovesInfo[MOVE_EARTHQUAKE].target == MOVE_TARGET_FOES_AND_ALLY); + PLAYER(species) { Ability(ability); } PLAYER(SPECIES_ABRA) { HP(1); } OPPONENT(SPECIES_GLALIE); OPPONENT(SPECIES_GLALIE); @@ -110,9 +137,14 @@ DOUBLE_BATTLE_TEST("Moxie does not increase damage done by the same move that ca HP_BAR(opponentLeft, captureDamage: &damage[0]); HP_BAR(playerRight); MESSAGE("Abra fainted!"); - ABILITY_POPUP(playerLeft, ABILITY_MOXIE); + ABILITY_POPUP(playerLeft, abilityPopUp); ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft); - MESSAGE("Salamence's Moxie raised its Attack!"); + if (species == SPECIES_SALAMENCE) + MESSAGE("Salamence's Moxie raised its Attack!"); + else if (species == SPECIES_GLASTRIER) + MESSAGE("Glastrier's Chilling Neigh raised its Attack!"); + else + MESSAGE("Calyrex's Chilling Neigh raised its Attack!"); HP_BAR(opponentRight, captureDamage: &damage[1]); } THEN { EXPECT_EQ(playerLeft->statStages[STAT_ATK], DEFAULT_STAT_STAGE + 1); diff --git a/test/battle/ability/normalize.c b/test/battle/ability/normalize.c new file mode 100644 index 000000000000..d3e8df6bee9d --- /dev/null +++ b/test/battle/ability/normalize.c @@ -0,0 +1,16 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Normalize tuns a move into a Normal-type move"); +TO_DO_BATTLE_TEST("Normalize boosts power of both affected and originally Normal-type moves by 20% (Gen7+)"); +TO_DO_BATTLE_TEST("Normalize affects status moves"); // Eg. Thunder Wave can affect Ground types +TO_DO_BATTLE_TEST("Normalize makes Flying Press do Normal/Flying damage"); +TO_DO_BATTLE_TEST("Normalize still makes Freeze-Dry do super effective damage to Water-type Pokémon"); +TO_DO_BATTLE_TEST("Normalize-affected moves become Electric-type under Electrify's effect"); +TO_DO_BATTLE_TEST("Normalize-affected moves become Electric-type under Ion Deluge's effect"); +TO_DO_BATTLE_TEST("Normalize doesn't affect Hidden Power's type"); +TO_DO_BATTLE_TEST("Normalize doesn't affect Weather Ball's type"); +TO_DO_BATTLE_TEST("Normalize doesn't affect Natural Gift's type"); +TO_DO_BATTLE_TEST("Normalize doesn't affect Judgment/Techno Blast/Multi-Attack's type"); +TO_DO_BATTLE_TEST("Normalize doesn't affect Terrain Pulse's type"); +TO_DO_BATTLE_TEST("Normalize doesn't affect damaging Z-Move types"); diff --git a/test/battle/ability/orichalcum_pulse.c b/test/battle/ability/orichalcum_pulse.c new file mode 100644 index 000000000000..295e0db23c73 --- /dev/null +++ b/test/battle/ability/orichalcum_pulse.c @@ -0,0 +1,5 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Orichalcum Pulse sets up sun for 5 turns"); +TO_DO_BATTLE_TEST("Orichalcum Pulse boosts the Pokémon's Attack by 33% in sun, even if it's holding an Utility Umbrella"); diff --git a/test/battle/ability/pixilate.c b/test/battle/ability/pixilate.c new file mode 100644 index 000000000000..97c9c37a0c7c --- /dev/null +++ b/test/battle/ability/pixilate.c @@ -0,0 +1,35 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL); + ASSUME(gMovesInfo[MOVE_TACKLE].power > 0); +} + +SINGLE_BATTLE_TEST("Pixilate turns a Normal-type move into a Fairy-type move") +{ + GIVEN { + PLAYER(SPECIES_DRAGONITE); + OPPONENT(SPECIES_ALTARIA) { Item(ITEM_ALTARIANITE); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE, gimmick: GIMMICK_MEGA); } + } SCENE { + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_MEGA_EVOLUTION, opponent); + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("It's super effective!"); + } +} + +TO_DO_BATTLE_TEST("Pixilate can not turn certain moves into Fairy type moves"); +TO_DO_BATTLE_TEST("Pixilate boosts power of affected moves by 20% (Gen7+)"); +TO_DO_BATTLE_TEST("Pixilate boosts power of affected moves by 30% (Gen6)"); +TO_DO_BATTLE_TEST("(DYNAMAX) Pixilate turns Max Strike into Max Starfall when not used by Gigantamax Alcremie"); +TO_DO_BATTLE_TEST("(DYNAMAX) Pixilate doesn't turn Max Strike into Max Starfall when used by Gigantamax Alcremie, instead becoming G-Max Finale"); + +// Gen 6-7 +TO_DO_BATTLE_TEST("Pixilate overrides Electrify (Gen6-7)"); +TO_DO_BATTLE_TEST("Pixilate overrides Ion Deluge (Gen6-7)"); +// Gen 8+ +TO_DO_BATTLE_TEST("Pixilate doesn't override Electrify (Gen8+)"); +//TO_DO_BATTLE_TEST("Pixilate doesn't override Ion Deluge (Gen8+)"); // Ion Deluge doesn't exist in Gen 8+, but we probably could assume it behaves similar to under Electrify. TODO: Test by hacking SV. diff --git a/test/battle/ability/protosynthesis.c b/test/battle/ability/protosynthesis.c index 3cb35164ec7b..58f10b366f73 100644 --- a/test/battle/ability/protosynthesis.c +++ b/test/battle/ability/protosynthesis.c @@ -99,3 +99,7 @@ SINGLE_BATTLE_TEST("Protosynthesis activates on switch-in") MESSAGE("Roaring Moon's Attack was heightened!"); } } + +TO_DO_BATTLE_TEST("Protosynthesis activates in sun before Booster Energy"); +TO_DO_BATTLE_TEST("Protosynthesis activates even if the Pokémon is holding an Utility Umbrella"); +TO_DO_BATTLE_TEST("Protosynthesis doesn't activate if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/rain_dish.c b/test/battle/ability/rain_dish.c index dd647f0eb95b..ed71a67f9277 100644 --- a/test/battle/ability/rain_dish.c +++ b/test/battle/ability/rain_dish.c @@ -14,3 +14,5 @@ SINGLE_BATTLE_TEST("Rain Dish recovers 1/16th of Max HP in Rain") HP_BAR(player, damage: -(100 / 16)); } } + +TO_DO_BATTLE_TEST("Rain Dish doesn't recover HP if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/refrigerate.c b/test/battle/ability/refrigerate.c new file mode 100644 index 000000000000..dbbaa30eb8dd --- /dev/null +++ b/test/battle/ability/refrigerate.c @@ -0,0 +1,34 @@ +#include "global.h" +#include "test/battle.h" + +ASSUMPTIONS +{ + ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL); + ASSUME(gMovesInfo[MOVE_TACKLE].power > 0); +} + +SINGLE_BATTLE_TEST("Refrigerate turns a Normal-type move into a Ice-type move") +{ + GIVEN { + PLAYER(SPECIES_MEGANIUM); + OPPONENT(SPECIES_AMAURA) { Ability(ABILITY_REFRIGERATE); } + } WHEN { + TURN { MOVE(opponent, MOVE_TACKLE); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent); + MESSAGE("It's super effective!"); + } +} + +TO_DO_BATTLE_TEST("Refrigerate can not turn certain moves into Ice type moves"); +TO_DO_BATTLE_TEST("Refrigerate boosts power of affected moves by 20% (Gen7+)"); +TO_DO_BATTLE_TEST("Refrigerate boosts power of affected moves by 30% (Gen6)"); +TO_DO_BATTLE_TEST("(DYNAMAX) Refrigerate turns Max Strike into Max Hailstorm when not used by Gigantamax Lapras"); +//TO_DO_BATTLE_TEST("(DYNAMAX) Refrigerate doesn't turn Max Strike into Max Hailstorm when used by Gigantamax Lapras, instead becoming G-Max Resonance"); // Marked in Bulbapedia as "needs research", so this assumes that it behaves like Pixilate. + +// Gen 6-7 +TO_DO_BATTLE_TEST("Refrigerate overrides Electrify (Gen6-7)"); +TO_DO_BATTLE_TEST("Refrigerate overrides Ion Deluge (Gen6-7)"); +// Gen 8+ +//TO_DO_BATTLE_TEST("Refrigerate doesn't override Electrify (Gen8+)"); // Bulbapedia doesn't list this effect, so it assumes it behaves like Pixilate. +//TO_DO_BATTLE_TEST("Refrigerate doesn't override Ion Deluge (Gen8+)"); // Ion Deluge doesn't exist in Gen 8+, but we probably could assume it behaves similar to under Electrify. TODO: Test by hacking SV. diff --git a/test/battle/ability/sand_force.c b/test/battle/ability/sand_force.c new file mode 100644 index 000000000000..e17722a88532 --- /dev/null +++ b/test/battle/ability/sand_force.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Sand Force prevents damage from sandstorm"); +TO_DO_BATTLE_TEST("Sand Force increases the power of Rock-, Ground- and Steel-type moves by 30% in sandstorm"); +TO_DO_BATTLE_TEST("Sand Force increases move power if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/sand_rush.c b/test/battle/ability/sand_rush.c new file mode 100644 index 000000000000..fa7695c129ca --- /dev/null +++ b/test/battle/ability/sand_rush.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Sand Rush prevents damage from sandstorm"); +TO_DO_BATTLE_TEST("Sand Rush doubles speed from sandstorm"); +TO_DO_BATTLE_TEST("Sand Rush doesn't double speed if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/sand_veil.c b/test/battle/ability/sand_veil.c index 9e4a634de25f..f42c2672734b 100644 --- a/test/battle/ability/sand_veil.c +++ b/test/battle/ability/sand_veil.c @@ -28,3 +28,6 @@ SINGLE_BATTLE_TEST("Sand Veil increases evasion during sandstorm") HP_BAR(player); } } + +TO_DO_BATTLE_TEST("Sand Veil doesn't prevent Sandstorm damage if Cloud Nine/Air Lock is on the field"); +TO_DO_BATTLE_TEST("Sand Veil doesn't increase evasion if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/slush_rush.c b/test/battle/ability/slush_rush.c new file mode 100644 index 000000000000..8ae62454bb49 --- /dev/null +++ b/test/battle/ability/slush_rush.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Slush Rush doubles speed from hail"); +TO_DO_BATTLE_TEST("Slush Rush doubles speed from snow"); +TO_DO_BATTLE_TEST("Slush Rush doesn't double speed if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/snow_cloak.c b/test/battle/ability/snow_cloak.c index f1bfbcb9b056..a4d1acadb7c5 100644 --- a/test/battle/ability/snow_cloak.c +++ b/test/battle/ability/snow_cloak.c @@ -27,3 +27,6 @@ SINGLE_BATTLE_TEST("Snow Cloak increases evasion during hail") HP_BAR(player); } } + +TO_DO_BATTLE_TEST("Snow Cloak doesn't prevent hail damage if Cloud Nine/Air Lock is on the field"); +TO_DO_BATTLE_TEST("Snow Cloak doesn't increase evasion if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/solar_power.c b/test/battle/ability/solar_power.c new file mode 100644 index 000000000000..f14ea11ee10a --- /dev/null +++ b/test/battle/ability/solar_power.c @@ -0,0 +1,7 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Solar Power increases a Sp. Attack by x1.5 in Sun"); +TO_DO_BATTLE_TEST("Solar Power doesn't increases a Sp. Attack if Cloud Nine/Air Lock is on the field"); +TO_DO_BATTLE_TEST("Solar Power causes the Pokémon to lose 1/8 max HP in Sun"); +TO_DO_BATTLE_TEST("Solar Power doesn't cause the Pokémon to lose 1/8 max HP if Cloud Nine/Air Lock is on the field"); diff --git a/test/battle/ability/swift_swim.c b/test/battle/ability/swift_swim.c new file mode 100644 index 000000000000..4282ac2741a1 --- /dev/null +++ b/test/battle/ability/swift_swim.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +TO_DO_BATTLE_TEST("Swift Swim doubles speed if it's raining"); +TO_DO_BATTLE_TEST("Swift Swim doesn't double speed if Cloud Nine/Air Lock is on the field"); +TO_DO_BATTLE_TEST("Swift Swim doesn't double speed if they have an Utility Umbrella"); diff --git a/test/battle/ability/unnerve.c b/test/battle/ability/unnerve.c new file mode 100644 index 000000000000..9ad4ee7e5fdd --- /dev/null +++ b/test/battle/ability/unnerve.c @@ -0,0 +1,6 @@ +#include "global.h" +#include "test/battle.h" + +// Remember to add a PARAMETRIZE for As One in the following tests: +TO_DO_BATTLE_TEST("Unnerve prevents opposing Pokémon from eating their own berries"); +TO_DO_BATTLE_TEST("Unnerve doesn't prevent opposing Pokémon from using Natural Gift"); diff --git a/test/battle/gimmick/terastal.c b/test/battle/gimmick/terastal.c index f14c398b6406..7a70ba0de014 100644 --- a/test/battle/gimmick/terastal.c +++ b/test/battle/gimmick/terastal.c @@ -86,46 +86,6 @@ SINGLE_BATTLE_TEST("(TERA) Terastallizing into the same type gives that type 2x } } -SINGLE_BATTLE_TEST("(TERA) Terastallizing into a different type with Adaptability gives 2.0x STAB", s16 damage) -{ - bool32 tera; - PARAMETRIZE { tera = GIMMICK_NONE; } - PARAMETRIZE { tera = GIMMICK_TERA; } - GIVEN { - PLAYER(SPECIES_CRAWDAUNT) { Ability(ABILITY_ADAPTABILITY); TeraType(TYPE_NORMAL); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_HEADBUTT, gimmick: tera); } - } SCENE { - MESSAGE("Crawdaunt used Headbutt!"); - ANIMATION(ANIM_TYPE_MOVE, MOVE_HEADBUTT, player); - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - // The jump from no STAB to 2.0x STAB is a 2.0x boost. - EXPECT_MUL_EQ(results[0].damage, Q_4_12(2.0), results[1].damage); - } -} - -SINGLE_BATTLE_TEST("(TERA) Terastallizing into the same type with Adaptability gives 2.25x STAB", s16 damage) -{ - bool32 tera; - PARAMETRIZE { tera = GIMMICK_NONE; } - PARAMETRIZE { tera = GIMMICK_TERA; } - GIVEN { - PLAYER(SPECIES_CRAWDAUNT) { Ability(ABILITY_ADAPTABILITY); TeraType(TYPE_WATER); } - OPPONENT(SPECIES_WOBBUFFET); - } WHEN { - TURN { MOVE(player, MOVE_WATER_PULSE, gimmick: tera); } - } SCENE { - MESSAGE("Crawdaunt used Water Pulse!"); - ANIMATION(ANIM_TYPE_MOVE, MOVE_WATER_PULSE, player); - HP_BAR(opponent, captureDamage: &results[i].damage); - } FINALLY { - // The jump from 2x STAB to 2.25x STAB is a 1.125x boost. - EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.125), results[1].damage); - } -} - SINGLE_BATTLE_TEST("(TERA) Terastallizing boosts moves of the same type to 60 BP", s16 damage) { bool32 tera; diff --git a/test/battle/ability/booster_energy.c b/test/battle/hold_effect/booster_energy.c similarity index 100% rename from test/battle/ability/booster_energy.c rename to test/battle/hold_effect/booster_energy.c diff --git a/test/battle/hold_effect/utility_umbrella.c b/test/battle/hold_effect/utility_umbrella.c index e02a4fdef355..f04a77378990 100644 --- a/test/battle/hold_effect/utility_umbrella.c +++ b/test/battle/hold_effect/utility_umbrella.c @@ -52,3 +52,5 @@ SINGLE_BATTLE_TEST("Utility Umbrella blocks Rain damage modifiers", s16 damage) EXPECT_MUL_EQ(results[2].damage, Q_4_12(1.5), results[3].damage); } } + +// Moves and abilities affected by Utility Umbrella have their tests in the respective files diff --git a/test/battle/move_effect/weather_ball.c b/test/battle/move_effect/weather_ball.c index 1656b60d87b0..432e5f79f737 100644 --- a/test/battle/move_effect/weather_ball.c +++ b/test/battle/move_effect/weather_ball.c @@ -78,3 +78,5 @@ SINGLE_BATTLE_TEST("Weather Ball doubles its power and turns to an Ice-type move EXPECT_MUL_EQ(results[0].damage, Q_4_12(4.0), results[1].damage); // double base power + type effectiveness. } } + +TO_DO_BATTLE_TEST("Weather Ball doesn't double its power or change type if Cloud Nine/Air Lock is on the field");