Skip to content

Commit

Permalink
Fix Jubilife Muffin full heal effect + better full heal tests (#5444)
Browse files Browse the repository at this point in the history
  • Loading branch information
kittenchilly authored Sep 29, 2024
1 parent 4183fa9 commit 1c022f4
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 22 deletions.
1 change: 1 addition & 0 deletions src/data/items.h
Original file line number Diff line number Diff line change
Expand Up @@ -13867,6 +13867,7 @@ const struct Item gItemsInfo[] =
.type = ITEM_USE_PARTY_MENU,
.fieldUseFunc = ItemUseOutOfBattle_Medicine,
.battleUsage = EFFECT_ITEM_CURE_STATUS,
.effect = gItemEffect_FullHeal,
.flingPower = 30,
.iconPic = gItemIcon_JubilifeMuffin,
.iconPalette = gItemIconPalette_JubilifeMuffin,
Expand Down
81 changes: 59 additions & 22 deletions test/battle/item_effect/cure_status.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,14 @@ SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned")
}
}

SINGLE_BATTLE_TEST("Ice Heal heals a battler from being frozen")
SINGLE_BATTLE_TEST("Ice Heal heals a battler from being frozen or frostbite")
{
u16 status;
PARAMETRIZE { status = STATUS1_FREEZE; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); }
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
TURN { USE_ITEM(player, ITEM_ICE_HEAL, partyIndex: 0); }
Expand All @@ -112,12 +115,13 @@ SINGLE_BATTLE_TEST("Ice Heal heals a battler from being frozen")
SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -134,12 +138,13 @@ SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status")
SINGLE_BATTLE_TEST("Heal Powder heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_HEAL_POWDER].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -156,12 +161,13 @@ SINGLE_BATTLE_TEST("Heal Powder heals a battler from any primary status")
SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_PEWTER_CRUNCHIES].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -178,12 +184,13 @@ SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status")
SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_LAVA_COOKIE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -200,12 +207,13 @@ SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status")
SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_RAGE_CANDY_BAR].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -222,12 +230,13 @@ SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status")
SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_OLD_GATEAU].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -244,12 +253,13 @@ SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status")
SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_CASTELIACONE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -266,12 +276,13 @@ SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status")
SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_LUMIOSE_GALETTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -288,12 +299,13 @@ SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status")
SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_SHALOUR_SABLE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -310,12 +322,13 @@ SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status")
SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
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; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_BIG_MALASADA].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
Expand All @@ -329,6 +342,29 @@ SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status")
}
}

SINGLE_BATTLE_TEST("Jubilife Muffin heals a battler from any primary status")
{
u16 status;
PARAMETRIZE { status = STATUS1_SLEEP; }
PARAMETRIZE { status = STATUS1_POISON; }
PARAMETRIZE { status = STATUS1_BURN; }
PARAMETRIZE { status = STATUS1_FREEZE; }
PARAMETRIZE { status = STATUS1_PARALYSIS; }
PARAMETRIZE { status = STATUS1_TOXIC_POISON; }
PARAMETRIZE { status = STATUS1_FROSTBITE; }
GIVEN {
ASSUME(gItemsInfo[ITEM_JUBILIFE_MUFFIN].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
TURN { USE_ITEM(player, ITEM_JUBILIFE_MUFFIN, partyIndex: 0); }
} SCENE {
MESSAGE("Wobbuffet had its status healed!");
} THEN {
EXPECT_EQ(player->status1, STATUS1_NONE);
}
}

SINGLE_BATTLE_TEST("Full Heal, Heal Powder and Local Specialties heal a battler from being confused")
{
u16 item;
Expand All @@ -342,6 +378,7 @@ SINGLE_BATTLE_TEST("Full Heal, Heal Powder and Local Specialties heal a battler
PARAMETRIZE { item = ITEM_LUMIOSE_GALETTE; }
PARAMETRIZE { item = ITEM_SHALOUR_SABLE; }
PARAMETRIZE { item = ITEM_BIG_MALASADA; }
PARAMETRIZE { item = ITEM_JUBILIFE_MUFFIN; }
GIVEN {
ASSUME(gItemsInfo[item].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET);
Expand Down

0 comments on commit 1c022f4

Please sign in to comment.