From 8ec56e00ee3ea4edf2a8220166fda124829b0b27 Mon Sep 17 00:00:00 2001 From: innerthunder Date: Wed, 25 Sep 2024 10:31:38 -0700 Subject: [PATCH] Make Switch[Summon]Phase params readonly --- src/phases/switch-phase.ts | 8 ++++---- src/phases/switch-summon-phase.ts | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/phases/switch-phase.ts b/src/phases/switch-phase.ts index 888fb6454fb..f5ce2179715 100644 --- a/src/phases/switch-phase.ts +++ b/src/phases/switch-phase.ts @@ -10,10 +10,10 @@ import { SwitchSummonPhase } from "./switch-summon-phase"; * for the player (if a switch would be valid for the current battle state). */ export class SwitchPhase extends BattlePhase { - protected fieldIndex: integer; - private switchType: SwitchType; - private isModal: boolean; - private doReturn: boolean; + protected readonly fieldIndex: integer; + private readonly switchType: SwitchType; + private readonly isModal: boolean; + private readonly doReturn: boolean; /** * Creates a new SwitchPhase diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 796a6195945..eb1e089543b 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -15,9 +15,9 @@ import { SubstituteTag } from "#app/data/battler-tags"; import { SwitchType } from "#enums/switch-type"; export class SwitchSummonPhase extends SummonPhase { - private switchType: SwitchType; - private slotIndex: integer; - private doReturn: boolean; + private readonly switchType: SwitchType; + private readonly slotIndex: integer; + private readonly doReturn: boolean; private lastPokemon: Pokemon;