Fixes Shell Bell inlcuding heal amount from Future Sight when triggered
This commit is contained in:
parent
adb4a1ff48
commit
0b2393ff8e
2 changed files with 31 additions and 1 deletions
|
@ -2456,7 +2456,9 @@ static void Cmd_datahpupdate(void)
|
|||
}
|
||||
|
||||
// Record damage for Shell Bell
|
||||
if (gSpecialStatuses[battler].shellBellDmg == 0 && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
if (gSpecialStatuses[gBattlerTarget].shellBellDmg == IGNORE_SHELL_BELL)
|
||||
gSpecialStatuses[battler].shellBellDmg = 0;
|
||||
else if (gSpecialStatuses[battler].shellBellDmg == 0 && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
gSpecialStatuses[battler].shellBellDmg = gHpDealt;
|
||||
|
||||
// Note: While physicalDmg/specialDmg below are only distinguished between for Counter/Mirror Coat, they are
|
||||
|
|
28
test/battle/hold_effect/shell_bell.c
Normal file
28
test/battle/hold_effect/shell_bell.c
Normal file
|
@ -0,0 +1,28 @@
|
|||
#include "global.h"
|
||||
#include "test/battle.h"
|
||||
|
||||
SINGLE_BATTLE_TEST("Shell Bell does not activate on Future Sight if the original user is on the field")
|
||||
{
|
||||
s16 damage = 0;
|
||||
s16 healed = 0;
|
||||
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(1); Item(ITEM_SHELL_BELL); }
|
||||
OPPONENT(SPECIES_WYNAUT);
|
||||
} WHEN {
|
||||
TURN { MOVE(player, MOVE_FUTURE_SIGHT); }
|
||||
TURN {}
|
||||
TURN {}
|
||||
TURN { MOVE(player, MOVE_DRAGON_RAGE); }
|
||||
} SCENE {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_FUTURE_SIGHT, player);
|
||||
MESSAGE("The opposing Wynaut took the Future Sight attack!");
|
||||
HP_BAR(opponent);
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_DRAGON_RAGE, player);
|
||||
HP_BAR(opponent, captureDamage: &damage);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
HP_BAR(player, captureDamage: &healed);
|
||||
} THEN {
|
||||
EXPECT_MUL_EQ(damage, Q_4_12(-0.25), healed);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue