Fix use candy menu showing up for evolved starters

pull/119/head
Flashfyre 2024-04-13 19:36:43 -04:00
parent c369e9ed85
commit 000d31f663
1 changed files with 10 additions and 7 deletions

View File

@ -25,6 +25,7 @@ import { speciesEggMoves } from "../data/egg-moves";
import { TitlePhase } from "../phases"; import { TitlePhase } from "../phases";
import { argbFromRgba } from "@material/material-color-utilities"; import { argbFromRgba } from "@material/material-color-utilities";
import { OptionSelectItem } from "./abstact-option-select-ui-handler"; import { OptionSelectItem } from "./abstact-option-select-ui-handler";
import { pokemonPrevolutions } from "#app/data/pokemon-evolutions";
export type StarterSelectCallback = (starters: Starter[]) => void; export type StarterSelectCallback = (starters: Starter[]) => void;
@ -874,6 +875,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
yOffset: 47 yOffset: 47
}); });
}; };
if (!pokemonPrevolutions.hasOwnProperty(this.lastSpecies.speciesId)) {
options.push({ options.push({
label: 'Use Candies', label: 'Use Candies',
handler: () => { handler: () => {
@ -881,6 +883,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler {
return true; return true;
} }
}); });
}
options.push({ options.push({
label: 'Cancel', label: 'Cancel',
handler: () => { handler: () => {