[Hotfix] End Biome Catch Problems (#3605)

* Needs more testing.

* removed debugging

---------

Co-authored-by: Frutescens <info@laptop>
This commit is contained in:
Mumble 2024-08-17 17:09:28 -07:00 committed by GitHub
parent 2b853bae25
commit 5ede6a54c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ export class GameMode implements GameModeConfig {
* @returns true if the game mode has that challenge * @returns true if the game mode has that challenge
*/ */
hasChallenge(challenge: Challenges): boolean { hasChallenge(challenge: Challenges): boolean {
return this.challenges.some(c => c.id === challenge); return this.challenges.some(c => c.id === challenge && c.value !== 0);
} }
/** /**

View File

@ -2034,7 +2034,8 @@ export class CommandPhase extends FieldPhase {
} }
break; break;
case Command.BALL: case Command.BALL:
if (this.scene.arena.biomeType === Biome.END && (!this.scene.gameMode.isClassic || this.scene.gameMode.isFreshStartChallenge() || (this.scene.getEnemyField().filter(p => p.isActive(true)).some(p => !p.scene.gameData.dexData[p.species.speciesId].caughtAttr) && this.scene.gameData.getStarterCount(d => !!d.caughtAttr) < Object.keys(speciesStarters).length - 1))) { const notInDex = (this.scene.getEnemyField().filter(p => p.isActive(true)).some(p => !p.scene.gameData.dexData[p.species.speciesId].caughtAttr) && this.scene.gameData.getStarterCount(d => !!d.caughtAttr) < Object.keys(speciesStarters).length - 1);
if (this.scene.arena.biomeType === Biome.END && (!this.scene.gameMode.isClassic || this.scene.gameMode.isFreshStartChallenge() || notInDex )) {
this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex); this.scene.ui.setMode(Mode.COMMAND, this.fieldIndex);
this.scene.ui.setMode(Mode.MESSAGE); this.scene.ui.setMode(Mode.MESSAGE);
this.scene.ui.showText(i18next.t("battle:noPokeballForce"), null, () => { this.scene.ui.showText(i18next.t("battle:noPokeballForce"), null, () => {