Files
DungeonCrawlerWorld/docs/superpowers/plans/2026-10-07-playtest-parity-fixes.md
T

5.8 KiB
Raw Blame History

Playtest Parity Fixes Implementation Plan

For agentic workers: REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (- [ ]) syntax for tracking.

Goal: Corriger les quatre écarts constatés en playtest concernant le jalon race/classe, la lisibilité de l’interface, la représentation du combat et le niveau principal.

Architecture: Conserver les domaines existants et corriger les branchements qui les exposent. La création de partie reste limitée aux paramètres de run; un panneau modal dédié consomme ClassEngine à l’entrée de l’étage 3. Le monde affiché reste piloté par FloorState, mais la surface et le profil de l’étage 1 sont alignés sur DCWASCII.

Tech Stack: Godot 4, GDScript, GUT 9.5.

Spec: Retours de playtest du 2026-10-07 et projet de référence ../DCWASCII (dcw/game.py, dcw/world/surface.py, dcw/world/generator.py).

Global Constraints

  • Préserver la modification locale préexistante de project.godot.
  • Ne pas confondre le niveau principal avec la minimap.
  • Les choix de race puis de classe sont obligatoires à l’entrée de l’étage 3 du Donjon, pas à la création ni au niveau de personnage 3.
  • Une attaque de mêlée reste déclenchée uniquement en tentant d’entrer dans la case adjacente occupée.
  • Les noms techniques et le code restent en anglais.

Task 1: Jalon race et classe de l’étage 3

Files:

  • Modify: scenes/menu/CharacterCreation.tscn
  • Modify: scripts/presentation/menu/character_creation.gd
  • Modify: scripts/presentation/menu/main_menu.gd
  • Modify: scripts/game/game.gd
  • Modify: scripts/domain/progression/class_engine.gd
  • Modify: scripts/domain/run/run_state.gd
  • Create: scenes/ui/RaceClassChoicePanel.tscn
  • Create: scripts/presentation/race_class_choice_panel.gd
  • Test: tests/e2e/test_new_run_creation_e2e.gd
  • Test: tests/e2e/test_floor_three_race_class_e2e.gd

Interfaces:

  • Consumes: ClassEngine.race_definitions(), compatibility rules, FloorTransition.transition().

  • Produces: a mandatory RaceClassChoicePanel, an initially empty race/archetype, and a persisted RunState.base_archetype after confirmation.

  • Add a failing creation-flow test proving there are no race/class controls and the new player has empty choices.

  • Remove race/class fields and arguments from the creation flow.

  • Add a failing floor-transition test proving entry to floor 3 opens a mandatory race-first modal.

  • Add separate race and class application methods to ClassEngine and implement the modal sequence.

  • Verify both focused E2E tests.

Task 2: HUD and chest layout

Files:

  • Modify: scenes/Game.tscn
  • Modify: scenes/ui/LootPanel.tscn
  • Test: tests/unit/test_hud_layout.gd
  • Test: tests/unit/test_loot_panel_layout.gd

Interfaces:

  • Consumes: existing HUD node paths retained for compatibility.

  • Produces: non-overlapping visible rectangles at 1280×720.

  • Add failing rectangle-intersection assertions for all visible HUD labels and chest panel sections.

  • Give each visible HUD datum a distinct row and sufficient wrapping space.

  • Put chest title, entries and action inside a vertical layout container.

  • Verify focused layout tests.

Task 3: Combat presentation and action wording

Files:

  • Modify: scripts/game/game.gd
  • Modify: scripts/domain/turn_resolver.gd
  • Test: tests/e2e/test_enemy_ai_e2e.gd
  • Test: tests/unit/test_turn_resolver.gd

Interfaces:

  • Consumes: authoritative ActorState.cell positions and equipped main-hand metadata when available.

  • Produces: synchronized enemy sprites after every resolved turn and melee messages that name the attack method.

  • Add a failing E2E assertion that an enemy view follows the enemy state after movement.

  • Resynchronize enemy views during player-action presentation updates.

  • Add failing assertions that melee messages identify bare hands, equipped weapon, or natural attack while retaining damage wording.

  • Add attack-method metadata to result messages without changing melee range rules.

  • Verify focused combat tests.

Task 4: Surface and procedural dungeon

Files:

  • Modify: scripts/domain/world/surface_generator.gd
  • Modify: scripts/domain/world/floor_generator.gd
  • Modify: scripts/game/game.gd
  • Modify: tests/unit/test_surface_floor_transition.gd
  • Modify: tests/unit/test_floor_generator_rooms.gd
  • Replace: tests/unit/test_demo_map.gd
  • Replace: tests/e2e/test_demo_map_chest_e2e.gd

Interfaces:

  • Consumes: reference surface contract (42×16, empty zone, corridor, door, stairs) and regular procedural formula 180 + floor*30, 90 + floor*15, 150 + floor*20.

  • Produces: the true reference surface at floor 0 and a 210×105, 170-room procedural floor 1.

  • Add failing surface assertions for dimensions, empty population, entrance, door and stairs.

  • Port the reference surface geometry.

  • Add failing floor-1 profile assertions for map size and room target.

  • Remove the obsolete shallow floor-1 profile and dead duplicate POC construction.

  • Replace POC route tests with surface-to-generated-dungeon behavior tests.

  • Verify world unit, integration and E2E tests.

Task 5: Regression verification

Files:

  • Modify only tests whose old expectations explicitly encoded the removed POC or creation-time class choice.

Interfaces:

  • Consumes: scripts/verify.sh and focused GUT runners.

  • Produces: passing unit, integration, E2E and visual verification without modifying project.godot.

  • Run focused suites after every red/green cycle.

  • Run git diff --check.

  • Run ./scripts/verify.sh.

  • Inspect the regenerated visual captures for the main level, HUD and chest panel.