From 663b92a56b66c5476339bea16ca0885467282bcb Mon Sep 17 00:00:00 2001 From: dingo Date: Sat, 21 Mar 2026 12:44:21 -0400 Subject: [PATCH] Expose all custom lobby rules in ranked play MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MatchmakerService now snapshots all 18 game-play fields from the ranked ruleset (previously only snapshotted 6). Admin panel at /game/ranked-rules gains 6 new cards for the previously hidden fields: - Board Size (width × height) - Hand Size (cap + discard-on-max behaviour) - Deck Rules (min/max deck size, max Tier-1 Arch copies) - Timers & Limits (turn timer, game time limit, turn limit) - Unit Buffs (MP buff per turn) - Tile Randomisation (starting random tile %) No DB migration needed — GameRuleSet already stores all fields. Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude Co-Authored-By: Happy --- .../Pages/Game/RankedRulesPage.razor | 126 ++++++++++++++++++ .../src/SOR.Matchmaking/MatchmakerService.cs | 12 ++ 2 files changed, 138 insertions(+) diff --git a/Server/src/SOR.Admin/Components/Pages/Game/RankedRulesPage.razor b/Server/src/SOR.Admin/Components/Pages/Game/RankedRulesPage.razor index c8a5d37..c9b07ca 100644 --- a/Server/src/SOR.Admin/Components/Pages/Game/RankedRulesPage.razor +++ b/Server/src/SOR.Admin/Components/Pages/Game/RankedRulesPage.razor @@ -106,6 +106,132 @@ else +
+
+
Board Size
+
+
+ + +
Number of columns on the battlefield.
+
+
+ + +
Number of rows on the battlefield.
+
+
+
+
+ +
+
+
Hand Size
+
+
+ + +
Maximum cards in hand. 0 = no cap.
+
+
+ + +
+
+
+
+ +
+
+
Deck Rules
+
+
+ + +
Smallest allowed deck. 0 = no minimum.
+
+
+ + +
Largest allowed deck. 0 = no maximum.
+
+
+ + +
Max copies of a Tier-1 Arch card per deck. 0 = no limit.
+
+
+
+
+ +
+
+
Timers & Limits
+
+
+ + +
Seconds per turn before auto-end. 0 = no timer.
+
+
+ + +
Total game time in minutes. 0 = no limit.
+
+
+ + +
Maximum turns before game ends. 0 = no limit.
+
+
+
+
+ +
+
+
Unit Buffs
+
+
+ + +
+ Flat MP bonus added to each unit at the start of its owner's turn. 0 = no buff. +
+
+
+
+
+ +
+
+
Tile Randomisation
+
+
+ + +
+ Percentage of board tiles assigned a random basic affinity at game start. + 0 = all void (default). 100 = every tile randomised. +
+
+
+
+
+
Custom Default
diff --git a/Server/src/SOR.Matchmaking/MatchmakerService.cs b/Server/src/SOR.Matchmaking/MatchmakerService.cs index 91325c8..02b3e0f 100644 --- a/Server/src/SOR.Matchmaking/MatchmakerService.cs +++ b/Server/src/SOR.Matchmaking/MatchmakerService.cs @@ -128,6 +128,18 @@ internal sealed class MatchmakerService : BackgroundService rankedRules.DrawPerTurn, rankedRules.SpHasCap, rankedRules.SpCap, + rankedRules.BoardWidth, + rankedRules.BoardHeight, + rankedRules.HandSizeCap, + rankedRules.DiscardOnMaxHand, + rankedRules.MaxDeckSize, + rankedRules.MinDeckSize, + rankedRules.MaxArchTier1, + rankedRules.TurnTimerSeconds, + rankedRules.TimeLimitMinutes, + rankedRules.TurnLimit, + rankedRules.MpBuff, + rankedRules.StartingRandomTilePct, rankedRules.WinnerOpReward, rankedRules.LoserOpReward, rankedRules.RankDiffOpMultiplierPct,