sovereignx/test/battle/ability/good_as_gold.c
kittenchilly db24128ee3
Update battle messages to Gen 5+ standards (#3240)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
2024-10-21 14:52:45 -03:00

70 lines
2.4 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Good as Gold protects from status moves")
{
GIVEN {
ASSUME(gMovesInfo[MOVE_TOXIC].category == DAMAGE_CATEGORY_STATUS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GHOLDENGO) { Ability(ABILITY_GOOD_AS_GOLD); }
} WHEN {
TURN { MOVE(player, MOVE_TOXIC); }
} SCENE {
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player);
ABILITY_POPUP(opponent, ABILITY_GOOD_AS_GOLD);
MESSAGE("It doesn't affect the opposing Gholdengo…");
}
}
SINGLE_BATTLE_TEST("Good as Gold doesn't protect the user from it's own moves")
{
GIVEN {
ASSUME(gMovesInfo[MOVE_NASTY_PLOT].category == DAMAGE_CATEGORY_STATUS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GHOLDENGO) { Ability(ABILITY_GOOD_AS_GOLD); }
} WHEN {
TURN { MOVE(opponent, MOVE_NASTY_PLOT); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_NASTY_PLOT, opponent);
NONE_OF {
ABILITY_POPUP(opponent, ABILITY_GOOD_AS_GOLD);
MESSAGE("It doesn't affect the opposing Gholdengo…");
}
}
}
SINGLE_BATTLE_TEST("Good as Gold doesn't protect from moves that target the field")
{
GIVEN {
ASSUME(gMovesInfo[MOVE_STEALTH_ROCK].category == DAMAGE_CATEGORY_STATUS);
ASSUME(gMovesInfo[MOVE_STEALTH_ROCK].target == MOVE_TARGET_OPPONENTS_FIELD);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GHOLDENGO) { Ability(ABILITY_GOOD_AS_GOLD); }
} WHEN {
TURN { MOVE(player, MOVE_STEALTH_ROCK); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_STEALTH_ROCK, player);
NONE_OF {
ABILITY_POPUP(opponent, ABILITY_GOOD_AS_GOLD);
MESSAGE("It doesn't affect the opposing Gholdengo…");
}
}
}
DOUBLE_BATTLE_TEST("Good as Gold protects from partner's status moves")
{
GIVEN {
ASSUME(gMovesInfo[MOVE_HELPING_HAND].category == DAMAGE_CATEGORY_STATUS);
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GHOLDENGO) { Ability(ABILITY_GOOD_AS_GOLD); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { MOVE(opponentRight, MOVE_HELPING_HAND); }
} SCENE {
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_HELPING_HAND, opponentRight);
ABILITY_POPUP(opponentLeft, ABILITY_GOOD_AS_GOLD);
MESSAGE("It doesn't affect the opposing Gholdengo…");
}
}