From b86a20c7b2e3692f7010438a76b31978b554a138 Mon Sep 17 00:00:00 2001 From: Jakub Hanko <60473007+JakubHanko@users.noreply.github.com> Date: Mon, 13 May 2024 14:13:34 +0200 Subject: [PATCH] Implement Miracle Eye and Foresight --- src/data/battler-tags.ts | 2 ++ src/data/move.ts | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 109711429..1314b644a 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1384,6 +1384,8 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc return new MagnetRisenTag(tagType, sourceMove); case BattlerTagType.ODOR_SLEUTH: return new ExposedTag(tagType, sourceMove, Type.GHOST, [ Type.NORMAL, Type.FIGHTING ], turnCount); + case BattlerTagType.MIRACLE_EYE: + return new ExposedTag(tagType, sourceMove, Type.DARK, [ Type.PSYCHIC ], turnCount); case BattlerTagType.NONE: default: return new BattlerTag(tagType, BattlerTagLapseType.CUSTOM, turnCount, sourceMove, sourceId); diff --git a/src/data/move.ts b/src/data/move.ts index 500188891..2e8bb4ec4 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -16,7 +16,7 @@ import { UnswappableAbilityAbAttr, UncopiableAbilityAbAttr, UnsuppressableAbilit import { Abilities } from "./enums/abilities"; import { allAbilities } from './ability'; import { PokemonHeldItemModifier } from "../modifier/modifier"; -import { BattlerIndex } from "../battle"; +import Battle, { BattlerIndex } from "../battle"; import { Stat } from "./pokemon-stat"; import { TerrainType } from "./terrain"; import { SpeciesFormChangeActiveTrigger } from "./pokemon-forms"; @@ -4670,8 +4670,9 @@ export function initMoves() { new AttackMove(Moves.ZAP_CANNON, Type.ELECTRIC, MoveCategory.SPECIAL, 120, 50, 5, 100, 0, 2) .attr(StatusEffectAttr, StatusEffect.PARALYSIS) .ballBombMove(), - new StatusMove(Moves.FORESIGHT, Type.NORMAL, -1, 40, -1, 0, 2) // TODO - .unimplemented(), + new StatusMove(Moves.FORESIGHT, Type.NORMAL, -1, 40, -1, 0, 2) + .attr(ExposedAttr) + .attr(AddBattlerTagAttr, BattlerTagType.ODOR_SLEUTH, false, false, 20), new SelfStatusMove(Moves.DESTINY_BOND, Type.GHOST, -1, 5, -1, 0, 2) .ignoresProtect() .condition(failOnBossCondition) @@ -5129,8 +5130,9 @@ export function initMoves() { new StatusMove(Moves.GRAVITY, Type.PSYCHIC, -1, 5, -1, 0, 4) .attr(AddArenaTagAttr, ArenaTagType.GRAVITY, 5) .target(MoveTarget.BOTH_SIDES), - new StatusMove(Moves.MIRACLE_EYE, Type.PSYCHIC, -1, 40, -1, 0, 4) // TODO - .unimplemented(), + new StatusMove(Moves.MIRACLE_EYE, Type.PSYCHIC, -1, 40, -1, 0, 4) + .attr(ExposedAttr) + .attr(AddBattlerTagAttr, BattlerTagType.MIRACLE_EYE, false, false, 20), new AttackMove(Moves.WAKE_UP_SLAP, Type.FIGHTING, MoveCategory.PHYSICAL, 70, 100, 10, -1, 0, 4) .attr(MovePowerMultiplierAttr, (user, target, move) => target.status?.effect === StatusEffect.SLEEP ? 2 : 1) .attr(HealStatusEffectAttr, false, StatusEffect.SLEEP),