39 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 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 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 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 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 928f58675f feat: IA por dificultad, eventos captura/jaque y consolidar SceneTransitionManager 2026-08-16 16:21:07 -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
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 ab31bba21e Adopt Claude Code Game Studios template, configure Unity engine, document Combat Mode
- 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>
2026-06-20 10:08:10 -03:00
jimmyabv d1ff57293d finalizado ajedez clasico 2025-07-29 15:27:32 -03:00
jimmyabv 779a4d8c1e Sistema de reglas sin condicion de ganar o perder impleentado 2025-07-29 13:32:29 -03:00
jimmyabv bb3c5f0230 Primer Commit 2025-07-29 00:54:13 -03:00