sovereignx/test/battle/ability/supersweet_syrup.c
sneed 620c453fbd
Intimidate and Super Sweet Sugar prints the right message and doesn't play animation when already at -6 (#4406)
* Intimidate won't print message or play animation at -6

Super Sweet Syrup included

* Update intimidate.c

* Update supersweet_syrup.c

* Update test/battle/ability/supersweet_syrup.c

---------

Co-authored-by: Bassoonian <iasperbassoonian@gmail.com>
2024-04-21 14:10:14 +02:00

73 lines
2.8 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Supersweet Syrup lowers evasion once per battle by one stage")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_DIPPLIN) { Ability(ABILITY_SUPERSWEET_SYRUP); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { SWITCH(opponent, 1); }
TURN { SWITCH(opponent, 0); }
} SCENE {
ABILITY_POPUP(opponent, ABILITY_SUPERSWEET_SYRUP);
MESSAGE("A supersweet aroma is wafting from the syrup covering Foe Dipplin!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("2 withdrew Dipplin!");
MESSAGE("2 withdrew Wobbuffet!");
NONE_OF {
ABILITY_POPUP(opponent, ABILITY_SUPERSWEET_SYRUP);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("A supersweet aroma is wafting from the syrup covering Foes Dipplin!");
}
} THEN {
EXPECT_EQ(player->statStages[STAT_EVASION], DEFAULT_STAT_STAGE - 1);
}
}
DOUBLE_BATTLE_TEST("Supersweet Syrup lowers evasion of both opposing mon's in battle")
{
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_DIPPLIN) { Ability(ABILITY_SUPERSWEET_SYRUP); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { }
} SCENE {
ABILITY_POPUP(opponentLeft, ABILITY_SUPERSWEET_SYRUP);
MESSAGE("A supersweet aroma is wafting from the syrup covering Foe Dipplin!");
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerLeft);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, playerRight);
} THEN {
EXPECT_EQ(playerLeft->statStages[STAT_EVASION], DEFAULT_STAT_STAGE - 1);
EXPECT_EQ(playerRight->statStages[STAT_EVASION], DEFAULT_STAT_STAGE - 1);
}
}
SINGLE_BATTLE_TEST("Supersweet Syrup can not further lower opponents evasion if it is at minimum stages")
{
GIVEN {
PLAYER(SPECIES_ODDISH);
OPPONENT(SPECIES_ODDISH);
OPPONENT(SPECIES_HYDRAPPLE) { Ability(ABILITY_SUPERSWEET_SYRUP); }
} WHEN {
TURN { MOVE(opponent, MOVE_SWEET_SCENT); }
TURN { MOVE(opponent, MOVE_SWEET_SCENT); }
TURN { MOVE(opponent, MOVE_SWEET_SCENT); }
TURN { SWITCH(opponent, 1); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWEET_SCENT, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWEET_SCENT, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWEET_SCENT, opponent);
ABILITY_POPUP(opponent, ABILITY_SUPERSWEET_SYRUP);
NONE_OF {
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_STATS_CHANGE, player);
MESSAGE("Oddish's evasiveness fell!");
}
MESSAGE("Oddish's evasiveness won't go lower!");
} THEN {
EXPECT_EQ(player->statStages[STAT_EVASION], MIN_STAT_STAGE);
}
}