From cc7b9de3209d069bd11cd613f8c1b2d5b19f47a2 Mon Sep 17 00:00:00 2001 From: Matthew Kroeger Date: Wed, 10 Jul 2024 02:08:26 -0500 Subject: [PATCH] Added getter for reroll count and ternary --- src/ui/modifier-select-ui-handler.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/ui/modifier-select-ui-handler.ts b/src/ui/modifier-select-ui-handler.ts index d5e16082b93..c5dd1abaf83 100644 --- a/src/ui/modifier-select-ui-handler.ts +++ b/src/ui/modifier-select-ui-handler.ts @@ -12,6 +12,7 @@ import { allMoves } from "../data/move"; import * as Utils from "./../utils"; import Overrides from "#app/overrides"; import i18next from "i18next"; +import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; export const SHOP_OPTIONS_ROW_LIMIT = 6; @@ -250,13 +251,8 @@ export default class ModifierSelectUiHandler extends AwaitableUiHandler { }); this.setCursor(0); - const phase = this.scene.getCurrentPhase() as any; - const rerollCount = phase.hasOwnProperty("rerollCount") ? phase.rerollCount : 0; - if (rerollCount) { - this.setRowCursor(this.scene.rerollTarget); - } else { - this.setRowCursor(1); - } + const phase = this.scene.getCurrentPhase() as SelectModifierPhase; + phase.getRerollCount() ? this.setRowCursor(this.scene.rerollTarget) : this.setRowCursor(1); handleTutorial(this.scene, Tutorial.Select_Item).then(() => { this.setCursor(0);