mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-29 13:50:42 +01:00
53180ebf87
* Updated Healing Wish and added config * Fixed Lunar Dance message Co-authored-by: AgustinGDLV <agustingomezdelavega@gmail.com> Co-authored-by: AgustinGDLV <103095241+AgustinGDLV@users.noreply.github.com> Co-authored-by: Martin Griffin <martinrgriffin@gmail.com>
58 lines
1.8 KiB
C
58 lines
1.8 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")
|
|
{
|
|
GIVEN {
|
|
ASSUME(B_HEALING_WISH_SWITCH >= GEN_5);
|
|
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);
|
|
}
|
|
}
|