sovereignx/test/battle/ability/cud_chew.c
psf 2597d8a35a
Updated species defines (#5075)
* First version of new defines

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Fixed cloaks

* Removed old defines

* Removed old defines

* Removed old defines and cleaned up some macros

* Undid changes to documentation
Deleted unused defines
Updated defines
Fixed tests
fixed docs

* moved note to top per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#discussion_r1783641599

* fixed alignment per https://github.com/rh-hideout/pokeemerald-expansion/pull/5075\#pullrequestreview-2341613591
2024-10-02 18:24:57 -03: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_PALDEA_COMBAT) { 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_PALDEA_COMBAT) { 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);
}
}