From 72758761205c0bf0f14700c9efec86cc5b671b8c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 15 Apr 2024 17:34:36 -0400 Subject: [PATCH] Fix starter select issue with gender forms --- src/ui/starter-select-ui-handler.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 7521cbbc6bb..6c589a1b2d7 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -1304,6 +1304,13 @@ export default class StarterSelectUiHandler extends MessageUiHandler { this.dexAttrCursor = 0n; this.natureCursor = -1; + if (species?.forms?.find(f => f.formKey === 'female')) { + if (female !== undefined) + formIndex = female ? 1 : 0; + else if (formIndex !== undefined) + female = formIndex === 1; + } + if (species) { this.dexAttrCursor |= (shiny !== undefined ? !shiny : !(shiny = oldProps.shiny)) ? DexAttr.NON_SHINY : DexAttr.SHINY; this.dexAttrCursor |= (female !== undefined ? !female : !(female = oldProps.female)) ? DexAttr.MALE : DexAttr.FEMALE;