From f1b639a504934807a7558566388b8945e62ec595 Mon Sep 17 00:00:00 2001 From: ghoulslash <41651341+ghoulslash@users.noreply.github.com> Date: Wed, 23 Oct 2024 05:46:58 -0400 Subject: [PATCH] Add basic Steam Engine, Guard Dog Tests (#5569) Co-authored-by: ghoulslash Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com> --- test/battle/ability/guard_dog.c | 28 ++++++++++++++++++++++++++++ test/battle/ability/steam_engine.c | 23 +++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 test/battle/ability/guard_dog.c create mode 100644 test/battle/ability/steam_engine.c diff --git a/test/battle/ability/guard_dog.c b/test/battle/ability/guard_dog.c new file mode 100644 index 0000000000..c4b44417af --- /dev/null +++ b/test/battle/ability/guard_dog.c @@ -0,0 +1,28 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Guard Dog raises Attack when intimidated", s16 damage) +{ + u32 ability; + PARAMETRIZE { ability = ABILITY_INTIMIDATE; } + PARAMETRIZE { ability = ABILITY_SHED_SKIN; } + GIVEN { + PLAYER(SPECIES_OKIDOGI) { Ability(ABILITY_GUARD_DOG); } + OPPONENT(SPECIES_WOBBUFFET); + OPPONENT(SPECIES_ARBOK) { Ability(ability); } + } WHEN { + TURN { SWITCH(opponent, 1); } + TURN { MOVE(player, MOVE_TACKLE); } + } SCENE { + if (ability == ABILITY_INTIMIDATE) + { + ABILITY_POPUP(opponent, ABILITY_INTIMIDATE); + ABILITY_POPUP(player, ABILITY_GUARD_DOG); + ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player); + MESSAGE("Okidogi's Attack rose!"); + } + HP_BAR(opponent, captureDamage: &results[i].damage); + } FINALLY { + EXPECT_MUL_EQ(results[1].damage, Q_4_12(1.5), results[0].damage); + } +} diff --git a/test/battle/ability/steam_engine.c b/test/battle/ability/steam_engine.c new file mode 100644 index 0000000000..bda470af2e --- /dev/null +++ b/test/battle/ability/steam_engine.c @@ -0,0 +1,23 @@ +#include "global.h" +#include "test/battle.h" + +SINGLE_BATTLE_TEST("Steam Engine raises speed when hit by a Fire or Water move") +{ + u16 move; + + PARAMETRIZE { move = MOVE_EMBER; } + PARAMETRIZE { move = MOVE_WATER_GUN; } + + GIVEN { + PLAYER(SPECIES_COALOSSAL) { Ability(ABILITY_STEAM_ENGINE); } + OPPONENT(SPECIES_WOBBUFFET); + } WHEN { + TURN { MOVE(opponent, move); } + } SCENE { + ANIMATION(ANIM_TYPE_MOVE, move, opponent); + ABILITY_POPUP(player, ABILITY_STEAM_ENGINE); + MESSAGE("Coalossal's Speed drastically rose!"); + } THEN { + EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE + 6); + } +}