Big Root tests (#6601)
This commit is contained in:
parent
3b53995691
commit
075efd36c1
80
test/battle/hold_effect/big_root.c
Normal file
80
test/battle/hold_effect/big_root.c
Normal file
@ -0,0 +1,80 @@
|
||||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gItemsInfo[ITEM_BIG_ROOT].holdEffect == HOLD_EFFECT_BIG_ROOT);
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Big Root increases healing from absorbing moves", s16 damage, s16 heal)
|
||||
{
|
||||
u32 item;
|
||||
|
||||
PARAMETRIZE { item = ITEM_NONE; }
|
||||
PARAMETRIZE { item = ITEM_BIG_ROOT; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(200); Item(item); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ABSORB); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ABSORB, player);
|
||||
HP_BAR(opponent, captureDamage: &results[i].damage);
|
||||
HP_BAR(player, captureDamage: &results[i].heal);
|
||||
} FINALLY {
|
||||
EXPECT_EQ(results[0].damage, results[1].damage); // Damage is unaffected
|
||||
EXPECT_MUL_EQ(results[1].heal, Q_4_12(5234 / 4096), results[0].heal);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Big Root increases the damage restored from Leech Seed, Ingrain and Aqua Ring", s16 heal, s16 damage)
|
||||
{
|
||||
KNOWN_FAILING;
|
||||
|
||||
u32 item;
|
||||
u32 move;
|
||||
|
||||
PARAMETRIZE { item = ITEM_NONE; move = MOVE_LEECH_SEED; }
|
||||
PARAMETRIZE { item = ITEM_BIG_ROOT; move = MOVE_LEECH_SEED; }
|
||||
PARAMETRIZE { item = ITEM_NONE; move = MOVE_INGRAIN; }
|
||||
PARAMETRIZE { item = ITEM_BIG_ROOT; move = MOVE_INGRAIN; }
|
||||
PARAMETRIZE { item = ITEM_NONE; move = MOVE_AQUA_RING; }
|
||||
PARAMETRIZE { item = ITEM_BIG_ROOT; move = MOVE_AQUA_RING; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(200); Item(item); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, move); }
|
||||
} SCENE {
|
||||
if (move == MOVE_LEECH_SEED)
|
||||
HP_BAR(opponent, captureDamage: &results[i].damage);
|
||||
HP_BAR(player, captureDamage: &results[i].heal);
|
||||
} FINALLY {
|
||||
EXPECT_EQ(results[0].damage, results[1].damage); // Damage is unaffected
|
||||
EXPECT_MUL_EQ(results[1].heal, Q_4_12(5234 / 4096), results[0].heal);
|
||||
EXPECT_MUL_EQ(results[3].heal, Q_4_12(5234 / 4096), results[2].heal);
|
||||
EXPECT_MUL_EQ(results[5].heal, Q_4_12(5234 / 4096), results[4].heal);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Big Root increases damage from absorbing Liquid Ooze", s16 damage)
|
||||
{
|
||||
u32 item;
|
||||
|
||||
PARAMETRIZE { item = ITEM_NONE; }
|
||||
PARAMETRIZE { item = ITEM_BIG_ROOT; }
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(200); Item(item); }
|
||||
OPPONENT(SPECIES_TENTACOOL) { Ability(ABILITY_LIQUID_OOZE); }
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_ABSORB); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_ABSORB, player);
|
||||
HP_BAR(player, captureDamage: &results[i].damage);
|
||||
} FINALLY {
|
||||
EXPECT_MUL_EQ(results[1].damage, Q_4_12(5234 / 4096), results[0].damage);
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user