[Bug] Gimmighoul & Eevee eggs will now properly randomize their forms (#5080)

This commit is contained in:
NightKev 2025-01-06 16:24:08 -08:00 committed by GitHub
parent 1be95e8a1a
commit 197b264fb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 2 deletions

View File

@ -1424,6 +1424,8 @@ export default class BattleScene extends SceneBase {
return 0;
}
const isEggPhase: boolean = [ "EggLapsePhase", "EggHatchPhase" ].includes(this.getCurrentPhase()?.constructor.name ?? "");
switch (species.speciesId) {
case Species.UNOWN:
case Species.SHELLOS:
@ -1455,7 +1457,7 @@ export default class BattleScene extends SceneBase {
}
return Utils.randSeedInt(8);
case Species.EEVEE:
if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30) {
if (this.currentBattle?.battleType === BattleType.TRAINER && this.currentBattle?.waveIndex < 30 && !isEggPhase) {
return 0; // No Partner Eevee for Wave 12 Preschoolers
}
return Utils.randSeedInt(2);
@ -1483,7 +1485,7 @@ export default class BattleScene extends SceneBase {
return 0;
case Species.GIMMIGHOUL:
// Chest form can only be found in Mysterious Chest Encounter, if this is a game mode with MEs
if (this.gameMode.hasMysteryEncounters) {
if (this.gameMode.hasMysteryEncounters && !isEggPhase) {
return 1; // Wandering form
} else {
return Utils.randSeedInt(species.forms.length);