diff --git a/src/GameLogic/MiniGames/ChaosCastleContext.cs b/src/GameLogic/MiniGames/ChaosCastleContext.cs index 2076833e21..811f14a045 100644 --- a/src/GameLogic/MiniGames/ChaosCastleContext.cs +++ b/src/GameLogic/MiniGames/ChaosCastleContext.cs @@ -207,7 +207,11 @@ protected override async ValueTask GameEndedAsync(ICollection finishers) var sortedFinishers = finishers .Select(this.GetGameStateOfFinisher) .WhereNotNull() - .OrderByDescending(state => state.Score) + // Players which died stay registered until they leave the map, so the survivors must rank first. + // Otherwise a dead player with more points (e.g. from monster kills) outranks the last survivor, + // and the survivor gets the "failed" result and the rewards of a lower rank. + .OrderByDescending(state => state.Player.IsAlive) + .ThenByDescending(state => state.Score) .ToList(); var scoreList = new List<(string Name, int Score, int BonusExp, int BonusMoney)>();