Merge pull request #1840 from LOuroboros/patch-2

Fixed battlerId in Poison Touch's confusionSelfDmg check
This commit is contained in:
ghoulslash 2021-11-01 11:39:51 -04:00 committed by GitHub
commit 25f200d7ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5199,7 +5199,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
case ABILITY_POISON_TOUCH:
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
&& gBattleMons[gBattlerTarget].hp != 0
&& !gProtectStructs[gBattlerTarget].confusionSelfDmg
&& !gProtectStructs[gBattlerAttacker].confusionSelfDmg
&& CanBePoisoned(gBattlerTarget)
&& IsMoveMakingContact(move, gBattlerAttacker)
&& (Random() % 3) == 0)