Option for Toxic never missing if user is Poison type. (#304)

This commit is contained in:
Eduardo Alvaro Quezada D'Ottone 2020-03-14 08:15:36 -03:00 committed by GitHub
parent cf4d5f6e59
commit 64031dd672
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -57,7 +57,8 @@
// Move settings
#define B_FELL_STINGER_STAT_RAISE GEN_6 // Gen6 Atk+2, Gen7 Atk+3.
#define B_SOUND_SUBSTITUTE GEN_6 // Starting from gen6 sound moves bypass Substitute.
#define B_SOUND_SUBSTITUTE GEN_6 // Starting from Gen6 sound moves bypass Substitute.
#define B_TOXIC_NEVER_MISS GEN_6 // Starting from Gen6, if Toxic is used by a Poison type, it will never miss.
// Ability settings
#define B_ABILITY_POP_UP GEN_6 // Starting from gen5, the pokemon abilities are displayed in a pop-up, when they activate in battle.

View file

@ -1197,7 +1197,9 @@ static bool32 AccuracyCalcHelper(u16 move)
JumpIfMoveFailed(7, move);
return TRUE;
}
else if (gBattleMoves[move].effect == EFFECT_TOXIC && IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_POISON))
else if (B_TOXIC_NEVER_MISS >= GEN_6
&& gBattleMoves[move].effect == EFFECT_TOXIC
&& IS_BATTLER_OF_TYPE(gBattlerAttacker, TYPE_POISON))
{
JumpIfMoveFailed(7, move);
return TRUE;