mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
50 lines
1.8 KiB
C
50 lines
1.8 KiB
C
#include "global.h"
|
|
#include "test/battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(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 {
|
|
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")
|
|
{
|
|
GIVEN {
|
|
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]);
|
|
}
|
|
}
|