From 000d31f663e8801b4587acb07dec246170a42cc1 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 13 Apr 2024 19:36:43 -0400 Subject: [PATCH] Fix use candy menu showing up for evolved starters --- src/ui/starter-select-ui-handler.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index c0bcb5497..dbe22516e 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -25,6 +25,7 @@ import { speciesEggMoves } from "../data/egg-moves"; import { TitlePhase } from "../phases"; import { argbFromRgba } from "@material/material-color-utilities"; import { OptionSelectItem } from "./abstact-option-select-ui-handler"; +import { pokemonPrevolutions } from "#app/data/pokemon-evolutions"; export type StarterSelectCallback = (starters: Starter[]) => void; @@ -874,13 +875,15 @@ export default class StarterSelectUiHandler extends MessageUiHandler { yOffset: 47 }); }; - options.push({ - label: 'Use Candies', - handler: () => { - ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); - return true; - } - }); + if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) { + options.push({ + label: 'Use Candies', + handler: () => { + ui.setMode(Mode.STARTER_SELECT).then(() => showUseCandies()); + return true; + } + }); + } options.push({ label: 'Cancel', handler: () => {