Phase 8: StartingRandomTilePct rule — full-stack implementation
- GameRules: add StartingRandomTilePct (int, 0–100, default 0)
- Board.Create(): accept startingRandomTilePct param; each tile
independently seeded from {Lake, Hill, Forest, Field} on Base1
- GameEngine: pass rules.StartingRandomTilePct to Board.Create()
- GameMessages: add StartingRandomTilePct to CustomRulesOverride + CustomRulesDto
- CustomLobby entity: add StartingRandomTilePctOverride column
- GameRuleSet entity: add StartingRandomTilePct column
- Migration AddStartingTileRule: new columns on custom_lobbies + game_rule_sets
- All 6 handlers wired: Create, LobbyReady, UpdateRules, AcceptSuggestion,
ListCustomLobbies, ListActiveLobbies
- Client lobby_room_screen.gd: "Starting Tile Affinity %" SpinBox (0–100)
in BOARD section; displayed in rules label and suggestion summary
Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -204,6 +204,7 @@ func _update_rules_label() -> void:
|
||||
"mpBuff": "MP Buff",
|
||||
"boardWidth": "Board W",
|
||||
"boardHeight": "Board H",
|
||||
"startingRandomTilePct":"Starting Tile %",
|
||||
}
|
||||
for key in fields:
|
||||
if _current_rules.has(key):
|
||||
@@ -287,6 +288,7 @@ func _format_rules_summary(rules: Dictionary) -> String:
|
||||
"mpBuff": "MP Buff",
|
||||
"boardWidth": "Board W",
|
||||
"boardHeight": "Board H",
|
||||
"startingRandomTilePct":"Starting Tile %",
|
||||
"firstPlayerSkipsDraw": "1st Player Skips Draw",
|
||||
"minDeckSize": "Min Deck",
|
||||
"maxDeckSize": "Max Deck",
|
||||
@@ -446,6 +448,7 @@ func _open_rules_editor() -> void:
|
||||
_section_label(inner, "BOARD")
|
||||
add_int.call("Board Width", "boardWidth", 3, 12, 6, "")
|
||||
add_int.call("Board Height", "boardHeight", 3, 12, 6, "")
|
||||
add_int.call("Starting Tile Affinity %","startingRandomTilePct", 0, 100, 0, "% of tiles that start with a random basic affinity (0 = all void)")
|
||||
|
||||
# ── Deck ───────────────────────────────────────────────────────────────────
|
||||
_section_label(inner, "DECK")
|
||||
|
||||
Reference in New Issue
Block a user