56 Commits
Author SHA1 Message Date
jimmyabv d7943b6b1c fix: update tests for silent CampaignConfig OnEnable + Linux SaveSystem 2026-08-25 23:10:25 -03:00
jimmyabv a732464614 ci: free runner disk space before Unity docker pull (no space left on device) 2026-08-25 22:07:07 -03:00
jimmyabv 229111a5ad docs: roadmap session IV + CLAUDE.md current state sync 2026-08-25 17:42:28 -03:00
jimmyabv 43f15eb9fe chore: scene saves from playtesting session (Ch1-3 UI edits) 2026-08-25 17:41:12 -03:00
jimmyabv bcc590f621 feat: runtime pause menu (continuar/reiniciar/opciones/menu) + Mi Memorial in main menu 2026-08-25 17:41:07 -03:00
jimmyabv 97677fbfff fix: defeat-to-Memorial chain, first-run dialogues, memorial typing, dialogue layout 2026-08-25 17:41:03 -03:00
jimmyabv dc45653be4 fix: pick best-wired DeadKingInputUI + runtime fallback inscription panel 2026-08-25 02:32:11 -03:00
jimmyabv 58fcf0fa5c feat: draws trigger Purgatory Duel for the Queen + post-defeat restart menu 2026-08-25 02:31:58 -03:00
jimmyabv 916acd3d79 test: raise EditMode coverage to 98.16% global, all classes >=95% 2026-08-25 02:30:58 -03:00
jimmyabv ff33c43293 chore: bump com.unity.testtools.codecoverage to 1.2.7 (batchmode coverage fix) 2026-08-24 21:32:04 -03:00
jimmyabv ac61e5f875 feat: menu BGM theme + stop chapter music on return to menu 2026-08-24 21:19:29 -03:00
jimmyabv 718246841c feat: La Muerte presence/commentary runtime + per-act BGM loops 2026-08-24 21:02:21 -03:00
jimmyabv cfc3981ebf docs: roadmap sync — vertical slice complete, current pending list
- Header/nota/milestones reflect real state: 4 scenes in Build Settings,
  200/200 EditMode tests, everything committed
- Checklist updated: La Muerte dialogues done (088d70d + 0f0b3dd), plus
  items already resolved by Aug 22 audit (scaled AI, Dead Kings UI, HUD,
  DialogueUI, scene management)
- Old blockers table replaced with actual pending list: runtime barks
  (deathCommentary has no reader), BGM, Purgatory UI dedup, manual
  playtest, Alpha/Beta/Release milestones
