From 8a71fe1e9f9c4ba9dd8fd7a02ec9b934f6849bd8 Mon Sep 17 00:00:00 2001 From: f-raZ0R Date: Fri, 10 May 2024 21:46:30 -0400 Subject: [PATCH 1/6] Initial draft for torment implementation. --- src/data/battler-tags.ts | 53 ++++++++++++++++++++++++++++-- src/data/enums/battler-tag-type.ts | 1 + src/data/move.ts | 9 +++-- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index ba00b0906..dba5a7f3b 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -1,7 +1,7 @@ import { CommonAnim, CommonBattleAnim } from "./battle-anims"; import { CommonAnimPhase, MoveEffectPhase, MovePhase, PokemonHealPhase, ShowAbilityPhase, StatChangePhase } from "../phases"; import { getPokemonMessage, getPokemonPrefix } from "../messages"; -import Pokemon, { MoveResult, HitResult } from "../field/pokemon"; +import Pokemon, { MoveResult, HitResult, TurnMove } from "../field/pokemon"; import { Stat, getStatName } from "./pokemon-stat"; import { StatusEffect } from "./status-effect"; import * as Utils from "../utils"; @@ -488,6 +488,53 @@ export class EncoreTag extends BattlerTag { } } +export class TormentedTag extends BattlerTag { + public moveId: Moves; + constructor(sourceId: integer) { + super(BattlerTagType.TORMENTED, BattlerTagLapseType.TURN_END, 1, Moves.TORMENT, sourceId); + } + /** + * When given a battler tag or json representing one, load the data for it. + * @param {BattlerTag | any} source A battler tag + */ + loadTag(source: BattlerTag | any): void { + super.loadTag(source); + this.moveId = source.moveId as Moves; + } + + canAdd(pokemon: Pokemon): boolean { + if (pokemon.isMax()) + return false; + return true; + } + + onAdd(pokemon: Pokemon): void { + super.onAdd(pokemon); + pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' was subjected\nto torment!')); + } + + onOverlap(pokemon: Pokemon): void { + super.onOverlap(pokemon); + //TODO: This is not official game text. Grab what the game actually says if this happens. + pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' is\nalready tormented!')); + } + + //Extremely janky hack to just test sure that this works in the first place. Athebyne please don't ship this. At the end of every turn, disables the last move you've used, for one turn. + lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { + const ret = lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); + if (ret) { + const lastMove = pokemon.getLastXMoves(1)[0]; + if (!lastMove) + return ret; + pokemon.summonData.disabledMove = lastMove.move; + pokemon.summonData.disabledTurns = 2; + + //pokemon.scene.queueMessage(disabledMove.getName(), `TORMENT TEST`); + return ret; + } + } +} + export class HelpingHandTag extends BattlerTag { constructor(sourceId: integer) { super(BattlerTagType.HELPING_HAND, BattlerTagLapseType.TURN_END, 1, Moves.HELPING_HAND, sourceId); @@ -1270,7 +1317,9 @@ export function getBattlerTag(tagType: BattlerTagType, turnCount: integer, sourc case BattlerTagType.CHARGING: return new ChargingTag(sourceMove, sourceId); case BattlerTagType.ENCORE: - return new EncoreTag(sourceId); + return new EncoreTag(sourceId); + case BattlerTagType.TORMENTED: + return new TormentedTag(sourceId); case BattlerTagType.HELPING_HAND: return new HelpingHandTag(sourceId); case BattlerTagType.INGRAIN: diff --git a/src/data/enums/battler-tag-type.ts b/src/data/enums/battler-tag-type.ts index d18ccf1c5..ab30aa861 100644 --- a/src/data/enums/battler-tag-type.ts +++ b/src/data/enums/battler-tag-type.ts @@ -11,6 +11,7 @@ export enum BattlerTagType { FRENZY = "FRENZY", CHARGING = "CHARGING", ENCORE = "ENCORE", + TORMENTED = "TORMENTED", HELPING_HAND = "HELPING_HAND", INGRAIN = "INGRAIN", AQUA_RING = "AQUA_RING", diff --git a/src/data/move.ts b/src/data/move.ts index 978f51091..51303f3e9 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2819,7 +2819,8 @@ export class AddBattlerTagAttr extends MoveEffectAttr { case BattlerTagType.INFESTATION: return -3; case BattlerTagType.ENCORE: - return -2; + return -2; + case BattlerTagType.TORMENTED: case BattlerTagType.INGRAIN: case BattlerTagType.IGNORE_ACCURACY: case BattlerTagType.AQUA_RING: @@ -4825,8 +4826,10 @@ export function initMoves() { new StatusMove(Moves.HAIL, Type.ICE, -1, 10, -1, 0, 3) .attr(WeatherChangeAttr, WeatherType.HAIL) .target(MoveTarget.BOTH_SIDES), - new StatusMove(Moves.TORMENT, Type.DARK, 100, 15, -1, 0, 3) - .unimplemented(), + new StatusMove(Moves.TORMENT, Type.DARK, 100, 15, -1, 0, 3) + .attr(AddBattlerTagAttr, BattlerTagType.TORMENTED, false, true) + .condition((user, target, move) => !target.getTag(BattlerTagType.TORMENTED) && !target.isMax()) + .partial(), new StatusMove(Moves.FLATTER, Type.DARK, 100, 15, -1, 0, 3) .attr(StatChangeAttr, BattleStat.SPATK, 1) .attr(ConfuseAttr), From f91ca416365d431e004ba283dfe2b2b680568d25 Mon Sep 17 00:00:00 2001 From: f-raZ0R Date: Sat, 11 May 2024 20:28:31 -0400 Subject: [PATCH 2/6] they call it torment because that's what its like to implement this move --- src/data/battler-tags.ts | 21 ++++++++++++-------- src/field/pokemon.ts | 22 +++++++++++++++------ src/locales/en/battle.ts | 1 + src/phases.ts | 40 +++++++++++++++++++++++++------------- src/system/pokemon-data.ts | 1 + src/ui/fight-ui-handler.ts | 2 +- 6 files changed, 59 insertions(+), 28 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index dba5a7f3b..bcebb78a0 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -505,6 +505,7 @@ export class TormentedTag extends BattlerTag { canAdd(pokemon: Pokemon): boolean { if (pokemon.isMax()) return false; + else return true; } @@ -515,21 +516,25 @@ export class TormentedTag extends BattlerTag { onOverlap(pokemon: Pokemon): void { super.onOverlap(pokemon); - //TODO: This is not official game text. Grab what the game actually says if this happens. - pokemon.scene.queueMessage(getPokemonMessage(pokemon, ' is\nalready tormented!')); } - //Extremely janky hack to just test sure that this works in the first place. Athebyne please don't ship this. At the end of every turn, disables the last move you've used, for one turn. + onRemove(pokemon: Pokemon): void { + super.onRemove(pokemon); + pokemon.scene.queueMessage(getPokemonMessage(pokemon, 'is no longer\ntormented!')); + } + lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { const ret = lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); if (ret) { const lastMove = pokemon.getLastXMoves(1)[0]; - if (!lastMove) + if (!lastMove || (lastMove.move === Moves.NONE)) return ret; - pokemon.summonData.disabledMove = lastMove.move; - pokemon.summonData.disabledTurns = 2; - - //pokemon.scene.queueMessage(disabledMove.getName(), `TORMENT TEST`); + if (lastMove.move === Moves.STRUGGLE) { + pokemon.summonData.unselectableMove = Moves.NONE; + } + else { + pokemon.summonData.unselectableMove = lastMove.move; + } return ret; } } diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 8afff1b27..f6bfaa902 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1185,11 +1185,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.scene.triggerPokemonFormChange(this, SpeciesFormChangeMoveLearnedTrigger); } - trySelectMove(moveIndex: integer, ignorePp?: boolean): boolean { + trySelectMove(moveIndex: integer, ignorePp?: boolean, skipSelection?: boolean): boolean { const move = this.getMoveset().length > moveIndex ? this.getMoveset()[moveIndex] : null; - return move?.isUsable(this, ignorePp); + return move?.isUsable(this, ignorePp) && (move?.isSelectable(this, ignorePp) || skipSelection); } showInfo(): void { @@ -2792,16 +2792,19 @@ export class EnemyPokemon extends Pokemon { } } - const movePool = this.getMoveset().filter(m => m.isUsable(this)); + const movePool = this.getMoveset().filter(m => m.isUsable(this)).filter(m => m.isSelectable(this)); if (movePool.length) { - if (movePool.length === 1) - return { move: movePool[0].moveId, targets: this.getNextTargets(movePool[0].moveId) }; const encoreTag = this.getTag(EncoreTag) as EncoreTag; if (encoreTag) { + if (this.summonData.disabledMove === encoreTag.moveId || this.summonData.unselectableMove === encoreTag.moveId) { + return { move: Moves.STRUGGLE, targets: this.getNextTargets(Moves.STRUGGLE) }; + } const encoreMove = movePool.find(m => m.moveId === encoreTag.moveId); if (encoreMove) return { move: encoreMove.moveId, targets: this.getNextTargets(encoreMove.moveId) }; - } + } + if (movePool.length === 1) + return { move: movePool[0].moveId, targets: this.getNextTargets(movePool[0].moveId) }; switch (this.aiType) { case AiType.RANDOM: const moveId = movePool[this.scene.randBattleSeedInt(movePool.length)].moveId; @@ -3138,6 +3141,7 @@ export class PokemonSummonData { public moveQueue: QueuedMove[] = []; public disabledMove: Moves = Moves.NONE; public disabledTurns: integer = 0; + public unselectableMove: Moves = Moves.NONE; public tags: BattlerTag[] = []; public abilitySuppressed: boolean = false; @@ -3221,6 +3225,12 @@ export class PokemonMove { return (ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1) && !this.getMove().name.endsWith(' (N)'); } + isSelectable(pokemon: Pokemon, ignorePp?: boolean): boolean { + if ((this.moveId && pokemon.summonData?.disabledMove === this.moveId) || (this.moveId && pokemon.summonData?.unselectableMove === this.moveId)) + return false; + return (ignorePp || this.ppUsed < this.getMovePp() || this.getMove().pp === -1) && !this.getMove().name.endsWith(' (N)'); + } + getMove(): Move { return allMoves[this.moveId]; } diff --git a/src/locales/en/battle.ts b/src/locales/en/battle.ts index 7c948e6f0..1bf422973 100644 --- a/src/locales/en/battle.ts +++ b/src/locales/en/battle.ts @@ -35,6 +35,7 @@ export const battle: SimpleTranslationEntries = { "moveNotImplemented": "{{moveName}} is not yet implemented and cannot be selected.", "moveNoPP": "There's no PP left for\nthis move!", "moveDisabled": "{{moveName}} is disabled!", + "moveTormented": "{{pokemonName}} can't use the same move\n twice in a row due to the torment!", "noPokeballForce": "An unseen force\nprevents using Poké Balls.", "noPokeballTrainer": "You can't catch\nanother trainer's Pokémon!", "noPokeballMulti": "You can only throw a Poké Ball\nwhen there is one Pokémon remaining!", diff --git a/src/phases.ts b/src/phases.ts index 20c4dc737..07687bc15 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1664,11 +1664,11 @@ export class CommandPhase extends FieldPhase { if (moveQueue.length) { const queuedMove = moveQueue[0]; if (!queuedMove.move) - this.handleCommand(Command.FIGHT, -1, false); + this.handleCommand(Command.FIGHT, -1, false, false); else { const moveIndex = playerPokemon.getMoveset().findIndex(m => m.moveId === queuedMove.move); if (moveIndex > -1 && playerPokemon.getMoveset()[moveIndex].isUsable(playerPokemon, queuedMove.ignorePP)) { - this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, { targets: queuedMove.targets, multiple: queuedMove.targets.length > 1 }); + this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, true, { targets: queuedMove.targets, multiple: queuedMove.targets.length > 1 }); } else this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex); } @@ -1680,14 +1680,20 @@ export class CommandPhase extends FieldPhase { const playerPokemon = this.scene.getPlayerField()[this.fieldIndex]; const enemyField = this.scene.getEnemyField(); let success: boolean; - + switch (command) { case Command.FIGHT: - let useStruggle = false; + let useStruggleA = false; + let useStruggleB = false; + let useStruggleC = false; + const encoreTag = playerPokemon.getTag(EncoreTag) as EncoreTag; if (cursor === -1 || - playerPokemon.trySelectMove(cursor, args[0] as boolean) || - (useStruggle = cursor > -1 && !playerPokemon.getMoveset().filter(m => m.isUsable(playerPokemon)).length)) { - const moveId = !useStruggle ? cursor > -1 ? playerPokemon.getMoveset()[cursor].moveId : Moves.NONE : Moves.STRUGGLE; + playerPokemon.trySelectMove(cursor, args[0] as boolean, args[1] as boolean) || + (useStruggleA = cursor > -1 && (!playerPokemon.getMoveset().filter(m => m.isSelectable(playerPokemon)).length) && !args[1]) || + (useStruggleB = cursor > -1 && (!playerPokemon.getMoveset().filter(m => m.isUsable(playerPokemon)).length)) || + (useStruggleC = cursor > -1 && encoreTag && encoreTag.moveId != Moves.NONE && (encoreTag.moveId === playerPokemon.summonData.unselectableMove || encoreTag.moveId === playerPokemon.summonData.disabledMove))) { + const moveId = !(useStruggleA || useStruggleB || useStruggleC) ? cursor > -1 ? playerPokemon.getMoveset()[cursor].moveId : Moves.NONE : Moves.STRUGGLE; + args.splice(1, 1); const turnCommand: TurnCommand = { command: Command.FIGHT, cursor: cursor, move: { move: moveId, targets: [], ignorePP: args[0] }, args: args }; const moveTargets: MoveTargetSet = args.length < 3 ? getMoveTargets(playerPokemon, moveId) : args[2]; if (!moveId) @@ -1706,13 +1712,14 @@ export class CommandPhase extends FieldPhase { const move = playerPokemon.getMoveset()[cursor]; this.scene.ui.setMode(Mode.MESSAGE); - // Decides between a Disabled, Not Implemented, or No PP translation message + // Decides between a Tormented, Disabled, Not Implemented, or No PP translation message const errorMessage = - playerPokemon.summonData.disabledMove === move.moveId ? 'battle:moveDisabled' : + playerPokemon.summonData.unselectableMove === move.moveId ? 'battle:moveTormented' : playerPokemon.summonData.disabledMove === move.moveId ? 'battle:moveDisabled' : move.getName().endsWith(' (N)') ? 'battle:moveNotImplemented' : 'battle:moveNoPP'; const moveName = move.getName().replace(' (N)', ''); // Trims off the indicator + const pokemonName = playerPokemon.name; - this.scene.ui.showText(i18next.t(errorMessage, { moveName: moveName }), null, () => { + this.scene.ui.showText(i18next.t(errorMessage, { moveName: moveName, pokemonName: pokemonName }), null, () => { this.scene.ui.clearText(); this.scene.ui.setMode(Mode.FIGHT, this.fieldIndex); }, null, true); @@ -1837,10 +1844,17 @@ export class CommandPhase extends FieldPhase { const moveIndex = pokemon.getMoveset().findIndex(m => m.moveId === encoreTag.moveId); - if (moveIndex === -1 || !pokemon.getMoveset()[moveIndex].isUsable(pokemon)) - return false; + if (moveIndex === -1 || (!(pokemon.getMoveset()[moveIndex].ppUsed < pokemon.getMoveset()[moveIndex].getMovePp() || + pokemon.getMoveset()[moveIndex].getMove().pp === -1) && !pokemon.getMoveset()[moveIndex].getMove().name.endsWith(' (N)'))) { + return false; + } - this.handleCommand(Command.FIGHT, moveIndex, false); + + if (!pokemon.getMoveset()[moveIndex].isUsable(pokemon) || !pokemon.getMoveset()[moveIndex].isSelectable(pokemon)) { + this.handleCommand(Command.FIGHT, 0, true, false); + return true; + } + this.handleCommand(Command.FIGHT, moveIndex, false, false); return true; } diff --git a/src/system/pokemon-data.ts b/src/system/pokemon-data.ts index dfbb9be57..92f597647 100644 --- a/src/system/pokemon-data.ts +++ b/src/system/pokemon-data.ts @@ -115,6 +115,7 @@ export default class PokemonData { this.summonData.moveQueue = source.summonData.moveQueue; this.summonData.disabledMove = source.summonData.disabledMove; this.summonData.disabledTurns = source.summonData.disabledTurns; + this.summonData.unselectableMove = source.summonData.unselectableMove; this.summonData.abilitySuppressed = source.summonData.abilitySuppressed; this.summonData.ability = source.summonData.ability; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 084337b40..a5c321200 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -100,7 +100,7 @@ export default class FightUiHandler extends UiHandler { if (button === Button.CANCEL || button === Button.ACTION) { if (button === Button.ACTION) { - if ((this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, cursor, false)) + if ((this.scene.getCurrentPhase() as CommandPhase).handleCommand(Command.FIGHT, cursor, false, false)) success = true; else ui.playError(); From 39a913ed38b1b45fd9c3f2befe23524676bc76f4 Mon Sep 17 00:00:00 2001 From: f-raZ0R Date: Mon, 13 May 2024 19:41:12 -0400 Subject: [PATCH 3/6] fix remaining encore issues --- src/phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/phases.ts b/src/phases.ts index b577768f6..de34d5194 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1851,7 +1851,7 @@ export class CommandPhase extends FieldPhase { if (!pokemon.getMoveset()[moveIndex].isUsable(pokemon) || !pokemon.getMoveset()[moveIndex].isSelectable(pokemon)) { - this.handleCommand(Command.FIGHT, 0, true, false); + this.handleCommand(Command.FIGHT, 5, true, false); return true; } this.handleCommand(Command.FIGHT, moveIndex, false, false); From e11c8ffe1aa578bd646f0458882bd36e7edae04d Mon Sep 17 00:00:00 2001 From: f-raZ0R Date: Mon, 13 May 2024 19:54:47 -0400 Subject: [PATCH 4/6] add comments where needed --- src/data/battler-tags.ts | 1 + src/field/pokemon.ts | 3 +++ src/phases.ts | 6 ++++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index bcebb78a0..e8af5bde2 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -523,6 +523,7 @@ export class TormentedTag extends BattlerTag { pokemon.scene.queueMessage(getPokemonMessage(pokemon, 'is no longer\ntormented!')); } + //At the end of each turn, if this pokemon executed a move this turn, set its unselectableMove to that move, unless it is struggle, in which case unset it. lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { const ret = lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); if (ret) { diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 74b062736..b03dbd062 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -3283,6 +3283,9 @@ export class PokemonSummonData { public moveQueue: QueuedMove[] = []; public disabledMove: Moves = Moves.NONE; public disabledTurns: integer = 0; + /* + * Moves that can not be selected in the UI, but don't fail when used for other reasons. Currently just used by Torment. + */ public unselectableMove: Moves = Moves.NONE; public tags: BattlerTag[] = []; public abilitySuppressed: boolean = false; diff --git a/src/phases.ts b/src/phases.ts index c33962742..67f51e698 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1667,7 +1667,8 @@ export class CommandPhase extends FieldPhase { this.handleCommand(Command.FIGHT, -1, false, false); else { const moveIndex = playerPokemon.getMoveset().findIndex(m => m.moveId === queuedMove.move); - if (moveIndex > -1 && playerPokemon.getMoveset()[moveIndex].isUsable(playerPokemon, queuedMove.ignorePP)) { + if (moveIndex > -1 && playerPokemon.getMoveset()[moveIndex].isUsable(playerPokemon, queuedMove.ignorePP)) { + //if the player already has a move queued (e.g. due to outrage), have arg1 be true in handleCommand this.handleCommand(Command.FIGHT, moveIndex, queuedMove.ignorePP, true, { targets: queuedMove.targets, multiple: queuedMove.targets.length > 1 }); } else this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex); @@ -1686,7 +1687,8 @@ export class CommandPhase extends FieldPhase { let useStruggleA = false; let useStruggleB = false; let useStruggleC = false; - const encoreTag = playerPokemon.getTag(EncoreTag) as EncoreTag; + const encoreTag = playerPokemon.getTag(EncoreTag) as EncoreTag; + //Lengthy check for whether or not the player's choice is legal, and if they should struggle. if (cursor === -1 || playerPokemon.trySelectMove(cursor, args[0] as boolean, args[1] as boolean) || (useStruggleA = cursor > -1 && (!playerPokemon.getMoveset().filter(m => m.isSelectable(playerPokemon)).length) && !args[1]) || From ef0ff6a7055340340627b790b57c183094f43f76 Mon Sep 17 00:00:00 2001 From: f-raZ0R Date: Mon, 13 May 2024 20:33:38 -0400 Subject: [PATCH 5/6] Fix interaction with Virtuals. --- src/data/battler-tags.ts | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index e8af5bde2..8dfe4ef34 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -523,18 +523,27 @@ export class TormentedTag extends BattlerTag { pokemon.scene.queueMessage(getPokemonMessage(pokemon, 'is no longer\ntormented!')); } - //At the end of each turn, if this pokemon executed a move this turn, set its unselectableMove to that move, unless it is struggle, in which case unset it. + //At the end of each turn, set this pokemon's unselectableMove to the last move it executed. If this move is struggle, instead unset unselectableMove. If no valid move is found, do nothing. lapse(pokemon: Pokemon, lapseType: BattlerTagLapseType): boolean { const ret = lapseType !== BattlerTagLapseType.CUSTOM || super.lapse(pokemon, lapseType); if (ret) { - const lastMove = pokemon.getLastXMoves(1)[0]; - if (!lastMove || (lastMove.move === Moves.NONE)) - return ret; - if (lastMove.move === Moves.STRUGGLE) { - pokemon.summonData.unselectableMove = Moves.NONE; - } - else { - pokemon.summonData.unselectableMove = lastMove.move; + const moveQueue = pokemon.getLastXMoves(); + let turnMove: TurnMove; + while (moveQueue.length) { + turnMove = moveQueue.shift(); + if (turnMove.virtual && turnMove.move !== Moves.STRUGGLE) + continue; + if (turnMove.move === Moves.STRUGGLE) { + pokemon.summonData.unselectableMove = Moves.NONE; + return ret; + } + const moveIndex = pokemon.getMoveset().findIndex(m => m.moveId === turnMove.move); + if (moveIndex === -1) + return ret; + else { + pokemon.summonData.unselectableMove = turnMove.move; + return ret; + } } return ret; } From 41cebcc182c0b39bd1dd848b654da36445a47ec7 Mon Sep 17 00:00:00 2001 From: Athebyne <30442287+f-raZ0R@users.noreply.github.com> Date: Tue, 14 May 2024 00:10:22 -0400 Subject: [PATCH 6/6] Remove Partial Tag Torment is fully implemented. --- src/data/move.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 8625360fd..3359ab64f 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4914,8 +4914,7 @@ export function initMoves() { .target(MoveTarget.BOTH_SIDES), new StatusMove(Moves.TORMENT, Type.DARK, 100, 15, -1, 0, 3) .attr(AddBattlerTagAttr, BattlerTagType.TORMENTED, false, true) - .condition((user, target, move) => !target.getTag(BattlerTagType.TORMENTED) && !target.isMax()) - .partial(), + .condition((user, target, move) => !target.getTag(BattlerTagType.TORMENTED) && !target.isMax()), new StatusMove(Moves.FLATTER, Type.DARK, 100, 15, -1, 0, 3) .attr(StatChangeAttr, BattleStat.SPATK, 1) .attr(ConfuseAttr),