mirror of
https://github.com/Melledy/LunarCore.git
synced 2025-12-14 06:14:45 +01:00
Prevent challenge round count from going below 1 when winning
This commit is contained in:
@@ -115,7 +115,7 @@ public class ChallengeInstance {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Calculate rounds left
|
// 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 {
|
} else {
|
||||||
// Fail challenge
|
// Fail challenge
|
||||||
this.setStatus(ChallengeStatus.CHALLENGE_FAILED);
|
this.setStatus(ChallengeStatus.CHALLENGE_FAILED);
|
||||||
|
|||||||
Reference in New Issue
Block a user