2026-08-24 20:31:35 -03:00
jimmyabv 0f0b3ddd82 feat: ricardo portrait + La Muerte dialogue appearances at act finales
- 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
2026-08-24 20:24:18 -03:00
jimmyabv 088d70db6f feat: La Muerte as speaker with custom art + data-driven quotes
- 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
2026-08-24 20:07:42 -03:00
jimmyabv f7d56066c0 feat: Purgatory Final duel vs La Muerte + SFX wiring + runtime options menu
- Duel flow: mating piece vs boss while board collapses (PurgatoryDuelManager/Rules/UI/MuerteQuotes)
- GameState.PurgatoryDuel + CampaignManager rescue/restart hooks + SquareClick routing
- Dice-based rescue of most valuable dead identity; final defeat restarts Chapter 1
- 6 SFX clips wired in Ch1/2/3 via AudioClipAssigner
- OptionsMenuController runtime audio/graphics panel, wired to MainMenu
- Tests migrated to Assets/Tests/EditMode subfolders + PurgatoryDuelRulesTests (200 total)
- Editor tools: DiagAssign, SpeakerDatabaseSetup, PurgatoryCanvasMaintenance
2026-08-24 19:39:52 -03:00
jimmyabv 9fdafe8e04 feat: chapter mechanics (cursed squares, fog of war, turn timer, boss queen) + dialogue data and scenes 2026-08-21 10:56:44 -03:00
jimmyabv 1c905e2689 fix: game over UI panels never showing + polish panel visuals
- CampaignManager: FindObjectOfType<T>(true) to find inactive panels
- CampaignManager: ActivateHierarchy() walks full ancestor chain before Show()
- All UI panels: defensive gameObject.SetActive(true) fallback when _panel is null
- Editor tools: polished panel visuals (overlay, borders, dividers, outline titles)
- Editor tools: same polish applied to SetupChapterScenes + CreateChapterScenes
2026-08-20 02:20:48 -03:00
jimmyabv 389f5272b5 fix: piece movement, gameplay bugs, and test fixes
- 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
2026-08-20 01:09:43 -03:00
jimmyabv fdb8c6eef7 fix: comprehensive chess gameplay fixes
- 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)
2026-08-17 23:34:27 -03:00
jimmyabv 2ba5995534 docs: update CLAUDE.md with current state and bug history 2026-08-17 22:47:06 -03:00
jimmyabv 351f9e12db fix: StackOverflow in King.GetAvailableMoves -> IsInCheck recursion
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.
2026-08-17 22:42:17 -03:00
jimmyabv 801de792ab fix: empty board + state stuck in Dialogue
- 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
2026-08-17 22:26:48 -03:00
jimmyabv c5915c2e97 fix: dark overlay + pause input error
- 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
2026-08-17 22:13:05 -03:00
jimmyabv 072537211c fix: dialogue system race condition + null safety
- 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
2026-08-17 21:48:04 -03:00
jimmyabv bf3bec3bb3 fix: add missing asmdef reference and namespace import
- Add Unity.InputSystem to AjedrezPurgatorio.Runtime.asmdef (fixes DialogueUI CS0246)
- Add using AjedrezPurgatorio.Gameplay to SetupChapterScenes (fixes PieceSelectionFeedback CS0246)
- Regenerated packages-lock.json and .slnx
2026-08-17 20:50:08 -03:00
jimmyabv b539aa403e fix: resolve compilation errors, add tests, fix configs, update docs
- Fix 9 CS0101 duplicate classes between Mono/ and Mono/Classic/
  - BoardManager -> ClassicBoardManager, SquareClick -> ClassicSquareClick
  - Delete duplicate Piece/Pawn/King/Queen/Rook/Bishop/Knight from Classic/
  - Merge GetAttackSquares into Piece base class with overrides
- Fix King castling: reject castling through/while in check
- Assign URP pipeline to QualitySettings (6 levels) and GraphicsSettings
- Fix template identifiers (DefaultCompany -> EarthGenesisGames)
- Delete orphaned SampleScene.unity and duplicate URP assets
- Fix test assembly reference (Assembly-CSharp -> AjedrezPurgatorio.Runtime)
- Remove 11 unused packages (multiplayer, visualscripting, terrain, etc.)
- Update BoardInputSystemSpike for ClassicSquareClick
- Write unit tests: CheckDetector, DrawDetector, MoveValidator
- Fix BalanceConfig JSON structure to match C# class fields
- Update stale documentation (~30 files)
  - architecture.md, ADR-0001, roadmap, gate-check, EPIC.md
  - PROJECT_STATUS.md, BLOQUEADORES_JUGABILIDAD.md
  - tech-debt-register.md
- Add Unity Editor setup guide (production/UNITY_EDITOR_SETUP.md)
2026-08-17 20:40:02 -03:00
jimmyabv 29446f95eb feat: SetupChapterScenes editor script — one-click scene wiring
Menu: Ajedrez Purgatorio > Setup Chapter Scenes

Creates and wires ALL serialized references in chapter scenes:
- Singletons: GameStateManager, CampaignManager, AIController, PurgatoryManager
- Gameplay: PieceIdentityManager, DiceSystem, PieceSelectionFeedback
- UI: GameHUD (turn text, check indicator, pause button, captured containers),
  DialogueUI (panel, text, speaker name/portrait, continue indicator),
  PauseMenu (panel, continue/retry/main menu buttons),
  PromotionUI (panel, 4 piece buttons),
  PieceTooltip (name, role, relationship)
