- Portraits/ricardo.png (256x256 flat crown style) wired into
SpeakerDatabase.asset and SpeakerDatabaseSetup entries; no speaker
is missing art now
- La Muerte speaks in campaign for the first time: one chained node in
g8/g16/g24 outros (act finales) plus g30 intro/outro bookends, closing
the game giving the player agency to leave the empty throne
- PortraitRegistry null-fill fix from previous commit makes her portrait
render automatically in these nodes
Verified in Unity 6000.3.13f1 batch mode: clean import, 200/200 EditMode tests
- Portraits/muerte.png (256x256 flat style) wired into SpeakerDatabase.asset
via deterministic GUID/fileID; SpeakerDatabaseSetup batch keeps it in sync
- PortraitRegistry now fills null portraits of existing speakers (was skip-only)
- MuerteQuotes loads pools from Resources Dialogues/muerte_quotes.json with
embedded fallback per purgatorio-final.md
- Boss art: Resources/Pieces/la_muerte.png (1024px, PPU 100); SpawnBoss swaps
the tinted king placeholder for the custom sprite when present
- Cleanup: stale TODO in CampaignState.StartChapter, /TestResults/ gitignored,
duplicate Assets/Game/Audio removed (broken YAML metas, zero references)
Verified in Unity 6000.3.13f1 batch mode: clean import, 200/200 EditMode tests
- GameManager.MovePiece: add visual position update (transform.position), logical position (currentPos), and hasMoved flag — pieces were static because grid updated but piece state never did
- GameManager.MovePiece: add castling rook movement (was detected but never executed)
- BoardManager: add _campaignSetupDone guard to prevent double piece placement
- GameManager: fix RecordMove hash to use next player (!whiteTurn)
- CheckDetector: use GetAttackSquares instead of GetAvailableMoves to prevent StackOverflow in IsInCheck recursion
- King: use IsSquareAttackedBy for castling check instead of GameManager.IsInCheck
- AIController: add IsMoveLegal validation before executing moves
- PurgatoryManager: fix state transitions to GameState.Purgatory/Playing
- CampaignState: call identity.ResetState() on Reset()
- GameManager: fire OnPieceMoved before promotion logic
- PromotionUI: auto-promote to Queen if promotionPanel is null
- CampaignManager: transition to Playing when chapter is null
- BoardManager: force GameState.Playing fallback after board setup
- PurgatorySetupValidator: add Setup Purgatorio en Escena menu item with inline setup
- Fix 13 test failures: add LogAssert.Expect for null-input tests, fix stalemate test layout
- BoardManager: always PlacePieces() in Start() (traditional chess first,
campaign can override via SetupBoard)
- Piece.ShowMoves: filter by legal moves only (MoveValidator.IsMoveLegal)
- SquareClick: null checks + GameState.Playing guard
- DialogueSystem: WaitForSecondsRealtime for typewriter (survives timeScale=0)
- GameManager: add IsMoveLegal public method for Piece.ShowMoves
- GameManager: en passant fires OnPieceCaptured BEFORE Destroy
- GameHUD: delegate pause to PauseMenuController (no direct timeScale)
CheckDetector.IsInCheck used GetAvailableMoves() which for King calls
GameManager.IsInCheck -> CheckDetector.IsInCheck -> King.GetAvailableMoves
creating infinite recursion. Changed to GetAttackSquares() which King
overrides to return attack squares without the check test.
- BoardManager.SetupBoard: fallback to PlacePieces() when campaign
identities are not configured (prevents empty board)
- CampaignManager: only transition to Dialogue state if StartDialogue
returns true (prevents state override when dialogue fails)
- Same fix for outro dialogue transition
- PromotionUI: deactivate DimBG (permanent 70% black overlay) on Awake,
show only during promotion selection
- PauseMenuController: remove Input.GetButtonDown('Pause') — button not
defined in InputManager, use KeyCode.Escape only
- SceneTransitionManager: use Time.unscaledDeltaTime and
WaitForSecondsRealtime so fades don't freeze when Time.timeScale=0
- CampaignManager: subscribe OnDialogueComplete BEFORE StartDialogue
(prevents game getting stuck in Dialogue state when dialogue not found)
- DialogueUI: null checks for _dialoguePanel, _continueIndicator,
_speakerNameText, _speakerPortrait, _continueIndicator in coroutines
- DialogueUI: fix Update fallback — check action != null before skipping
keyboard/mouse input
I1: ReadOnlyDrawer shows [ReadOnly] fields as greyed out in Inspector
I2: BoardManager.Start() skips PlacePieces() when CampaignManager is active (SetupBoard will place pieces instead)
C1: CampaignManager._pendingChapterIndex consumed in OnSceneLoaded (Start only runs once for DontDestroyOnLoad)
C2: PieceIdentityManager.AssignIdentities() called after BoardManager.SetupBoard
C3: CampaignState.Reset() populates _alivePieces from _allIdentities
C4: GameManager no longer calls GameStateManager.TransitionTo — CampaignManager handles state exclusively
C5: PromotionUI uses only callback, removes duplicate PromotePawnTo call
C6: DialogueSystem.StartDialogue fires OnDialogueComplete on failure (returns bool now)
W1: OnChapterDefeat calls AutoSaveProgress to persist defeat state
W2: PauseMenuController uses SceneTransitionManager for fade effect
- GameStateManager: removed GetSceneNameForState/LoadSceneForState, TransitionTo now only sets state + fires events
- CampaignManager: handles all scene transitions directly, subscribes to GameManager with retry pattern (OnEnable+Start), added RetryChapter(), pending chapter initialization via OnSceneLoaded
- MainMenuController: removed double scene load on New Campaign, Continue now uses CampaignManager.LoadProgress, removed unused helper methods
- PauseMenuController: retry uses CampaignManager.RetryChapter, main menu sets GameStateManager state
- DeadKingInputUI: TransitionToMainMenu sets GameStateManager state to Menu
Menu: Ajedrez Purgatorio > Create Chapter Scenes
- Duplica Chapter1 como base para Chapter2 (El Hospital) y Chapter3 (La Corte del Juicio)
- Configura titulos, resetea stats de campana
- Crea DeadKingInputUI y DeadKingRevealUI si no existen
- Actualiza Build Settings con las 4 escenas
The May 10 commit (8a1db81) contained a much more mature, tested implementation
than the local Classic/Combat refactor done earlier today: Piece Identity System,
Dice/Purgatory mechanic, Dead Kings async pool, Dialogue System, Campaign System,
AI with Easy/Medium/Hard strategies, full chess rules (checkmate, stalemate, en
passant, castling, draw detection), and NUnit unit tests. The Classic/Combat
scaffold built today was a more primitive duplicate, created without awareness
of this prior work.
Per explicit user decision: restore the full May tree (code, tests, and the 9
design/gdd/* documents), and remove the Classic/Combat code along with the
GDD/ADR/control-manifest that documented it (now describing discarded code).
Reapplied on top of the restored May state (unrelated to the code decision):
- Fix CLAUDE.md / docs/CLAUDE.md engine-reference import (was still pointing at
docs/engine-reference/godot/VERSION.md)
- Remove unused docs/engine-reference/godot/ and unreal/ (project is Unity-only)
- Fill in technical-preferences.md naming conventions, specialist routing, and
testing framework (NUnit) entries that were left as [TO BE CONFIGURED]
- Add Version Awareness section to unity-specialist agent
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Install CCGS agent/skill/hook framework (.claude/, docs templates, GitHub issue/PR templates)
- Configure CLAUDE.md and technical-preferences.md for Unity 6000.3.3f1 (C#, URP, collider-based mouse picking)
- Point engine reference import at docs/engine-reference/unity/ and remove unused Godot/Unreal reference docs
- Add Version Awareness section to unity-specialist agent
- Set production/review-mode.txt to lean
- Add design/gdd/combat-mode.md: reverse-documented GDD for the vs-AI Combat mode, confirming it as the foundation for the guion.md narrative campaign (separate from Classic mode)
- Add docs/architecture/ADR-0001: documents the existing board-state/singleton/per-mode architecture and the decision to keep Classic and Combat modes permanently separate
- Add docs/architecture/control-manifest.md: programmer rules sheet sourced from ADR-0001 and Unity 6 engine reference docs
- Continue in-progress Mono/Classic and Mono/Combat refactor (ScoreManager, scene/prefab updates)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>