Fixes gems triggering on confusion damage (#5723)
This commit is contained in:
parent
6b170d70f1
commit
846427ac43
2 changed files with 19 additions and 0 deletions
|
@ -2119,6 +2119,7 @@ END:
|
|||
}
|
||||
if (gSpecialStatuses[gBattlerAttacker].gemBoost
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& !(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
|
||||
&& gBattleMons[gBattlerAttacker].item
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_PLEDGE
|
||||
&& gCurrentMove != MOVE_STRUGGLE)
|
||||
|
|
|
@ -26,3 +26,21 @@ SINGLE_BATTLE_TEST("Confusion adds a 50/33% chance to hit self with 40 power")
|
|||
EXPECT_EQ(damage[0], damage[1]);
|
||||
}
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Confusion self hit does not consume Gems")
|
||||
{
|
||||
PASSES_RANDOMLY(B_CONFUSION_SELF_DMG_CHANCE >= GEN_7 ? 33 : 50, 100, RNG_CONFUSION);
|
||||
GIVEN {
|
||||
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_NORMAL_GEM); };
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_CONFUSE_RAY); MOVE(player, MOVE_TACKLE); }
|
||||
} SCENE {
|
||||
NONE_OF {
|
||||
ANIMATION(ANIM_TYPE_MOVE, MOVE_TACKLE, player);
|
||||
ANIMATION(ANIM_TYPE_GENERAL, B_ANIM_HELD_ITEM_EFFECT, player);
|
||||
MESSAGE("Normal Gem strengthened Wobbuffet's power!");
|
||||
}
|
||||
MESSAGE("It hurt itself in its confusion!");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue