mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 11:37:40 +01:00
f1b9872bf0
Thank you to SBird for providing mgba-rom-test binaries and Spikes/Toxic Spikes tests! Co-authored-by: sbird <sbird@no.tld>
58 lines
1.7 KiB
C
58 lines
1.7 KiB
C
#include "global.h"
|
|
#include "test_battle.h"
|
|
|
|
ASSUMPTIONS
|
|
{
|
|
ASSUME(gBattleMoves[MOVE_JUMP_KICK].effect == EFFECT_RECOIL_IF_MISS);
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Jump Kick has 50% recoil on miss")
|
|
{
|
|
s16 recoil;
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(player, MOVE_JUMP_KICK, hit: FALSE); }
|
|
} SCENE {
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
|
MESSAGE("Wobbuffet used Jump Kick!");
|
|
MESSAGE("Wobbuffet's attack missed!");
|
|
MESSAGE("Wobbuffet kept going and crashed!");
|
|
HP_BAR(player, damage: maxHP / 2);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Jump Kick has 50% recoil on protect")
|
|
{
|
|
s16 recoil;
|
|
GIVEN {
|
|
ASSUME(gBattleMoves[MOVE_JUMP_KICK].flags & FLAG_PROTECT_AFFECTED);
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
} WHEN {
|
|
TURN { MOVE(opponent, MOVE_PROTECT); MOVE(player, MOVE_JUMP_KICK, hit: FALSE); }
|
|
} SCENE {
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_PROTECT, opponent);
|
|
NOT ANIMATION(ANIM_TYPE_MOVE, MOVE_JUMP_KICK, player);
|
|
HP_BAR(player, damage: maxHP / 2);
|
|
}
|
|
}
|
|
|
|
SINGLE_BATTLE_TEST("Jump Kick has no recoil if no target")
|
|
{
|
|
KNOWN_FAILING; // #2596.
|
|
GIVEN {
|
|
PLAYER(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WOBBUFFET);
|
|
OPPONENT(SPECIES_WYNAUT);
|
|
} WHEN {
|
|
TURN { MOVE(opponent, MOVE_HEALING_WISH); MOVE(player, MOVE_JUMP_KICK, hit: FALSE); SEND_OUT(opponent, 1); }
|
|
} SCENE {
|
|
s32 maxHP = GetMonData(&PLAYER_PARTY[0], MON_DATA_MAX_HP);
|
|
ANIMATION(ANIM_TYPE_MOVE, MOVE_HEALING_WISH, opponent);
|
|
NOT HP_BAR(player, damage: maxHP / 2);
|
|
}
|
|
}
|