2023-08-12 20:00:15 +01:00
|
|
|
#include "global.h"
|
|
|
|
#include "test/battle.h"
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Bad poison deals 1/16th cumulative damage per turn")
|
|
|
|
{
|
2023-10-12 11:14:07 +01:00
|
|
|
u32 j;
|
2023-08-12 20:00:15 +01:00
|
|
|
GIVEN {
|
|
|
|
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); }
|
|
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
|
|
} WHEN {
|
2023-10-12 11:14:07 +01:00
|
|
|
for (j = 0; j < 4; j++)
|
2023-08-12 20:00:15 +01:00
|
|
|
TURN {}
|
|
|
|
} SCENE {
|
|
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
2023-10-12 11:14:07 +01:00
|
|
|
for (j = 0; j < 4; j++)
|
|
|
|
HP_BAR(player, damage: maxHP / 16 * (j + 1));
|
2023-08-12 20:00:15 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SINGLE_BATTLE_TEST("Bad poison cumulative damage resets on switch")
|
|
|
|
{
|
2023-10-12 11:14:07 +01:00
|
|
|
u32 j;
|
2023-08-12 20:00:15 +01:00
|
|
|
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);
|
2023-10-12 11:14:07 +01:00
|
|
|
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));
|
2023-08-12 20:00:15 +01:00
|
|
|
}
|
|
|
|
}
|