2023-12-08 16:29:29 +00:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Cotton Down drops speed by one of opposing battler if hit by a damaging move")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_ELDEGOSS) { Ability(ABILITY_COTTON_DOWN); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_COTTON_DOWN);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
MESSAGE("Wobbuffet's Speed fell!");
|
|
|
|
} THEN {
|
|
|
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Cotton Down drops speed by one for each multi hit")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
OPPONENT(SPECIES_ELDEGOSS) { Ability(ABILITY_COTTON_DOWN); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(player, MOVE_DOUBLE_KICK); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_DOUBLE_KICK, player);
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_COTTON_DOWN);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
MESSAGE("Wobbuffet's Speed fell!");
|
|
|
|
ABILITY_POPUP(opponent, ABILITY_COTTON_DOWN);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
|
|
|
|
MESSAGE("Wobbuffet's Speed fell!");
|
|
|
|
} THEN {
|
|
|
|
EXPECT_EQ(player->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
DOUBLE_BATTLE_TEST("Cotton Down drops speed by one of all other battlers on the field")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
|
|
PLAYER(SPECIES_WYNAUT);
|
|
|
|
OPPONENT(SPECIES_ELDEGOSS) { Ability(ABILITY_COTTON_DOWN); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentLeft); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft);
|
|
|
|
ABILITY_POPUP(opponentLeft, ABILITY_COTTON_DOWN);
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
|
|
|
MESSAGE("Wobbuffet's Speed fell!");
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
|
|
|
|
MESSAGE("Wynaut's Speed fell!");
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight);
|
2024-10-21 18:52:45 +01:00
|
|
|
MESSAGE("The opposing Wobbuffet's Speed fell!");
|
2023-12-08 16:29:29 +00:00
|
|
|
} THEN {
|
|
|
|
EXPECT_EQ(playerLeft->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
|
|
|
EXPECT_EQ(playerRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
|
|
|
EXPECT_EQ(opponentRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE - 1);
|
|
|
|
}
|
|
|
|
}
|
2024-12-20 21:24:23 +00:00
|
|
|
|
|
|
|
DOUBLE_BATTLE_TEST("Cotton Down correctly gets blocked by stat reduction preventing abilities")
|
|
|
|
{
|
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_METAGROSS) { Ability(ABILITY_CLEAR_BODY); }
|
|
|
|
PLAYER(SPECIES_WYNAUT) { Item(ITEM_CLEAR_AMULET); }
|
|
|
|
OPPONENT(SPECIES_ELDEGOSS) { Ability(ABILITY_COTTON_DOWN); }
|
|
|
|
OPPONENT(SPECIES_CORVIKNIGHT) { Ability(ABILITY_MIRROR_ARMOR); }
|
|
|
|
} WHEN {
|
|
|
|
TURN { MOVE(playerLeft, MOVE_TACKLE, target: opponentLeft); }
|
|
|
|
} SCENE {
|
|
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, playerLeft);
|
|
|
|
ABILITY_POPUP(opponentLeft, ABILITY_COTTON_DOWN);
|
|
|
|
NONE_OF {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
|
|
|
|
MESSAGE("Metagross's Speed fell!");
|
|
|
|
}
|
|
|
|
ABILITY_POPUP(playerLeft, ABILITY_CLEAR_BODY);
|
|
|
|
NONE_OF {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
|
|
|
|
MESSAGE("Wynaut's Speed fell!");
|
|
|
|
}
|
|
|
|
MESSAGE("The effects of the Clear Amulet held by Wynaut prevents its stats from being lowered!");
|
|
|
|
NONE_OF {
|
|
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, opponentRight);
|
|
|
|
MESSAGE("The opposing Corviknight's Speed fell!");
|
|
|
|
}
|
|
|
|
ABILITY_POPUP(opponentRight, ABILITY_MIRROR_ARMOR);
|
|
|
|
} THEN {
|
|
|
|
EXPECT_EQ(playerLeft->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
|
|
|
EXPECT_EQ(playerRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
|
|
|
EXPECT_EQ(opponentRight->statStages[STAT_SPEED], DEFAULT_STAT_STAGE);
|
|
|
|
}
|
|
|
|
}
|