- Purgatory: PurgatoryOfferUI, DiceRollUI, DiceResultUI
- Dead Kings: DeadKingRevealUI, DeadKingInputUI
- Assigns CampaignState, CampaignConfig assets to relevant components
- Cleans garbage objects (SquareClick at wrong positions)
2026-08-17 18:18:55 -03:00
jimmyabv 67048ddcb0 chore: cleanup dead code + null safety + BalanceConfig fix
- Delete DadoSystem.cs (empty stub, replaced by DiceSystem)
- Delete dead OnPromotionSelected method from GameManager (caused double turn toggle if wired)
- PurgatoryManager: null checks on _campaignState before MarkPieceDead/MarkPieceRecovered
- BalanceConfig.LoadFromJSON: actually applies JSON via JsonUtility.FromJsonOverwrite
2026-08-17 18:12:04 -03:00
jimmyabv 31e70b1bcf fix: ReadOnlyPropertyDrawer + BoardManager skips PlacePieces in campaign mode
I1: ReadOnlyDrawer shows [ReadOnly] fields as greyed out in Inspector
I2: BoardManager.Start() skips PlacePieces() when CampaignManager is active (SetupBoard will place pieces instead)
2026-08-17 16:54:30 -03:00
jimmyabv 0def9769ef fix: 6 critical bugs blocking campaign flow
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
2026-08-17 05:07:23 -03:00
jimmyabv 714b17811b fix: GameStateManager pure state tracker, CampaignManager owns scene flow
- 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
2026-08-17 04:55:05 -03:00
jimmyabv f87a656695 feat: crear escenas Chapter2 y Chapter3 con Build Settings actualizado
- Chapter2 (El Hospital) y Chapter3 (La Corte del Juicio) creadas
- Editor script CreateChapterScenes con namespaces corregidos
- Build Settings: MainMenu(0), Chapter1(1), Chapter2(2), Chapter3(3)
2026-08-17 04:43:37 -03:00
jimmyabv e4fee2bd80 feat: editor script para crear escenas Chapter2 y Chapter3
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
2026-08-17 04:41:08 -03:00
jimmyabv f7df1befca feat: integrar GameManager-AudioManager-CampaignManager, tests unitarios y epics
GameManager:
- Campaign stats tracking (moves, captures, purgatory wins/losses)
- AudioManager SFX wiring (move, capture, check, checkmate, promotion)
- GameStateManager transitions on game over/draw
- RecordPurgatoryResult() and ResetCampaignStats() public API

AudioManager:
- Migrated to Awake-explicit singleton (Instance = this)
- Added OnDestroy cleanup

CampaignManager:
- Dead King reveal UI integration (ShowDeadKingReveal)
- Dead King input UI integration (TransitionToDeadKings)
- CampaignState restore from save (TotalPiecesLost, LastChapterWasVictory setters)

UI:
- GameHUD: pause button + piece sprite fallback via SpriteRenderer/Resources
- DeadKingInputUI: GatherCampaignStats from GameManager, TransitionToMainMenu
- DialogueUI: WaitForSecondsRealtime survives timeScale=0 pauses

Tests (73 tests):
- CheckDetector: check, checkmate, WouldLeaveKingInCheck, HasAnyLegalMove
- DrawDetector: insufficient material, stalemate, 50-move rule, threefold repetition, position hash
- MoveValidator: constructor, move legality, check avoidance, legal move enumeration
- DiceSystem: 2d6 distribution, winner determination, piece bonuses, penalty scaling
- SaveSystem: slot validation, null safety, data structures

