sovereignx/test/battle/move_effect/earthquake.c
Eduardo Quezada 0a8284ce9f
Added missing Move Effect TODO tests - Volume B (#4682)
* Added missing Move Effect TODO tests - Volume B

* Apply suggestions from code review

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>

* Removed unused bulldoze effect file

* Removed individual tests for Baton Pass + Status1 in favor of the existing single test

---------

Co-authored-by: Alex <93446519+AlexOn1ine@users.noreply.github.com>
2024-06-01 15:07:51 +02:00

28 lines
1.1 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Earthquake's and Bulldoze's damage is halved when Grassy Terrain is in effect", s16 damage)
{
bool32 terrain;
u16 move;
PARAMETRIZE { terrain = FALSE; move = MOVE_EARTHQUAKE; } // 0
PARAMETRIZE { terrain = TRUE; move = MOVE_EARTHQUAKE; } // 1
PARAMETRIZE { terrain = FALSE; move = MOVE_BULLDOZE; } // 2
PARAMETRIZE { terrain = TRUE; move = MOVE_BULLDOZE; } // 3
GIVEN {
ASSUME(gMovesInfo[MOVE_EARTHQUAKE].effect == EFFECT_EARTHQUAKE);
ASSUME(gMovesInfo[MOVE_BULLDOZE].effect == EFFECT_EARTHQUAKE);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
if (terrain)
TURN { MOVE(player, MOVE_GRASSY_TERRAIN); }
TURN { MOVE(player, move); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, move, player);
HP_BAR(opponent, captureDamage: &results[i].damage);
} FINALLY {
EXPECT_MUL_EQ(results[0].damage, Q_4_12(0.5), results[1].damage);
EXPECT_MUL_EQ(results[2].damage, Q_4_12(0.5), results[3].damage);
}
}