mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 06:53:27 +02:00
[Bug] Ensure MEs disabled in a challenge mode only do so while challenge is active (#6337)
* Ensure MEs disabled in a challenge mode only do so while challenge is active * Optimize checking disallowed challenges
This commit is contained in:
parent
af0b0b775f
commit
edeb116ead
@ -3684,15 +3684,8 @@ export class BattleScene extends SceneBase {
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (this.gameMode.modeId === GameModes.CHALLENGE) {
|
||||
const disallowedChallenges = encounterCandidate.disallowedChallenges;
|
||||
if (
|
||||
disallowedChallenges &&
|
||||
disallowedChallenges.length > 0 &&
|
||||
this.gameMode.challenges.some(challenge => disallowedChallenges.includes(challenge.id))
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
if (encounterCandidate.disallowedChallenges?.some(challenge => this.gameMode.hasChallenge(challenge))) {
|
||||
return false;
|
||||
}
|
||||
if (!encounterCandidate.meetsRequirements()) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user