pokeemerald/test/battle/item_effect/heal_and_cure_status.c

44 lines
1.5 KiB
C
Raw Normal View History

2023-04-21 20:57:30 +02:00
#include "global.h"
#include "test/battle.h"
2023-04-21 20:57:30 +02:00
SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary status")
{
u16 status;
PARAMETRIZE{ status = STATUS1_BURN; }
PARAMETRIZE{ status = STATUS1_FREEZE; }
PARAMETRIZE{ status = STATUS1_PARALYSIS; }
PARAMETRIZE{ status = STATUS1_POISON; }
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
2023-06-23 11:38:18 +02:00
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); Status1(status); }
2023-04-21 20:57:30 +02:00
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); }
} SCENE {
2023-04-24 22:26:56 +02:00
MESSAGE("Wobbuffet had its HP restored!");
2023-04-25 23:06:07 +02:00
} THEN {
2023-04-21 20:57:30 +02:00
EXPECT_EQ(player->hp, player->maxHP);
EXPECT_EQ(player->status1, STATUS1_NONE);
}
}
SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion")
{
GIVEN {
ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
2023-06-23 11:38:18 +02:00
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN{ MOVE(opponent, MOVE_CONFUSE_RAY); }
TURN{ USE_ITEM(player, ITEM_FULL_RESTORE, partyIndex: 0); }
TURN{ MOVE(player, MOVE_TACKLE); }
} SCENE {
2023-04-24 22:26:56 +02:00
MESSAGE("Wobbuffet had its HP restored!");
NONE_OF { MESSAGE("Wobbuffet is confused!"); }
2023-04-25 23:06:07 +02:00
} THEN {
EXPECT_EQ(player->hp, player->maxHP);
}
}