Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests for status curing berries #3289

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
214 changes: 214 additions & 0 deletions test/battle/hold_effect/cure_status.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
#include "global.h"
#include "test/battle.h"

ASSUMPTIONS
{
ASSUME(gItems[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
}

SINGLE_BATTLE_TEST("xx - Pecha and Lum berry cure poison")
AsparagusEduardo marked this conversation as resolved.
Show resolved Hide resolved
{
u16 item;

PARAMETRIZE { item = ITEM_PECHA_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_POISON_POWDER); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_POISON_POWDER, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, poison: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, poison: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Pecha and Lum berry cure bad poison")
{
u16 item;

PARAMETRIZE { item = ITEM_PECHA_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_TOXIC); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, badPoison: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, badPoison: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Rawst and Lum berry cure burn")
{
u16 item;

PARAMETRIZE { item = ITEM_RAWST_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_WILL_O_WISP); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_WILL_O_WISP, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_BRN, opponent);
STATUS_ICON(opponent, burn: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, burn: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Aspear and Lum berry cure freeze")
AsparagusEduardo marked this conversation as resolved.
Show resolved Hide resolved
{
u16 item;

PARAMETRIZE { item = ITEM_ASPEAR_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_ICE_PUNCH); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_ICE_PUNCH, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_FRZ, opponent);
STATUS_ICON(opponent, freeze: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, freeze: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Chesto and Lum berry cure sleep")
{
u16 item;

PARAMETRIZE { item = ITEM_CHESTO_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_HYPNOSIS); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_HYPNOSIS, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_SLP, opponent);
STATUS_ICON(opponent, sleep: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, sleep: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Cheri and Lum berry cure paralysis")
{
u16 item;

PARAMETRIZE { item = ITEM_CHERI_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_THUNDER_WAVE); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_THUNDER_WAVE, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PRZ, opponent);
STATUS_ICON(opponent, paralysis: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, paralysis: FALSE);
}
}

SINGLE_BATTLE_TEST("xx - Perism and Lum cure confusion")
{
u16 item;

PARAMETRIZE { item = ITEM_PERSIM_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_PERSIM_BERRY].holdEffect == HOLD_EFFECT_CURE_CONFUSION);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_CONFUSE_RAY); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_CONFUSE_RAY, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_CONFUSION, opponent);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
}
}

SINGLE_BATTLE_TEST("xx - Hold effect cures status if a pokemon enters a battle")
{
u16 status;
u16 item;

PARAMETRIZE{ status = STATUS1_BURN; item = ITEM_RAWST_BERRY; }
PARAMETRIZE{ status = STATUS1_FREEZE; item = ITEM_ASPEAR_BERRY; }
PARAMETRIZE{ status = STATUS1_PARALYSIS; item = ITEM_CHERI_BERRY; }
PARAMETRIZE{ status = STATUS1_POISON; item = ITEM_PECHA_BERRY; }
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; item = ITEM_PECHA_BERRY; }
PARAMETRIZE{ status = STATUS1_SLEEP; item = ITEM_CHESTO_BERRY; }

GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItems[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
ASSUME(gItems[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
ASSUME(gItems[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
ASSUME(gItems[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Status1(status); Item(item); }
} WHEN {
AsparagusEduardo marked this conversation as resolved.
Show resolved Hide resolved
TURN { }
} SCENE {
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
}
}

SINGLE_BATTLE_TEST("xx - Pokemon can be further poisoned with Toxic spikes after a status healing hold effect was previously used")
{
u16 item;

PARAMETRIZE { item = ITEM_PECHA_BERRY; }
PARAMETRIZE { item = ITEM_LUM_BERRY; }

KNOWN_FAILING;
GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT) { Item(item); }
} WHEN {
TURN { MOVE(player, MOVE_TOXIC_SPIKES); }
TURN { SWITCH(opponent, 1); }
TURN { SWITCH(opponent, 0); }
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TOXIC_SPIKES, player);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, poison: TRUE);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
STATUS_ICON(opponent, poison: FALSE);
ANIMATION(ANIM_TYPE_STATUS, B_ANIM_STATUS_PSN, opponent);
STATUS_ICON(opponent, poison: TRUE);
}
}