From 1167b21d7eb4446e01600331a2f8b77a33b85aea Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 5 Apr 2024 14:26:41 -0400 Subject: [PATCH] Fix Poison Point not working --- src/data/ability.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index 9346d090d..87b6aed60 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -476,7 +476,7 @@ export class PostDefendContactApplyStatusEffectAbAttr extends PostDefendAbAttr { } applyPostDefend(pokemon: Pokemon, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { - if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && pokemon.randSeedInt(100) < this.chance && !pokemon.status) { + if (move.getMove().checkFlag(MoveFlags.MAKES_CONTACT, attacker, pokemon) && !pokemon.status && (this.chance === -1 || pokemon.randSeedInt(100) < this.chance)) { const effect = this.effects.length === 1 ? this.effects[0] : this.effects[pokemon.randSeedInt(this.effects.length)]; return attacker.trySetStatus(effect, true); } @@ -2143,7 +2143,7 @@ export function initAbilities() { new Ability(Abilities.HUGE_POWER, "Huge Power", "Doubles the Pokémon's Attack stat.", 3) .attr(BattleStatMultiplierAbAttr, BattleStat.ATK, 2), new Ability(Abilities.POISON_POINT, "Poison Point", "Contact with the Pokémon may poison the attacker.", 3) - .attr(PostDefendContactApplyStatusEffectAbAttr, StatusEffect.POISON), + .attr(PostDefendContactApplyStatusEffectAbAttr, -1, StatusEffect.POISON), new Ability(Abilities.INNER_FOCUS, "Inner Focus", "The Pokémon's intensely focused, and that protects the Pokémon from flinching.", 3) .attr(BattlerTagImmunityAbAttr, BattlerTagType.FLINCHED) .ignorable(),