Prevent challenge round count from going below 1 when winning

This commit is contained in:
Melledy 2023-11-12 03:27:04 -08:00
parent 2ddd89829d
commit 59c40437a4

View File

@ -115,7 +115,7 @@ public class ChallengeInstance {
}
// Calculate rounds left
this.roundsLeft = Math.min(Math.max(this.roundsLeft - stats.getRoundCnt(), 0), this.roundsLeft);
this.roundsLeft = Math.min(Math.max(this.roundsLeft - stats.getRoundCnt(), 1), this.roundsLeft);
} else {
// Fail challenge
this.setStatus(ChallengeStatus.CHALLENGE_FAILED);