Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove duplicate CanBePoisoned condition #2988

Merged

Conversation

u8-Salem
Copy link

@u8-Salem u8-Salem commented May 9, 2023

Description

removes a duplicate condition for CanBePoisoned (marked orange here)

index cd65d58093..e8c9b8d8cd 100644
--- a/src/battle_util.c
+++ b/src/battle_util.c
@@ -6411,11 +6411,10 @@ bool32 CanBePoisoned(u8 battlerAttacker, u8 battlerTarget)
      || gSideStatuses[GetBattlerSide(battlerTarget)] & SIDE_STATUS_SAFEGUARD
!     || gBattleMons[battlerTarget].status1 & STATUS1_ANY
      || ability == ABILITY_IMMUNITY
      || ability == ABILITY_COMATOSE
      || IsAbilityOnSide(battlerTarget, ABILITY_PASTEL_VEIL)
-     || gBattleMons[battlerTarget].status1 & STATUS1_ANY
      || IsAbilityStatusProtected(battlerTarget)
      || IsBattlerTerrainAffected(battlerTarget, STATUS_FIELD_MISTY_TERRAIN))
         return FALSE;
     return TRUE;
 }

Issue(s) that this PR fixes

fixes #2987

Discord contact info

Salem#3258

@AsparagusEduardo AsparagusEduardo merged commit 8fc4aa9 into rh-hideout:upcoming May 10, 2023
@AsparagusEduardo AsparagusEduardo mentioned this pull request May 31, 2023
@u8-Salem u8-Salem deleted the duplicateConditionFix branch August 4, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicated condition on CanBePoisoned
2 participants