sovereignx/test/battle/weather/snow.c

29 lines
998 B
C
Raw Normal View History

2023-05-02 15:16:58 +01:00
#include "global.h"
#include "test/battle.h"
2023-05-02 15:16:58 +01:00
// Please add Snow interactions with move, item and ability effects on their respective files.
2023-05-02 15:16:58 +01:00
ASSUMPTIONS
{
2023-05-02 20:17:14 +01:00
ASSUME(gBattleMoves[MOVE_SNOWSCAPE].effect == EFFECT_SNOWSCAPE);
ASSUME(gSpeciesInfo[SPECIES_WOBBUFFET].types[0] != TYPE_ICE && gSpeciesInfo[SPECIES_WOBBUFFET].types[1] != TYPE_ICE);
ASSUME(gSpeciesInfo[SPECIES_GLALIE].types[0] == TYPE_ICE || gSpeciesInfo[SPECIES_GLALIE].types[1] == TYPE_ICE);
2023-05-02 15:16:58 +01:00
}
SINGLE_BATTLE_TEST("Snow multiplies the defense of Ice-types by 1.5x", s16 damage)
2023-05-02 15:16:58 +01:00
{
u16 move;
PARAMETRIZE{ move = MOVE_SNOWSCAPE; }
PARAMETRIZE{ move = MOVE_CELEBRATE; }
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GLALIE);
} WHEN {
TURN { MOVE(opponent, move); }
TURN { MOVE(player, MOVE_TACKLE); }
} SCENE {
HP_BAR(opponent, captureDamage: &results[i].damage);
} FINALLY {
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage);
}
}