Fixed chances of confusion self-damage. (#371)

This commit is contained in:
Eduardo Alvaro Quezada D'Ottone 2020-05-18 08:51:30 -04:00 committed by GitHub
parent f82bd2f9c4
commit 4c5de0998a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2311,12 +2311,7 @@ u8 AtkCanceller_UnableToUseMove(void)
gBattleMons[gBattlerAttacker].status2--; gBattleMons[gBattlerAttacker].status2--;
if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION) if (gBattleMons[gBattlerAttacker].status2 & STATUS2_CONFUSION)
{ {
if (Random() % ((B_CONFUSION_SELF_DMG_CHANCE >= GEN_7) ? 3 : 2 == 0)) if (Random() % ((B_CONFUSION_SELF_DMG_CHANCE >= GEN_7) ? 3 : 2 == 0)) // confusion dmg
{
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
BattleScriptPushCursor();
}
else // confusion dmg
{ {
gBattleCommunication[MULTISTRING_CHOOSER] = 1; gBattleCommunication[MULTISTRING_CHOOSER] = 1;
gBattlerTarget = gBattlerAttacker; gBattlerTarget = gBattlerAttacker;
@ -2324,6 +2319,11 @@ u8 AtkCanceller_UnableToUseMove(void)
gProtectStructs[gBattlerAttacker].confusionSelfDmg = 1; gProtectStructs[gBattlerAttacker].confusionSelfDmg = 1;
gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE; gHitMarker |= HITMARKER_UNABLE_TO_USE_MOVE;
} }
else
{
gBattleCommunication[MULTISTRING_CHOOSER] = 0;
BattleScriptPushCursor();
}
gBattlescriptCurrInstr = BattleScript_MoveUsedIsConfused; gBattlescriptCurrInstr = BattleScript_MoveUsedIsConfused;
} }
else // snapped out of confusion else // snapped out of confusion