From d8bb221eff45a83e8ac37b0652bdeed899e66cef Mon Sep 17 00:00:00 2001 From: Temps Ray Date: Wed, 24 Apr 2024 15:13:05 -0400 Subject: [PATCH] Remove unnecessary ohko flag --- src/data/ability.ts | 2 +- src/data/move.ts | 20 +++++--------------- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index a7dadb479aa..a62ac6b8e9c 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1653,7 +1653,7 @@ export class ForewarnAbAttr extends PostSummonAbAttr { for (let move of opponent.moveset) { if (move.getMove() instanceof StatusMove) { movePower = 1; - } else if (move.getMove().hasFlag(MoveFlags.OHKO_Move)) { + } else if (move.getMove().findAttr(attr => attr instanceof OneHitKOAttr)) { movePower = 150; } else if (move.getMove().id === Moves.COUNTER || move.getMove().id === Moves.MIRROR_COAT || move.getMove().id === Moves.METAL_BURST) { movePower = 120; diff --git a/src/data/move.ts b/src/data/move.ts index 40391b31923..74f43eb2727 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -69,8 +69,7 @@ export enum MoveFlags { DANCE_MOVE = 4096, WIND_MOVE = 8192, TRIAGE_MOVE = 16384, - IGNORE_ABILITIES = 32768, - OHKO_Move = 65536 + IGNORE_ABILITIES = 32768 } type MoveConditionFunc = (user: Pokemon, target: Pokemon, move: Move) => boolean; @@ -235,11 +234,6 @@ export default class Move implements Localizable { return this; } - OHKOMove(ohko?: boolean): this { - this.setFlag(MoveFlags.OHKO_Move, ohko); - return this; - } - soundBased(soundBased?: boolean): this { this.setFlag(MoveFlags.SOUND_BASED, soundBased); return this; @@ -3715,8 +3709,7 @@ export function initMoves() { new AttackMove(Moves.VISE_GRIP, Type.NORMAL, MoveCategory.PHYSICAL, 55, 100, 30, -1, 0, 1), new AttackMove(Moves.GUILLOTINE, Type.NORMAL, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1) .attr(OneHitKOAttr) - .attr(OneHitKOAccuracyAttr) - .OHKOMove(), + .attr(OneHitKOAccuracyAttr), new AttackMove(Moves.RAZOR_WIND, Type.NORMAL, MoveCategory.SPECIAL, 80, 100, 10, -1, 0, 1) .attr(ChargeAttr, ChargeAnim.RAZOR_WIND_CHARGING, 'whipped\nup a whirlwind!') .attr(HighCritAttr) @@ -3765,8 +3758,7 @@ export function initMoves() { .attr(MultiHitAttr), new AttackMove(Moves.HORN_DRILL, Type.NORMAL, MoveCategory.PHYSICAL, 200, 30, 5, -1, 0, 1) .attr(OneHitKOAttr) - .attr(OneHitKOAccuracyAttr) - .OHKOMove(), + .attr(OneHitKOAccuracyAttr), new AttackMove(Moves.TACKLE, Type.NORMAL, MoveCategory.PHYSICAL, 40, 100, 35, -1, 0, 1), new AttackMove(Moves.BODY_SLAM, Type.NORMAL, MoveCategory.PHYSICAL, 85, 100, 15, 30, 0, 1) .attr(StatusEffectAttr, StatusEffect.PARALYSIS), @@ -3922,8 +3914,7 @@ export function initMoves() { .attr(OneHitKOAttr) .attr(OneHitKOAccuracyAttr) .attr(HitsTagAttr, BattlerTagType.UNDERGROUND, false) - .makesContact(false) - .OHKOMove(), + .makesContact(false), new AttackMove(Moves.DIG, Type.GROUND, MoveCategory.PHYSICAL, 80, 100, 10, -1, 0, 1) .attr(ChargeAttr, ChargeAnim.DIG_CHARGING, 'dug a hole!', BattlerTagType.UNDERGROUND) .ignoresVirtual(), @@ -4584,8 +4575,7 @@ export function initMoves() { .makesContact(false), new AttackMove(Moves.SHEER_COLD, Type.ICE, MoveCategory.SPECIAL, 200, 30, 5, -1, 0, 3) .attr(OneHitKOAttr) - .attr(OneHitKOAccuracyAttr) - .OHKOMove(), + .attr(OneHitKOAccuracyAttr), new AttackMove(Moves.MUDDY_WATER, Type.WATER, MoveCategory.SPECIAL, 90, 85, 10, 30, 0, 3) .attr(StatChangeAttr, BattleStat.ACC, -1) .target(MoveTarget.ALL_NEAR_ENEMIES),