Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Liquid Ooze, Aromatic Mist Tests #5753

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions test/battle/ability/liquid_ooze.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "global.h"
#include "test/battle.h"

SINGLE_BATTLE_TEST("Liquid Ooze causes leech seedee to faint before seeder")
{
u16 ability;
PARAMETRIZE { ability = ABILITY_CLEAR_BODY; }
PARAMETRIZE { ability = ABILITY_LIQUID_OOZE; }
GIVEN {
PLAYER(SPECIES_BULBASAUR) { HP(1); }
OPPONENT(SPECIES_TENTACOOL) { HP(1); Ability(ability); }
} WHEN {
TURN { MOVE(player, MOVE_LEECH_SEED); }
} SCENE {
MESSAGE("Bulbasaur used Leech Seed!");
// Drain at end of turn
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_LEECH_SEED_DRAIN, opponent);
if (ability != ABILITY_LIQUID_OOZE) {
MESSAGE("The opposing Tentacool's health is sapped by Leech Seed!");
MESSAGE("The opposing Tentacool fainted!");
} else {
ABILITY_POPUP(opponent, ABILITY_LIQUID_OOZE);
MESSAGE("Bulbasaur sucked up the liquid ooze!");
MESSAGE("The opposing Tentacool fainted!");
MESSAGE("Bulbasaur fainted!");
}
}
}
38 changes: 36 additions & 2 deletions test/battle/move_effect/aromatic_mist.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
#include "global.h"
#include "test/battle.h"

TO_DO_BATTLE_TEST("Aromatic Mist raises Sp. Defense of a target ally by 1 stage");
TO_DO_BATTLE_TEST("Aromatic Mist fails in Single Battles");
DOUBLE_BATTLE_TEST("Aromatic Mist raises Sp. Defense of a target ally by 1 stage")
{
GIVEN {
PLAYER(SPECIES_WEEZING_GALAR);
PLAYER(SPECIES_SYLVEON);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT);
} WHEN {
TURN { MOVE(playerLeft, MOVE_AROMATIC_MIST); }
} SCENE {
MESSAGE("Weezing used Aromatic Mist!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
} THEN {
EXPECT_EQ(playerLeft->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
EXPECT_EQ(playerRight->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 1);
EXPECT_EQ(opponentLeft->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
EXPECT_EQ(opponentRight->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
}
}

SINGLE_BATTLE_TEST("Aromatic Mist fails in Single Battles")
{
GIVEN {
PLAYER(SPECIES_WEEZING_GALAR);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(player, MOVE_AROMATIC_MIST); }
} SCENE {
MESSAGE("Weezing used Aromatic Mist!");
MESSAGE("But it failed!");
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
} THEN {
EXPECT_EQ(player->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE);
}
}
Loading