sovereignx/test/battle/ability/cud_chew.c
Eduardo Quezada 5ec08ee98c
Small Battle Test reorganization (#4504)
* Fixed test folders + Chud Chew test name fixes

* Adjusted file names + merged Burn Up and Double Shock files

* Added Spit Up/Swallow files that point to Stockpile's file

* Multiple changes (see description)

- Moved secondary effect files to their own folder.
- Split hit_set_entry_hazards.c to separate files for Spikes/Stealth Rock.
- Grouped Hex/Venoshock to the same file
2024-05-06 09:36:52 +02:00

49 lines
2 KiB
C

#include "global.h"
#include "test/battle.h"
SINGLE_BATTLE_TEST("Cud Chew will activate Kee Berry effect again on the next turn")
{
GIVEN {
ASSUME(gItemsInfo[ITEM_KEE_BERRY].holdEffect == HOLD_EFFECT_KEE_BERRY);
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_TAUROS_PALDEAN_COMBAT_BREED) { Ability(ABILITY_CUD_CHEW); Item(ITEM_KEE_BERRY); }
} WHEN {
TURN { MOVE(player, MOVE_TACKLE); }
TURN { MOVE(player, MOVE_CELEBRATE);}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
HP_BAR(opponent);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
ABILITY_POPUP(opponent, ABILITY_CUD_CHEW);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
} THEN {
EXPECT_EQ(opponent->statStages[STAT_DEF], DEFAULT_STAT_STAGE + 2);
}
}
SINGLE_BATTLE_TEST("Cud Chew will activate Oran Berry effect again on the next turn")
{
GIVEN {
ASSUME(gItemsInfo[ITEM_ORAN_BERRY].holdEffect == HOLD_EFFECT_RESTORE_HP);
ASSUME(gItemsInfo[ITEM_ORAN_BERRY].holdEffectParam == 10);
ASSUME(gMovesInfo[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gMovesInfo[MOVE_DRAGON_RAGE].argument == 40);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_TAUROS_PALDEAN_COMBAT_BREED) { MaxHP(60); HP(60); Ability(ABILITY_CUD_CHEW); Item(ITEM_ORAN_BERRY); }
} WHEN {
TURN { MOVE(player, MOVE_DRAGON_RAGE); }
TURN { MOVE(player, MOVE_CELEBRATE);}
TURN {}
} SCENE {
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_RAGE, player);
HP_BAR(opponent);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
ANIMATION(ANIM_TYPE_MOVE, MOVE_CELEBRATE, player);
ABILITY_POPUP(opponent, ABILITY_CUD_CHEW);
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, opponent);
} THEN {
EXPECT_EQ(opponent->hp, 40);
}
}