From 82b2d498313668213d4ae884e14447f8f0d5e711 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Tue, 16 Sep 2025 19:44:51 +0200 Subject: [PATCH 1/2] Added gender restrictions --- src/data/challenge.ts | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 65faa900af7..79192514c5c 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -466,6 +466,20 @@ export class SingleGenerationChallenge extends Challenge { return false; } + applyStarterSelectModify(speciesId: SpeciesId, dexEntry: DexEntry, _starterDataEntry: StarterDataEntry): boolean { + // Ralts must be male and Snorunt must be female + if (this.value === 4) { + if (speciesId === SpeciesId.RALTS) { + dexEntry.caughtAttr &= ~DexAttr.FEMALE; + } + if (speciesId === SpeciesId.SNORUNT) { + dexEntry.caughtAttr &= ~DexAttr.MALE; + } + } + + return true; + } + applyPokemonInBattle(pokemon: Pokemon, valid: BooleanHolder): boolean { const baseGeneration = getPokemonSpecies(pokemon.species.speciesId).generation; const fusionGeneration = pokemon.isFusion() ? getPokemonSpecies(pokemon.fusionSpecies!.speciesId).generation : 0; @@ -739,6 +753,27 @@ export class SingleTypeChallenge extends Challenge { return false; } + applyStarterSelectModify(speciesId: SpeciesId, dexEntry: DexEntry, _starterDataEntry: StarterDataEntry): boolean { + const type = this.value - 1; + + if (type === PokemonType.FIGHTING && speciesId === SpeciesId.RALTS) { + dexEntry.caughtAttr &= ~DexAttr.FEMALE; + } + if (type === PokemonType.GHOST && speciesId === SpeciesId.SNORUNT) { + dexEntry.caughtAttr &= ~DexAttr.MALE; + } + if (speciesId === SpeciesId.BURMY) { + if (type === PokemonType.FLYING) { + dexEntry.caughtAttr &= ~DexAttr.FEMALE; + } + if ([PokemonType.GRASS, PokemonType.GROUND, PokemonType.STEEL].includes(type)) { + dexEntry.caughtAttr &= ~DexAttr.MALE; + } + } + + return true; + } + applyPokemonInBattle(pokemon: Pokemon, valid: BooleanHolder): boolean { if ( pokemon.isPlayer() From d60f5d4d653b5b38f1990f9880c95ab6502b0418 Mon Sep 17 00:00:00 2001 From: Wlowscha <54003515+Wlowscha@users.noreply.github.com> Date: Thu, 18 Sep 2025 19:04:54 +0200 Subject: [PATCH 2/2] No male Ralts in mono fairy challenge --- src/data/challenge.ts | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 79192514c5c..38c7a1990e4 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -756,10 +756,15 @@ export class SingleTypeChallenge extends Challenge { applyStarterSelectModify(speciesId: SpeciesId, dexEntry: DexEntry, _starterDataEntry: StarterDataEntry): boolean { const type = this.value - 1; - if (type === PokemonType.FIGHTING && speciesId === SpeciesId.RALTS) { - dexEntry.caughtAttr &= ~DexAttr.FEMALE; + if (speciesId === SpeciesId.RALTS) { + if (type === PokemonType.FIGHTING) { + dexEntry.caughtAttr &= ~DexAttr.FEMALE; + } + if (type === PokemonType.FAIRY) { + dexEntry.caughtAttr &= ~DexAttr.MALE; + } } - if (type === PokemonType.GHOST && speciesId === SpeciesId.SNORUNT) { + if (speciesId === SpeciesId.SNORUNT && type === PokemonType.GHOST) { dexEntry.caughtAttr &= ~DexAttr.MALE; } if (speciesId === SpeciesId.BURMY) {