diff --git a/coach/coach_service.py b/coach/coach_service.py index 685fdb0..f81fddc 100644 --- a/coach/coach_service.py +++ b/coach/coach_service.py @@ -77,7 +77,7 @@ class CoachService: logger.warning("Deck report not found: %s", deck_id) return None try: - with open(report_path, "r") as f: + with open(report_path, "r", encoding="utf-8") as f: data = json.load(f) return DeckReport(**data) except Exception as e: @@ -95,7 +95,7 @@ class CoachService: """Persist a coaching session to disk and SQLite.""" COACH_SESSIONS_DIR.mkdir(parents=True, exist_ok=True) path = COACH_SESSIONS_DIR / f"{session.sessionId}.json" - with open(path, "w") as f: + with open(path, "w", encoding="utf-8") as f: f.write(session.model_dump_json(indent=2)) if _DB_AVAILABLE: try: @@ -147,7 +147,7 @@ class CoachService: if not path.exists(): return None try: - with open(path, "r") as f: + with open(path, "r", encoding="utf-8") as f: data = json.load(f) return CoachSession(**data) except Exception as e: @@ -168,7 +168,7 @@ class CoachService: sessions = [] for f in sorted(COACH_SESSIONS_DIR.glob("*.json"), reverse=True): try: - with open(f, "r") as fh: + with open(f, "r", encoding="utf-8") as fh: data = json.load(fh) if deck_id and data.get("deckId", "") != deck_id: continue diff --git a/lan-client/engine.js b/lan-client/engine.js index bb38f8a..245161a 100644 --- a/lan-client/engine.js +++ b/lan-client/engine.js @@ -5286,8 +5286,7 @@ function setLife(playerId, newLife) { eliminatePlayer(playerId, 'life total reached 0'); } checkStateBasedActions(); - // Sync enhanced player panels - if (typeof renderEnhancedPanels === 'function') renderEnhancedPanels(); + if (typeof renderCmdDmgInline === 'function') renderCmdDmgInline(); } // ============================================================ @@ -5322,8 +5321,7 @@ function adjustCommanderDamage(targetPlayerId, sourcePlayerId, amount) { panelContainer.replaceWith(newPanel); } checkStateBasedActions(); - // Sync enhanced player panels - if (typeof renderEnhancedPanels === 'function') renderEnhancedPanels(); + if (typeof renderCmdDmgInline === 'function') renderCmdDmgInline(); } // ============================================================ @@ -5356,8 +5354,6 @@ function adjustPoison(playerId, amount) { panelContainer.replaceWith(newPanel); } if (gameState.rulesEngine && gameState.rulesEngine.sbaChecks) checkStateBasedActions(); - // Sync enhanced player panels - if (typeof renderEnhancedPanels === 'function') renderEnhancedPanels(); } // ============================================================ @@ -13049,6 +13045,8 @@ function startGame() { renderHandArea(); renderPhaseTracker(); updateTurnDisplay(); + if (typeof renderCmdDmgInline === 'function') renderCmdDmgInline(); + if (typeof refreshLeftPanelTriggers === 'function') refreshLeftPanelTriggers(); // Set default search focus setTimeout(() => { diff --git a/lan-client/index.html b/lan-client/index.html index 182f799..0a2c5e5 100644 --- a/lan-client/index.html +++ b/lan-client/index.html @@ -269,7 +269,7 @@ -
+
Cmd Dmg
—
@@ -288,7 +288,7 @@
-
+
Cmd Dmg
—
@@ -307,7 +307,7 @@
-
+
Cmd Dmg
—
@@ -326,7 +326,7 @@
-
+
Cmd Dmg
—
@@ -369,6 +369,24 @@ + + + + +
›
+