mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-26 08:46:55 +00:00
[Hotfix] End Biome Catch Problems (#3605)
* Needs more testing. * removed debugging --------- Co-authored-by: Frutescens <info@laptop>
This commit is contained in:
parent
2b853bae25
commit
5ede6a54c6
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user