diff --git a/src/data/arena-tag.ts b/src/data/arena-tag.ts index f8590a796d1..3eeeb0a543d 100644 --- a/src/data/arena-tag.ts +++ b/src/data/arena-tag.ts @@ -28,7 +28,7 @@ import { ArenaTagType } from "#enums/arena-tag-type"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; import { ArenaTagSide } from "#enums/arena-tag-side"; -import { MoveUseMode } from "#enums/move-use-mode" +import { MoveUseMode } from "#enums/move-use-mode"; export abstract class ArenaTag { constructor( diff --git a/src/overrides.ts b/src/overrides.ts index 1fbca8e8de1..26e6e16b232 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -272,7 +272,7 @@ class DefaultOverrides { /** * Set all non-scripted waves to use the selected battle type. - * + * * Ignored if set to {@linkcode BattleType.TRAINER} and `DISABLE_STANDARD_TRAINERS_OVERRIDE` is `true`. */ readonly BATTLE_TYPE_OVERRIDE: Exclude | null = null; @@ -285,17 +285,17 @@ export const defaultOverrides = new DefaultOverrides(); export default { ...defaultOverrides, - ...overrides + ...overrides, } satisfies InstanceType; export type BattleStyle = "double" | "single" | "even-doubles" | "odd-doubles"; export type RandomTrainerOverride = { /** The Type of trainer to force */ - trainerType: Exclude, + trainerType: Exclude; /* If the selected trainer type has a double version, it will always use its double version. */ - alwaysDouble?: boolean -} + alwaysDouble?: boolean; +}; /** The type of the {@linkcode DefaultOverrides} class */ -export type OverridesType = typeof DefaultOverrides; \ No newline at end of file +export type OverridesType = typeof DefaultOverrides; diff --git a/src/phases/move-phase.ts b/src/phases/move-phase.ts index 9ad34206968..15433a4769a 100644 --- a/src/phases/move-phase.ts +++ b/src/phases/move-phase.ts @@ -15,7 +15,6 @@ import type { DelayedAttackTag } from "#app/data/arena-tag"; import { CommonAnim } from "#enums/move-anims-common"; import { CenterOfAttentionTag } from "#app/data/battler-tags"; import { BattlerTagLapseType } from "#enums/battler-tag-lapse-type"; -import type { HealStatusEffectAttr } from "#app/data/moves/move"; import { applyMoveAttrs } from "#app/data/moves/apply-attrs"; import { allMoves } from "#app/data/data-lists"; import { MoveFlags } from "#enums/MoveFlags"; @@ -263,8 +262,7 @@ export class MovePhase extends BattlePhase { !!this.move .getMove() .findAttr( - attr => attr.is("HealStatusEffectAttr") - && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE), + attr => attr.is("HealStatusEffectAttr") && attr.selfTarget && attr.isOfEffect(StatusEffect.FREEZE), ) || (!this.pokemon.randBattleSeedInt(5) && Overrides.STATUS_ACTIVATION_OVERRIDE !== true) || Overrides.STATUS_ACTIVATION_OVERRIDE === false; @@ -279,10 +277,11 @@ export class MovePhase extends BattlePhase { globalScene.phaseManager.queueMessage( getStatusEffectActivationText(this.pokemon.status.effect, getPokemonNameWithAffix(this.pokemon)), ); - globalScene.phaseManager.unshiftNew("CommonAnimPhase", - this.pokemon.getBattlerIndex(), - undefined, - CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect # + globalScene.phaseManager.unshiftNew( + "CommonAnimPhase", + this.pokemon.getBattlerIndex(), + undefined, + CommonAnim.POISON + (this.pokemon.status.effect - 1), // offset anim # by effect # ); } else if (healed) { // cure status and play effect @@ -497,7 +496,6 @@ export class MovePhase extends BattlePhase { this.move, this.useMode, ); - } /** @@ -506,7 +504,9 @@ export class MovePhase extends BattlePhase { public end(): void { globalScene.phaseManager.unshiftNew( "MoveEndPhase", - this.pokemon.getBattlerIndex(), this.getActiveTargetPokemon(), isVirtual(this.useMode), + this.pokemon.getBattlerIndex(), + this.getActiveTargetPokemon(), + isVirtual(this.useMode), ); super.end(); diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index 76555369579..753fa3b6daa 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -173,9 +173,21 @@ export class TurnStartPhase extends FieldPhase { } if (pokemon.isPlayer() && turnCommand.cursor === -1) { - phaseManager.pushNew("MovePhase", pokemon, turnCommand.targets || turnCommand.move!.targets, move, turnCommand.move!.useMode); //TODO: is the bang correct here? + phaseManager.pushNew( + "MovePhase", + pokemon, + turnCommand.targets || turnCommand.move!.targets, + move, + turnCommand.move!.useMode, + ); //TODO: is the bang correct here? } else { - phaseManager.pushNew("MovePhase", pokemon, turnCommand.targets || turnCommand.move!.targets, move, queuedMove.useMode); // TODO: is the bang correct here? + phaseManager.pushNew( + "MovePhase", + pokemon, + turnCommand.targets || turnCommand.move!.targets, + move, + queuedMove.useMode, + ); // TODO: is the bang correct here? } break; case Command.BALL: diff --git a/src/system/settings/settings-gamepad.ts b/src/system/settings/settings-gamepad.ts index d39d5cf5a41..8a28e9fbf14 100644 --- a/src/system/settings/settings-gamepad.ts +++ b/src/system/settings/settings-gamepad.ts @@ -32,7 +32,10 @@ const pressAction = i18next.t("settings:pressActionToAssign"); export const settingGamepadOptions = { [SettingGamepad.Controller]: [i18next.t("settings:controllerDefault"), i18next.t("settings:controllerChange")], - [SettingGamepad.Gamepad_Support]: [i18next.t("settings:gamepadSupportAuto"), i18next.t("settings:gamepadSupportDisabled")], + [SettingGamepad.Gamepad_Support]: [ + i18next.t("settings:gamepadSupportAuto"), + i18next.t("settings:gamepadSupportDisabled"), + ], [SettingGamepad.Button_Up]: [`KEY ${Button.UP.toString()}`, pressAction], [SettingGamepad.Button_Down]: [`KEY ${Button.DOWN.toString()}`, pressAction], [SettingGamepad.Button_Left]: [`KEY ${Button.LEFT.toString()}`, pressAction], diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 9018bda23ac..14cd10d0d6f 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -164,7 +164,11 @@ export default class FightUiHandler extends UiHandler implements InfoToggle { break; case Button.ACTION: if ( - (globalScene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(this.fromCommand, cursor, MoveUseMode.NORMAL) + (globalScene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand( + this.fromCommand, + cursor, + MoveUseMode.NORMAL, + ) ) { success = true; } else { diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 4ead4f460e4..430eb023b7a 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -1,4 +1,4 @@ -import type { PlayerPokemon , TurnMove} from "#app/field/pokemon"; +import type { PlayerPokemon, TurnMove } from "#app/field/pokemon"; import type { PokemonMove } from "#app/data/moves/pokemon-move"; import type Pokemon from "#app/field/pokemon"; import { MoveResult } from "#enums/move-result"; diff --git a/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts index 4b425659042..a8b09461ea0 100644 --- a/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -13,6 +13,7 @@ import { MoveUseMode } from "#enums/move-use-mode"; describe("Abilities - Gorilla Tactics", () => { let phaserGame: Phaser.Game; let game: GameManager; + beforeAll(() => { phaserGame = new Phaser.Game({ type: Phaser.HEADLESS, diff --git a/test/testUtils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts index 5ceb453ccc6..948113db312 100644 --- a/test/testUtils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -92,7 +92,11 @@ export class MoveHelper extends GameManagerHelper { ); }); this.game.onNextPrompt("CommandPhase", UiMode.FIGHT, () => { - (this.game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand(Command.TERA, movePosition, MoveUseMode.NORMAL); + (this.game.scene.phaseManager.getCurrentPhase() as CommandPhase).handleCommand( + Command.TERA, + movePosition, + MoveUseMode.NORMAL, + ); }); if (targetIndex !== null) {