From f00b03479897e950e6d8dc9389bf95d9207ec890 Mon Sep 17 00:00:00 2001 From: pixelizedgaming Date: Thu, 9 May 2024 12:02:42 -0700 Subject: [PATCH] patched transform & mimic interaction --- .gitignore | 3 ++- src/data/ability.ts | 7 +++++-- src/data/move.ts | 3 ++- src/phases.ts | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 55f9203a8..d5ff76902 100644 --- a/.gitignore +++ b/.gitignore @@ -35,4 +35,5 @@ src/data/battle-anim-raw-data*.ts src/data/battle-anim-data.ts src/overrides.ts -coverage \ No newline at end of file +coverage +src/overrides.ts diff --git a/src/data/ability.ts b/src/data/ability.ts index 1c949fcea..fafff0c98 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -1185,9 +1185,12 @@ export class PostAttackLockMoveAbAttr extends PostAttackAbAttr { } applyPostAttack(pokemon: Pokemon, passive: boolean, attacker: Pokemon, move: PokemonMove, hitResult: HitResult, args: any[]): boolean { if (!this.condition(pokemon, attacker, move.getMove())) return false; + console.log(`locked in the move: ${allMoves[pokemon.summonData.choicedMove].name}!`) - pokemon.summonData.choicedMove = move.moveId; - pokemon.scene.queueMessage(getPokemonMessage(pokemon ,` is locked into ${allMoves[pokemon.summonData.choicedMove].name}!`)); + if (!(move.moveId === Moves.MIMIC || move.moveId === Moves.TRANSFORM)){ + pokemon.summonData.choicedMove = move.moveId; + pokemon.scene.queueMessage(getPokemonMessage(pokemon ,` is locked into ${allMoves[pokemon.summonData.choicedMove].name}!`)); + } return true; } } diff --git a/src/data/move.ts b/src/data/move.ts index fd55bc920..bd381cff7 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -3650,7 +3650,8 @@ export class MovesetCopyMoveAttr extends OverrideMoveEffectAttr { user.summonData.moveset = user.getMoveset().slice(0); user.summonData.moveset[thisMoveIndex] = new PokemonMove(copiedMove.id, 0, 0); - + user.summonData.choicedMove = user.summonData.choicedMove === move.id ? copiedMove.id : user.summonData.choicedMove; + user.scene.queueMessage(getPokemonMessage(user, ` copied\n${copiedMove.name}!`)); return true; diff --git a/src/phases.ts b/src/phases.ts index 3af474ee7..a6d410d79 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2205,7 +2205,7 @@ export class MovePhase extends BattlePhase { console.log(Moves[this.move.moveId]); - if (!this.canMove() && (this.pokemon.summonData.disabledMove !== this.pokemon.summonData.choicedMove)) { // patch for choice item - disable interaction + if (!this.canMove() && (this.move.moveId !== Moves.STRUGGLE)) { // patch for choice item - disable interaction if (this.move.moveId && this.pokemon.summonData.disabledMove === this.move.moveId) this.scene.queueMessage(`${this.move.getName()} is disabled!`); if (this.move.moveId && this.pokemon.summonData.choicedMove !== Moves.NONE && this.pokemon.summonData.choicedMove !== this.move.moveId)