mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
f5b149b971
* Run assumptions on all runners * Make i const in battle tests This avoids the pitfall of using i in a PARAMETRIZEd test and confusing the runner.
42 lines
1.1 KiB
C
42 lines
1.1 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
SINGLE_BATTLE_TEST("Bad poison deals 1/16th cumulative damage per turn")
|
|
{
|
|
u32 j;
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); }
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
for (j = 0; j < 4; j++)
|
|
TURN {}
|
|
} SCENE {
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
|
for (j = 0; j < 4; j++)
|
|
HP_BAR(player, damage: maxHP / 16 * (j + 1));
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Bad poison cumulative damage resets on switch")
|
|
{
|
|
u32 j;
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); }
|
|
PLAYER(SPECIES_WYNAUT);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN {}
|
|
TURN {}
|
|
TURN { SWITCH(player, 1); }
|
|
TURN { SWITCH(player, 0); }
|
|
TURN {}
|
|
TURN {}
|
|
} SCENE {
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
|
for (j = 0; j < 2; j++)
|
|
HP_BAR(player, damage: maxHP / 16 * (j + 1));
|
|
for (j = 0; j < 2; j++)
|
|
HP_BAR(player, damage: maxHP / 16 * (j + 1));
|
|
}
|
|
}
|