1ae26b32e6
* Fix Kee Berry and Custap Berry + Tests * add missing assumes * fix wrong test files * fix new line
60 lines
2.1 KiB
C
60 lines
2.1 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gItems[ITEM_MARANGA_BERRY].holdEffect == HOLD_EFFECT_MARANGA_BERRY);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by one stage when hit by a special move")
|
|
{
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MARANGA_BERRY); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_SWIFT); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player);
|
|
HP_BAR(opponent);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!");
|
|
} THEN {
|
|
EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 1);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by two stages with Ripen when hit by a special move")
|
|
{
|
|
GIVEN {
|
|
ASSUME(P_GEN_8_POKEMON == TRUE);
|
|
ASSUME(gBattleMoves[MOVE_SWIFT].split == SPLIT_SPECIAL);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_APPLIN) { Item(ITEM_MARANGA_BERRY); Ability(ABILITY_RIPEN); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_SWIFT); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_SWIFT, player);
|
|
HP_BAR(opponent);
|
|
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
MESSAGE("Using Maranga Berry, the Sp. Def of Foe Applin sharply rose!");
|
|
} THEN {
|
|
EXPECT_EQ(opponent->statStages[STAT_SPDEF], DEFAULT_STAT_STAGE + 2);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by one stage when hit by a special move")
|
|
{
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_TACKLE].split == SPLIT_PHYSICAL);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MARANGA_BERRY); }
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_TACKLE); }
|
|
} SCENE {
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
|
HP_BAR(opponent);
|
|
NOT ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
|
|
NOT MESSAGE("Using Maranga Berry, the Sp. Def of Foe Wobbuffet rose!");
|
|
}
|
|
}
|