Epics (5):
- core-integration, campaign-flow, scene-assembly, testing, polish
2026-08-17 04:36:46 -03:00
jimmyabv 8b32633024 docs: clean up root CLAUDE.md — remove placeholders, add project identity 2026-08-17 02:37:55 -03:00
jimmyabv 0cdf08e6f3 docs: fix broken refs, generate control manifest, update systems-index
- Fixed 22 broken references to design/accessibility-requirements.md → design/ux/ across 9 files
- Generated docs/architecture/control-manifest.md from ADR-0000..0014 (212 lines, 5 layers)
- Updated systems-index.md: systems 19/20/22 now show 'design ' alongside ' No iniciado'
- Added dead-king-reveal.md reference to Dead King Input/Reveal UI row
- Bumped game-concept.md status from Draft to Approved
2026-08-17 02:29:50 -03:00
jimmyabv 86d4b144b1 docs: complete art bible S6+S8+S9, fix GDD headings, move accessibility, add quick-specs
- Art Bible: S6 Environment Art Standards (vacío, tableros, iluminación, escenas)
- Art Bible: S8 VFX Standards (captura, recuperación, muerte, Dead King, ambientales, transiciones)
- Art Bible: S9 Asset Production Standards (nomenclatura, formatos, budgets, directorios, pipeline)
- GDDs: rename 'Detailed Design' → 'Detailed Rules' in 6 system GDDs
- Moved accessibility-requirements.md to design/ux/ (correct per CLAUDE.md)
- Added exemption for foundational docs in design/CLAUDE.md
- Created design/quick-specs/ directory
- Fixed broken path references in interaction-patterns.md and art-bible.md
2026-08-17 02:20:43 -03:00
jimmyabv d97fe604d2 docs: art bible S5+S7, accessibility, UX patterns, CI workflow, gate check, purgatorio cap fix
- Art Bible: S5 Character Art Standards, S7 UI Art Standards (14 subsections total)
- Accessibility requirements doc (tier Standard)
- 11 UX interaction patterns
- GitHub Actions CI workflow (Unity batchmode)
- Gate check report: Technical Setup → Pre-Production
- Fixed piece-identity.md purgatorio cap contradiction (max 3 per board)
- Performance budgets + forbidden patterns + ADR log in technical-preferences
- Entity registry updated (piece-identity.md referenced_by for purgatory cap)
2026-08-17 02:11:05 -03:00
jimmyabv b8676dcaa7 docs: ADR-0010..0014 aceptados (Piece Identity, Dice, Dialogue, Dead Kings, Audio) y registry 2026-08-16 17:21:24 -03:00
jimmyabv d273e55dde docs: artifacts de /architecture-review (145 TRs, matriz de trazabilidad, veredicto CONCERNS) 2026-08-16 16:51:52 -03:00
jimmyabv 928f58675f feat: IA por dificultad, eventos captura/jaque y consolidar SceneTransitionManager 2026-08-16 16:21:07 -03:00
jimmyabv 17e6e5a9b3 docs: ADR-0000..0009 aceptados y registry de arquitectura 2026-08-16 16:21:03 -03:00
jimmyabv 306c444016 chore: settings de proyecto, dependencias y gitignore (excluir cachés IDE y paquete Coplay) 2026-08-16 04:47:30 -03:00
jimmyabv d05f850d61 content: reorganizar sprites a TESTING_ONLY, mover diálogos, añadir piezas, escenas y TextMesh Pro 2026-08-16 04:33:51 -03:00
jimmyabv b8b26ae5c1 feat: herramientas editor y ajustes diálogo, campaña y transición de escena 2026-08-16 03:59:20 -03:00
jimmyabv 51364556d9 docs: actualizar estado del proyecto, roadmap y arquitectura sprint 5 2026-08-16 03:59:19 -03:00
jimmyabvandClaude Sonnet 4.6 9c8e7d281e Unify Ricardo Valdes and Julian Vane as two atemporal timelines
Per explicit user decision, the Purgatorio is established as a timeless
realm that judges guilty souls from different eras independently. Ricardo
Valdes (game-concept.md, implemented vertical slice) and Julian Vane
(guion.md, "Gambito de Sombras", design-only) become Timeline I and II of
the same cosmology rather than two competing canons.

- Add design/narrative/purgatorio-cosmology.md: the canonical bridge doc.
  Unifies la_muerte / El Coleccionista as one entity wearing two narrative
  masks, and Dead Kings / Legados as one system at two scopes (King-only vs
  any named piece). Confirms the Dead Kings pool is shared across both
  timelines by explicit decision, with the technical implication spelled
  out (no timeline filter field should be added to DeadKingPool without a
  new ADR reversing this).
- Register julian_vane and clara_vane in design/registry/entities.yaml, and
  link el_coleccionista as an alias of the existing la_muerte entity.
- Add systems-index.md rows for the future Timeline II campaign and for
  Legados as an extension of the existing Piece Identity / Dead Kings
  systems, rather than new systems to build from scratch.
- Cross-reference game-concept.md to the new cosmology doc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-24 17:34:55 -03:00
jimmyabvandClaude Sonnet 4.6 83e5e53e94 Restore May vertical slice (Sprint 1-3), discard Classic/Combat refactor
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>
2026-06-24 17:10:19 -03:00
jimmyabvandClaude Sonnet 4.6 893e513486 Merge origin/main, keeping local content (May Sprint 5 commit superseded)
The May 10 commit on origin/main (8a1db81, "Sprint 5 - Meta Systems + Polish")
diverged from this local clone, which had its own independently-evolved CCGS
setup, GDDs, and Unity configuration. Per explicit user decision, local content
wins for every overlapping file; origin/main's unique history is preserved in
this merge's parents (recoverable via 8a1db81) rather than rewritten.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-20 10:08:59 -03:00