mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
add mirror herb tests
This commit is contained in:
parent
445e9c4b8b
commit
bdd0195fe0
51
test/hold_effect_mirror_herb.c
Normal file
51
test/hold_effect_mirror_herb.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include "global.h"
|
||||
#include "test_battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB;
|
||||
};
|
||||
|
||||
SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's stat changes in a turn", s16 damage)
|
||||
{
|
||||
u32 item;
|
||||
PARAMETRIZE{ item = ITEM_NONE; }
|
||||
PARAMETRIZE{ item = ITEM_MIRROR_HERB; }
|
||||
GIVEN {
|
||||
ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Speed(4); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Speed(5); Item(item); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_DRAGON_DANCE); }
|
||||
TURN { MOVE(player, MOVE_TACKLE); MOVE(opponent, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
if (item == ITEM_NONE) {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
HP_BAR(player, captureDamage: &results[i].damage);
|
||||
} else {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, opponent);
|
||||
HP_BAR(player, captureDamage: &results[i].damage);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
||||
}
|
||||
} FINALLY {
|
||||
EXPECT_MUL_EQ(results[0].damage, Q_4_12(1.5), results[1].damage);
|
||||
EXPECT_EQ(player->statStages[STAT_ATK], opponent->statStages[STAT_ATK]);
|
||||
EXPECT_EQ(player->statStages[STAT_SPEED], opponent->statStages[STAT_SPEED]);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Mirror Herb copies all of of Stuff Cheeks", s16 damage)
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB);
|
||||
ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
|
||||
PLAYER(SPECIES_SKWOVET) { Item(ITEM_LIECHI_BERRY); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MIRROR_HERB); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_STUFF_CHEEKS); }
|
||||
} THEN {
|
||||
EXPECT_EQ(player->statStages[STAT_ATK], opponent->statStages[STAT_ATK]);
|
||||
EXPECT_EQ(player->statStages[STAT_DEF], opponent->statStages[STAT_DEF]);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user