Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb600fbdf6 | ||
|
|
0f2eeac912 | ||
|
|
069537e737 | ||
|
|
70aa27d232 | ||
|
|
a2d5918b36 | ||
|
|
f9ef3d72aa | ||
|
|
bbf89a9f36 | ||
|
|
bc67e5ed88 | ||
|
|
c410f830e3 | ||
|
|
78f4744c3f | ||
|
|
8816c31301 | ||
|
|
0d8ba84cf2 | ||
|
|
0090753675 | ||
|
|
4cc2bd4272 | ||
|
|
dbc53aab71 | ||
|
|
f1b58935bf | ||
|
|
59d0b65eb6 | ||
|
|
ca90d790d9 | ||
|
|
39fd70da88 | ||
|
|
65d35b5102 | ||
|
|
f8d4d932c3 | ||
|
|
6e8c4aa20a | ||
|
|
7c43fb2ecb | ||
|
|
a42002c834 | ||
|
|
c235dab643 | ||
|
|
f9934530e1 | ||
|
|
c779c796ec | ||
|
|
f6e93159c0 | ||
|
|
23acd47495 | ||
|
|
cf102e1e95 | ||
|
|
122fdac97c | ||
|
|
9921e02de3 | ||
|
|
27edac9a2f | ||
|
|
80ecc836c2 | ||
|
|
e6025317e1 | ||
|
|
59e922ce29 | ||
|
|
885781cf9c | ||
|
|
a55f0fc452 | ||
|
|
ebc35e8277 | ||
|
|
eca098b4b9 | ||
|
|
cce25a1908 | ||
|
|
744ba873bc | ||
|
|
4091501396 | ||
|
|
be891712c1 | ||
|
|
5ef08a6e33 | ||
|
|
e8082b3ca6 | ||
|
|
9bd003102c | ||
|
|
34eb08f02a | ||
|
|
f65e9026c1 | ||
|
|
6ded0f76ce | ||
|
|
337c404912 | ||
|
|
cc80c3e369 | ||
|
|
1419b24870 | ||
|
|
fb61b4fe91 |
@@ -1,5 +1,6 @@
|
|||||||
.godot/
|
.godot/
|
||||||
*.import
|
*.import
|
||||||
artifacts/
|
artifacts/
|
||||||
|
build/
|
||||||
|
|
||||||
.claude/
|
.claude/
|
||||||
|
|||||||
@@ -1,124 +1,45 @@
|
|||||||
# Dungeon Crawler World — S4 Audio and visual verification
|
# Dungeon Crawler World
|
||||||
|
|
||||||
## Prerequisites
|
Dungeon Crawler World is a desktop Godot dungeon-crawler prototype with deterministic procedural floors, a graphical HUD/minimap, versioned five-slot saves, imported ASCII content, optional safe audio, and Linux/Windows export presets.
|
||||||
|
|
||||||
Godot 4.2+ is required (verified with Godot 4.5). GUT **9.5.0** is vendored and pinned at `addons/gut`. Linux visual verification needs either an active display or `xvfb-run`; the verification script uses Xvfb automatically when `DISPLAY` is unset.
|
## Play or build
|
||||||
|
|
||||||
## Run on Linux
|
- **Players:** read [Playing](docs/PLAYING.md) for installation, controls, saves, accessibility, audio, and limitations.
|
||||||
|
- **Content authors:** read [Content and modding](docs/CONTENT_AND_MODDING.md) for supported JSON data, asset credits/licenses, safe audio boundaries, and packaging a source modification.
|
||||||
|
|
||||||
|
Godot **4.5** is the verified version (Godot 4.2+ minimum). Run the source project with:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
"${GODOT_BIN:-$(command -v godot4 || command -v godot)}" --path .
|
"${GODOT_BIN:-$(command -v godot4 || command -v godot)}" --path .
|
||||||
```
|
```
|
||||||
|
|
||||||
Use WASD / arrow keys (and QZC diagonals); **keypad 9** moves north-east. The HUD help band explicitly shows `Déplacer : ZQSD / Flèches (nord-est : pavé num. 9)` and `Interagir : Espace ou E`; both **Space** and **E** are bound only to `interact`. All inputs pass through `ActionRouter`: movement and interaction are implemented, while the registered future commands emit a journaled `action_unavailable` event rather than being ignored. The rebindable command vocabulary and defaults are: **.** wait, **F** attack, **R** ranged, **X** cast, **T** talk, **H** rest, **I** inventory, **P** character, **J** quests, **U** audience, **Y** recap, **M** map, and **O** options. `Game.submit_test_action(Vector2i)` and `Game.submit_test_interact()` are deterministic public E2E seams and follow the same action router as keyboard input. Interacting with an adjacent closed door opens it into floor space, logs the action, refreshes FOV, and gives living enemies exactly one normal response. A closed chest is likewise non-walkable; interacting with it replaces it with floor, logs `chest_opened` as `You open the chest.`, refreshes FOV, and gives at most one normal enemy response. It deliberately grants no loot or inventory item. Interacting with no target only logs `nothing_to_interact` and does not consume an enemy turn. Interacting while standing on stairs logs `stairs_used`, sets the demonstration exit state, and gives living enemies exactly one normal response.
|
Install export templates matching the exact Godot version, then build desktop artifacts:
|
||||||
|
|
||||||
## Display, grid, and camera
|
|
||||||
|
|
||||||
The project reference viewport is **1280×720**, with canvas-item stretching and a resizable window. Dungeon coordinates remain in the `cell * 32` domain: `MapRenderer.get_cell_rect(cell)` returns the exact 32×32 world rectangle for a cell, and `Game.get_actor_cell_rect(actor_id)` exposes the effective actor image rectangle. Actor sprites are top-left anchored so their complete 32×32 image is contained in their cell before and after movement.
|
|
||||||
|
|
||||||
`Camera2D` follows the player after each valid action, uses `zoom = (2, 2)`, and is bounded to the map's world rectangle. Dungeon/domain coordinates and `TILE_SIZE=32` are unchanged. The public HUD nodes stay below `HUD` (`CanvasLayer`, layer 1), so they remain viewport-anchored rather than moving with the camera. Compact corner and bottom panels keep the central play area clear.
|
|
||||||
|
|
||||||
### S5.1 verification note
|
|
||||||
|
|
||||||
The S5.1 contract—1280×720 reference viewport, actor rectangle, and camera behavior—is covered by the dedicated tests and visual capture check. This note records coverage only; it does not assert an execution result.
|
|
||||||
|
|
||||||
## Optional ASCII audio layout
|
|
||||||
|
|
||||||
Audio is optional presentation. Its absence, unknown requests, missing folders, bad files, and unsupported codecs never affect a turn or game startup. No audio files ship with this repository.
|
|
||||||
|
|
||||||
`AudioLibrary` first searches the directory named by `DCW_AUDIO_HOME`; when it is unset, it searches `~/.local/share/dcwascii`. Place tracks in this exact layout:
|
|
||||||
|
|
||||||
```text
|
|
||||||
<root>/
|
|
||||||
├── audio/
|
|
||||||
│ ├── exploration/
|
|
||||||
│ ├── combat/
|
|
||||||
│ └── danger/
|
|
||||||
└── sfx/
|
|
||||||
├── attack_given/
|
|
||||||
├── attack_received/
|
|
||||||
├── menu_select/
|
|
||||||
├── menu_cancel/
|
|
||||||
├── item_use/
|
|
||||||
└── death/
|
|
||||||
```
|
|
||||||
|
|
||||||
Admitted file extensions are `.mp3`, `.ogg`, `.oga`, `.wav`, `.flac`, `.m4a`, and `.opus`. `AudioLibrary` discovers the first admitted regular file in each requested directory and exposes that path only as diagnostics (`get_last_ambience_path` / `get_last_sfx_path`). **This prototype never loads or plays external audio:** it does not invoke `AudioStream*.load_from_file`, `ResourceLoader`, or another Godot loader on files below these roots, regardless of extension or apparent validity. A nominal or truncated `.wav` is therefore equally non-playable (`has_playable_ambience()` / `has_playable_sfx()` return `false`) and cannot affect gameplay. Directory discovery is deliberately best-effort and error-free; it is not a promise that the discovered file can be read or played. The game still selects `exploration` at startup, changes to `combat` for a combat result, and dispatches audio requests for player attacks, enemy attacks, and death without blocking those actions.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
DCW_AUDIO_HOME="$HOME/.local/share/dcwascii" "${GODOT_BIN:-godot4}" --path .
|
./scripts/build-linux.sh
|
||||||
|
./scripts/build-windows.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
## Tests and visual check
|
The Linux script creates `build/linux/DungeonCrawlerWorld.x86_64` and smoke-launches it under X11 (or Xvfb). The Windows script creates `build/windows/DungeonCrawlerWorld.exe` and a distribution manifest. It validates files only and deliberately makes no Windows-runtime claim from Linux. Both scripts explicitly stop before export when their matching templates are absent. Build output is reproducible and ignored by Git.
|
||||||
|
|
||||||
|
## Verification
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/test-unit.sh
|
./tests/scripts/test_export_scripts.sh
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/test-integration.sh
|
./tests/scripts/test_parity_recovery_gate.sh
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/test-e2e.sh
|
./tests/scripts/test_parity_gauntlet.sh
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/run-visual-check.sh
|
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh
|
GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh
|
||||||
|
GODOT_BIN=/snap/bin/godot4 ./scripts/run-parity-gauntlet.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Each runner first executes `godot --headless --path . --import`. This generates the ignored `.godot` cache required for global script classes and imported assets, so the commands are reproducible from a newly checked-out worktree. Import failures stop the runner and retain Godot's error output.
|
The full verifier runs unit, integration, E2E, and visual-capture checks, then exits nonzero when the strict release parity gate finds a blocked, unowned, invalid, or unjustified contract. `run-parity-gauntlet.sh` additionally runs save/load plus generated-floor seed suites. See the [release checklist](docs/RELEASE_CHECKLIST.md), [release evidence](docs/release/RC-2026-10-04-evidence.md), and [ASCII parity matrix](docs/parity/ASCII_TEST_MATRIX.md) before tagging. The visual check needs an active display or `xvfb-run`; it distinctly reports unavailable visual infrastructure rather than a false pass. Test runners first import the project headlessly so a fresh checkout receives its required Godot cache.
|
||||||
|
|
||||||
## ASCII content catalog
|
## Project notes
|
||||||
|
|
||||||
`data/ascii/` is a byte-for-byte UTF-8 copy of the authored JSON hierarchy from DCWASCII, including dialogue, event, and quest files. `ContentCatalog.load_from_directory(path)` exposes `StringName` getters for items, enemies, spells, achievements, loot tables, NPCs, and quests. It preserves source definitions without translating gameplay data; unsupported content families remain copied for later slices. Missing required `id` values and duplicate supported ids are retained as explicit catalog diagnostics. The integration suite proves all supported ASCII ids occur exactly once in the catalog.
|
- [Asset registry and CC0 license provenance](assets/ASSET_REGISTRY.md)
|
||||||
|
- [ASCII parity matrix](docs/parity/ASCII_TEST_MATRIX.md)
|
||||||
|
- [Release checklist and evidence](docs/RELEASE_CHECKLIST.md)
|
||||||
|
- [Player instructions](docs/PLAYING.md)
|
||||||
|
- [Content and modding](docs/CONTENT_AND_MODDING.md)
|
||||||
|
|
||||||
### Large generated catalog budget
|
The game works without optional audio. It only plays registered Godot `AudioStream` resources from a user manifest and never searches or decodes arbitrary external audio paths. The current prototype demonstrates the reached-stairs exit state but does not generate a next level there.
|
||||||
|
|
||||||
The main-menu **Content Catalog** (`C`) searches the complete imported item, spell, and achievement catalogs, and uses **Tab** to switch catalog plus **Page Up/Down** to navigate. It renders at most 24 rows at a time rather than instantiating or formatting all results. The D6 integration contract validates every generated id and its item category/rarity/equipment slot, spell school, or achievement category.
|
|
||||||
|
|
||||||
On Linux with Godot 4.5.0 release-like headless execution and a warm imported project, `scripts/measure_catalog_performance.gd` recorded three menu/catalog opens at **293–306 ms** (end-to-end process wall time **0.99–1.05 s**), rendering 24 rows from 15,058 items. The acceptance budgets are **≤ 5,000 ms** for cold catalog import (enforced by the integration test) and **≤ 5,000 ms** to open the catalog menu (enforced by the measurement script). The generous cold-acceptance limit keeps the check stable under repository/CI startup noise; the script prints the measured duration, budget, and PASS/FAIL status and exits nonzero for an incomplete or over-budget open. Re-measure with:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GODOT_BIN=/snap/bin/godot4 ./scripts/godot-import.sh
|
|
||||||
/snap/bin/godot4 --headless --path . -s res://scripts/measure_catalog_performance.gd
|
|
||||||
```
|
|
||||||
|
|
||||||
A true Linux release export could not be generated in this repository because it has no `export_presets.cfg`; the documented run therefore uses the release-like headless runtime path and explicitly reports that limitation.
|
|
||||||
|
|
||||||
`run-visual-check.sh` runs the actual project twice: `--capture` records the initial state at `artifacts/visual-check.png`, while `--capture-exit` records the reached-exit state at `artifacts/visual-check-exit.png`. Both must be valid **1280×720** PNGs, and output is logged to `artifacts/visual-check.log`. The runner measures the dungeon viewport pixels with the Python standard library only (PNG parsing uses `struct`/`zlib`, with no Pillow or other external dependency): unmodulated visible terrain, texture-preserving explored terrain (captured luminance ≤ 0.35), and exact black-blue unknown fog (`#010205`). The explored luminance is calculated from detected captured pixels, not from a pre-render tint constant. It chooses `xvfb-run` with a 1280×720 screen when no display is available, enforces a timeout, and reports **unavailable** (rather than a false pass) when neither a display nor Xvfb exists. Godot `SCRIPT ERROR` and `Parse Error` diagnostics fail the check; `xkbcommon: ERROR` Compose/keymap warnings from the Snap/Xvfb environment are expected backend noise and are not treated as application errors. `verify.sh` runs unit tests and headless E2E before visual verification; unavailable visual verification is reported distinctly from a failed test or failed visual capture.
|
|
||||||
|
|
||||||
For a direct headless startup check:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
GODOT_BIN=/snap/bin/godot4 timeout 3s /snap/bin/godot4 --headless --path .
|
|
||||||
```
|
|
||||||
|
|
||||||
## Exploration, combat, and HUD
|
|
||||||
|
|
||||||
- `GameState.visible_cells` render unmodulated. Cells retained in `explored_cells` preserve their tile texture beneath a black-blue overlay (normalized tint luminance ≤ 0.35); unknown cells are `Color(0.005, 0.008, 0.02, 1.0)` black-blue fog.
|
|
||||||
- FOV is map-aware: walls and closed doors are visible but block cells behind them.
|
|
||||||
- `HUD/PlayerHealthLabel`, `HUD/EnemyHealthLabel`, `HUD/CombatSummaryLabel`, and `HUD/EventLog` expose the current combat state. Their historical public paths are retained while viewport-anchored HUD panels separate stats, journal, contextual prompt, and help.
|
|
||||||
- `HUD/ContextPromptLabel` mirrors `GameHud.get_context_prompt()`: stairs under the player take priority and read `Espace — Descendre l’escalier`; otherwise an adjacent closed chest reads `Espace — Ouvrir le coffre` before an adjacent closed door can read `Espace — Ouvrir la porte`; a reached exit reads `Sortie atteinte — prochain étage bientôt disponible`; otherwise it is empty. Using stairs sets only `GameState.exit_reached`, logs `stairs_used`, and leaves the player and current map in place.
|
|
||||||
- Every `melee` and `enemy_melee` result is routed to its actor view; the sprite's persistent red tint makes received damage visible.
|
|
||||||
|
|
||||||
## Exports
|
|
||||||
|
|
||||||
Install the Godot 4.5 export templates matching the editor/runtime, then open `project.godot` in the Godot editor and use **Project → Export**.
|
|
||||||
|
|
||||||
### Linux/X11
|
|
||||||
|
|
||||||
1. Add or select a **Linux/X11** preset.
|
|
||||||
2. Choose an output path such as `build/linux/DungeonCrawlerWorld.x86_64` and click **Export Project**.
|
|
||||||
3. On Linux, make the binary executable if necessary, then launch it:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
chmod +x build/linux/DungeonCrawlerWorld.x86_64
|
|
||||||
./build/linux/DungeonCrawlerWorld.x86_64
|
|
||||||
```
|
|
||||||
|
|
||||||
### Windows Desktop
|
|
||||||
|
|
||||||
1. Add or select a **Windows Desktop** preset.
|
|
||||||
2. Choose an output path such as `build/windows/DungeonCrawlerWorld.exe` and click **Export Project**.
|
|
||||||
3. Distribute the exported `.exe` with its generated `.pck` file when Godot produces one.
|
|
||||||
|
|
||||||
Windows exports can be produced from Linux when the matching templates are installed, but this project does **not** claim that a Windows export has been tested on Windows.
|
|
||||||
|
|
||||||
## Limits
|
|
||||||
|
|
||||||
This compact prototype has one deterministic goblin, direct pursuit, no persistence or inventory UI, and persistent rather than animated damage tint. Audio remains intentionally nonblocking and uses no bundled assets. Reaching the stairs is a demonstration-only exit: it sets `exit_reached` and displays `Sortie atteinte — prochain étage bientôt disponible`; **no next level is generated or loaded**, and the current player and map remain unchanged.
|
|
||||||
|
|||||||
@@ -13,3 +13,30 @@ All binary art below is an unmodified 32×32 PNG copied from the local **Dungeon
|
|||||||
| `assets/dcss/stairs.png` | `dungeon/gateways/stone_stairs_up.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
| `assets/dcss/stairs.png` | `dungeon/gateways/stone_stairs_up.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
||||||
| `assets/dcss/player.png` | `player/base/kobold_female_new.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
| `assets/dcss/player.png` | `player/base/kobold_female_new.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
||||||
| `assets/dcss/goblin.png` | `monster/goblin_new.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
| `assets/dcss/goblin.png` | `monster/goblin_new.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
||||||
|
| `assets/dcss/war_dog.png` | `monster/animals/war_dog.png` | Dungeon Crawl Stone Soup Full | CC0 1.0 | none |
|
||||||
|
| `assets/audio/dungeon_exploration.wav` | generated specifically for this project | Dungeon Crawler World project | original project asset | procedural synthesis, 2026-10-08 |
|
||||||
|
| `assets/audio/dungeon_combat.wav` | generated specifically for this project | Dungeon Crawler World project | original project asset | procedural synthesis, 2026-10-08 |
|
||||||
|
| `assets/audio/dungeon_danger.wav` | generated specifically for this project | Dungeon Crawler World project | original project asset | procedural synthesis, 2026-10-08 |
|
||||||
|
|
||||||
|
## Dark fantasy UI kit — Task 1
|
||||||
|
|
||||||
|
Reusable UI components copied from the local prototype kit documented by the portable pack identifier `DungeonCrawlerWorld_UI_Assets/README.md`. Only transparent reusable components were imported, plus the two explicitly requested captures (`portrait_roger.png`, `illustration_equipement.png`). Import presets keep UI textures uncompressed, without mipmaps, and do not scale/recolor them with editor settings for pixel-stable UI rendering.
|
||||||
|
|
||||||
|
| Imported path | Local source | Author / pack | License | Modification / intended use |
|
||||||
|
|---|---|---|---|---|
|
||||||
|
| `assets/ui/dark_fantasy/bouton_normal_180x48.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/bouton_normal_180x48.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; normal button state |
|
||||||
|
| `assets/ui/dark_fantasy/bouton_survol_180x48.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/bouton_survol_180x48.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; hover/focus/pressed button state |
|
||||||
|
| `assets/ui/dark_fantasy/case_inventaire_72x72.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/case_inventaire_72x72.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; inventory slot frame |
|
||||||
|
| `assets/ui/dark_fantasy/header_800x54.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/header_800x54.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; ornamental header bar |
|
||||||
|
| `assets/ui/dark_fantasy/jauge_focus_pleine.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/jauge_focus_pleine.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; full focus gauge texture for TextureProgressBar |
|
||||||
|
| `assets/ui/dark_fantasy/jauge_vie_pleine.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/jauge_vie_pleine.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; full health gauge texture for TextureProgressBar |
|
||||||
|
| `assets/ui/dark_fantasy/jauge_xp_pleine.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/jauge_xp_pleine.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; full XP gauge texture for TextureProgressBar |
|
||||||
|
| `assets/ui/dark_fantasy/panel_320x200.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/panel_320x200.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; fixed-size charcoal/gold panel |
|
||||||
|
| `assets/ui/dark_fantasy/panel_440x270.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/panel_440x270.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; fixed-size charcoal/gold panel |
|
||||||
|
| `assets/ui/dark_fantasy/panel_64x64_nine_patch_source.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/panel_64x64_nine_patch_source.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; NinePatchRect/StyleBoxTexture source, 10 px margins |
|
||||||
|
| `assets/ui/dark_fantasy/touche_clavier_vide.png` | `DungeonCrawlerWorld_UI_Assets/composants_transparents/touche_clavier_vide.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; keyboard shortcut keycap |
|
||||||
|
| `assets/ui/dark_fantasy/portrait_roger.png` | `DungeonCrawlerWorld_UI_Assets/captures/portrait_roger.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; Roger portrait TextureRect |
|
||||||
|
| `assets/ui/dark_fantasy/illustration_equipement.png` | `DungeonCrawlerWorld_UI_Assets/captures/illustration_equipement.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; equipment illustration TextureRect |
|
||||||
|
| `assets/ui/dark_fantasy/dungeon_ui_background.png` | `DungeonCrawlerWorld_UI_Assets/captures/c4dc05cf-9f60-4620-a0af-f067852ba23b.png` | DungeonCrawlerWorld prototype UI kit | project prototype asset | none; reusable HUD background capture, tracked under portable pack identifier rather than an absolute workstation path |
|
||||||
|
| `assets/ui/dark_fantasy/dark_fantasy_theme.tres` | authored in project from imported UI kit colors/textures | Dungeon Crawler World project | original project asset | Godot Theme: parchment text, gold accents, charcoal panels, ornamental textured borders, focused/hover button states, 16–22 px readable defaults |
|
||||||
|
| `assets/ui/dark_fantasy/gold_coin.svg` | authored in project | Dungeon Crawler World project | original project asset | simple original SVG; readable round gold currency icon for HUD/GoldIcon |
|
||||||
|
|||||||
|
After Width: | Height: | Size: 676 B |
|
After Width: | Height: | Size: 392 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cow1oh3o0fbus"
|
||||||
|
path="res://.godot/imported/bouton_normal_180x48.png-d9711fa595a0c3013705906e1b96edfc.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/bouton_normal_180x48.png"
|
||||||
|
dest_files=["res://.godot/imported/bouton_normal_180x48.png-d9711fa595a0c3013705906e1b96edfc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 394 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dnlfu6bkuvwp8"
|
||||||
|
path="res://.godot/imported/bouton_survol_180x48.png-941a16c6df0968e7cf184cf2a49ee3c5.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/bouton_survol_180x48.png"
|
||||||
|
dest_files=["res://.godot/imported/bouton_survol_180x48.png-941a16c6df0968e7cf184cf2a49ee3c5.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 407 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bu7xvj53seokx"
|
||||||
|
path="res://.godot/imported/case_inventaire_72x72.png-b4d759bb61ed8ed9e36f821cdf01969d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/case_inventaire_72x72.png"
|
||||||
|
dest_files=["res://.godot/imported/case_inventaire_72x72.png-b4d759bb61ed8ed9e36f821cdf01969d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
[gd_resource type="Theme" load_steps=8 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/panel_64x64_nine_patch_source.png" id="1_panel64"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/bouton_normal_180x48.png" id="2_btn_normal"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/bouton_survol_180x48.png" id="3_btn_hover"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/case_inventaire_72x72.png" id="4_inventory"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_panel"]
|
||||||
|
texture = ExtResource("1_panel64")
|
||||||
|
texture_margin_left = 10.0
|
||||||
|
texture_margin_top = 10.0
|
||||||
|
texture_margin_right = 10.0
|
||||||
|
texture_margin_bottom = 10.0
|
||||||
|
content_margin_left = 14.0
|
||||||
|
content_margin_top = 12.0
|
||||||
|
content_margin_right = 14.0
|
||||||
|
content_margin_bottom = 12.0
|
||||||
|
modulate_color = Color(0.95, 0.88, 0.68, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_button_normal"]
|
||||||
|
texture = ExtResource("2_btn_normal")
|
||||||
|
texture_margin_left = 14.0
|
||||||
|
texture_margin_top = 12.0
|
||||||
|
texture_margin_right = 14.0
|
||||||
|
texture_margin_bottom = 12.0
|
||||||
|
content_margin_left = 18.0
|
||||||
|
content_margin_top = 8.0
|
||||||
|
content_margin_right = 18.0
|
||||||
|
content_margin_bottom = 8.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_button_hover"]
|
||||||
|
texture = ExtResource("3_btn_hover")
|
||||||
|
texture_margin_left = 14.0
|
||||||
|
texture_margin_top = 12.0
|
||||||
|
texture_margin_right = 14.0
|
||||||
|
texture_margin_bottom = 12.0
|
||||||
|
content_margin_left = 18.0
|
||||||
|
content_margin_top = 8.0
|
||||||
|
content_margin_right = 18.0
|
||||||
|
content_margin_bottom = 8.0
|
||||||
|
modulate_color = Color(1.0, 0.88, 0.48, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_inventory_slot"]
|
||||||
|
texture = ExtResource("4_inventory")
|
||||||
|
texture_margin_left = 8.0
|
||||||
|
texture_margin_top = 8.0
|
||||||
|
texture_margin_right = 8.0
|
||||||
|
texture_margin_bottom = 8.0
|
||||||
|
content_margin_left = 8.0
|
||||||
|
content_margin_top = 8.0
|
||||||
|
content_margin_right = 8.0
|
||||||
|
content_margin_bottom = 8.0
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
default_base_scale = 1.0
|
||||||
|
default_font_size = 18
|
||||||
|
Button/colors/font_color = Color(0.82, 0.72, 0.45, 1)
|
||||||
|
Button/colors/font_disabled_color = Color(0.36, 0.32, 0.25, 1)
|
||||||
|
Button/colors/font_focus_color = Color(1, 0.87, 0.42, 1)
|
||||||
|
Button/colors/font_hover_color = Color(1, 0.86, 0.36, 1)
|
||||||
|
Button/colors/font_hover_pressed_color = Color(0.95, 0.78, 0.28, 1)
|
||||||
|
Button/colors/font_outline_color = Color(0.05, 0.04, 0.03, 1)
|
||||||
|
Button/colors/font_pressed_color = Color(0.93, 0.76, 0.24, 1)
|
||||||
|
Button/constants/h_separation = 6
|
||||||
|
Button/constants/outline_size = 2
|
||||||
|
Button/font_sizes/font_size = 18
|
||||||
|
Button/styles/disabled = SubResource("StyleBoxTexture_button_normal")
|
||||||
|
Button/styles/focus = SubResource("StyleBoxTexture_button_hover")
|
||||||
|
Button/styles/hover = SubResource("StyleBoxTexture_button_hover")
|
||||||
|
Button/styles/normal = SubResource("StyleBoxTexture_button_normal")
|
||||||
|
Button/styles/pressed = SubResource("StyleBoxTexture_button_hover")
|
||||||
|
CheckButton/colors/font_color = Color(0.82, 0.72, 0.45, 1)
|
||||||
|
CheckButton/colors/font_hover_color = Color(1, 0.86, 0.36, 1)
|
||||||
|
CheckButton/font_sizes/font_size = 18
|
||||||
|
Label/colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
|
Label/colors/font_outline_color = Color(0.04, 0.03, 0.025, 1)
|
||||||
|
Label/constants/line_spacing = 3
|
||||||
|
Label/constants/outline_size = 1
|
||||||
|
Label/font_sizes/font_size = 18
|
||||||
|
LineEdit/colors/caret_color = Color(0.95, 0.78, 0.28, 1)
|
||||||
|
LineEdit/colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
|
LineEdit/colors/font_placeholder_color = Color(0.58, 0.49, 0.34, 1)
|
||||||
|
LineEdit/font_sizes/font_size = 18
|
||||||
|
LineEdit/styles/focus = SubResource("StyleBoxTexture_panel")
|
||||||
|
LineEdit/styles/normal = SubResource("StyleBoxTexture_panel")
|
||||||
|
MarginContainer/constants/margin_bottom = 12
|
||||||
|
MarginContainer/constants/margin_left = 14
|
||||||
|
MarginContainer/constants/margin_right = 14
|
||||||
|
MarginContainer/constants/margin_top = 12
|
||||||
|
NinePatchRect/colors/modulate_color = Color(1, 1, 1, 1)
|
||||||
|
Panel/styles/panel = SubResource("StyleBoxTexture_panel")
|
||||||
|
PanelContainer/styles/panel = SubResource("StyleBoxTexture_panel")
|
||||||
|
ProgressBar/colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
|
ProgressBar/font_sizes/font_size = 16
|
||||||
|
ProgressBar/styles/background = SubResource("StyleBoxTexture_panel")
|
||||||
|
RichTextLabel/colors/default_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
|
RichTextLabel/colors/font_outline_color = Color(0.04, 0.03, 0.025, 1)
|
||||||
|
RichTextLabel/constants/line_separation = 3
|
||||||
|
RichTextLabel/constants/outline_size = 1
|
||||||
|
RichTextLabel/font_sizes/bold_font_size = 18
|
||||||
|
RichTextLabel/font_sizes/bold_italics_font_size = 18
|
||||||
|
RichTextLabel/font_sizes/italics_font_size = 18
|
||||||
|
RichTextLabel/font_sizes/mono_font_size = 16
|
||||||
|
RichTextLabel/font_sizes/normal_font_size = 18
|
||||||
|
TabContainer/colors/font_selected_color = Color(1, 0.86, 0.36, 1)
|
||||||
|
TabContainer/colors/font_unselected_color = Color(0.82, 0.72, 0.45, 1)
|
||||||
|
TabContainer/font_sizes/font_size = 18
|
||||||
|
TextureButton/styles/focus = SubResource("StyleBoxTexture_button_hover")
|
||||||
|
Tree/colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
|
Tree/colors/guide_color = Color(0.45, 0.36, 0.16, 1)
|
||||||
|
Tree/colors/relationship_line_color = Color(0.45, 0.36, 0.16, 1)
|
||||||
|
Tree/font_sizes/font_size = 18
|
||||||
|
Tree/styles/focus = SubResource("StyleBoxTexture_panel")
|
||||||
|
Tree/styles/panel = SubResource("StyleBoxTexture_panel")
|
||||||
|
VBoxContainer/constants/separation = 8
|
||||||
|
Window/colors/title_color = Color(1, 0.86, 0.36, 1)
|
||||||
|
Window/font_sizes/title_font_size = 22
|
||||||
|
Window/styles/embedded_border = SubResource("StyleBoxTexture_panel")
|
||||||
|
After Width: | Height: | Size: 2.2 MiB |
@@ -0,0 +1,6 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
|
||||||
|
<circle cx="32" cy="32" r="29" fill="#3f2608"/>
|
||||||
|
<circle cx="32" cy="32" r="25" fill="#d59620" stroke="#ffe58a" stroke-width="4"/>
|
||||||
|
<circle cx="32" cy="32" r="17" fill="#f6bd3a" stroke="#9d5e0e" stroke-width="3"/>
|
||||||
|
<path d="M32 18v28M24 25h13a6 6 0 010 12H27" fill="none" stroke="#6d3d08" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 570 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cn1ylkt1gdri3"
|
||||||
|
path="res://.godot/imported/header_800x54.png-8168d4b03d78332ce9be36d6efc70292.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/header_800x54.png"
|
||||||
|
dest_files=["res://.godot/imported/header_800x54.png-8168d4b03d78332ce9be36d6efc70292.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 135 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c7xpnu2ug8a87"
|
||||||
|
path="res://.godot/imported/illustration_equipement.png-17faa12e99d3eb7822899599360d7b06.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/illustration_equipement.png"
|
||||||
|
dest_files=["res://.godot/imported/illustration_equipement.png-17faa12e99d3eb7822899599360d7b06.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 260 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://lihl4mwt6wbt"
|
||||||
|
path="res://.godot/imported/jauge_focus_pleine.png-64bf27c84c8e05cfa86bf7d4297e8997.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/jauge_focus_pleine.png"
|
||||||
|
dest_files=["res://.godot/imported/jauge_focus_pleine.png-64bf27c84c8e05cfa86bf7d4297e8997.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 256 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c0t0ocoverbbr"
|
||||||
|
path="res://.godot/imported/jauge_vie_pleine.png-75bd04bf86b6c769a3e43d7f6534489d.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/jauge_vie_pleine.png"
|
||||||
|
dest_files=["res://.godot/imported/jauge_vie_pleine.png-75bd04bf86b6c769a3e43d7f6534489d.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 259 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dn58tylg6os7w"
|
||||||
|
path="res://.godot/imported/jauge_xp_pleine.png-45d8a1b9a97caa1a7551aef5f69de77e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/jauge_xp_pleine.png"
|
||||||
|
dest_files=["res://.godot/imported/jauge_xp_pleine.png-45d8a1b9a97caa1a7551aef5f69de77e.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 948 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://nbehix2ncwl3"
|
||||||
|
path="res://.godot/imported/panel_320x200.png-745adcaa92ccb293fc90dc8ce6d3dbe5.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/panel_320x200.png"
|
||||||
|
dest_files=["res://.godot/imported/panel_320x200.png-745adcaa92ccb293fc90dc8ce6d3dbe5.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 1.3 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://do1kj76r5rihi"
|
||||||
|
path="res://.godot/imported/panel_440x270.png-d711f8145df187c64091a8248e4dcbc1.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/panel_440x270.png"
|
||||||
|
dest_files=["res://.godot/imported/panel_440x270.png-d711f8145df187c64091a8248e4dcbc1.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 392 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cf2866mb1kemu"
|
||||||
|
path="res://.godot/imported/panel_64x64_nine_patch_source.png-7ff7dcd49b8e306dc38177a411da730c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/panel_64x64_nine_patch_source.png"
|
||||||
|
dest_files=["res://.godot/imported/panel_64x64_nine_patch_source.png-7ff7dcd49b8e306dc38177a411da730c.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 32 KiB |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b3t2nmqk1h6sy"
|
||||||
|
path="res://.godot/imported/portrait_roger.png-74551b7844d393bf5ec8920cc556e9c7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/portrait_roger.png"
|
||||||
|
dest_files=["res://.godot/imported/portrait_roger.png-74551b7844d393bf5ec8920cc556e9c7.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
|
After Width: | Height: | Size: 218 B |
@@ -0,0 +1,40 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c6l1uyqyf1b3h"
|
||||||
|
path="res://.godot/imported/touche_clavier_vide.png-6931d919c221b025b4da175cc93a8397.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/ui/dark_fantasy/touche_clavier_vide.png"
|
||||||
|
dest_files=["res://.godot/imported/touche_clavier_vide.png-6931d919c221b025b4da175cc93a8397.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/uastc_level=0
|
||||||
|
compress/rdo_quality_loss=0.0
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/channel_remap/red=0
|
||||||
|
process/channel_remap/green=1
|
||||||
|
process/channel_remap/blue=2
|
||||||
|
process/channel_remap/alpha=3
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
# Content, assets, and modding
|
||||||
|
|
||||||
|
## Content shipped with the game
|
||||||
|
|
||||||
|
Authored gameplay data lives under `data/ascii/` as UTF-8 JSON copied from the ASCII project. The game reads it through `ContentLoader` and `ContentCatalog` at startup. Supported files are deliberately explicit:
|
||||||
|
|
||||||
|
| Location | Loaded catalog |
|
||||||
|
| --- | --- |
|
||||||
|
| `items.json`, `enemies.json`, `spells.json`, `achievements.json`, `factions.json`, `loot_tables.json`, `npcs.json`, `traps.json` | Definitions of that named family |
|
||||||
|
| `dialogues/*.json` | Dialogue definitions |
|
||||||
|
| `quests/*.json` | Quest definitions |
|
||||||
|
| `events/*.json` | Narrative/world-event definitions |
|
||||||
|
|
||||||
|
`hero_classes.json`, `races.json`, `perks.json`, `recipes.json`, and `titles.json` are preserved source data. They are consumed by their specific game systems where available but are not generic `ContentCatalog` families. The loader retains a diagnostic for unreadable JSON, a missing `id`, or duplicate supported IDs; it does not silently replace duplicate definitions.
|
||||||
|
|
||||||
|
## Supported modding workflow
|
||||||
|
|
||||||
|
This repository does not provide a runtime mod browser, load order, dependency resolver, code modding API, or guarantee a stable schema. Treat content changes as a source mod/fork:
|
||||||
|
|
||||||
|
1. Create a branch or copy of the source checkout.
|
||||||
|
2. Edit an existing supported JSON file or add a correctly shaped JSON file to `dialogues/`, `quests/`, or `events/`.
|
||||||
|
3. Give each supported definition a non-empty unique string `id` within its family. Keep IDs stable after publishing: saves and references use them.
|
||||||
|
4. Validate JSON syntax and start the project from source.
|
||||||
|
5. Run the relevant test suite and then `./scripts/verify.sh` before distributing your build.
|
||||||
|
6. Re-export desktop artifacts with the G5 build scripts rather than editing a `.pck` or executable in place.
|
||||||
|
|
||||||
|
For a minimal item addition, add an object compatible with the nearby entries in `data/ascii/items.json`, including an `id`. For dialogue, quest, and event additions, copy the structure of a neighboring single-definition file. Existing content is the authoritative schema reference because the port intentionally preserves ASCII definitions rather than introducing a second content format.
|
||||||
|
|
||||||
|
Do not assume every preserved field creates a new behavior. Unsupported content families and unimplemented rules remain data for later port work. Validate a changed item, quest, event, enemy, or dialogue in a real run before release.
|
||||||
|
|
||||||
|
### Save compatibility
|
||||||
|
|
||||||
|
Changing or deleting IDs can make existing save data invalid, incomplete, or semantically different. Back up `user://saves` before testing a mod. Current saves use versioned JSON, and the loader reports unsupported ASCII-migration keys rather than claiming they were kept. There is no automatic migration system for third-party content schema changes.
|
||||||
|
|
||||||
|
### Optional audio customization
|
||||||
|
|
||||||
|
Audio is optional and is intentionally constrained. The game only plays typed `AudioStream` resources registered in `user://audio/audio_import_manifest.tres`; arbitrary files in a folder are neither scanned nor decoded. A safe setup tool or source change must import audio through Godot, create an `AudioImportManifest`, and register only the documented ambience contexts and SFX event names. See [PLAYING.md](PLAYING.md#audio-optional) for those names and silent fallback behavior.
|
||||||
|
|
||||||
|
## Assets and credits
|
||||||
|
|
||||||
|
All shipped binary art is listed in [`assets/ASSET_REGISTRY.md`](../assets/ASSET_REGISTRY.md). The seven unmodified 32×32 dungeon sprites are from the **Dungeon Crawl Stone Soup Full** tile pack and are licensed **CC0 1.0**. The license text is included at [`assets/dcss/LICENSE-CC0-1.0.txt`](../assets/dcss/LICENSE-CC0-1.0.txt). Attribution is not required by CC0; the registry credits the pack voluntarily and records each source path.
|
||||||
|
|
||||||
|
No audio assets ship with the project. Generated screenshots and build output are intentionally untracked (`artifacts/` and `build/`). Preserve licenses and record provenance for every new binary asset or third-party data set you add.
|
||||||
|
|
||||||
|
## Packaging modified content
|
||||||
|
|
||||||
|
A source mod must be exported with the same Godot version and matching export templates used for the base build:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/build-linux.sh
|
||||||
|
./scripts/build-windows.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Linux exports are smoke-launched under X11. Windows exports are file-manifest validated on Linux only; test modified Windows builds on a Windows system before claiming runtime support. The generated Windows manifest lists every distribution file in `build/windows/` so package them together.
|
||||||
|
|
||||||
|
## Intentional limits
|
||||||
|
|
||||||
|
- No in-game mod discovery, mod menu, hot reload, or compatibility promise exists.
|
||||||
|
- Altering scripts, scenes, save serialization, or action routing is code development, not supported data-only modding.
|
||||||
|
- Runtime content loaded from downloaded arbitrary paths is intentionally unsupported.
|
||||||
|
- The project remains a compact prototype: a reached stair exit does not generate a next level, and some parity actions are registered before their complete gameplay rules exist.
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
# Playing Dungeon Crawler World
|
||||||
|
|
||||||
|
Dungeon Crawler World is a desktop Godot prototype. It supports Linux x86_64 and Windows x86_64 exports. The reference display is 1920×1080, but the window is resizable.
|
||||||
|
|
||||||
|
## Install or run
|
||||||
|
|
||||||
|
### Downloaded Linux build
|
||||||
|
|
||||||
|
Extract the Linux archive, then make the executable runnable if your archive tool did not preserve its mode:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
chmod +x DungeonCrawlerWorld.x86_64
|
||||||
|
./DungeonCrawlerWorld.x86_64
|
||||||
|
```
|
||||||
|
|
||||||
|
### Downloaded Windows build
|
||||||
|
|
||||||
|
Keep `DungeonCrawlerWorld.exe` together with every file listed in the adjacent `DungeonCrawlerWorld.exe.manifest` (including the `.pck` sidecar when listed). Open the `.exe` normally. A Windows artifact can be exported from Linux, but its runtime is **not** tested by this project on Linux.
|
||||||
|
|
||||||
|
### Run from a source checkout
|
||||||
|
|
||||||
|
Godot 4.5 is the verified version (Godot 4.2+ is the project minimum):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
"${GODOT_BIN:-$(command -v godot4 || command -v godot)}" --path .
|
||||||
|
```
|
||||||
|
|
||||||
|
To produce a release build yourself, install Godot export templates matching the exact Godot version, then run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/build-linux.sh
|
||||||
|
./scripts/build-windows.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
The Linux script exports `build/linux/DungeonCrawlerWorld.x86_64` and smoke-launches it under X11 (using `xvfb-run` when no `DISPLAY` is set). The Windows script creates `build/windows/DungeonCrawlerWorld.exe` and a manifest; it validates generated files but does not execute Windows software on Linux. Both scripts stop with a specific missing-template message before exporting if the matching templates are unavailable. Set `GODOT_BIN` to choose Godot, or `GODOT_EXPORT_TEMPLATES_DIR` to choose its template directory.
|
||||||
|
|
||||||
|
## Start, save, and load
|
||||||
|
|
||||||
|
Choose **NEW RUN** at the main menu, choose a character, then enter the dungeon. **CONTINUE** loads the most recently updated occupied slot; **LOAD SLOT** opens a specific slot.
|
||||||
|
|
||||||
|
La sauvegarde est **manuelle** : pendant une partie, appuyez sur **V** (fonctionne aussi dans le jeu lancé depuis l’éditeur Godot) ou sur **Ctrl+S** dans une version autonome, puis choisissez l’un des cinq emplacements. Un message confirme l’emplacement écrit. Il n’est pas nécessaire d’avoir un menu Échap et le ciblage ou l’ouverture du panneau de sauvegarde ne consomme aucun tour. Le menu principal expose **CONTINUE** et **LOAD SLOT** pour reprendre la sauvegarde la plus récente ou choisir un emplacement. Les sauvegardes sont des fichiers JSON versionnés dans `user://saves`, nommés `slot1.json` à `slot5.json`. Leur chemin natif dépend de la plateforme. Copiez le dossier `saves` complet pour sauvegarder vos parties hors jeu; ne modifiez pas un fichier pendant son écriture.
|
||||||
|
|
||||||
|
The game recognizes its current schema and can migrate the supported parts of the supplied ASCII save shape. Unsupported legacy keys are reported rather than silently claimed as preserved.
|
||||||
|
|
||||||
|
## Controls
|
||||||
|
|
||||||
|
Press **F1** in a run for the current in-game control list. It is generated from the active input map, so it reflects the inventory binding after you change it in Options.
|
||||||
|
|
||||||
|
| Action | Default control |
|
||||||
|
| --- | --- |
|
||||||
|
| Move north / south / west / east | **W / S / A / D** or arrow keys |
|
||||||
|
| Move north-west / north-east / south-west / south-east | **Q / keypad 9 / Z / C** |
|
||||||
|
| Interact, open doors/chests, use stairs | **Space** or **E** |
|
||||||
|
| Wait | **.** |
|
||||||
|
| Attaque de mêlée | Se déplacer vers la case d’un ennemi adjacent |
|
||||||
|
| Attaque à distance / lancer un sort | **F / X** |
|
||||||
|
| Sauvegarder manuellement | **V** dans le debug Godot, ou **Ctrl+S** en version autonome, puis choisir un emplacement |
|
||||||
|
| Talk / rest | **T / H** |
|
||||||
|
| Inventory / crafting | **I / B** |
|
||||||
|
| Character / quests | **P / J** |
|
||||||
|
| Companion / party | **K / G** |
|
||||||
|
| Achievements / audience / recap | **L / U / Y** |
|
||||||
|
| Factions / moderation | **M / N** |
|
||||||
|
| Minimap expand/collapse | **Tab** |
|
||||||
|
| Options / help | **O / F1** |
|
||||||
|
| Expand journal | **L** (shares the achievements default) |
|
||||||
|
|
||||||
|
Plusieurs commandes ouvrent des panneaux contextuels. Dans les panneaux de sélection, utilisez les flèches pour choisir, **Entrée** ou **Espace** pour confirmer et **Échap** pour annuler. Avec une arme à distance équipée, **F** ouvre les cibles actuellement à portée et en ligne de vue; confirmer le tir consomme immédiatement un tour et les adversaires survivants se déplacent ou attaquent. **K** ouvre les ordres du familier : **Reste en arrière**, **Défends-moi** ou **Attaque à vue**. Dans l’inventaire, utilisez **E** pour équiper, **U** pour utiliser et **D** pour déposer. Dans la boutique, **Tab** change le mode achat/vente.
|
||||||
|
|
||||||
|
## Musique et audio
|
||||||
|
|
||||||
|
Le jeu contient trois ambiances originales intégrées : exploration, combat et danger. L’exploration démarre automatiquement avec la partie et le contexte passe à la musique de combat lors d’un affrontement. Le panneau Options contrôle séparément les volumes Ambiance et Effets.
|
||||||
|
|
||||||
|
La personnalisation reste sécurisée : le jeu ne parcourt et ne décode jamais des fichiers arbitraires. Un manifeste Godot optionnel dans `user://audio/audio_import_manifest.tres` peut remplacer individuellement les ressources intégrées avec des `AudioStream` déjà importés. Il reconnaît les contextes `exploration`, `combat`, `danger` et les effets `attack_given`, `attack_received`, `menu_select`, `menu_cancel`, `item_use`, `death`. Une entrée absente du manifeste utilisateur conserve la ressource intégrée correspondante.
|
||||||
|
|
||||||
|
## Known limitations
|
||||||
|
|
||||||
|
- This is a compact prototype, not a completed commercial release.
|
||||||
|
- The final stair state demonstrates a reached exit; no next level is generated at that point.
|
||||||
|
- Some action-router commands are registered for parity/UI discovery before all have complete gameplay behavior; unavailable actions are journaled rather than silently ignored.
|
||||||
|
- Save slots contain one run each and there is no cloud synchronization.
|
||||||
|
- Only the Linux desktop runtime has an automated smoke launch. Windows output is artifact-validated on Linux but needs a Windows host for runtime validation.
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
# Release checklist — Godot port candidate
|
||||||
|
|
||||||
|
Reviewed 2026-10-04 against the read-only DCWASCII reference at
|
||||||
|
`f25a69bad629c1737c22c2a1080ddd010e024912`. A checked item has executable
|
||||||
|
or recorded evidence; it is not a claim of byte-for-byte terminal-UI equivalence.
|
||||||
|
A release candidate/tag is prohibited until the strict parity gate, clean import,
|
||||||
|
Godot verification, export validation, and ASCII reference suite all pass.
|
||||||
|
|
||||||
|
## Product and content
|
||||||
|
|
||||||
|
- [x] Imported catalog source IDs, generated catalog taxonomy/cardinality, and load-time budget are covered — `test_ascii_content_parity.gd`, `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd`.
|
||||||
|
- [x] Character creation, exploration, combat, inventory/equipment, loot, dialogue, quests, companions/party, progression, factions, audience/recap, achievements/titles, death modes, and graphical feedback have named test evidence in `docs/parity/ASCII_TEST_MATRIX.md`.
|
||||||
|
- [x] Floor-18 descent produces visible victory without floor 19; bounded deep profiles include a floor-15 target above 150 rooms — `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, `test_final_floor_victory_e2e.gd`.
|
||||||
|
- [x] Generated safe rooms stay outside the entrance, include beds/Bobka, and grant repeatable free rations — `test_safe_room_service.gd`, `test_safe_room_generation.gd`, `test_bobka_safe_room_e2e.gd`.
|
||||||
|
- [x] Tourists start at floor 6, cap at one, support selfie audience gain, and are ejected rather than killed with moderation — `test_tourist_service.gd`, `test_tourist_generation.gd`, `test_tourist_dialogue_e2e.gd`.
|
||||||
|
|
||||||
|
## State, deterministic generation, presentation, and distribution
|
||||||
|
|
||||||
|
- [x] Versioned five-slot save/load and actual menu save → restart → load are covered — `test_save_repository.gd`, `test_save_load_e2e.gd`.
|
||||||
|
- [x] Generated-floor connectivity, exit path, and safe population run 100 deterministic seeds — `test_floor_generator_connectivity.gd`, `test_floor_generator_exit_path.gd`, `test_floor_population_safety.gd`.
|
||||||
|
- [x] Visual capture validates initial and exit states — `scripts/run-visual-check.sh`, `scripts/check-visual-capture.py`.
|
||||||
|
- [x] Assets, controls/accessibility, optional audio, source modding, and platform caveats are documented — `assets/ASSET_REGISTRY.md`, `docs/PLAYING.md`, `docs/CONTENT_AND_MODDING.md`.
|
||||||
|
- [x] Linux export smoke and Windows output validation are scripted; the PR-4 command results are recorded in the release evidence document.
|
||||||
|
|
||||||
|
## Strict release gate
|
||||||
|
|
||||||
|
- [x] `./tests/scripts/test_parity_recovery_gate.sh` proves blocked and unowned fixture rows fail while a complete owned fixture passes.
|
||||||
|
- [x] `./tests/scripts/test_parity_gauntlet.sh` covers the full static-gate classifications.
|
||||||
|
- [x] `./scripts/run-parity-gauntlet.sh --matrix-only` requires every row to be `ported`, `replaced`, or explicitly justified `not_applicable` with evidence.
|
||||||
|
- [x] PR-4 command outcomes, ASCII revision/count, and final tag decision are recorded in `docs/release/RC-2026-10-04-evidence.md`.
|
||||||
|
- [x] Every required gate is green; create the local `v0.1.0-rc1` tag only after the evidence commit. Do not push it from this worktree.
|
||||||
|
|
||||||
|
**Disposition: eligible for a local release-candidate tag. The evidence record,
|
||||||
|
not a partial pass or unavailable verification, is the tag authority.**
|
||||||
@@ -1,51 +1,57 @@
|
|||||||
# ASCII test parity matrix
|
# ASCII test parity matrix
|
||||||
|
|
||||||
Scope: every `DCWASCII/tests/test_*.py` module as inventoried on 2026-10-02. Status is deliberately conservative: **blocked** means the behavior is not yet available in the Godot port and its named slice owns the replacement; **replaced** means the original module's applicable contract is covered by a Godot test with a stated target owner. No row is unclassified.
|
Scope: every `DCWASCII/tests/test_*.py` module, inventoried against the read-only
|
||||||
|
reference checkout at commit `f25a69bad629c1737c22c2a1080ddd010e024912` on
|
||||||
|
2026-10-04. **Replaced** means a graphical/deterministic Godot contract covers
|
||||||
|
the applicable player-facing behavior; it does **not** claim byte-for-byte or
|
||||||
|
terminal-UI equivalence. `not_applicable` requires an explicit justification.
|
||||||
|
|
||||||
| ASCII module | Status | Godot evidence / planned owner |
|
| ASCII module | Status | Godot evidence / target owner |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| `test_achievements.py` | blocked | F3 — `test_achievements.gd` / achievement reward E2E |
|
| `test_achievements.py` | replaced | F3 — `test_achievements.gd`, `test_achievement_reward_e2e.gd` |
|
||||||
| `test_audience.py` | blocked | F4 — `test_audience.gd` |
|
| `test_audience.py` | replaced | F4 — `test_audience.gd`, `test_audience_episode_e2e.gd` |
|
||||||
| `test_audio.py` | blocked | G3 — `test_audio_playback.gd` / audio settings E2E |
|
| `test_audio.py` | replaced | G3 — `test_audio_library.gd`, `test_audio_playback.gd`, `test_audio_settings_e2e.gd` |
|
||||||
| `test_beds_stairs.py` | blocked | B5–B6 — floor transition/deadline tests |
|
| `test_beds_stairs.py` | replaced | B6/D4 — `test_floor_deadline.gd`, `test_shop_rest_e2e.gd`, `test_stair_deadline_e2e.gd` |
|
||||||
| `test_bulk_content.py` | replaced | A1 `test_ascii_content_parity.gd`; D6 owns bulk performance/catalog UI |
|
| `test_bulk_content.py` | replaced | A1/D6 — `test_ascii_content_parity.gd`, `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||||
| `test_combat.py` | blocked | C2 — `test_melee_combat.gd` / melee feedback E2E |
|
| `test_combat.py` | replaced | C2 — `test_melee_combat.gd`, `test_melee_feedback_e2e.gd`, `test_combat_hud_e2e.gd` |
|
||||||
| `test_companion.py` | blocked | E4 — `test_companion.gd` |
|
| `test_companion.py` | replaced | E4 — `test_companion.gd`, `test_pet_companion_e2e.gd` |
|
||||||
| `test_companion_support.py` | blocked | E4 — `test_companion_support.gd` |
|
| `test_companion_support.py` | replaced | E4 — `test_companion_support.gd` |
|
||||||
| `test_countdown_moderation.py` | blocked | B6 / F5 — floor deadline and moderation tests |
|
| `test_countdown_moderation.py` | replaced | B6/F5 — `test_floor_deadline.gd`, `test_moderation_event_e2e.gd` |
|
||||||
| `test_crafting.py` | blocked | D5 — `test_crafting.gd` / crafting E2E |
|
| `test_crafting.py` | replaced | D5 — `test_crafting.gd`, `test_crafting_e2e.gd` |
|
||||||
| `test_dialogue.py` | blocked | E1 — `test_dialogue.gd` / NPC dialogue E2E |
|
| `test_dialogue.py` | replaced | E1 — `test_dialogue.gd`, `test_dialogue_e2e.gd` |
|
||||||
| `test_economy.py` | blocked | D4 — `test_economy.gd` / shop-rest E2E |
|
| `test_economy.py` | replaced | D4 — `test_economy.gd`, `test_shop_rest_e2e.gd` |
|
||||||
| `test_factions.py` | blocked | F5 — `test_factions.gd` |
|
| `test_factions.py` | replaced | F5 — `test_factions.gd`, `test_moderation_event_e2e.gd` |
|
||||||
| `test_floor_zero.py` | blocked | B5 — `test_floor_transition.gd` / descend E2E |
|
| `test_floor_zero.py` | replaced | B5 — `test_surface_floor_transition.gd`, `test_door_to_stairs_exit_e2e.gd`, `test_menu_multi_floor_e2e.gd` |
|
||||||
| `test_generation.py` | blocked | B2–B4 — generator/population integration tests |
|
| `test_generation.py` | replaced | B2–B4 — `test_floor_generator_connectivity.gd`, `test_floor_generator_exit_path.gd`, `test_floor_population_safety.gd` |
|
||||||
| `test_guilds.py` | blocked | B3 / E1 — guild room and dialogue tests |
|
| `test_guilds.py` | replaced | B3/E1 — `test_floor_generator_rooms.gd`, `test_dialogue.gd` |
|
||||||
| `test_healing_system.py` | blocked | C1 / D4 — status and safe-rest tests |
|
| `test_healing_system.py` | replaced | C1/D4 — `test_status_effects.gd`, `test_shop_rest_e2e.gd` |
|
||||||
| `test_hero_classes.py` | blocked | F2 — `test_hero_classes.gd` |
|
| `test_hero_classes.py` | replaced | F2 — `test_hero_classes.gd`, `test_floor_three_choice_e2e.gd` |
|
||||||
| `test_identification.py` | blocked | D3 — `test_identification.gd` |
|
| `test_identification.py` | replaced | D3 — `test_identification.gd` |
|
||||||
| `test_inventory.py` | blocked | D1 — `test_inventory.gd` / pickup E2E |
|
| `test_inventory.py` | replaced | D1 — `test_inventory.gd`, `test_pickup_inventory_e2e.gd`, `test_equip_use_item_e2e.gd` |
|
||||||
| `test_item_details.py` | blocked | D3 — equipment/inventory detail tests |
|
| `test_item_details.py` | replaced | D3 — `test_equipment.gd`, `test_identification.gd`, `test_equip_use_item_e2e.gd` |
|
||||||
| `test_kill_method_gold.py` | blocked | C2 / D4 — combat and economy tests |
|
| `test_kill_method_gold.py` | replaced | C2/D4 — `test_melee_combat.gd`, `test_economy.gd` |
|
||||||
| `test_limb_wounds.py` | blocked | C2 — `test_limb_wounds.gd` |
|
| `test_limb_wounds.py` | replaced | C2 — `test_limb_wounds.gd` |
|
||||||
| `test_loot.py` | blocked | D2 — `test_loot_resolver.gd` / chest E2E |
|
| `test_loot.py` | replaced | D2 — `test_loot_resolver.gd`, `test_world_chest_loot_e2e.gd` |
|
||||||
| `test_magic.py` | blocked | C5 — `test_magic.gd` / spell E2E |
|
| `test_magic.py` | replaced | C5 — `test_magic.gd`, `test_spell_casting_e2e.gd` |
|
||||||
| `test_map_persistence.py` | blocked | B5 — floor transition persistence tests |
|
| `test_map_persistence.py` | replaced | A4/B5/G1 — `test_map_renderer_fog.gd`, `test_surface_floor_transition.gd`, `test_save_repository.gd` |
|
||||||
| `test_menu_scrolling.py` | blocked | G2 / D6 — full UI navigation and large-catalog E2E |
|
| `test_menu_scrolling.py` | replaced | G2/D6 — `test_full_ui_navigation_e2e.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||||
| `test_minimap.py` | blocked | G2 — `test_minimap.gd` |
|
| `test_minimap.py` | replaced | G2 — `test_minimap.gd`, `test_black_fog_e2e.gd` |
|
||||||
| `test_narrative_resurrection.py` | blocked | F6 — death/resurrection tests |
|
| `test_narrative_resurrection.py` | replaced | F6 — `test_death_resurrection.gd`, `test_death_mode_e2e.gd` |
|
||||||
| `test_party_system.py` | blocked | E5 — `test_party_system.gd` / recruit-party E2E |
|
| `test_party_system.py` | replaced | E5 — `test_party_system.gd`, `test_recruit_party_e2e.gd` |
|
||||||
| `test_playtest_fixes.py` | blocked | G6 — full parity regression gauntlet |
|
| `test_playtest_fixes.py` | replaced | G6 — `test_achievements.gd`, `test_floor_deadline.gd`, `test_world_chest_loot_e2e.gd` |
|
||||||
| `test_playtest_v2.py` | blocked | G6 — full parity regression gauntlet |
|
| `test_playtest_v2.py` | ported | PR-1 — `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, and real `test_final_floor_victory_e2e.gd` cover bounded deep generation, floor-18 victory, and no floor 19. |
|
||||||
| `test_quests.py` | blocked | E3 — `test_quests.gd` / quest lifecycle E2E |
|
| `test_quests.py` | replaced | E3 — `test_quests.gd`, `test_quest_lifecycle_e2e.gd` |
|
||||||
| `test_quests_v3.py` | blocked | E3 — `test_quests.gd` / quest lifecycle E2E |
|
| `test_quests_v3.py` | replaced | E3 — `test_quests.gd`, `test_quest_lifecycle_e2e.gd` |
|
||||||
| `test_race_class.py` | blocked | F2 — `test_race_class.gd` |
|
| `test_race_class.py` | replaced | F2 — `test_race_class.gd`, `test_floor_three_choice_e2e.gd` |
|
||||||
| `test_real_time_deadline.py` | blocked | B6 — `test_floor_deadline.gd` |
|
| `test_real_time_deadline.py` | replaced | B6 — `test_floor_deadline.gd`, `test_stair_deadline_e2e.gd` |
|
||||||
| `test_realworld_items.py` | blocked | D6 — bulk-content loading and catalog UI E2E |
|
| `test_realworld_items.py` | replaced | D6 — `test_bulk_content_loading.gd`, `test_large_catalog_menu_e2e.gd` |
|
||||||
| `test_recap.py` | blocked | F4 — `test_recap.gd` |
|
| `test_recap.py` | replaced | F4 — `test_recap.gd`, `test_audience_episode_e2e.gd` |
|
||||||
| `test_safe_rooms_bobka.py` | blocked | B3 / D4 / E1 — sanctuary, rest, and dialogue tests |
|
| `test_safe_rooms_bobka.py` | ported | PR-2 — `test_safe_room_service.gd`, `test_safe_room_generation.gd`, and real `test_bobka_safe_room_e2e.gd` cover non-entrance safe rooms, beds, Bobka, and repeatable free rations. |
|
||||||
| `test_save.py` | blocked | G1 — save repository/migration/load E2E |
|
| `test_save.py` | replaced | G1 — `test_save_repository.gd`, `test_ascii_save_migration.gd`, `test_save_load_e2e.gd` |
|
||||||
| `test_syndicate.py` | blocked | F5 — `test_syndicate.gd` |
|
| `test_syndicate.py` | replaced | F5 — `test_syndicate.gd`, `test_moderation_event_e2e.gd` |
|
||||||
| `test_titles.py` | blocked | F3 — `test_titles.gd` |
|
| `test_titles.py` | replaced | F3 — `test_titles.gd`, `test_achievement_reward_e2e.gd` |
|
||||||
| `test_tourists.py` | blocked | E1 — NPC dialogue E2E |
|
| `test_tourists.py` | ported | PR-3 — `test_tourist_service.gd`, `test_tourist_generation.gd`, and real `test_tourist_dialogue_e2e.gd` cover floor-six/capped spawning, selfie audience gain, and protected ejection with moderation. |
|
||||||
|
|
||||||
**Classification totals:** 1 replaced, 42 blocked, 0 ported, 0 not_applicable, 0 unclassified. `test_bulk_content.py` is replaced only for A1's source-id/catalog-cardinality contract; its generated-content behavioral and performance coverage remains blocked on D6.
|
**Classification totals:** 40 replaced, 0 blocked, 3 ported, 0 not_applicable,
|
||||||
|
0 unclassified. Every row has named Godot proof. The release gate remains strict:
|
||||||
|
any future blocked, unowned, invalid, or unjustified `not_applicable` row fails it.
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
# v0.1.0-rc1 release evidence — PR-4
|
||||||
|
|
||||||
|
**Recorded:** 2026-10-05
|
||||||
|
|
||||||
|
This is the release decision record for the PR-4 parity re-gate. It covers the
|
||||||
|
Godot worktree based on `be89171` plus the PR-4 changes recorded with this
|
||||||
|
document. The ASCII reference was used read-only at
|
||||||
|
`f25a69bad629c1737c22c2a1080ddd010e024912`; it was not modified.
|
||||||
|
|
||||||
|
## Gate results
|
||||||
|
|
||||||
|
| Required gate | Command | Result | Evidence / count |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| Recovery-gate regression | `./tests/scripts/test_parity_recovery_gate.sh` | PASS | A complete owned fixture passed; blocked and unowned fixtures failed as required. |
|
||||||
|
| Static gauntlet contracts | `./tests/scripts/test_parity_gauntlet.sh` | PASS | Valid `ported`, `replaced`, and justified `not_applicable` fixtures passed; blocked, unowned, unjustified, and unknown fixtures failed. |
|
||||||
|
| Strict matrix gate | `./scripts/run-parity-gauntlet.sh --matrix-only` | PASS | 43 rows, 0 invalid. Matrix totals: 40 replaced, 3 ported, 0 blocked, 0 not applicable, 0 unclassified. |
|
||||||
|
| Clean Godot verification | `rm -rf .godot artifacts && GODOT_BIN=/snap/bin/godot4 ./scripts/verify.sh` | PASS | Godot 4.5.stable.official.876b29033; 65 unit scripts / 197 tests / 2,450 assertions, 12 integration scripts / 17 tests / 235,740 assertions, and 46 E2E scripts / 61 tests / 615 assertions: 275 tests and 238,805 assertions total. Visual initial and exit captures passed. |
|
||||||
|
| Full release gauntlet | `GODOT_BIN=/snap/bin/godot4 ./scripts/run-parity-gauntlet.sh` | PASS | Matrix: 43 rows, 0 invalid. Save repository 3 tests / 40 assertions; save/load E2E 1 / 14; connectivity seeds 1 / 3,900; exit-path seeds 1 / 5,050; population seeds 1 / 155,834. All 7 tests / 164,838 assertions passed. |
|
||||||
|
| Export-script contract | `./tests/scripts/test_export_scripts.sh` | PASS | Both Linux/X11 and Windows Desktop scripts reject missing matching templates before export. |
|
||||||
|
| Linux export and smoke | `GODOT_BIN=/snap/bin/godot4 ./scripts/build-linux.sh` | PASS | Exported `build/linux/DungeonCrawlerWorld.x86_64` and completed X11 capture-mode smoke launch. |
|
||||||
|
| Windows export validation | `GODOT_BIN=/snap/bin/godot4 ./scripts/build-windows.sh` | PASS | Exported `build/windows/DungeonCrawlerWorld.exe` and validated its distribution manifest. Windows runtime was not executed on this Linux host. |
|
||||||
|
| ASCII reference suite (read-only) | `python3 -m pytest -q tests` in `DCWASCII` | PASS | 462 passed in 186.21s. Reference HEAD remained `f25a69bad629c1737c22c2a1080ddd010e024912`; its only pre-existing status entry before and after was untracked `CLAUDE.md`. |
|
||||||
|
|
||||||
|
The Godot runners emitted existing GUT resource-UID and resource-leak warnings,
|
||||||
|
but no `SCRIPT ERROR` or `Parse Error`; their exit statuses were zero. The
|
||||||
|
visual/export scripts apply their documented error filters and passed.
|
||||||
|
|
||||||
|
## Matrix evidence audited in this re-gate
|
||||||
|
|
||||||
|
The only PR-4 matrix classification changes for recovered gaps have named proof:
|
||||||
|
|
||||||
|
- `test_playtest_v2.py` — PR-1's `test_deep_floor_profile.gd`,
|
||||||
|
`test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, and
|
||||||
|
`test_final_floor_victory_e2e.gd`.
|
||||||
|
- `test_safe_rooms_bobka.py` — PR-2's `test_safe_room_service.gd`,
|
||||||
|
`test_safe_room_generation.gd`, and `test_bobka_safe_room_e2e.gd`.
|
||||||
|
- `test_tourists.py` — PR-3's `test_tourist_service.gd`,
|
||||||
|
`test_tourist_generation.gd`, and `test_tourist_dialogue_e2e.gd`.
|
||||||
|
|
||||||
|
The matrix is release-blocking: any future blocked, unowned, invalid, or
|
||||||
|
unjustified `not_applicable` row makes the strict gate fail.
|
||||||
|
|
||||||
|
## RC decision
|
||||||
|
|
||||||
|
**Eligible and approved for a local `v0.1.0-rc1` tag.** Every required gate
|
||||||
|
above is green. Per the PR-4 instruction, no branch, commit, tag, or pull
|
||||||
|
request is pushed; the local tag is created only after the evidence commit.
|
||||||
@@ -0,0 +1,514 @@
|
|||||||
|
# Parity Recovery Before Release Candidate Implementation Plan
|
||||||
|
|
||||||
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use `subagent-driven-development` (recommended) or `executing-plans` to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
|
**Goal:** Close the three honest Godot-vs-DCWASCII parity gaps found by G6—final-floor victory/deep-floor scale, safe rooms with Bobka, and tourists—then rerun the strict release-candidate gate without weakening its rules.
|
||||||
|
|
||||||
|
**Architecture:** The existing Godot domain remains authoritative at runtime. The three recovery slices extend the deterministic floor generator, `RunState`, dialogue/effect plumbing, audience/moderation, and floor transition services through explicit data-backed contracts; they do not invoke Python/ASCII during play. The current local G6 branch is treated as release-gate tooling only: it is rebased onto the recovery integration head in the final task, where its strict matrix can become green honestly.
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.5, GDScript, GUT, Godot real-scene E2E, Bash/Python standard-library verification, Xvfb, Gitea local, Kanita.
|
||||||
|
|
||||||
|
**Spec:**
|
||||||
|
- `docs/superpowers/plans/2026-10-02-full-dcwascii-godot-port.md`
|
||||||
|
- `DCWASCII/tests/test_playtest_v2.py`
|
||||||
|
- `DCWASCII/tests/test_safe_rooms_bobka.py`
|
||||||
|
- `DCWASCII/tests/test_tourists.py`
|
||||||
|
- `DCWASCII/dcw/world/generator.py`
|
||||||
|
- `DCWASCII/dcw/game.py`
|
||||||
|
- `DCWASCII/dcw/conditions.py`
|
||||||
|
- `DCWASCII/dcw/config.py`
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Never modify `DCWASCII`; its code and tests are read-only behavioral oracles.
|
||||||
|
- Preserve the Godot game as a native GDScript executable; no Python process or Python content loader at runtime.
|
||||||
|
- Use the imported `data/ascii/` JSON identifiers/text unchanged.
|
||||||
|
- Every slice follows: focused RED proof → minimal GREEN → GUT/unit/integration → real `Game.tscn` E2E → clean-worktree import → Xvfb capture when presentation changes → independent review → Gitea PR.
|
||||||
|
- A release candidate is forbidden while any row in `docs/parity/ASCII_TEST_MATRIX.md` is `blocked`, unowned, invalid, or unjustified `not_applicable`.
|
||||||
|
- The final floor is **18**, matching `DCWASCII/dcw/config.py::FINAL_FLOOR`.
|
||||||
|
- Per-floor deadline is **15 days on floor 1 + 5 days per later floor**, with **20 turns/day**, matching the existing B6 Godot constants and ASCII config.
|
||||||
|
- Safe room kinds are exactly `refuge` and `sanctuary`; the entrance is never safe and never contains a bed or Bobka.
|
||||||
|
- Tourist content begins on floor **6**, has at most one tourist per floor, and never creates a real enemy death.
|
||||||
|
- No unrelated asset changes. New UI/content assets require an entry in `assets/ASSET_REGISTRY.md`.
|
||||||
|
- Reports, red logs, review packages and Kanita state live in ignored `.superpowers/` / `.claude/`, never in the product tree.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Recovery graph and Kanita shape
|
||||||
|
|
||||||
|
The generation, population and dialogue services overlap, so the corrective implementation intentionally avoids unsafe parallel edits.
|
||||||
|
|
||||||
|
```text
|
||||||
|
PR-1 Endgame/deep floors ──► PR-2 Safe rooms/Bobka ──► PR-3 Tourists ──► PR-4 Parity re-gate / RC decision
|
||||||
|
```
|
||||||
|
|
||||||
|
| Slice | Track | True blocker | Why it must wait |
|
||||||
|
| --- | --- | --- | --- |
|
||||||
|
| PR-1 | `world/final-floor` | none | Establishes final-floor and scale contracts used by later generated floors. |
|
||||||
|
| PR-2 | `world/safe-room` | PR-1 | Both change the floor generator and floor population invariants. |
|
||||||
|
| PR-3 | `world/tourists` | PR-2 | Shares NPC population and dialogue/effect application with Bobka. |
|
||||||
|
| PR-4 | `release/parity` | PR-1, PR-2, PR-3 | Rebases/reuses G6 gate only after all three matrix rows are truly covered. |
|
||||||
|
|
||||||
|
**Kanita proposal:** create one new project named `DCW — Parity Recovery Before RC`; one list and one agent task per PR-1 through PR-4; exactly six checklist items per task: brief, RED, GREEN, integration/E2E, clean verify/capture, review/PR.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Files and contracts fixed by this plan
|
||||||
|
|
||||||
|
| Area | Create/modify | Responsibility |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Final-floor rules | `scripts/domain/world/floor_generator.gd`, `scripts/domain/run/floor_transition.gd`, `scripts/domain/run/floor_deadline.gd`, `scripts/domain/run/run_state.gd` | Deep scale, final floor, victory and no floor 19. |
|
||||||
|
| Safe rooms | `scripts/domain/world/floor_generator.gd`, `scripts/domain/world/floor_populator.gd`, `scripts/domain/world/special_interactions.gd`, dialogue effect bridge | Guaranteed safe room, bed, Bobka and repeatable ration. |
|
||||||
|
| Tourist system | `scripts/domain/world/floor_populator.gd`, `scripts/domain/dialogue/dialogue_engine.gd`, `scripts/domain/combat/condition_engine.gd`, `scripts/domain/meta/audience_state.gd`, `scripts/domain/meta/moderation.gd` | Spawn, selfie, protected health/ejection and moderation. |
|
||||||
|
| Release gate | `docs/parity/ASCII_TEST_MATRIX.md`, `scripts/run-parity-gauntlet.sh`, `docs/RELEASE_CHECKLIST.md`, `tests/scripts/test_parity_gauntlet.sh` | Honest all-green parity decision. |
|
||||||
|
|
||||||
|
### Frozen recovery contracts
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
# Final-floor and generated scale
|
||||||
|
const FINAL_FLOOR := 18
|
||||||
|
func FloorGenerator.generation_profile(floor_number: int) -> Dictionary
|
||||||
|
# Returns deterministic map size, target room count and room size range.
|
||||||
|
|
||||||
|
func FloorTransition.try_descend(run: RunState) -> Array[GameEvent]
|
||||||
|
# At FINAL_FLOOR produces `game_victory`; it never creates floor 19.
|
||||||
|
|
||||||
|
# Safe rooms
|
||||||
|
func FloorState.safe_rooms() -> Array[RoomState]
|
||||||
|
func SafeRoomService.can_rest(floor: FloorState, cell: Vector2i) -> bool
|
||||||
|
func SafeRoomService.give_bobka_ration(run: RunState, npc_id: StringName) -> Array[GameEvent]
|
||||||
|
# Repeated calls are allowed; each successful call grants one consumable_ration and zero gold.
|
||||||
|
|
||||||
|
# Tourists
|
||||||
|
func TouristService.try_spawn(floor: FloorState, catalog: ContentCatalog, rng: DeterministicRng) -> Array[GameEvent]
|
||||||
|
func TouristService.selfie(run: RunState, tourist_id: StringName) -> Array[GameEvent]
|
||||||
|
func TouristService.endanger(run: RunState, tourist_id: StringName, amount: int) -> Array[GameEvent]
|
||||||
|
# At zero hidden health: `tourist_ejected`, not `actor_died`; exactly one moderation strike is emitted.
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task PR-1: Deep-floor scale, final-floor victory and endgame
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/world/floor_generator.gd`
|
||||||
|
- Modify: `scripts/domain/world/room_graph.gd`
|
||||||
|
- Modify: `scripts/domain/run/floor_transition.gd`
|
||||||
|
- Modify: `scripts/domain/run/floor_deadline.gd`
|
||||||
|
- Modify: `scripts/domain/run/run_state.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`, `scripts/presentation/hud.gd`, `scenes/Game.tscn`
|
||||||
|
- Create: `scripts/domain/run/endgame_state.gd`
|
||||||
|
- Create: `scenes/ui/VictoryPanel.tscn`, `scripts/presentation/victory_panel.gd`
|
||||||
|
- Create: `tests/unit/test_deep_floor_profile.gd`
|
||||||
|
- Create: `tests/unit/test_final_floor_victory.gd`
|
||||||
|
- Create: `tests/integration/test_deep_floor_generation.gd`
|
||||||
|
- Create: `tests/e2e/test_final_floor_victory_e2e.gd`
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md`
|
||||||
|
|
||||||
|
**Consumes:** `FloorState`, `RoomGraph`, B5 `FloorTransition`, B6 `FloorDeadline`.
|
||||||
|
|
||||||
|
**Produces:** deterministic deep-floor profile, final-floor win state, `game_victory` event and a visible victory panel.
|
||||||
|
|
||||||
|
**Behavioral contract:**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func FloorGenerator.generation_profile(floor_number: int) -> Dictionary:
|
||||||
|
# floor 1 is strictly smaller than floor 12.
|
||||||
|
# floor 15 has target_rooms > 150.
|
||||||
|
# profile must be bounded so the generated map remains valid in Godot.
|
||||||
|
|
||||||
|
func FloorTransition.try_descend(run: RunState) -> Array[GameEvent]:
|
||||||
|
# if run.current_floor == 18 and eligible, append game_victory,
|
||||||
|
# set run.endgame_state.victory = true, and never allocate floor 19.
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write failing deep-floor profile tests**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_floor_fifteen_targets_more_than_one_hundred_fifty_rooms() -> void:
|
||||||
|
var profile := FloorGenerator.generation_profile(15)
|
||||||
|
assert_gt(int(profile["target_room_count"]), 150)
|
||||||
|
|
||||||
|
func test_deeper_profiles_have_more_rooms_than_shallow_profiles() -> void:
|
||||||
|
assert_gt(
|
||||||
|
int(FloorGenerator.generation_profile(12)["target_room_count"]),
|
||||||
|
int(FloorGenerator.generation_profile(2)["target_room_count"])
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 2: Run the focused test and retain RED proof**
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/test-unit.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: failure because `generation_profile` / final-floor contract does not exist or room target remains the fixed B2 count.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Implement bounded deterministic scale**
|
||||||
|
|
||||||
|
Implement a floor-number profile with the ASCII intent:
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
var target_room_count := mini(500, 150 + floor_number * 20)
|
||||||
|
var map_width := mini(700, 180 + floor_number * 30)
|
||||||
|
var map_height := mini(350, 90 + floor_number * 15)
|
||||||
|
```
|
||||||
|
|
||||||
|
Do not naïvely allocate/render a 700×350 sprite node per cell. Keep `GridMapState` data scalable and make `MapRenderer` only draw the current camera/FOV viewport if existing rendering is otherwise O(map area) per frame. Add a generated-floor integration test at floors 2, 12 and 15 that checks profile scale, room count, non-overlap, entry/exit reachability and no process timeout.
|
||||||
|
|
||||||
|
- [ ] **Step 4: Write failing final-floor victory test**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_descending_from_eligible_final_floor_marks_victory_without_floor_nineteen() -> void:
|
||||||
|
var run := _run_at_final_eligible_stairs()
|
||||||
|
var events := FloorTransition.try_descend(run)
|
||||||
|
assert_true(run.endgame_state.victory)
|
||||||
|
assert_true(events.any(func(event): return event.kind == &"game_victory"))
|
||||||
|
assert_false(run.floors.has(19))
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 5: Implement victory state and presentation**
|
||||||
|
|
||||||
|
Implement `EndgameState`; route final-floor descent to `game_victory`, recap/audience-compatible event and `VictoryPanel`. Preserve normal B6 early-stairs gate. Heal/transition semantics for non-final floors remain unchanged.
|
||||||
|
|
||||||
|
- [ ] **Step 6: Add true-scene endgame E2E**
|
||||||
|
|
||||||
|
Create a deterministic final-floor fixture, set the staircase eligibility through the public deadline seam, send real interact input, then assert:
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
assert_true(game.get_run_state().endgame_state.victory)
|
||||||
|
assert_true(victory_panel.visible)
|
||||||
|
assert_string_contains(victory_panel.get_display_text(), "vaincu")
|
||||||
|
assert_false(game.get_run_state().floors.has(19))
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 7: Verify and commit**
|
||||||
|
|
||||||
|
Run:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/test-unit.sh
|
||||||
|
./scripts/test-integration.sh
|
||||||
|
./scripts/test-e2e.sh
|
||||||
|
DISPLAY= ./scripts/verify.sh
|
||||||
|
git diff --check
|
||||||
|
```
|
||||||
|
|
||||||
|
Commit:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git add scripts scenes tests docs/parity
|
||||||
|
git commit -m "feat: add final floor victory and deep generation scale"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task PR-2: Safe rooms, beds and Bobka’s repeatable free ration
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/world/floor_generator.gd`
|
||||||
|
- Modify: `scripts/domain/world/floor_populator.gd`
|
||||||
|
- Modify: `scripts/domain/world/special_interactions.gd`
|
||||||
|
- Modify: `scripts/domain/dialogue/dialogue_engine.gd`
|
||||||
|
- Modify: `scripts/domain/combat/condition_engine.gd`
|
||||||
|
- Modify: `scripts/domain/run/run_state.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`, `scripts/presentation/hud.gd`
|
||||||
|
- Create: `scripts/domain/world/safe_room_service.gd`
|
||||||
|
- Create: `tests/unit/test_safe_room_service.gd`
|
||||||
|
- Create: `tests/integration/test_safe_room_generation.gd`
|
||||||
|
- Create: `tests/e2e/test_bobka_safe_room_e2e.gd`
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md`
|
||||||
|
|
||||||
|
**Consumes:** PR-1 generation profile and current safe room room kinds; E1 dialogue effects; D1 inventory; D4 rest/economy.
|
||||||
|
|
||||||
|
**Produces:** explicit safe-room service, beds and Bobka data population, repeatable no-cost ration grant.
|
||||||
|
|
||||||
|
**Behavioral contract:**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
const SAFE_ROOM_KINDS := [&"refuge", &"sanctuary"]
|
||||||
|
|
||||||
|
func SafeRoomService.is_safe_room(room: RoomState) -> bool
|
||||||
|
func SafeRoomService.validate_floor(floor: FloorState) -> PackedStringArray
|
||||||
|
# returns diagnostics; empty means entrance is not safe, entrance has no bed,
|
||||||
|
# and at least one non-entrance safe room exists.
|
||||||
|
|
||||||
|
func SafeRoomService.give_bobka_ration(run: RunState, npc_id: StringName) -> Array[GameEvent]
|
||||||
|
# one `item_granted` and one `bobka_ration_given`; zero gold mutation;
|
||||||
|
# it intentionally remains repeatable across dialogue sessions.
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write failing 20-seed safe-room tests**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_entrance_is_never_safe_and_has_no_bed() -> void:
|
||||||
|
for seed_index in range(20):
|
||||||
|
var floor := _generate(4, "SAFE-START-%d" % seed_index)
|
||||||
|
var entrance_room := floor.room_at(floor.entrance)
|
||||||
|
assert_false(entrance_room.kind in SafeRoomService.SAFE_ROOM_KINDS)
|
||||||
|
assert_false(floor.metadata.get("bed_cells", []).has(floor.entrance))
|
||||||
|
|
||||||
|
func test_every_generated_floor_has_a_non_entrance_safe_room() -> void:
|
||||||
|
for seed_index in range(20):
|
||||||
|
assert_gt(_generate(4, "SAFE-%d" % seed_index).safe_rooms().size(), 0)
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 2: Run RED proof**
|
||||||
|
|
||||||
|
Run the focused unit/integration suite. Expected: current Godot generation either does not guarantee a safe room for every seed, populates no Bobka, or uses bed placement without a service contract.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Implement generator and population guarantees**
|
||||||
|
|
||||||
|
During `_assign_room_kinds`, reserve exactly one candidate room other than entrance/exit as `refuge` or `sanctuary` when none has been selected. Materialize one bed in each safe room, never in entrance. `FloorPopulator` adds one `npc_bobka` in each safe room only if a non-bed floor tile is free. Keep rooms/cells deterministic.
|
||||||
|
|
||||||
|
- [ ] **Step 4: Write failing Bobka effect test**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_bobka_ration_is_repeatable_and_free() -> void:
|
||||||
|
var run := _run_with_bobka()
|
||||||
|
var gold_before := run.gold
|
||||||
|
SafeRoomService.give_bobka_ration(run, &"npc_bobka_00")
|
||||||
|
SafeRoomService.give_bobka_ration(run, &"npc_bobka_00")
|
||||||
|
assert_eq(run.inventory.count_by_definition(&"consumable_ration"), 2)
|
||||||
|
assert_eq(run.gold, gold_before)
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 5: Wire dialogue and UI**
|
||||||
|
|
||||||
|
Map `give_item` in Bobka’s imported dialogue to the inventory service, preserving content `dlg_bobka`. No one-shot guard may be added. Show a clear event/log message and inventory update after every ration.
|
||||||
|
|
||||||
|
- [ ] **Step 6: Add true-scene E2E**
|
||||||
|
|
||||||
|
Generate deterministic safe-room floor; interact with Bobka through the dialogue panel three separate times and choose “Prendre une ration.” Assert three rations, unchanged gold, bed/rest prompt and safe-room marker. Verify no starting spawn is safe.
|
||||||
|
|
||||||
|
- [ ] **Step 7: Verify and commit**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/test-unit.sh
|
||||||
|
./scripts/test-integration.sh
|
||||||
|
./scripts/test-e2e.sh
|
||||||
|
DISPLAY= ./scripts/verify.sh
|
||||||
|
git diff --check
|
||||||
|
git commit -m "feat: add safe rooms and repeatable Bobka rations"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task PR-3: Tourists, selfies and protected ejection
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/world/floor_populator.gd`
|
||||||
|
- Modify: `scripts/domain/world/spawn_rules.gd`
|
||||||
|
- Modify: `scripts/domain/entities/party_state.gd` only if NPC collection helpers are shared
|
||||||
|
- Modify: `scripts/domain/dialogue/dialogue_engine.gd`
|
||||||
|
- Modify: `scripts/domain/combat/condition_engine.gd`
|
||||||
|
- Modify: `scripts/domain/meta/audience_state.gd`
|
||||||
|
- Modify: `scripts/domain/meta/moderation.gd`
|
||||||
|
- Modify: `scripts/domain/meta/achievement_manager.gd`
|
||||||
|
- Modify: `scripts/domain/run/run_state.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`, dialogue panel/HUD as required
|
||||||
|
- Create: `scripts/domain/world/tourist_service.gd`
|
||||||
|
- Create: `tests/unit/test_tourist_service.gd`
|
||||||
|
- Create: `tests/integration/test_tourist_generation.gd`
|
||||||
|
- Create: `tests/e2e/test_tourist_dialogue_e2e.gd`
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md`
|
||||||
|
|
||||||
|
**Consumes:** PR-2 NPC safe population/dialogue effect seam; F3 achievements; F4 audience; F5 moderation.
|
||||||
|
|
||||||
|
**Produces:** data-backed tourist spawn and protected dialogue behavior with non-lethal ejection.
|
||||||
|
|
||||||
|
**Behavioral contract:**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
const TOURIST_MIN_FLOOR := 6
|
||||||
|
const TOURIST_MAX_PER_FLOOR := 1
|
||||||
|
|
||||||
|
func TouristService.try_spawn(floor: FloorState, catalog: ContentCatalog, rng: DeterministicRng) -> Array[GameEvent]
|
||||||
|
# zero before floor 6; at most one at/after floor 6; requires npc_tourist_influencer.
|
||||||
|
|
||||||
|
func TouristService.selfie(run: RunState, tourist_id: StringName) -> Array[GameEvent]
|
||||||
|
# audience increases; tourist HP/ejection unchanged; fires tourist_met once when eligibility is met.
|
||||||
|
|
||||||
|
func TouristService.endanger(run: RunState, tourist_id: StringName, amount: int) -> Array[GameEvent]
|
||||||
|
# warning is handled by dialogue flag; only actual danger reduces hidden health.
|
||||||
|
# at <= 0: NPC removed/ejected, no actor_died/kill XP/loot/faction kill;
|
||||||
|
# exactly one moderation violation `mise_en_danger_touriste`.
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write failing generation tests**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_no_tourists_before_floor_six() -> void:
|
||||||
|
for seed_index in range(25):
|
||||||
|
assert_eq(_tourists(_generate(5, "TOUR-EARLY-%d" % seed_index)).size(), 0)
|
||||||
|
|
||||||
|
func test_at_most_one_tourist_per_eligible_floor() -> void:
|
||||||
|
for seed_index in range(30):
|
||||||
|
assert_lte(_tourists(_generate(8, "TOUR-CAP-%d" % seed_index)).size(), 1)
|
||||||
|
|
||||||
|
func test_tourist_can_spawn_at_floor_six_across_seed_sample() -> void:
|
||||||
|
assert_true(_any_seed_spawns_tourist(6, 60))
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 2: Run RED proof**
|
||||||
|
|
||||||
|
Run focused tests. Expected: no tourist metadata/service population exists.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Implement protected tourist spawn**
|
||||||
|
|
||||||
|
Read `npc_tourist_influencer` from catalog. Generate only in eligible non-entrance, non-boss safe/open/narrative rooms; reserve a free reachable cell. Store `is_tourist`, `hidden_health`, `ejected=false` in NPC state metadata. Never create more than one per floor.
|
||||||
|
|
||||||
|
- [ ] **Step 4: Write failing positive/negative tourist dialogue tests**
|
||||||
|
|
||||||
|
```gdscript
|
||||||
|
func test_selfie_increases_audience_without_harming_tourist() -> void:
|
||||||
|
var run := _run_with_tourist()
|
||||||
|
var views_before := run.audience.views
|
||||||
|
var events := TouristService.selfie(run, _tourist_id(run))
|
||||||
|
assert_gt(run.audience.views, views_before)
|
||||||
|
assert_false(_tourist(run).metadata["ejected"])
|
||||||
|
assert_true(events.any(func(event): return event.kind == &"tourist_selfie"))
|
||||||
|
|
||||||
|
func test_exhausting_hidden_health_ejects_without_real_kill() -> void:
|
||||||
|
var run := _run_with_tourist()
|
||||||
|
while _tourist(run).metadata["hidden_health"] > 0:
|
||||||
|
TouristService.endanger(run, _tourist_id(run), 15)
|
||||||
|
assert_true(_tourist(run).metadata["ejected"])
|
||||||
|
assert_false(_tourist_is_active(run))
|
||||||
|
assert_eq(run.faction_war.kill_count(&"tourists"), 0)
|
||||||
|
assert_eq(run.moderation.strikes_for(&"mise_en_danger_touriste"), 1)
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 5: Wire dialogue effects and achievements**
|
||||||
|
|
||||||
|
Implement `tourist_selfie` and `endanger_tourist` as explicit condition effects. Fire `tourist_met` at dialogue start once the character-level condition allows it. The first “juste pour voir” option only sets `warned_tourist_shove`; danger options affect hidden health. Do not award kill XP, normal loot, enemy-death achievements or faction kill counts.
|
||||||
|
|
||||||
|
- [ ] **Step 6: Add real-scene E2E**
|
||||||
|
|
||||||
|
Use deterministic tourist fixture in a floor-six run. Drive dialogue UI input:
|
||||||
|
|
||||||
|
1. take selfie and assert audience increases without damage/ejection;
|
||||||
|
2. close/reopen and choose warning, then real shove until ejection;
|
||||||
|
3. assert visible evacuation/moderation event, deadline penalty, no `actor_died`, no tourist remaining in active NPC view.
|
||||||
|
|
||||||
|
- [ ] **Step 7: Verify and commit**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./scripts/test-unit.sh
|
||||||
|
./scripts/test-integration.sh
|
||||||
|
./scripts/test-e2e.sh
|
||||||
|
DISPLAY= ./scripts/verify.sh
|
||||||
|
git diff --check
|
||||||
|
git commit -m "feat: add protected tourists and moderation"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task PR-4: Re-run strict parity gate and make the RC decision
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md`
|
||||||
|
- Modify: `scripts/run-parity-gauntlet.sh`
|
||||||
|
- Modify: `scripts/verify.sh`
|
||||||
|
- Modify: `docs/RELEASE_CHECKLIST.md`
|
||||||
|
- Modify: `README.md` only if release status changes
|
||||||
|
- Create: `tests/scripts/test_parity_recovery_gate.sh`
|
||||||
|
- Create: `docs/release/RC-<date>-evidence.md`
|
||||||
|
|
||||||
|
**Consumes:** all PR-1, PR-2 and PR-3 merged heads; local G6 gate tooling from `slice/g6-release-gauntlet` rebased/cherry-picked only after the recovery rows are covered.
|
||||||
|
|
||||||
|
**Produces:** an honest RC decision: tag only if all matrix rows pass; otherwise report exact blockers and leave tag absent.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write failing parity-recovery gate test**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# tests/scripts/test_parity_recovery_gate.sh
|
||||||
|
# A temporary matrix row with `blocked` must make run-parity-gauntlet.sh exit 1.
|
||||||
|
# A complete owned/replaced matrix must let the static gate continue.
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 2: Run RED proof**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./tests/scripts/test_parity_recovery_gate.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Expected: runner absent, or current G6 matrix retains blocked recovery rows and exits 1.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Update matrix with evidence, not claims**
|
||||||
|
|
||||||
|
Replace only these rows when their exact tests exist:
|
||||||
|
|
||||||
|
| ASCII module | Required Godot proof |
|
||||||
|
| --- | --- |
|
||||||
|
| `test_playtest_v2.py` | `test_deep_floor_profile.gd`, `test_final_floor_victory.gd`, `test_deep_floor_generation.gd`, `test_final_floor_victory_e2e.gd` |
|
||||||
|
| `test_safe_rooms_bobka.py` | `test_safe_room_service.gd`, `test_safe_room_generation.gd`, `test_bobka_safe_room_e2e.gd` |
|
||||||
|
| `test_tourists.py` | `test_tourist_service.gd`, `test_tourist_generation.gd`, `test_tourist_dialogue_e2e.gd` |
|
||||||
|
|
||||||
|
Set each row to `ported` or `replaced` only with named proof and explanation of any graphical substitution. No `blocked` remains.
|
||||||
|
|
||||||
|
- [ ] **Step 4: Run the complete Godot gauntlet in a clean worktree**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
rm -rf .godot artifacts
|
||||||
|
./scripts/godot-import.sh
|
||||||
|
DISPLAY= ./scripts/verify.sh
|
||||||
|
./scripts/run-parity-gauntlet.sh
|
||||||
|
./tests/scripts/test_export_scripts.sh
|
||||||
|
./scripts/build-linux.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
Verify generated-floor profile seed suites, save/load roundtrip, visual captures and Linux smoke. If any command fails, do not create a tag.
|
||||||
|
|
||||||
|
- [ ] **Step 5: Run ASCII reference read-only**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /home/hectelyon/Documents/Projects/ProjetsPersos/DCWASCII
|
||||||
|
python3 -m unittest discover -s tests -v
|
||||||
|
```
|
||||||
|
|
||||||
|
Record revision, command, count and exit status in `docs/release/RC-<date>-evidence.md`. Do not write to the ASCII repository.
|
||||||
|
|
||||||
|
- [ ] **Step 6: Make the release decision**
|
||||||
|
|
||||||
|
Only if all gates are green:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git tag -a v0.1.0-rc1 -m "Godot full-port release candidate"
|
||||||
|
git push origin v0.1.0-rc1
|
||||||
|
```
|
||||||
|
|
||||||
|
If a gate is red, do not tag or call it an RC. Add the precise failure and the owning next task to the evidence document.
|
||||||
|
|
||||||
|
- [ ] **Step 7: Verify and commit**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
./tests/scripts/test_parity_recovery_gate.sh
|
||||||
|
./scripts/run-parity-gauntlet.sh
|
||||||
|
DISPLAY= ./scripts/verify.sh
|
||||||
|
git diff --check
|
||||||
|
git commit -m "chore: revalidate parity recovery release gate"
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Definition of Done
|
||||||
|
|
||||||
|
This recovery plan is complete only when:
|
||||||
|
|
||||||
|
1. The three former G6 rows have named Godot proof and are no longer `blocked`.
|
||||||
|
2. Final-floor descent at floor 18 produces victory without floor 19.
|
||||||
|
3. Deep generation has a bounded but demonstrably large floor-15 profile (>150 rooms), entrance/exit reachability and deterministic output.
|
||||||
|
4. Every generated non-surface floor guarantees a safe room outside the entrance, with a bed and Bobka ration flow.
|
||||||
|
5. Tourists spawn only at/after floor 6, at most one per floor, can award audience through selfie, and are ejected—not killed—with exactly one moderation strike on exhaustion.
|
||||||
|
6. The strict parity script, all Godot suites, clean-worktree import, capture checks, Linux export smoke and read-only ASCII suite pass.
|
||||||
|
7. A release candidate tag exists only after the previous six conditions pass.
|
||||||
|
|
||||||
|
## Self-review
|
||||||
|
|
||||||
|
- **Coverage:** each of the three G6 blocked modules has one vertical capability slice and named test seams; PR-4 owns the re-gate.
|
||||||
|
- **Consistency:** final floor uses `18`; deep scale mirrors ASCII bounded formulas; Bobka uses existing imported IDs; tourist details map to existing dialogue effects/data and F4/F5 services.
|
||||||
|
- **Scope discipline:** PR-1 handles endgame/scale, PR-2 safe rooms, PR-3 tourists, PR-4 release validation. No task quietly introduces the next task’s aggregate.
|
||||||
|
- **Honesty:** PR-4 explicitly permits a red release decision. A tag is conditional on evidence, never on plan completion alone.
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
# 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.
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
# Dark Fantasy Interface Refactor 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:** Rebuild the in-game HUD around the supplied dark-fantasy mock-up while preserving all gameplay, input, journal, minimap, overlay, and node-path contracts.
|
||||||
|
|
||||||
|
**Architecture:** Keep `Game.tscn` and `GameHud` as the integration boundary. Add reusable imported UI textures and a shared Godot theme, then reorganize the HUD into fixed left, center, and right regions inside the existing 1920×1080 reference viewport. Existing functional nodes remain at their current `HUD/*` paths; new decoration and layout containers are additive.
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.7, GDScript, `.tscn`/`.tres` resources, GUT tests, PNG UI assets.
|
||||||
|
|
||||||
|
**Spec:** `/home/hectelyon/Downloads/DungeonCrawlerWorld_UI_Assets/README.md` and `captures/00_maquette_complete.png`
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Treat the supplied complete mock-up as visual direction, not as frozen game content.
|
||||||
|
- Recreate all live text and interactive states in Godot.
|
||||||
|
- Preserve existing gameplay and public `HUD/*` node paths used by `game.gd` and tests.
|
||||||
|
- Keep the 1920×1080 reference viewport and `canvas_items` stretching.
|
||||||
|
- Use the transparent components for reusable controls; use capture crops only for genuinely illustrative content.
|
||||||
|
- Do not change domain/gameplay logic except where presentation data must be exposed.
|
||||||
|
- Run targeted tests, the full verification suite, and visual capture inspection before completion.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## File Map
|
||||||
|
|
||||||
|
- `assets/ui/dark_fantasy/*`: copied production-ready transparent UI textures and illustrative portrait/equipment art.
|
||||||
|
- `assets/ui/dark_fantasy/dark_fantasy_theme.tres`: reusable typography, colors, panel, button, and scrollbar styling.
|
||||||
|
- `scenes/Game.tscn`: new desktop HUD composition and visual hierarchy while preserving functional root paths.
|
||||||
|
- `scenes/ui/Minimap.tscn`: dark-fantasy map panel and caption styling.
|
||||||
|
- `scripts/presentation/hud.gd`: live character/header/status copy and responsive layout behavior.
|
||||||
|
- `scripts/presentation/minimap.gd`: minimap sizing based on its actual drawing region.
|
||||||
|
- `tests/unit/test_hud_layout.gd`: structural, non-overlap, content, and central-play-area contracts for the new shell.
|
||||||
|
- `tests/e2e/test_visual_readability_e2e.gd`: integration contract for the redesigned layout.
|
||||||
|
- `assets/ASSET_REGISTRY.md`: provenance and use of the supplied UI kit.
|
||||||
|
|
||||||
|
### Task 1: Import the reusable art kit and define the visual system
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `res://assets/ui/dark_fantasy/dark_fantasy_theme.tres` and stable texture paths consumed by scenes.
|
||||||
|
|
||||||
|
- [ ] Copy only transparent reusable components plus `portrait_roger.png` and `illustration_equipement.png` into `assets/ui/dark_fantasy/`.
|
||||||
|
- [ ] Add import presets suitable for pixel-stable UI rendering where needed.
|
||||||
|
- [ ] Create `dark_fantasy_theme.tres` with parchment text, gold accents, charcoal panels, ornamental borders, focused/hover button states, and readable 16–22 px defaults.
|
||||||
|
- [ ] Register source and intended use in `assets/ASSET_REGISTRY.md`.
|
||||||
|
- [ ] Run a headless Godot import and require exit code 0.
|
||||||
|
|
||||||
|
### Task 2: Lock the desired HUD shell with failing layout tests
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: existing `GameScene`, `GameHud`, and `Game.REFERENCE_VIEWPORT`.
|
||||||
|
- Produces: test contracts for `TopBar`, `LeftRail`, `PlayAreaFrame`, `RightRail`, and `CommandBar` under `HUD/ResponsiveLayout`.
|
||||||
|
|
||||||
|
- [ ] Replace the old compact-overlay assertions with assertions for a full-frame HUD shell, distinct non-overlapping rails, and a center gameplay viewport.
|
||||||
|
- [ ] Assert that every existing live label remains enclosed by its intended panel.
|
||||||
|
- [ ] Assert dynamic header/character fields and command hints use live game values.
|
||||||
|
- [ ] Update the visual E2E region contract to target the framed center viewport.
|
||||||
|
- [ ] Run the HUD and visual-readability tests and confirm they fail for missing new regions.
|
||||||
|
|
||||||
|
### Task 3: Build the desktop dark-fantasy HUD
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: shared theme/textures from Task 1 and test node names from Task 2.
|
||||||
|
- Preserves: all existing direct paths such as `HUD/PlayerHealthLabel`, `HUD/EventLog`, `HUD/ContextPromptLabel`, and overlay scene paths.
|
||||||
|
- Produces: `GameHud.apply_viewport_layout(viewport_size: Vector2) -> void` and the five named layout regions.
|
||||||
|
|
||||||
|
- [ ] Add the full-screen dark backdrop, top statistics bar, left character/objective/status rail, center play frame, right journal/map rail, quick-slot strip, prompt, and bottom command bar.
|
||||||
|
- [ ] Convert HP, focus, and XP presentation to styled live gauges without changing refresh semantics.
|
||||||
|
- [ ] Add character portrait/equipment illustration as non-interactive image content.
|
||||||
|
- [ ] Add live floor, player name, room/exploration, and status labels populated by `GameHud.refresh`.
|
||||||
|
- [ ] Add viewport-layout behavior that preserves the designed proportions at 1920×1080 and keeps controls readable at 1280×720.
|
||||||
|
- [ ] Run HUD unit tests until they pass.
|
||||||
|
|
||||||
|
### Task 4: Integrate the minimap and gameplay camera with the framed center
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: `HUD/ResponsiveLayout/PlayAreaFrame` and existing `Minimap.set_state(...)`.
|
||||||
|
- Produces: minimap drawing constrained to its inner map region; camera still tracks the actor and obeys map limits.
|
||||||
|
|
||||||
|
- [ ] Restyle `Minimap.tscn` for the right rail without changing the `HUD/Minimap` root path.
|
||||||
|
- [ ] Make minimap cell sizing use the drawable map rectangle rather than the full framed control.
|
||||||
|
- [ ] Keep hidden enemies hidden and preserve expand/collapse behavior.
|
||||||
|
- [ ] Run minimap, camera-grid, and display-layout tests until they pass.
|
||||||
|
|
||||||
|
### Task 5: Validate overlays, inputs, visual output, and responsive behavior
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: complete redesigned HUD.
|
||||||
|
- Produces: regression evidence and captured screenshots.
|
||||||
|
|
||||||
|
- [ ] Run all HUD, prompt, minimap, navigation, combat-HUD, and level-up tests.
|
||||||
|
- [ ] Run `./scripts/run-visual-check.sh` and inspect generated captures for overlap, clipping, readability, and center-map framing.
|
||||||
|
- [ ] Run the game/capture at 1280×720 and verify the layout remains usable.
|
||||||
|
- [ ] Run `./scripts/verify.sh` and require all executable and parity gates to pass.
|
||||||
|
- [ ] Run `git diff --check` and inspect final status/diff for unrelated changes.
|
||||||
|
- [ ] Commit and push the refactor to Gitea.
|
||||||
@@ -0,0 +1,107 @@
|
|||||||
|
# Health Regeneration and Pets 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:** Porter dans le jeu Godot la régénération passive automatique des PV et rendre le familier créé avec la partie réellement configurable, persistant et utile en exploration/combat, conformément aux comportements de référence de DCWASCII.
|
||||||
|
|
||||||
|
**Architecture:** La formule de régénération reste une règle de domaine pure, appelée une seule fois à la fin de chaque tour résolu et appliquée silencieusement au joueur puis au familier vivant. Le familier reste l’agrégat `CompanionState` existant, enrichi avec son identité, ses caractéristiques de régénération et une IA agressive/défensive/soutien; la création, les transitions d’étage, l’UI et la sauvegarde consomment cet agrégat sans dupliquer les règles.
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.7, GDScript, GUT 9.5, scènes `.tscn`, sauvegardes JSON.
|
||||||
|
|
||||||
|
**Spec:** Référence fonctionnelle `../DCWASCII/README.md` sections « Familier jouable » et « Système de soins », ainsi que `../DCWASCII/dcw/entities/{player,companion}.py`, `../DCWASCII/dcw/game.py`, `../DCWASCII/dcw/ai/companion_behaviors.py`.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Préserver tous les changements locaux déjà présents; ne pas réinitialiser ni réécrire les modifications non liées.
|
||||||
|
- Régénération ASCII: `max(1, Endurance / 3)`, bonus `regen_bonus`, amplification de 15 % par rang de compétence Régénération au-delà du rang de base 1, puis multiplicateur de difficulté (1,5 / 1 / 0,75 / 0,5).
|
||||||
|
- La régénération est silencieuse, plafonnée aux PV max, active dès le niveau 1, une fois par tour consommé, et ne ranime jamais une entité morte.
|
||||||
|
- Le familier est optionnel, autonome, persistant, suit le joueur entre les étages et sa mort ne termine pas la partie.
|
||||||
|
- Conserver les coutures publiques et les sauvegardes existantes compatibles.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Passive health regeneration rule
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Create: `scripts/domain/combat/health_regeneration.gd`
|
||||||
|
- Test: `tests/unit/test_health_regeneration.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `HealthRegeneration.amount(endurance: int, regeneration_skill: int, perk_bonus: int, difficulty_id: StringName) -> int`
|
||||||
|
- Produces: `HealthRegeneration.apply(actor: ActorState, endurance: int, regeneration_skill: int, perk_bonus: int, difficulty_id: StringName) -> int`
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write the failing formula and cap/death tests**
|
||||||
|
- [ ] **Step 2: Run the focused test and confirm RED because the rule does not exist**
|
||||||
|
- [ ] **Step 3: Implement the exact ASCII formula and difficulty multipliers**
|
||||||
|
- [ ] **Step 4: Run the focused test and confirm GREEN**
|
||||||
|
|
||||||
|
### Task 2: End-of-turn regeneration integration
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scripts/domain/entities/companion_state.gd`
|
||||||
|
- Test: `tests/e2e/test_health_regeneration_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: `HealthRegeneration.apply(...)`
|
||||||
|
- Produces: automatic, silent player/pet healing through normal `submit_player_action` gameplay turns.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Add an E2E test that damages the player, consumes real movement turns and observes exact healing without a regeneration journal event**
|
||||||
|
- [ ] **Step 2: Run it and confirm RED because completed turns do not heal**
|
||||||
|
- [ ] **Step 3: Add one centralized end-of-turn hook using the character model’s effective Endurance/skill/perk values and the run difficulty**
|
||||||
|
- [ ] **Step 4: Extend the test to a living pet and confirm dead actors remain at zero**
|
||||||
|
- [ ] **Step 5: Run focused unit/E2E tests and confirm GREEN**
|
||||||
|
|
||||||
|
### Task 3: Configurable pet identity and persistence
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/run/run_settings.gd`
|
||||||
|
- Modify: `scripts/domain/entities/companion_state.gd`
|
||||||
|
- Modify: `scripts/presentation/menu/character_creation.gd`
|
||||||
|
- Modify: `scenes/menu/CharacterCreation.tscn`
|
||||||
|
- Modify: `scripts/infrastructure/save/save_repository.gd`
|
||||||
|
- Modify: `scripts/presentation/companion_panel.gd`
|
||||||
|
- Test: `tests/unit/test_companion.gd`
|
||||||
|
- Test: `tests/unit/test_save_repository.gd`
|
||||||
|
- Test: `tests/e2e/test_new_run_creation_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: optional `RunSettings.pet_name` and `RunSettings.pet_species`, with backward-compatible defaults.
|
||||||
|
- Produces: `CompanionState.name`, `species`, Endurance/skill/perk regeneration fields serialized with the companion.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Add failing tests for identity defaults/custom values and save/load round-trip**
|
||||||
|
- [ ] **Step 2: Run focused tests and confirm RED**
|
||||||
|
- [ ] **Step 3: Add name/species fields shown only when the pet checkbox is enabled and pass them through `RunSettings`**
|
||||||
|
- [ ] **Step 4: Persist the complete companion record while accepting legacy companion records**
|
||||||
|
- [ ] **Step 5: Show name, species and PV in the companion panel**
|
||||||
|
- [ ] **Step 6: Run focused tests and confirm GREEN**
|
||||||
|
|
||||||
|
### Task 4: Functional autonomous pet behavior and floor following
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/ai/companion_behaviors.gd`
|
||||||
|
- Modify: `scripts/domain/turn_resolver.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Test: `tests/unit/test_companion.gd`
|
||||||
|
- Test: `tests/e2e/test_pet_companion_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: existing stances `FOLLOW`, `DEFEND`, `SUPPORT` as backward-compatible storage identifiers.
|
||||||
|
- Produces: aggressive chase/attack for `FOLLOW`, threat interception for `DEFEND`, low-PV player healing for `SUPPORT`, nearest-target enemy attacks, and adjacent pet placement after floor changes.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Add one failing behavior test for aggressive chase and one for support healing**
|
||||||
|
- [ ] **Step 2: Run focused tests and confirm RED for the missing decisions**
|
||||||
|
- [ ] **Step 3: Implement deterministic nearest-enemy pursuit and a bounded support-heal action**
|
||||||
|
- [ ] **Step 4: Resolve heal actions and make enemies pursue/attack the nearer living player or pet, with ties favoring the pet**
|
||||||
|
- [ ] **Step 5: Add an E2E floor-transition assertion that the pet is placed next to the player**
|
||||||
|
- [ ] **Step 6: Run pet unit/integration/E2E tests and confirm GREEN**
|
||||||
|
|
||||||
|
### Task 5: Verification and parity evidence
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md` only if a new explicit mapping row/note is required.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Run unit tests for regeneration, companions, settings and saves**
|
||||||
|
- [ ] **Step 2: Run pet/new-run/regeneration E2E tests**
|
||||||
|
- [ ] **Step 3: Run the project verification script and inspect failures**
|
||||||
|
- [ ] **Step 4: Confirm `git diff --check` and review the final diff for unrelated changes**
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
# Save, Ranged Combat, and Pet Controls 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:** Rendre la sauvegarde accessible sans menu Échap, déplacer l’attaque à distance sur `F` avec sélection de cible et tour ennemi immédiat, puis exposer trois comportements de familier en français avec un sprite temporaire de chien.
|
||||||
|
|
||||||
|
**Architecture:** Le menu principal reste le propriétaire du `SaveRepository`, mais le jeu actif lui demande d’ouvrir le panneau de sauvegarde par signal afin d’éviter un second dépôt et de conserver les cinq emplacements existants. Le ciblage à distance continue d’utiliser `RangedCombat` et `TargetingOverlay`; seules la touche, la validation des cibles et la résolution complète du tour sont renforcées. Les identifiants persistés des postures du familier restent compatibles, tandis que leurs libellés et règles deviennent « reste en arrière », « défends-moi » et « attaque à vue ».
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.7, GDScript, GUT 9.5, scènes `.tscn`, sauvegardes JSON.
|
||||||
|
|
||||||
|
**Spec:** Retour de playtest utilisateur du 2026-10-08.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Préserver tous les changements locaux déjà présents; ne pas réinitialiser ni réécrire les modifications non liées.
|
||||||
|
- L’attaque à distance se déclenche sur `F` seulement si une arme à distance est équipée; `Entrée` confirme et `Échap` annule la cible sans consommer de tour.
|
||||||
|
- Une attaque à distance valide consomme exactement un tour et fait immédiatement résoudre le déplacement ou l’attaque des adversaires survivants.
|
||||||
|
- Les trois comportements visibles du familier sont « Reste en arrière », « Défends-moi » et « Attaque à vue ».
|
||||||
|
- Le familier utilise temporairement un sprite animal de type chien compatible avec la licence CC0 existante.
|
||||||
|
- Conserver la lecture des anciennes sauvegardes et des anciennes valeurs de posture.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Sauvegarde accessible et explicite
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `project.godot`
|
||||||
|
- Modify: `scripts/game/input_bindings.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scripts/presentation/menu/main_menu.gd`
|
||||||
|
- Modify: `scripts/presentation/save_load_panel.gd`
|
||||||
|
- Modify: `scenes/ui/SaveLoadPanel.tscn`
|
||||||
|
- Modify: `tests/unit/test_action_router.gd`
|
||||||
|
- Modify: `tests/e2e/test_save_load_e2e.gd`
|
||||||
|
- Modify: `docs/PLAYING.md`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: input action `save` on `Ctrl+S`, routed as `PlayerAction(&"save")`.
|
||||||
|
- Produces: `Game.save_requested` connected by `MainMenu` to `show_save_slots()`.
|
||||||
|
- Produces: French save-panel feedback that states that saves are manual and confirms the slot written.
|
||||||
|
|
||||||
|
- [ ] Add a failing action-router assertion for `save` and an E2E test that `Ctrl+S` opens the save-slot panel during a run.
|
||||||
|
- [ ] Add the input binding/help label and the `Game.save_requested` signal branch.
|
||||||
|
- [ ] Connect the game signal in `MainMenu` and keep repository ownership there.
|
||||||
|
- [ ] Translate/clarify save-panel labels and update the player documentation.
|
||||||
|
- [ ] Run focused action-router and save/load tests.
|
||||||
|
|
||||||
|
### Task 2: Attaque à distance sur F et tour ennemi
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `project.godot`
|
||||||
|
- Modify: `scripts/game/input_bindings.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scripts/presentation/targeting_overlay.gd`
|
||||||
|
- Modify: `tests/e2e/test_ranged_targeting_e2e.gd`
|
||||||
|
- Modify: `tests/e2e/test_input_action_router_e2e.gd`
|
||||||
|
- Modify: `docs/PLAYING.md`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `F` bound to `ranged`; the obsolete standalone `attack` input is removed because melee remains movement into an adjacent enemy.
|
||||||
|
- Produces: targeting candidates filtered by weapon range and line of sight.
|
||||||
|
- Consumes: `TurnResolver.append_enemy_response(...)` for every valid shot against a surviving enemy.
|
||||||
|
|
||||||
|
- [ ] Add failing E2E assertions proving `F` opens targeting, invalid/no-weapon input does not consume a turn, cancellation does not consume a turn, and a valid shot advances exactly one turn while the enemy approaches.
|
||||||
|
- [ ] Move `ranged` from `R` to `F` and remove the conflicting unused `attack` action from the input catalog/map.
|
||||||
|
- [ ] Filter displayed targets through `RangedCombat` validation without consuming ammunition.
|
||||||
|
- [ ] Keep confirmation/cancellation explicit in French and resolve one enemy response after a valid shot.
|
||||||
|
- [ ] Run focused ranged, input, turn-resolver, and combat tests.
|
||||||
|
|
||||||
|
### Task 3: Comportements du familier et sprite chien
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/entities/companion_state.gd`
|
||||||
|
- Modify: `scripts/domain/ai/companion_behaviors.gd`
|
||||||
|
- Modify: `scripts/domain/turn_resolver.gd`
|
||||||
|
- Modify: `scripts/infrastructure/save/save_repository.gd`
|
||||||
|
- Modify: `scripts/presentation/companion_panel.gd`
|
||||||
|
- Modify: `scenes/Game.tscn`
|
||||||
|
- Create: `assets/dcss/war_dog.png`
|
||||||
|
- Modify: `assets/ASSET_REGISTRY.md`
|
||||||
|
- Modify: `tests/unit/test_companion.gd`
|
||||||
|
- Modify: `tests/e2e/test_pet_companion_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: persistent stances `stay_back`, `defend`, `attack_on_sight`, while mapping legacy `follow`, `defend`, `support` values.
|
||||||
|
- Produces: behavior rules where `stay_back` follows without engaging, `defend` attacks threats adjacent to the player, and `attack_on_sight` pursues the nearest living enemy.
|
||||||
|
- Produces: French UI labels/descriptions and `assets/dcss/war_dog.png` on `$World/Companion`.
|
||||||
|
|
||||||
|
- [ ] Add failing deterministic unit tests for the three named policies and an E2E panel-selection test for their French labels.
|
||||||
|
- [ ] Define the new stance identifiers and compatibility aliases/migration.
|
||||||
|
- [ ] Implement passive following, player defense, and nearest-enemy aggression.
|
||||||
|
- [ ] Replace support-only interception checks with the defend stance and update journal wording.
|
||||||
|
- [ ] Copy the local CC0 DCSS war-dog tile, wire it to the companion sprite, and register its source/license.
|
||||||
|
- [ ] Run focused companion, support-compatibility, save, and pet E2E tests.
|
||||||
|
|
||||||
|
### Task 4: Vérification
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `docs/parity/ASCII_TEST_MATRIX.md` only if a mapped contract needs an explicit note.
|
||||||
|
|
||||||
|
- [ ] Run all unit, integration, and E2E suites.
|
||||||
|
- [ ] Run the visual check and inspect the companion sprite and new HUD/help wording.
|
||||||
|
- [ ] Run `git diff --check` and inspect the final diff for unrelated changes.
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# Temporary Starting Playtest Chests 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:** Garantir temporairement trois coffres dans la salle de départ d’une nouvelle partie pour tester la mêlée, la distance et un sort offensif.
|
||||||
|
|
||||||
|
**Architecture:** Un module `TemporaryPlaytestKit` isolé place trois coffres à récompense fixe sur l’étage de surface. `Game` l’appelle uniquement lors d’une nouvelle partie configurée, jamais lors du chargement d’une sauvegarde ni dans le générateur procédural. Les récompenses utilisent le flux normal des coffres; le payload de distance ajoute des munitions et le grimoire utilise l’effet normal `learn_spell`.
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.5, GDScript, GUT.
|
||||||
|
|
||||||
|
**Spec:** Retour de playtest du 2026-10-08.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Code explicitement temporaire et supprimable dans un fichier autonome.
|
||||||
|
- Exactement trois coffres de playtest sur une nouvelle surface.
|
||||||
|
- Aucun changement aux tables de loot ou aux étages procéduraux.
|
||||||
|
- Les sauvegardes chargées ne recréent pas les coffres.
|
||||||
|
- Récompenses fixes : mêlée, distance avec munitions, grimoire offensif.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Fixture temporaire de coffres
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Create: `scripts/game/temporary_playtest_kit.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Create: `tests/e2e/test_temporary_playtest_chests_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `TemporaryPlaytestKit.apply_to_new_run(floor: FloorState) -> void`.
|
||||||
|
|
||||||
|
- [ ] Écrire un test E2E rouge instanciant une nouvelle partie et exigeant trois coffres fixes accessibles.
|
||||||
|
- [ ] Créer le module isolé avec trois cellules, trois récompenses et un marqueur metadata temporaire.
|
||||||
|
- [ ] Appeler le module seulement dans le chemin de nouvelle partie configurée.
|
||||||
|
- [ ] Vérifier qu’un chargement ne recrée aucun coffre.
|
||||||
|
|
||||||
|
### Task 2: Récompenses réellement testables
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `tests/e2e/test_temporary_playtest_chests_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: payload coffre `ammunition` et effet d’objet `learn_spell`.
|
||||||
|
- Produces: munitions ajoutées lors de la récupération; `SpellState.learn(spell_id)` lors de l’utilisation du grimoire.
|
||||||
|
|
||||||
|
- [ ] Tester l’ouverture/récupération normale de chaque coffre.
|
||||||
|
- [ ] Ajouter les munitions du payload à `ActorState.ammunition` dans `_take_all_loot`.
|
||||||
|
- [ ] Après `InventoryState.use_item`, appliquer les effets `learn_spell` acceptés à `spell_state`.
|
||||||
|
- [ ] Vérifier qu’on peut équiper l’arme à distance, cibler avec F, et sélectionner le sort avec X après lecture.
|
||||||
|
|
||||||
|
### Task 3: Vérification
|
||||||
|
|
||||||
|
- [ ] Exécuter les tests ciblés coffre/inventaire/distance/magie.
|
||||||
|
- [ ] Exécuter les suites unitaires et E2E.
|
||||||
|
- [ ] Exécuter `git diff --check` et vérifier que le code temporaire reste contenu dans son module.
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
# UI, Input, Loot, and 1080p 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 panneaux à choix illisibles, rendre la sauvegarde accessible depuis le jeu embarqué dans l’éditeur, fiabiliser les flèches de déplacement, diversifier les coffres, matérialiser le butin des ennemis et migrer l’affichage de référence vers 1920×1080.
|
||||||
|
|
||||||
|
**Architecture:** Les panneaux modaux utilisent des conteneurs de mise en page plutôt que des offsets concurrents. Le routeur d’entrée conserve l’InputMap, mais expose une touche de sauvegarde sans modificateur qui n’est pas interceptée par l’éditeur et verrouille un seul déplacement par pression physique. Le résolveur de butin interdit de sélectionner deux fois le même objet pendant une résolution, tandis qu’une étape post-combat unique dans `Game` matérialise les tables de butin sur la cellule de mort pour toutes les voies létales. La résolution de référence devient un contrat 1920×1080 partagé par le projet, les tests et la capture visuelle.
|
||||||
|
|
||||||
|
**Tech Stack:** Godot 4.5, GDScript, GUT 9.5, scènes `.tscn`, JSON de contenu, scripts Bash/Python de vérification visuelle.
|
||||||
|
|
||||||
|
**Spec:** Retours de playtest et capture fournis le 2026-10-08.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Préserver les nombreuses modifications locales déjà présentes et ne pas réinitialiser les fichiers hors périmètre.
|
||||||
|
- Les PNJ ne sont jamais des cibles de combat ou des sources de butin ennemi.
|
||||||
|
- Les corrections restent déterministes pour un seed et un contexte identiques.
|
||||||
|
- Les objets d’ennemis doivent être visibles au sol et passer par le flux de ramassage existant.
|
||||||
|
- Le viewport, la fenêtre de référence et les captures deviennent exactement 1920×1080.
|
||||||
|
- Les panneaux ne doivent plus superposer le récit, les choix et l’aide, y compris avec du texte long.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Résolution de référence 1920×1080
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `project.godot`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scripts/check-visual-capture.py`
|
||||||
|
- Modify: `scripts/run-visual-check.sh`
|
||||||
|
- Modify: `scripts/build-linux.sh`
|
||||||
|
- Modify: `tests/scripts/test_godot_import_runners.sh`
|
||||||
|
- Modify: `tests/unit/test_display_layout.gd`
|
||||||
|
- Modify: `tests/e2e/test_display_camera_grid_e2e.gd`
|
||||||
|
- Modify: `tests/unit/test_hud_layout.gd`
|
||||||
|
- Modify: `docs/PLAYING.md`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `Game.REFERENCE_VIEWPORT == Vector2i(1920, 1080)`.
|
||||||
|
- Produces: exact 1920×1080 PNG visual captures and smoke displays.
|
||||||
|
|
||||||
|
- [ ] Add failing assertions for the new project and `Game` reference dimensions.
|
||||||
|
- [ ] Change project viewport/window overrides and the public game constant.
|
||||||
|
- [ ] Update Xvfb, fake PNG and PNG validation dimensions; derive the measured dungeon crop from the new dimensions.
|
||||||
|
- [ ] Re-express the central HUD clearance area relative to `REFERENCE_VIEWPORT`.
|
||||||
|
- [ ] Run display, HUD, E2E camera and script-runner tests.
|
||||||
|
|
||||||
|
### Task 2: Panneaux de choix adaptatifs et non chevauchants
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scenes/ui/EventPanel.tscn`
|
||||||
|
- Modify: `scenes/ui/DialoguePanel.tscn`
|
||||||
|
- Modify: `scenes/ui/QuestPanel.tscn`
|
||||||
|
- Modify: `scripts/presentation/event_panel.gd`
|
||||||
|
- Modify: `scripts/presentation/dialogue_panel.gd`
|
||||||
|
- Modify: `scripts/presentation/quest_panel.gd`
|
||||||
|
- Modify: affected E2E node paths
|
||||||
|
- Create: `tests/unit/test_choice_panel_layout.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: each modal as `PanelContainer > VBoxContainer Layout > Title, Body, Entries, Help`.
|
||||||
|
- Produces: distinct, contained narrative, choice and help rectangles at 1920×1080.
|
||||||
|
|
||||||
|
- [ ] Write a failing rectangle test with representative multiline narrative and choices for Event, Dialogue and Quest.
|
||||||
|
- [ ] Replace direct children and absolute offsets with one `VBoxContainer`, content margins and explicit vertical allocation.
|
||||||
|
- [ ] Update scripts and E2E paths from `$Body`/`$Entries` to `$Layout/Body`/`$Layout/Entries`.
|
||||||
|
- [ ] Verify at least 12 px logical separation and containment after two layout frames.
|
||||||
|
- [ ] Run choice-panel, dialogue, event and quest tests.
|
||||||
|
|
||||||
|
### Task 3: Sauvegarde utilisable depuis le debug embarqué et entrée fiable
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `project.godot`
|
||||||
|
- Modify: `scripts/game/input_bindings.gd`
|
||||||
|
- Modify: `scripts/game/action_router.gd`
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scenes/Game.tscn`
|
||||||
|
- Modify: `tests/unit/test_action_router.gd`
|
||||||
|
- Modify: `tests/e2e/test_save_load_e2e.gd`
|
||||||
|
- Modify: `tests/e2e/test_input_action_router_e2e.gd`
|
||||||
|
- Modify: `docs/PLAYING.md`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: existing `save` player action and `Game.save_requested` signal.
|
||||||
|
- Produces: `V` as editor-safe save shortcut while retaining `Ctrl+S` for standalone/exported builds.
|
||||||
|
- Produces: one movement action per non-echo physical arrow press.
|
||||||
|
|
||||||
|
- [ ] Add a failing E2E test that opens save slots with plain `V` through real input.
|
||||||
|
- [ ] Add `V` as a second `save` binding and document why `Ctrl+S` is intercepted by the Godot editor’s own Save command in embedded play.
|
||||||
|
- [ ] Add a repeated alternating Up/Down E2E test proving every press is routed once and echo events do not create or swallow actions.
|
||||||
|
- [ ] Handle arrow physical keycodes deterministically before ambiguous action matching and ignore `InputEventKey.echo` for turn commands.
|
||||||
|
- [ ] Update the HUD/help text and run action/input/save tests.
|
||||||
|
|
||||||
|
### Task 4: Coffres sans objets répétés
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/domain/items/loot_resolver.gd`
|
||||||
|
- Modify: `scripts/domain/world/floor_populator.gd`
|
||||||
|
- Modify: `tests/unit/test_loot_resolver.gd`
|
||||||
|
- Modify: `tests/unit/test_floor_populator.gd`
|
||||||
|
- Modify: `tests/e2e/test_world_chest_loot_e2e.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: `LootResolver.resolve(...)` selects each `item_id` at most once per reward; explicit `min_qty/max_qty` remains the sole source of quantity.
|
||||||
|
- Produces: ordinary treasure rooms use `floor_treasure`, not arbitrary enemy or boss tables.
|
||||||
|
|
||||||
|
- [ ] Add a failing dominant-weight multi-roll test showing the same item is currently selected twice.
|
||||||
|
- [ ] Filter already-selected item IDs from subsequent weighted rolls while leaving gold/empty repeatable.
|
||||||
|
- [ ] Assert that generated treasure chests use the floor treasure table.
|
||||||
|
- [ ] Run resolver, chest, population and deterministic-generation tests.
|
||||||
|
|
||||||
|
### Task 5: Butin ennemi matérialisé et ramassable
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `scripts/game/game.gd`
|
||||||
|
- Modify: `scripts/domain/magic/magic_engine.gd`
|
||||||
|
- Modify: `scripts/presentation/loot_feedback.gd`
|
||||||
|
- Modify: `tests/e2e/test_melee_feedback_e2e.gd`
|
||||||
|
- Modify: `tests/e2e/test_ranged_targeting_e2e.gd`
|
||||||
|
- Modify: `tests/e2e/test_spell_casting_e2e.gd`
|
||||||
|
- Modify: `tests/unit/test_save_repository.gd`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Produces: one post-combat materialization step that resolves each `loot_dropped` descriptor exactly once.
|
||||||
|
- Produces: valid `ItemInstance` entries in `FloorState.ground_items[death_cell]` and immediate run gold credit.
|
||||||
|
- Produces: resolved `loot_dropped` payload containing `loot_table`, `items`, `gold`, and `empty`.
|
||||||
|
|
||||||
|
- [ ] Add a failing melee E2E assertion that a catalog-backed killed enemy leaves a ground item at its death cell.
|
||||||
|
- [ ] Resolve the enemy loot table using a stable `enemy:<floor>:<actor_id>` context before event journaling, create item instances, add them to `ground_items`, and credit gold.
|
||||||
|
- [ ] Add the missing loot descriptor to lethal spell outcomes so magic shares the same post-combat pipeline.
|
||||||
|
- [ ] Verify melee, ranged, companion and spell deaths each materialize once, and the existing interaction picks the item up.
|
||||||
|
- [ ] Verify save/load round-trips the generated drop and update feedback wording from “secured” to “dropped”.
|
||||||
|
|
||||||
|
### Task 6: Verification complète
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: no production files unless a verified regression requires it.
|
||||||
|
|
||||||
|
- [ ] Run all unit tests.
|
||||||
|
- [ ] Run all integration tests.
|
||||||
|
- [ ] Run all E2E tests.
|
||||||
|
- [ ] Run visual capture and inspect both 1920×1080 images.
|
||||||
|
- [ ] Run matrix parity gate and `git diff --check`.
|
||||||
|
- [ ] Review the final diff for unrelated or generated temporary files.
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
; Desktop release presets. The build scripts require matching Godot export
|
||||||
|
; templates and write their ignored artifacts below build/.
|
||||||
|
|
||||||
|
[preset.0]
|
||||||
|
name="Linux/X11"
|
||||||
|
platform="Linux/X11"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="build/linux/DungeonCrawlerWorld.x86_64"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/bptc=false
|
||||||
|
texture_format/s3tc=true
|
||||||
|
texture_format/etc=false
|
||||||
|
texture_format/etc2=false
|
||||||
|
texture_format/astc=false
|
||||||
|
texture_format/pvrtc=false
|
||||||
|
texture_format/dxt5_ra_as_rgba=false
|
||||||
|
texture_format/optimize=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
|
||||||
|
[preset.1]
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=false
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter=""
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="build/windows/DungeonCrawlerWorld.exe"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
|
||||||
|
[preset.1.options]
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/bptc=false
|
||||||
|
texture_format/s3tc=true
|
||||||
|
texture_format/etc=false
|
||||||
|
texture_format/etc2=false
|
||||||
|
texture_format/astc=false
|
||||||
|
texture_format/pvrtc=false
|
||||||
|
texture_format/dxt5_ra_as_rgba=false
|
||||||
|
texture_format/optimize=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
@@ -1,56 +1,192 @@
|
|||||||
; Engine configuration file.
|
; Engine configuration file.
|
||||||
; GUT 9.5.0 is pinned under addons/gut.
|
; It's best edited using the editor UI and not directly,
|
||||||
|
; since the parameters that go here are not all obvious.
|
||||||
|
;
|
||||||
|
; Format:
|
||||||
|
; [section] ; section goes between []
|
||||||
|
; param=value ; assign values to parameters
|
||||||
|
|
||||||
config_version=5
|
config_version=5
|
||||||
|
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Dungeon Crawler World"
|
config/name="Dungeon Crawler World"
|
||||||
run/main_scene="res://scenes/menu/MainMenu.tscn"
|
run/main_scene="res://scenes/menu/MainMenu.tscn"
|
||||||
|
config/features=PackedStringArray("4.7")
|
||||||
|
|
||||||
[display]
|
[display]
|
||||||
window/size/viewport_width=1280
|
|
||||||
window/size/viewport_height=720
|
window/size/viewport_width=1920
|
||||||
window/size/window_width_override=1280
|
window/size/viewport_height=1080
|
||||||
window/size/window_height_override=720
|
window/size/window_width_override=1920
|
||||||
window/size/resizable=true
|
window/size/window_height_override=1080
|
||||||
window/stretch/mode="canvas_items"
|
window/stretch/mode="canvas_items"
|
||||||
|
|
||||||
[rendering]
|
|
||||||
renderer/rendering_method="gl_compatibility"
|
|
||||||
renderer/rendering_method.mobile="gl_compatibility"
|
|
||||||
textures/default_filters/use_nearest_mipmap_filter=false
|
|
||||||
textures/canvas_textures/default_texture_filter=0
|
|
||||||
|
|
||||||
[editor_plugins]
|
[editor_plugins]
|
||||||
|
|
||||||
enabled=PackedStringArray("res://addons/gut/plugin.cfg")
|
enabled=PackedStringArray("res://addons/gut/plugin.cfg")
|
||||||
|
|
||||||
[input]
|
[input]
|
||||||
interact={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":32),Object(InputEventKey,"physical_keycode":69)]}
|
|
||||||
move_north={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":87),Object(InputEventKey,"physical_keycode":4194320)]}
|
interact={
|
||||||
move_south={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":83),Object(InputEventKey,"physical_keycode":4194322)]}
|
"deadzone": 0.5,
|
||||||
move_west={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":65),Object(InputEventKey,"physical_keycode":4194319)]}
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":32,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
move_east={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":68),Object(InputEventKey,"physical_keycode":4194321)]}
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":69,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
move_northwest={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":81)]}
|
]
|
||||||
move_northeast={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":4194447)]}
|
}
|
||||||
move_southwest={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":90)]}
|
move_north={
|
||||||
move_southeast={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":67)]}
|
"deadzone": 0.5,
|
||||||
wait={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":46)]}
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":87,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
attack={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":70)]}
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194320,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
ranged={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":82)]}
|
]
|
||||||
cast={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":88)]}
|
}
|
||||||
talk={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":84)]}
|
move_south={
|
||||||
rest={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":72)]}
|
"deadzone": 0.5,
|
||||||
inventory={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":73)]}
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
crafting={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":66)]}
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194322,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
character={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":80)]}
|
]
|
||||||
quest={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":74)]}
|
}
|
||||||
companion={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":75)]}
|
move_west={
|
||||||
party={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":71)]}
|
"deadzone": 0.5,
|
||||||
achievements={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":76)]}
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":65,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
audience={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":85)]}
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194319,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
recap={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":89)]}
|
]
|
||||||
factions={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":77)]}
|
}
|
||||||
moderation={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":78)]}
|
move_east={
|
||||||
map={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":4194308)]}
|
"deadzone": 0.5,
|
||||||
help={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":4194332)]}
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":68,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
toggle_log={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":76)]}
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194321,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
options={"deadzone":0.5,"events":[Object(InputEventKey,"physical_keycode":79)]}
|
]
|
||||||
|
}
|
||||||
|
move_northwest={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":81,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
move_northeast={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194447,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
move_southwest={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":90,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
move_southeast={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194441,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
wait={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":46,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
ranged={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":70,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
save={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":86,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
cast={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":88,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
talk={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":84,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
rest={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":72,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
inventory={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
crafting={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":66,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
character={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":67,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
quest={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
companion={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":75,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
party={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":71,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
achievements={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
audience={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":85,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
recap={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":89,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
factions={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":77,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
moderation={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":78,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
map={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194308,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
help={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":4194332,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
toggle_log={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
options={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":79,"key_label":0,"unicode":0,"location":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
[rendering]
|
||||||
|
|
||||||
|
textures/canvas_textures/default_texture_filter=0
|
||||||
|
renderer/rendering_method="gl_compatibility"
|
||||||
|
renderer/rendering_method.mobile="gl_compatibility"
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
[gd_scene load_steps=19 format=3]
|
[gd_scene load_steps=26 format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/game/game.gd" id="1_game"]
|
[ext_resource type="Script" path="res://scripts/game/game.gd" id="1_game"]
|
||||||
[ext_resource type="Script" path="res://scripts/presentation/map_renderer.gd" id="2_map"]
|
[ext_resource type="Script" path="res://scripts/presentation/map_renderer.gd" id="2_map"]
|
||||||
[ext_resource type="Script" path="res://scripts/presentation/actor_view.gd" id="3_actor"]
|
[ext_resource type="Script" path="res://scripts/presentation/actor_view.gd" id="3_actor"]
|
||||||
[ext_resource type="Script" path="res://scripts/presentation/hud.gd" id="4_hud"]
|
[ext_resource type="Script" path="res://scripts/presentation/hud.gd" id="4_hud"]
|
||||||
[ext_resource type="Texture2D" path="res://assets/dcss/player.png" id="5_player"]
|
[ext_resource type="Texture2D" path="res://assets/dcss/player.png" id="5_player"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/dcss/war_dog.png" id="35_companion"]
|
||||||
[ext_resource type="Script" path="res://scripts/infrastructure/audio_library.gd" id="6_audio"]
|
[ext_resource type="Script" path="res://scripts/infrastructure/audio_library.gd" id="6_audio"]
|
||||||
[ext_resource type="Script" path="res://scripts/presentation/event_presenter.gd" id="7_presenter"]
|
[ext_resource type="Script" path="res://scripts/presentation/event_presenter.gd" id="7_presenter"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/overlays/CombatFeedback.tscn" id="8_feedback"]
|
[ext_resource type="PackedScene" path="res://scenes/overlays/CombatFeedback.tscn" id="8_feedback"]
|
||||||
@@ -23,34 +24,58 @@
|
|||||||
[ext_resource type="PackedScene" path="res://scenes/ui/PartyPanel.tscn" id="19_party"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/PartyPanel.tscn" id="19_party"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/CharacterPanel.tscn" id="20_character"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/CharacterPanel.tscn" id="20_character"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/ProgressionChoicePanel.tscn" id="21_progression_choice"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/ProgressionChoicePanel.tscn" id="21_progression_choice"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/ui/RaceClassChoicePanel.tscn" id="34_race_class_choice"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/AchievementPanel.tscn" id="22_achievement"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/AchievementPanel.tscn" id="22_achievement"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/AudiencePanel.tscn" id="23_audience"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/AudiencePanel.tscn" id="23_audience"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/RecapPanel.tscn" id="24_recap"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/RecapPanel.tscn" id="24_recap"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/FactionPanel.tscn" id="25_faction"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/FactionPanel.tscn" id="25_faction"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/ModerationPanel.tscn" id="26_moderation"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/ModerationPanel.tscn" id="26_moderation"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/DeathPanel.tscn" id="27_death"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/DeathPanel.tscn" id="27_death"]
|
||||||
|
[ext_resource type="PackedScene" path="res://scenes/ui/VictoryPanel.tscn" id="33_victory"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/Minimap.tscn" id="28_minimap"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/Minimap.tscn" id="28_minimap"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/OptionsPanel.tscn" id="29_options"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/OptionsPanel.tscn" id="29_options"]
|
||||||
[ext_resource type="PackedScene" path="res://scenes/ui/HelpPanel.tscn" id="30_help"]
|
[ext_resource type="PackedScene" path="res://scenes/ui/HelpPanel.tscn" id="30_help"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBox_hud_panel"]
|
[ext_resource type="Theme" path="res://assets/ui/dark_fantasy/dark_fantasy_theme.tres" id="36_hud_theme"]
|
||||||
bg_color = Color(0.035, 0.055, 0.09, 0.9)
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/portrait_roger.png" id="38_hud_portrait"]
|
||||||
border_width_left = 2
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/panel_64x64_nine_patch_source.png" id="37_hud_panel"]
|
||||||
border_width_top = 2
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/dungeon_ui_background.png" id="38_hud_background"]
|
||||||
border_width_right = 2
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/jauge_vie_pleine.png" id="40_hud_health"]
|
||||||
border_width_bottom = 2
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/jauge_focus_pleine.png" id="41_hud_focus"]
|
||||||
border_color = Color(0.25, 0.48, 0.62, 0.9)
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/jauge_xp_pleine.png" id="42_hud_xp"]
|
||||||
corner_radius_top_left = 6
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/gold_coin.svg" id="43_hud_gold_coin"]
|
||||||
corner_radius_top_right = 6
|
|
||||||
corner_radius_bottom_right = 6
|
[sub_resource type="StyleBoxTexture" id="StyleBox_hud_panel"]
|
||||||
corner_radius_bottom_left = 6
|
texture = ExtResource("37_hud_panel")
|
||||||
content_margin_left = 12.0
|
texture_margin_left = 10.0
|
||||||
content_margin_top = 8.0
|
texture_margin_top = 10.0
|
||||||
content_margin_right = 12.0
|
texture_margin_right = 10.0
|
||||||
content_margin_bottom = 8.0
|
texture_margin_bottom = 10.0
|
||||||
|
modulate_color = Color(0.32, 0.29, 0.23, 0.88)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_xp_background"]
|
||||||
|
bg_color = Color(0.025, 0.02, 0.014, 1)
|
||||||
|
border_width_left = 1
|
||||||
|
border_width_top = 1
|
||||||
|
border_width_right = 1
|
||||||
|
border_width_bottom = 1
|
||||||
|
border_color = Color(0.55, 0.40, 0.16, 1)
|
||||||
|
corner_radius_top_left = 4
|
||||||
|
corner_radius_top_right = 4
|
||||||
|
corner_radius_bottom_right = 4
|
||||||
|
corner_radius_bottom_left = 4
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_xp_fill"]
|
||||||
|
bg_color = Color(0.78, 0.58, 0.2, 1)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxEmpty" id="StyleBox_legacy_transparent"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBox_prompt_panel"]
|
[sub_resource type="StyleBoxFlat" id="StyleBox_prompt_panel"]
|
||||||
bg_color = Color(0.08, 0.12, 0.16, 0.94)
|
bg_color = Color(0.10, 0.075, 0.042, 0.98)
|
||||||
border_width_left = 2
|
border_width_left = 2
|
||||||
border_width_top = 2
|
border_width_top = 2
|
||||||
border_width_right = 2
|
border_width_right = 2
|
||||||
@@ -61,6 +86,60 @@ corner_radius_top_right = 6
|
|||||||
corner_radius_bottom_right = 6
|
corner_radius_bottom_right = 6
|
||||||
corner_radius_bottom_left = 6
|
corner_radius_bottom_left = 6
|
||||||
|
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_opaque_outside_artboard"]
|
||||||
|
bg_color = Color(0.012, 0.018, 0.028, 1)
|
||||||
|
border_width_left = 1
|
||||||
|
border_width_top = 1
|
||||||
|
border_width_right = 1
|
||||||
|
border_width_bottom = 1
|
||||||
|
border_color = Color(0.19, 0.15, 0.09, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBox_play_area_mask"]
|
||||||
|
texture = ExtResource("38_hud_background")
|
||||||
|
modulate_color = Color(0.55, 0.55, 0.55, 1)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBox_section"]
|
||||||
|
texture = ExtResource("37_hud_panel")
|
||||||
|
texture_margin_left = 10.0
|
||||||
|
texture_margin_top = 10.0
|
||||||
|
texture_margin_right = 10.0
|
||||||
|
texture_margin_bottom = 10.0
|
||||||
|
modulate_color = Color(0.27, 0.24, 0.19, 0.9)
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_play_frame"]
|
||||||
|
bg_color = Color(0.008, 0.012, 0.018, 0.0)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.67, 0.48, 0.19, 0.95)
|
||||||
|
corner_radius_top_left = 10
|
||||||
|
corner_radius_top_right = 10
|
||||||
|
corner_radius_bottom_right = 10
|
||||||
|
corner_radius_bottom_left = 10
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBox_health_fill"]
|
||||||
|
texture = ExtResource("40_hud_health")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 4.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 4.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBox_focus_fill"]
|
||||||
|
texture = ExtResource("41_hud_focus")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 4.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 4.0
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxTexture" id="StyleBox_xp_fill_dark_fantasy"]
|
||||||
|
texture = ExtResource("42_hud_xp")
|
||||||
|
texture_margin_left = 4.0
|
||||||
|
texture_margin_top = 4.0
|
||||||
|
texture_margin_right = 4.0
|
||||||
|
texture_margin_bottom = 4.0
|
||||||
|
|
||||||
[node name="Game" type="Node2D"]
|
[node name="Game" type="Node2D"]
|
||||||
script = ExtResource("1_game")
|
script = ExtResource("1_game")
|
||||||
|
|
||||||
@@ -91,8 +170,7 @@ script = ExtResource("3_actor")
|
|||||||
[node name="Enemies" type="Node2D" parent="World"]
|
[node name="Enemies" type="Node2D" parent="World"]
|
||||||
|
|
||||||
[node name="Companion" type="Sprite2D" parent="World"]
|
[node name="Companion" type="Sprite2D" parent="World"]
|
||||||
texture = ExtResource("5_player")
|
texture = ExtResource("35_companion")
|
||||||
modulate = Color(0.62, 0.87, 1, 1)
|
|
||||||
script = ExtResource("3_actor")
|
script = ExtResource("3_actor")
|
||||||
|
|
||||||
[node name="Party" type="Node2D" parent="World"]
|
[node name="Party" type="Node2D" parent="World"]
|
||||||
@@ -131,6 +209,8 @@ script = ExtResource("4_hud")
|
|||||||
|
|
||||||
[node name="ProgressionChoicePanel" parent="HUD" instance=ExtResource("21_progression_choice")]
|
[node name="ProgressionChoicePanel" parent="HUD" instance=ExtResource("21_progression_choice")]
|
||||||
|
|
||||||
|
[node name="RaceClassChoicePanel" parent="HUD" instance=ExtResource("34_race_class_choice")]
|
||||||
|
|
||||||
[node name="AchievementPanel" parent="HUD" instance=ExtResource("22_achievement")]
|
[node name="AchievementPanel" parent="HUD" instance=ExtResource("22_achievement")]
|
||||||
|
|
||||||
[node name="AudiencePanel" parent="HUD" instance=ExtResource("23_audience")]
|
[node name="AudiencePanel" parent="HUD" instance=ExtResource("23_audience")]
|
||||||
@@ -143,6 +223,8 @@ script = ExtResource("4_hud")
|
|||||||
|
|
||||||
[node name="DeathPanel" parent="HUD" instance=ExtResource("27_death")]
|
[node name="DeathPanel" parent="HUD" instance=ExtResource("27_death")]
|
||||||
|
|
||||||
|
[node name="VictoryPanel" parent="HUD" instance=ExtResource("33_victory")]
|
||||||
|
|
||||||
[node name="Minimap" parent="HUD" instance=ExtResource("28_minimap")]
|
[node name="Minimap" parent="HUD" instance=ExtResource("28_minimap")]
|
||||||
|
|
||||||
[node name="OptionsPanel" parent="HUD" instance=ExtResource("29_options")]
|
[node name="OptionsPanel" parent="HUD" instance=ExtResource("29_options")]
|
||||||
@@ -150,231 +232,425 @@ script = ExtResource("4_hud")
|
|||||||
[node name="HelpPanel" parent="HUD" instance=ExtResource("30_help")]
|
[node name="HelpPanel" parent="HUD" instance=ExtResource("30_help")]
|
||||||
|
|
||||||
[node name="AchievementToast" type="Label" parent="HUD"]
|
[node name="AchievementToast" type="Label" parent="HUD"]
|
||||||
offset_left = 390.0
|
layout_mode = 0
|
||||||
offset_top = 18.0
|
|
||||||
offset_right = 890.0
|
|
||||||
offset_bottom = 48.0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.82, 0.42, 1)
|
theme_override_colors/font_color = Color(1, 0.82, 0.42, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 18
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="TitleLabel" type="Label" parent="HUD"]
|
[node name="TitleLabel" type="Label" parent="HUD"]
|
||||||
offset_left = 390.0
|
layout_mode = 0
|
||||||
offset_top = 48.0
|
theme_override_colors/font_color = Color(0.95, 0.79, 0.36, 1)
|
||||||
offset_right = 890.0
|
theme_override_font_sizes/font_size = 22
|
||||||
offset_bottom = 74.0
|
horizontal_alignment = 1
|
||||||
theme_override_colors/font_color = Color(0.75, 0.94, 0.55, 1)
|
vertical_alignment = 1
|
||||||
|
text = "Étage 0"
|
||||||
|
|
||||||
|
[node name="TitleNotificationLabel" type="Label" parent="HUD"]
|
||||||
|
layout_mode = 0
|
||||||
|
visible = false
|
||||||
|
theme_override_colors/font_color = Color(1, 0.88, 0.52, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
theme_override_font_sizes/font_size = 20
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="TitleNotificationTimer" type="Timer" parent="HUD"]
|
||||||
|
wait_time = 5.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="AchievementToastTimer" type="Timer" parent="HUD"]
|
||||||
|
wait_time = 5.0
|
||||||
|
one_shot = true
|
||||||
|
|
||||||
|
[node name="HeaderValuesLabel" type="Label" parent="HUD" groups=["hud_header_values"]]
|
||||||
|
layout_mode = 0
|
||||||
|
theme_override_colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 16
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
text = ""
|
||||||
|
visible = false
|
||||||
|
|
||||||
[node name="ResponsiveLayout" type="Control" parent="HUD"]
|
[node name="ResponsiveLayout" type="Control" parent="HUD"]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
|
z_index = -1
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
theme = ExtResource("36_hud_theme")
|
||||||
|
|
||||||
|
[node name="DarkBackdrop" type="Control" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
|
||||||
|
[node name="Artboard" type="Control" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
|
||||||
|
[node name="LetterboxTop" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_opaque_outside_artboard")
|
||||||
|
|
||||||
|
[node name="LetterboxBottom" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_opaque_outside_artboard")
|
||||||
|
|
||||||
|
[node name="PillarboxLeft" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_opaque_outside_artboard")
|
||||||
|
|
||||||
|
[node name="PillarboxRight" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_opaque_outside_artboard")
|
||||||
|
|
||||||
|
[node name="PlayAreaMaskTop" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_play_area_mask")
|
||||||
|
|
||||||
|
[node name="PlayAreaMaskLeft" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_play_area_mask")
|
||||||
|
|
||||||
|
[node name="PlayAreaMaskRight" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_play_area_mask")
|
||||||
|
|
||||||
|
[node name="PlayAreaMaskBottom" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_play_area_mask")
|
||||||
|
|
||||||
|
[node name="TopBar" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
||||||
|
|
||||||
|
[node name="LeftRail" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
||||||
|
|
||||||
|
[node name="CharacterSection" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_section")
|
||||||
|
|
||||||
|
[node name="ObjectivesSection" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_section")
|
||||||
|
|
||||||
|
[node name="StatusSection" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_section")
|
||||||
|
|
||||||
|
[node name="CharacterSectionTitle" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.84, 0.48, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 2
|
||||||
|
theme_override_font_sizes/font_size = 22
|
||||||
|
text = "PERSONNAGE"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="ObjectivesSectionTitle" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.9, 0.7, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||||
|
theme_override_constants/outline_size = 2
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 2
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "OBJECTIFS"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="StatusSectionTitle" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.9, 0.7, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||||
|
theme_override_constants/outline_size = 2
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 2
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "ÉTAT"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="PlayAreaFrame" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
show_behind_parent = true
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_play_frame")
|
||||||
|
|
||||||
|
[node name="RightRail" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
||||||
|
|
||||||
|
[node name="JournalSection" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_section")
|
||||||
|
|
||||||
|
[node name="MapSection" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_section")
|
||||||
|
|
||||||
|
[node name="JournalSectionTitle" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.84, 0.48, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 2
|
||||||
|
theme_override_font_sizes/font_size = 22
|
||||||
|
text = "JOURNAL"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="MapSectionTitle" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.9, 0.7, 1)
|
||||||
|
theme_override_colors/font_outline_color = Color(0.06, 0.035, 0.015, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.85)
|
||||||
|
theme_override_constants/outline_size = 2
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 2
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "CARTE"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="CommandBar" type="Panel" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
||||||
|
|
||||||
[node name="StatsPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
[node name="StatsPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
mouse_filter = 2
|
||||||
offset_left = 12.0
|
show_behind_parent = true
|
||||||
offset_top = 12.0
|
theme_override_styles/panel = SubResource("StyleBox_legacy_transparent")
|
||||||
offset_right = 248.0
|
|
||||||
offset_bottom = 170.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
|
||||||
|
|
||||||
[node name="LogPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
[node name="LogPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 1
|
mouse_filter = 2
|
||||||
anchor_left = 1.0
|
show_behind_parent = true
|
||||||
anchor_right = 1.0
|
theme_override_styles/panel = SubResource("StyleBox_legacy_transparent")
|
||||||
offset_left = -256.0
|
|
||||||
offset_top = 12.0
|
|
||||||
offset_right = -12.0
|
|
||||||
offset_bottom = 170.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
|
||||||
|
|
||||||
[node name="PromptPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
[node name="PromptPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 10
|
mouse_filter = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -280.0
|
|
||||||
offset_top = -90.0
|
|
||||||
offset_right = 280.0
|
|
||||||
offset_bottom = -52.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_styles/panel = SubResource("StyleBox_prompt_panel")
|
|
||||||
|
|
||||||
[node name="HelpPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
[node name="HelpPanel" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 12
|
mouse_filter = 2
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 12.0
|
|
||||||
offset_top = -42.0
|
|
||||||
offset_right = -12.0
|
|
||||||
offset_bottom = -12.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_styles/panel = SubResource("StyleBox_hud_panel")
|
|
||||||
|
|
||||||
[node name="PlayerHealthLabel" type="Label" parent="HUD"]
|
[node name="QuickSlotStrip" type="PanelContainer" parent="HUD/ResponsiveLayout"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
mouse_filter = 2
|
||||||
offset_left = 26.0
|
|
||||||
offset_top = 26.0
|
[node name="QuickSlotHint" type="Label" parent="HUD/ResponsiveLayout"]
|
||||||
offset_right = 236.0
|
layout_mode = 0
|
||||||
offset_bottom = 46.0
|
mouse_filter = 2
|
||||||
grow_horizontal = 0
|
theme_override_colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
grow_vertical = 0
|
theme_override_font_sizes/font_size = 16
|
||||||
theme_override_colors/font_color = Color(1, 1, 1, 1)
|
text = "1 Arme • 2 Sort • 3 Soin • I Sac"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="PortraitIllustration" type="TextureRect" parent="HUD/ResponsiveLayout"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
texture = ExtResource("38_hud_portrait")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
|
[node name="CharacterNameLabel" type="Label" parent="HUD/ResponsiveLayout" groups=["hud_character_values"]]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.84, 0.48, 1)
|
||||||
|
theme_override_font_sizes/font_size = 21
|
||||||
|
text = ""
|
||||||
|
visible = false
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="CharacterLevelLabel" type="Label" parent="HUD/ResponsiveLayout" groups=["hud_character_values"]]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.8, 0.76, 0.62, 1)
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "Niveau 1"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="PlayerHealthLabel" type="Label" parent="HUD" groups=["hud_character_values"]]
|
||||||
|
layout_mode = 0
|
||||||
|
theme_override_colors/font_color = Color(1, 0.78, 0.68, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 18
|
||||||
|
text = "PV du joueur : 12/12"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="PlayerFocusLabel" type="Label" parent="HUD"]
|
[node name="HealthBar" type="ProgressBar" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
mouse_filter = 2
|
||||||
offset_left = 26.0
|
max_value = 12.0
|
||||||
offset_top = 48.0
|
value = 12.0
|
||||||
offset_right = 236.0
|
show_percentage = false
|
||||||
offset_bottom = 68.0
|
theme_override_styles/background = SubResource("StyleBox_xp_background")
|
||||||
grow_horizontal = 0
|
theme_override_styles/fill = SubResource("StyleBox_health_fill")
|
||||||
grow_vertical = 0
|
|
||||||
|
[node name="PlayerFocusLabel" type="Label" parent="HUD" groups=["hud_character_values"]]
|
||||||
|
layout_mode = 0
|
||||||
theme_override_colors/font_color = Color(0.7, 0.8, 1, 1)
|
theme_override_colors/font_color = Color(0.7, 0.8, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 18
|
||||||
|
text = "Focus : 3/3"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="FocusBar" type="ProgressBar" parent="HUD"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
max_value = 3.0
|
||||||
|
value = 3.0
|
||||||
|
show_percentage = false
|
||||||
|
theme_override_styles/background = SubResource("StyleBox_xp_background")
|
||||||
|
theme_override_styles/fill = SubResource("StyleBox_focus_fill")
|
||||||
|
|
||||||
|
[node name="ExperienceBar" type="ProgressBar" parent="HUD"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_styles/background = SubResource("StyleBox_xp_background")
|
||||||
|
theme_override_styles/fill = SubResource("StyleBox_xp_fill_dark_fantasy")
|
||||||
|
show_percentage = false
|
||||||
|
|
||||||
|
[node name="ExperienceLabel" type="Label" parent="HUD"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
theme_override_colors/font_color = Color(0.92, 0.97, 1, 1)
|
||||||
|
theme_override_colors/font_shadow_color = Color(0, 0, 0, 0.9)
|
||||||
|
theme_override_constants/shadow_offset_x = 1
|
||||||
|
theme_override_constants/shadow_offset_y = 1
|
||||||
|
theme_override_font_sizes/font_size = 14
|
||||||
|
text = "Niveau 1 — XP 0/100"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="CharacterStatusLabel" type="Label" parent="HUD" groups=["hud_character_values"]]
|
||||||
|
layout_mode = 0
|
||||||
|
theme_override_colors/font_color = Color(0.75, 0.9, 0.72, 1)
|
||||||
|
theme_override_font_sizes/font_size = 15
|
||||||
|
text = ""
|
||||||
|
visible = false
|
||||||
|
autowrap_mode = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
|
[node name="GoldIcon" type="TextureRect" parent="HUD"]
|
||||||
|
layout_mode = 0
|
||||||
|
mouse_filter = 2
|
||||||
|
texture = ExtResource("43_hud_gold_coin")
|
||||||
|
expand_mode = 1
|
||||||
|
stretch_mode = 5
|
||||||
|
|
||||||
[node name="GoldLabel" type="Label" parent="HUD"]
|
[node name="GoldLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
|
||||||
offset_left = 26.0
|
|
||||||
offset_top = 70.0
|
|
||||||
offset_right = 236.0
|
|
||||||
offset_bottom = 90.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.84, 0.35, 1)
|
theme_override_colors/font_color = Color(1, 0.84, 0.35, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 18
|
||||||
text = "Or: 0"
|
text = "0"
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="QuestTrackerLabel" type="Label" parent="HUD"]
|
[node name="QuestTrackerLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
|
||||||
offset_left = 26.0
|
|
||||||
offset_top = 92.0
|
|
||||||
offset_right = 360.0
|
|
||||||
offset_bottom = 112.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(0.65, 1, 0.72, 1)
|
theme_override_colors/font_color = Color(0.65, 1, 0.72, 1)
|
||||||
theme_override_font_sizes/font_size = 14
|
theme_override_font_sizes/font_size = 14
|
||||||
text = "Quêtes : aucune"
|
text = "Quêtes : aucune"
|
||||||
|
autowrap_mode = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="SpellLabel" type="Label" parent="HUD"]
|
[node name="SpellLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
text = ""
|
||||||
offset_left = 26.0
|
visible = false
|
||||||
offset_top = 92.0
|
|
||||||
offset_right = 360.0
|
|
||||||
offset_bottom = 112.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(0.82, 0.7, 1, 1)
|
theme_override_colors/font_color = Color(0.82, 0.7, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 14
|
theme_override_font_sizes/font_size = 14
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="EnemyHealthLabel" type="Label" parent="HUD"]
|
[node name="EnemyHealthLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
text = ""
|
||||||
offset_left = 26.0
|
visible = false
|
||||||
offset_top = 114.0
|
|
||||||
offset_right = 236.0
|
|
||||||
offset_bottom = 134.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.8, 0.7, 1)
|
theme_override_colors/font_color = Color(1, 0.8, 0.7, 1)
|
||||||
theme_override_font_sizes/font_size = 18
|
theme_override_font_sizes/font_size = 16
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="CombatSummaryLabel" type="Label" parent="HUD"]
|
[node name="CombatSummaryLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
text = ""
|
||||||
offset_left = 26.0
|
visible = false
|
||||||
offset_top = 114.0
|
|
||||||
offset_right = 236.0
|
|
||||||
offset_bottom = 134.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 15
|
||||||
|
autowrap_mode = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="DeadlineLabel" type="Label" parent="HUD"]
|
[node name="DeadlineLabel" type="Label" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 0
|
text = ""
|
||||||
offset_left = 26.0
|
visible = false
|
||||||
offset_top = 138.0
|
|
||||||
offset_right = 360.0
|
|
||||||
offset_bottom = 158.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.76, 0.4, 1)
|
theme_override_colors/font_color = Color(1, 0.76, 0.4, 1)
|
||||||
theme_override_font_sizes/font_size = 14
|
theme_override_font_sizes/font_size = 14
|
||||||
|
autowrap_mode = 2
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="EventLog" type="RichTextLabel" parent="HUD"]
|
[node name="EventLog" type="RichTextLabel" parent="HUD"]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 1
|
mouse_filter = 2
|
||||||
anchor_left = 1.0
|
|
||||||
anchor_right = 1.0
|
|
||||||
offset_left = -244.0
|
|
||||||
offset_top = 22.0
|
|
||||||
offset_right = -24.0
|
|
||||||
offset_bottom = 158.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
grow_vertical = 0
|
|
||||||
bbcode_enabled = false
|
bbcode_enabled = false
|
||||||
fit_content = false
|
fit_content = false
|
||||||
theme_override_colors/default_color = Color(1, 1, 0.8, 1)
|
theme_override_colors/default_color = Color(1, 1, 0.8, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 14
|
theme_override_font_sizes/normal_font_size = 14
|
||||||
|
|
||||||
[node name="ContextPromptLabel" type="Label" parent="HUD"]
|
[node name="ActionHintLabel" type="Label" parent="HUD/ResponsiveLayout/PromptPanel" groups=["hud_command_hints"]]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 10
|
mouse_filter = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -266.0
|
|
||||||
offset_top = -85.0
|
|
||||||
offset_right = 266.0
|
|
||||||
offset_bottom = -57.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.92, 0.63, 1)
|
theme_override_colors/font_color = Color(1, 0.92, 0.63, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "F : Distance • X : Magie • K : Familier"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 0
|
||||||
|
|
||||||
|
[node name="ContextPromptLabel" type="Label" parent="HUD" groups=["hud_command_hints"]]
|
||||||
|
layout_mode = 0
|
||||||
|
theme_override_colors/font_color = Color(0.82, 0.9, 1, 1)
|
||||||
|
theme_override_font_sizes/font_size = 13
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="HelpLabel" type="Label" parent="HUD"]
|
[node name="HelpLabel" type="Label" parent="HUD" groups=["hud_command_hints"]]
|
||||||
layout_mode = 1
|
layout_mode = 0
|
||||||
anchors_preset = 12
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 28.0
|
|
||||||
offset_top = -37.0
|
|
||||||
offset_right = -28.0
|
|
||||||
offset_bottom = -17.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(0.82, 0.9, 1, 1)
|
theme_override_colors/font_color = Color(0.82, 0.9, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 14
|
theme_override_font_sizes/font_size = 14
|
||||||
text = "Déplacer : ZQSD / Flèches (nord-est : pavé num. 9) • Interagir : Espace ou E"
|
text = "Déplacer ZQSD • Interagir Espace • Inventaire I • Sauvegarde V • Aide F1"
|
||||||
|
clip_text = false
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ anchor_top = 0.5
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -270.0
|
offset_left = -270.0
|
||||||
offset_top = -350.0
|
offset_top = -310.0
|
||||||
offset_right = 270.0
|
offset_right = 270.0
|
||||||
offset_bottom = 350.0
|
offset_bottom = 310.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_panel")
|
theme_override_styles/panel = SubResource("StyleBox_panel")
|
||||||
@@ -68,43 +68,26 @@ custom_minimum_size = Vector2(0, 31)
|
|||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
placeholder_text = "Sans-Nom"
|
placeholder_text = "Sans-Nom"
|
||||||
|
|
||||||
[node name="ArchetypeLabel" type="Label" parent="Panel/Layout/Fields"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Base archetype"
|
|
||||||
|
|
||||||
[node name="ArchetypeOption" type="OptionButton" parent="Panel/Layout/Fields"]
|
|
||||||
custom_minimum_size = Vector2(0, 31)
|
|
||||||
layout_mode = 2
|
|
||||||
item_count = 3
|
|
||||||
selected = 0
|
|
||||||
popup/item_0/text = "Vanguard"
|
|
||||||
popup/item_0/id = 0
|
|
||||||
popup/item_0/metadata = "vanguard"
|
|
||||||
popup/item_1/text = "Mystic"
|
|
||||||
popup/item_1/id = 1
|
|
||||||
popup/item_1/metadata = "mystic"
|
|
||||||
popup/item_2/text = "Scout"
|
|
||||||
popup/item_2/id = 2
|
|
||||||
popup/item_2/metadata = "scout"
|
|
||||||
|
|
||||||
[node name="RaceLabel" type="Label" parent="Panel/Layout/Fields"]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Race"
|
|
||||||
|
|
||||||
[node name="RaceOption" type="OptionButton" parent="Panel/Layout/Fields"]
|
|
||||||
custom_minimum_size = Vector2(0, 31)
|
|
||||||
layout_mode = 2
|
|
||||||
|
|
||||||
[node name="RecommendationLabel" type="Label" parent="Panel/Layout/Fields"]
|
|
||||||
layout_mode = 2
|
|
||||||
autowrap_mode = 2
|
|
||||||
theme_override_colors/font_color = Color(0.72, 0.8, 0.92, 1)
|
|
||||||
|
|
||||||
[node name="PetCheck" type="CheckBox" parent="Panel/Layout/Fields"]
|
[node name="PetCheck" type="CheckBox" parent="Panel/Layout/Fields"]
|
||||||
custom_minimum_size = Vector2(0, 27)
|
custom_minimum_size = Vector2(0, 27)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Bring a pet companion"
|
text = "Bring a pet companion"
|
||||||
|
|
||||||
|
[node name="PetDetails" type="VBoxContainer" parent="Panel/Layout/Fields"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 4
|
||||||
|
|
||||||
|
[node name="PetNameEdit" type="LineEdit" parent="Panel/Layout/Fields/PetDetails"]
|
||||||
|
custom_minimum_size = Vector2(0, 31)
|
||||||
|
layout_mode = 2
|
||||||
|
placeholder_text = "Pet name (Familier)"
|
||||||
|
|
||||||
|
[node name="PetSpeciesEdit" type="LineEdit" parent="Panel/Layout/Fields/PetDetails"]
|
||||||
|
custom_minimum_size = Vector2(0, 31)
|
||||||
|
layout_mode = 2
|
||||||
|
placeholder_text = "Nature / species (Animal)"
|
||||||
|
|
||||||
[node name="SeedLabel" type="Label" parent="Panel/Layout/Fields"]
|
[node name="SeedLabel" type="Label" parent="Panel/Layout/Fields"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Generation seed"
|
text = "Generation seed"
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
[gd_scene load_steps=3 format=3]
|
[gd_scene load_steps=4 format=3]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://scripts/presentation/character_panel.gd" id="1_character"]
|
[ext_resource type="Script" path="res://scripts/presentation/character_panel.gd" id="1_character"]
|
||||||
|
[ext_resource type="Texture2D" path="res://assets/ui/dark_fantasy/panel_64x64_nine_patch_source.png" id="2_panel"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBox_character_panel"]
|
[sub_resource type="StyleBoxTexture" id="StyleBox_character_panel"]
|
||||||
bg_color = Color(0.035, 0.055, 0.09, 0.97)
|
texture = ExtResource("2_panel")
|
||||||
border_width_left = 3
|
texture_margin_left = 10.0
|
||||||
border_width_top = 3
|
texture_margin_top = 10.0
|
||||||
border_width_right = 3
|
texture_margin_right = 10.0
|
||||||
border_width_bottom = 3
|
texture_margin_bottom = 10.0
|
||||||
border_color = Color(0.66, 0.82, 0.42, 0.95)
|
modulate_color = Color(0.22, 0.2, 0.16, 0.98)
|
||||||
corner_radius_top_left = 8
|
|
||||||
corner_radius_top_right = 8
|
|
||||||
corner_radius_bottom_right = 8
|
|
||||||
corner_radius_bottom_left = 8
|
|
||||||
|
|
||||||
[node name="CharacterPanel" type="PanelContainer"]
|
[node name="CharacterPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -22,10 +19,10 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -220.0
|
offset_left = -360.0
|
||||||
offset_top = -170.0
|
offset_top = -320.0
|
||||||
offset_right = 220.0
|
offset_right = 360.0
|
||||||
offset_bottom = 170.0
|
offset_bottom = 320.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_character_panel")
|
theme_override_styles/panel = SubResource("StyleBox_character_panel")
|
||||||
@@ -36,13 +33,15 @@ layout_mode = 1
|
|||||||
anchors_preset = 10
|
anchors_preset = 10
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
offset_left = -185.0
|
offset_left = -310.0
|
||||||
offset_top = 18.0
|
offset_top = 22.0
|
||||||
offset_right = 185.0
|
offset_right = 310.0
|
||||||
offset_bottom = 46.0
|
offset_bottom = 54.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme_override_colors/font_color = Color(0.75, 0.94, 0.55, 1)
|
theme_override_colors/font_color = Color(1, 0.88, 0.52, 1)
|
||||||
theme_override_font_sizes/font_size = 21
|
theme_override_colors/font_outline_color = Color(0.08, 0.045, 0.015, 1)
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
theme_override_font_sizes/font_size = 24
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Body" type="RichTextLabel" parent="."]
|
[node name="Body" type="RichTextLabel" parent="."]
|
||||||
@@ -50,11 +49,11 @@ layout_mode = 1
|
|||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 1.0
|
||||||
offset_left = 30.0
|
offset_left = 42.0
|
||||||
offset_top = 62.0
|
offset_top = 76.0
|
||||||
offset_right = -30.0
|
offset_right = -42.0
|
||||||
offset_bottom = -24.0
|
offset_bottom = -30.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.95, 0.93, 0.8, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 18
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 32.0
|
||||||
|
content_margin_top = 22.0
|
||||||
|
content_margin_right = 32.0
|
||||||
|
content_margin_bottom = 22.0
|
||||||
|
|
||||||
[node name="DeathPanel" type="PanelContainer"]
|
[node name="DeathPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -22,40 +26,57 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -310.0
|
offset_left = -340.0
|
||||||
offset_top = -190.0
|
offset_top = -230.0
|
||||||
offset_right = 310.0
|
offset_right = 340.0
|
||||||
offset_bottom = 190.0
|
offset_bottom = 230.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_death_panel")
|
theme_override_styles/panel = SubResource("StyleBox_death_panel")
|
||||||
script = ExtResource("1_death")
|
script = ExtResource("1_death")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 16
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -260.0
|
custom_minimum_size = Vector2(0, 42)
|
||||||
offset_top = 22.0
|
layout_mode = 2
|
||||||
offset_right = 260.0
|
|
||||||
offset_bottom = 54.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(1, 0.38, 0.34, 1)
|
theme_override_colors/font_color = Color(1, 0.38, 0.34, 1)
|
||||||
theme_override_font_sizes/font_size = 27
|
theme_override_font_sizes/font_size = 27
|
||||||
text = "VOUS ÊTES MORT"
|
text = "VOUS ÊTES MORT"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Body" type="RichTextLabel" parent="."]
|
[node name="Body" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 15
|
size_flags_vertical = 3
|
||||||
anchor_right = 1.0
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 40.0
|
|
||||||
offset_top = 75.0
|
|
||||||
offset_right = -40.0
|
|
||||||
offset_bottom = -34.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(1, 0.91, 0.9, 1)
|
theme_override_colors/default_color = Color(1, 0.91, 0.9, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 18
|
theme_override_font_sizes/normal_font_size = 18
|
||||||
|
|
||||||
|
[node name="Hint" type="Label" parent="Layout"]
|
||||||
|
custom_minimum_size = Vector2(0, 24)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(1, 0.78, 0.72, 1)
|
||||||
|
theme_override_font_sizes/font_size = 15
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Actions" type="HBoxContainer" parent="Layout"]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="LoadButton" type="Button" parent="Layout/Actions"]
|
||||||
|
custom_minimum_size = Vector2(170, 42)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "CHARGER"
|
||||||
|
|
||||||
|
[node name="NewRunButton" type="Button" parent="Layout/Actions"]
|
||||||
|
custom_minimum_size = Vector2(190, 42)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "NOUVELLE PARTIE"
|
||||||
|
|
||||||
|
[node name="MenuButton" type="Button" parent="Layout/Actions"]
|
||||||
|
custom_minimum_size = Vector2(150, 42)
|
||||||
|
layout_mode = 2
|
||||||
|
text = "MENU PRINCIPAL"
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 36.0
|
||||||
|
content_margin_top = 28.0
|
||||||
|
content_margin_right = 36.0
|
||||||
|
content_margin_bottom = 28.0
|
||||||
|
|
||||||
[node name="DialoguePanel" type="PanelContainer"]
|
[node name="DialoguePanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -22,70 +26,46 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -300.0
|
offset_left = -480.0
|
||||||
offset_top = -205.0
|
offset_top = -360.0
|
||||||
offset_right = 300.0
|
offset_right = 480.0
|
||||||
offset_bottom = 205.0
|
offset_bottom = 360.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_dialogue_panel")
|
theme_override_styles/panel = SubResource("StyleBox_dialogue_panel")
|
||||||
script = ExtResource("1_dialogue")
|
script = ExtResource("1_dialogue")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 16
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -270.0
|
custom_minimum_size = Vector2(0, 42)
|
||||||
offset_top = 18.0
|
layout_mode = 2
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(0.55, 0.9, 1, 1)
|
theme_override_colors/font_color = Color(0.55, 0.9, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 21
|
theme_override_font_sizes/font_size = 24
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Body" type="RichTextLabel" parent="."]
|
[node name="Body" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 300)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 58.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -175.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 18
|
theme_override_font_sizes/normal_font_size = 20
|
||||||
|
|
||||||
[node name="Entries" type="RichTextLabel" parent="."]
|
[node name="Entries" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 190)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 238.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -48.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/default_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 19
|
||||||
|
|
||||||
[node name="Help" type="Label" parent="."]
|
[node name="Help" type="Label" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 34)
|
||||||
anchors_preset = 10
|
layout_mode = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -270.0
|
|
||||||
offset_top = -42.0
|
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = -18.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(0.55, 0.9, 1, 1)
|
theme_override_colors/font_color = Color(0.55, 0.9, 1, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 17
|
||||||
text = "↑/↓ Choisir Entrée Confirmer Échap Partir"
|
text = "↑/↓ Choisir Entrée Confirmer Échap Partir"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 36.0
|
||||||
|
content_margin_top = 28.0
|
||||||
|
content_margin_right = 36.0
|
||||||
|
content_margin_bottom = 28.0
|
||||||
|
|
||||||
[node name="EventPanel" type="PanelContainer"]
|
[node name="EventPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -22,70 +26,46 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -300.0
|
offset_left = -480.0
|
||||||
offset_top = -205.0
|
offset_top = -360.0
|
||||||
offset_right = 300.0
|
offset_right = 480.0
|
||||||
offset_bottom = 205.0
|
offset_bottom = 360.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_event_panel")
|
theme_override_styles/panel = SubResource("StyleBox_event_panel")
|
||||||
script = ExtResource("1_event")
|
script = ExtResource("1_event")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 16
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -270.0
|
custom_minimum_size = Vector2(0, 42)
|
||||||
offset_top = 18.0
|
layout_mode = 2
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(1, 0.84, 0.42, 1)
|
theme_override_colors/font_color = Color(1, 0.84, 0.42, 1)
|
||||||
theme_override_font_sizes/font_size = 21
|
theme_override_font_sizes/font_size = 24
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Body" type="RichTextLabel" parent="."]
|
[node name="Body" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 300)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 58.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -175.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 18
|
theme_override_font_sizes/normal_font_size = 20
|
||||||
|
|
||||||
[node name="Entries" type="RichTextLabel" parent="."]
|
[node name="Entries" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 190)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 238.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -48.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/default_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 19
|
||||||
|
|
||||||
[node name="Help" type="Label" parent="."]
|
[node name="Help" type="Label" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 34)
|
||||||
anchors_preset = 10
|
layout_mode = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -270.0
|
|
||||||
offset_top = -42.0
|
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = -18.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(1, 0.84, 0.42, 1)
|
theme_override_colors/font_color = Color(1, 0.84, 0.42, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 17
|
||||||
text = "↑/↓ Choisir Entrée Confirmer Échap Partir"
|
text = "↑/↓ Choisir Entrée Confirmer Échap Partir"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 24.0
|
||||||
|
content_margin_top = 18.0
|
||||||
|
content_margin_right = 24.0
|
||||||
|
content_margin_bottom = 18.0
|
||||||
|
|
||||||
[node name="InventoryPanel" type="PanelContainer"]
|
[node name="InventoryPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -23,43 +27,57 @@ anchor_top = 0.5
|
|||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -400.0
|
offset_left = -400.0
|
||||||
offset_top = -235.0
|
offset_top = -260.0
|
||||||
offset_right = 400.0
|
offset_right = 400.0
|
||||||
offset_bottom = 235.0
|
offset_bottom = 260.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_inventory_panel")
|
theme_override_styles/panel = SubResource("StyleBox_inventory_panel")
|
||||||
script = ExtResource("1_inventory")
|
script = ExtResource("1_inventory")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 12
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -350.0
|
custom_minimum_size = Vector2(0, 34)
|
||||||
offset_top = 18.0
|
layout_mode = 2
|
||||||
offset_right = 350.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/font_size = 24
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "INVENTORY"
|
text = "INVENTAIRE"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Entries" type="RichTextLabel" parent="."]
|
[node name="Columns" type="HBoxContainer" parent="Layout"]
|
||||||
layout_mode = 0
|
layout_mode = 2
|
||||||
offset_left = 28.0
|
size_flags_vertical = 3
|
||||||
offset_top = 66.0
|
theme_override_constants/separation = 20
|
||||||
offset_right = 355.0
|
|
||||||
offset_bottom = 400.0
|
[node name="Entries" type="RichTextLabel" parent="Layout/Columns"]
|
||||||
|
custom_minimum_size = Vector2(300, 0)
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 18
|
theme_override_font_sizes/normal_font_size = 18
|
||||||
|
scroll_active = true
|
||||||
|
scroll_following = false
|
||||||
|
|
||||||
[node name="Details" type="RichTextLabel" parent="."]
|
[node name="Details" type="RichTextLabel" parent="Layout/Columns"]
|
||||||
layout_mode = 0
|
custom_minimum_size = Vector2(400, 0)
|
||||||
offset_left = 380.0
|
layout_mode = 2
|
||||||
offset_top = 66.0
|
size_flags_horizontal = 3
|
||||||
offset_right = 770.0
|
size_flags_vertical = 3
|
||||||
offset_bottom = 420.0
|
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 17
|
||||||
|
scroll_active = true
|
||||||
|
scroll_following = false
|
||||||
|
|
||||||
|
[node name="Footer" type="Label" parent="Layout"]
|
||||||
|
custom_minimum_size = Vector2(0, 28)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "↑/↓ Sélectionner E Équiper U Utiliser D Jeter I Fermer"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 30.0
|
||||||
|
content_margin_top = 18.0
|
||||||
|
content_margin_right = 30.0
|
||||||
|
content_margin_bottom = 18.0
|
||||||
|
|
||||||
[node name="LootPanel" type="PanelContainer"]
|
[node name="LootPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -31,49 +35,31 @@ grow_vertical = 2
|
|||||||
theme_override_styles/panel = SubResource("StyleBox_loot_panel")
|
theme_override_styles/panel = SubResource("StyleBox_loot_panel")
|
||||||
script = ExtResource("1_loot")
|
script = ExtResource("1_loot")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 14
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -180.0
|
custom_minimum_size = Vector2(0, 34)
|
||||||
offset_top = 18.0
|
layout_mode = 2
|
||||||
offset_right = 180.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/font_size = 24
|
theme_override_font_sizes/font_size = 24
|
||||||
text = "COFFRE OUVERT"
|
text = "COFFRE OUVERT"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Entries" type="RichTextLabel" parent="."]
|
[node name="Entries" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 148)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 66.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -70.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 19
|
theme_override_font_sizes/normal_font_size = 19
|
||||||
|
|
||||||
[node name="TakeAll" type="Label" parent="."]
|
[node name="TakeAll" type="Label" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 30)
|
||||||
anchors_preset = 10
|
layout_mode = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -180.0
|
|
||||||
offset_top = -52.0
|
|
||||||
offset_right = 180.0
|
|
||||||
offset_bottom = -22.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 0
|
|
||||||
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
theme_override_colors/font_color = Color(1, 0.9, 0.5, 1)
|
||||||
theme_override_font_sizes/font_size = 17
|
theme_override_font_sizes/font_size = 17
|
||||||
text = "Entrée / Espace — Tout prendre"
|
text = "Entrée / Espace — Tout prendre"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -3,27 +3,23 @@
|
|||||||
[ext_resource type="Script" path="res://scripts/presentation/minimap.gd" id="1_minimap"]
|
[ext_resource type="Script" path="res://scripts/presentation/minimap.gd" id="1_minimap"]
|
||||||
|
|
||||||
[sub_resource type="StyleBoxFlat" id="StyleBox_minimap"]
|
[sub_resource type="StyleBoxFlat" id="StyleBox_minimap"]
|
||||||
bg_color = Color(0.025, 0.045, 0.085, 0.94)
|
bg_color = Color(0.045, 0.035, 0.025, 0.96)
|
||||||
border_width_left = 2
|
border_width_left = 3
|
||||||
border_width_top = 2
|
border_width_top = 3
|
||||||
border_width_right = 2
|
border_width_right = 3
|
||||||
border_width_bottom = 2
|
border_width_bottom = 3
|
||||||
border_color = Color(0.45, 0.75, 0.9, 0.9)
|
border_color = Color(0.67, 0.48, 0.19, 0.95)
|
||||||
corner_radius_top_left = 6
|
corner_radius_top_left = 8
|
||||||
corner_radius_top_right = 6
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 6
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 6
|
corner_radius_bottom_left = 8
|
||||||
|
shadow_color = Color(0, 0, 0, 0.55)
|
||||||
|
shadow_size = 5
|
||||||
|
|
||||||
[node name="Minimap" type="Control"]
|
[node name="Minimap" type="Control"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 1
|
offset_right = 280.0
|
||||||
anchor_left = 1.0
|
offset_bottom = 300.0
|
||||||
anchor_right = 1.0
|
|
||||||
offset_left = -188.0
|
|
||||||
offset_top = 184.0
|
|
||||||
offset_right = -20.0
|
|
||||||
offset_bottom = 352.0
|
|
||||||
grow_horizontal = 0
|
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
script = ExtResource("1_minimap")
|
script = ExtResource("1_minimap")
|
||||||
|
|
||||||
@@ -43,13 +39,28 @@ layout_mode = 1
|
|||||||
anchors_preset = 10
|
anchors_preset = 10
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
offset_left = -70.0
|
offset_left = -120.0
|
||||||
offset_top = 4.0
|
offset_top = 7.0
|
||||||
offset_right = 70.0
|
offset_right = 120.0
|
||||||
offset_bottom = 20.0
|
offset_bottom = 29.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
theme_override_colors/font_color = Color(0.78, 0.94, 1, 1)
|
theme_override_colors/font_color = Color(0.86, 0.78, 0.58, 1)
|
||||||
theme_override_font_sizes/font_size = 12
|
theme_override_font_sizes/font_size = 13
|
||||||
text = "CARTE — Tab"
|
text = "CARTE — TAB"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
|
|
||||||
|
[node name="MapRegion" type="Control" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 14.0
|
||||||
|
offset_top = 40.0
|
||||||
|
offset_right = -14.0
|
||||||
|
offset_bottom = -14.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
mouse_filter = 2
|
||||||
|
clip_contents = true
|
||||||
|
|||||||
@@ -13,6 +13,10 @@ corner_radius_top_left = 8
|
|||||||
corner_radius_top_right = 8
|
corner_radius_top_right = 8
|
||||||
corner_radius_bottom_right = 8
|
corner_radius_bottom_right = 8
|
||||||
corner_radius_bottom_left = 8
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 36.0
|
||||||
|
content_margin_top = 28.0
|
||||||
|
content_margin_right = 36.0
|
||||||
|
content_margin_bottom = 28.0
|
||||||
|
|
||||||
[node name="QuestPanel" type="PanelContainer"]
|
[node name="QuestPanel" type="PanelContainer"]
|
||||||
visible = false
|
visible = false
|
||||||
@@ -22,70 +26,46 @@ anchor_left = 0.5
|
|||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -300.0
|
offset_left = -480.0
|
||||||
offset_top = -205.0
|
offset_top = -360.0
|
||||||
offset_right = 300.0
|
offset_right = 480.0
|
||||||
offset_bottom = 205.0
|
offset_bottom = 360.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
theme_override_styles/panel = SubResource("StyleBox_quest_panel")
|
theme_override_styles/panel = SubResource("StyleBox_quest_panel")
|
||||||
script = ExtResource("1_quest")
|
script = ExtResource("1_quest")
|
||||||
|
|
||||||
[node name="Title" type="Label" parent="."]
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 2
|
||||||
anchors_preset = 10
|
theme_override_constants/separation = 16
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_right = 0.5
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
offset_left = -270.0
|
custom_minimum_size = Vector2(0, 42)
|
||||||
offset_top = 18.0
|
layout_mode = 2
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = 46.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(0.55, 1, 0.67, 1)
|
theme_override_colors/font_color = Color(0.55, 1, 0.67, 1)
|
||||||
theme_override_font_sizes/font_size = 21
|
theme_override_font_sizes/font_size = 24
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="Body" type="RichTextLabel" parent="."]
|
[node name="Body" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 300)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 58.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -175.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 19
|
||||||
|
|
||||||
[node name="Entries" type="RichTextLabel" parent="."]
|
[node name="Entries" type="RichTextLabel" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 190)
|
||||||
anchors_preset = 15
|
layout_mode = 2
|
||||||
anchor_right = 1.0
|
size_flags_vertical = 3
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = 30.0
|
|
||||||
offset_top = 220.0
|
|
||||||
offset_right = -30.0
|
|
||||||
offset_bottom = -48.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
grow_vertical = 2
|
|
||||||
theme_override_colors/default_color = Color(0.7, 1, 0.75, 1)
|
theme_override_colors/default_color = Color(0.7, 1, 0.75, 1)
|
||||||
theme_override_font_sizes/normal_font_size = 17
|
theme_override_font_sizes/normal_font_size = 19
|
||||||
|
|
||||||
[node name="Help" type="Label" parent="."]
|
[node name="Help" type="Label" parent="Layout"]
|
||||||
layout_mode = 1
|
custom_minimum_size = Vector2(0, 34)
|
||||||
anchors_preset = 10
|
layout_mode = 2
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 1.0
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 1.0
|
|
||||||
offset_left = -270.0
|
|
||||||
offset_top = -42.0
|
|
||||||
offset_right = 270.0
|
|
||||||
offset_bottom = -18.0
|
|
||||||
grow_horizontal = 2
|
|
||||||
theme_override_colors/font_color = Color(0.55, 1, 0.67, 1)
|
theme_override_colors/font_color = Color(0.55, 1, 0.67, 1)
|
||||||
theme_override_font_sizes/font_size = 16
|
theme_override_font_sizes/font_size = 17
|
||||||
text = "↑/↓ Choisir Entrée Accepter A Abandonner Échap Fermer"
|
text = "↑/↓ Choisir Entrée Accepter A Abandonner Échap Fermer"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
vertical_alignment = 1
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
[gd_scene load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/presentation/race_class_choice_panel.gd" id="1_panel"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_panel"]
|
||||||
|
bg_color = Color(0.035, 0.055, 0.09, 0.99)
|
||||||
|
border_width_left = 3
|
||||||
|
border_width_top = 3
|
||||||
|
border_width_right = 3
|
||||||
|
border_width_bottom = 3
|
||||||
|
border_color = Color(0.96, 0.76, 0.28, 0.95)
|
||||||
|
corner_radius_top_left = 8
|
||||||
|
corner_radius_top_right = 8
|
||||||
|
corner_radius_bottom_right = 8
|
||||||
|
corner_radius_bottom_left = 8
|
||||||
|
content_margin_left = 28.0
|
||||||
|
content_margin_top = 22.0
|
||||||
|
content_margin_right = 28.0
|
||||||
|
content_margin_bottom = 22.0
|
||||||
|
|
||||||
|
[node name="RaceClassChoicePanel" type="PanelContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -390.0
|
||||||
|
offset_top = -300.0
|
||||||
|
offset_right = 390.0
|
||||||
|
offset_bottom = 300.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_panel")
|
||||||
|
script = ExtResource("1_panel")
|
||||||
|
|
||||||
|
[node name="Layout" type="VBoxContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/separation = 12
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="Layout"]
|
||||||
|
custom_minimum_size = Vector2(0, 34)
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(0.96, 0.82, 0.42, 1)
|
||||||
|
theme_override_font_sizes/font_size = 23
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Intro" type="Label" parent="Layout"]
|
||||||
|
custom_minimum_size = Vector2(0, 28)
|
||||||
|
layout_mode = 2
|
||||||
|
autowrap_mode = 2
|
||||||
|
theme_override_colors/font_color = Color(0.8, 0.88, 1, 1)
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Options" type="RichTextLabel" parent="Layout"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
theme_override_colors/default_color = Color(0.92, 0.95, 1, 1)
|
||||||
|
theme_override_font_sizes/normal_font_size = 16
|
||||||
@@ -52,7 +52,7 @@ layout_mode = 2
|
|||||||
theme_override_colors/font_color = Color(0.96, 0.84, 0.44, 1)
|
theme_override_colors/font_color = Color(0.96, 0.84, 0.44, 1)
|
||||||
theme_override_font_sizes/font_size = 26
|
theme_override_font_sizes/font_size = 26
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
text = "LOAD RUN"
|
text = "CHARGER UNE PARTIE"
|
||||||
|
|
||||||
[node name="Slots" type="VBoxContainer" parent="Panel/Layout"]
|
[node name="Slots" type="VBoxContainer" parent="Panel/Layout"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
@@ -92,4 +92,4 @@ horizontal_alignment = 1
|
|||||||
[node name="CancelButton" type="Button" parent="Panel/Layout"]
|
[node name="CancelButton" type="Button" parent="Panel/Layout"]
|
||||||
custom_minimum_size = Vector2(0, 40)
|
custom_minimum_size = Vector2(0, 40)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "BACK"
|
text = "RETOUR"
|
||||||
|
|||||||
@@ -0,0 +1,61 @@
|
|||||||
|
[gd_scene load_steps=3 format=3]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://scripts/presentation/victory_panel.gd" id="1_victory"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBox_victory_panel"]
|
||||||
|
bg_color = Color(0.035, 0.1, 0.08, 0.98)
|
||||||
|
border_width_left = 4
|
||||||
|
border_width_top = 4
|
||||||
|
border_width_right = 4
|
||||||
|
border_width_bottom = 4
|
||||||
|
border_color = Color(0.95, 0.78, 0.3, 0.98)
|
||||||
|
corner_radius_top_left = 8
|
||||||
|
corner_radius_top_right = 8
|
||||||
|
corner_radius_bottom_right = 8
|
||||||
|
corner_radius_bottom_left = 8
|
||||||
|
|
||||||
|
[node name="VictoryPanel" type="PanelContainer"]
|
||||||
|
visible = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -310.0
|
||||||
|
offset_top = -190.0
|
||||||
|
offset_right = 310.0
|
||||||
|
offset_bottom = 190.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBox_victory_panel")
|
||||||
|
script = ExtResource("1_victory")
|
||||||
|
|
||||||
|
[node name="Title" type="Label" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 10
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -260.0
|
||||||
|
offset_top = 22.0
|
||||||
|
offset_right = 260.0
|
||||||
|
offset_bottom = 54.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_colors/font_color = Color(1, 0.82, 0.35, 1)
|
||||||
|
theme_override_font_sizes/font_size = 27
|
||||||
|
text = "VICTOIRE"
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Body" type="RichTextLabel" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 40.0
|
||||||
|
offset_top = 75.0
|
||||||
|
offset_right = -40.0
|
||||||
|
offset_bottom = -34.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_colors/default_color = Color(0.94, 1, 0.9, 1)
|
||||||
|
theme_override_font_sizes/normal_font_size = 18
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Export the Linux desktop build and, unless SKIP_SMOKE=1, prove it starts under
|
||||||
|
# X11. Artifacts are intentionally ignored and can be recreated at any time.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
cd "$root_dir"
|
||||||
|
|
||||||
|
GODOT_BIN="${GODOT_BIN:-/snap/bin/godot4}"
|
||||||
|
if [[ ! -x "$GODOT_BIN" ]]; then
|
||||||
|
GODOT_BIN="$(command -v godot4 || command -v godot || true)"
|
||||||
|
fi
|
||||||
|
if [[ -z "$GODOT_BIN" ]]; then
|
||||||
|
echo "build-linux: Godot executable not found; set GODOT_BIN." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
preset="Linux/X11"
|
||||||
|
output="build/linux/DungeonCrawlerWorld.x86_64"
|
||||||
|
godot_version="$("$GODOT_BIN" --version)"
|
||||||
|
template_version="${godot_version%%.official.*}"
|
||||||
|
if [[ -n "${GODOT_EXPORT_TEMPLATES_DIR:-}" ]]; then
|
||||||
|
templates_dir="$GODOT_EXPORT_TEMPLATES_DIR"
|
||||||
|
else
|
||||||
|
# Native and Flatpak Godot use these roots. The Snap owns its isolated
|
||||||
|
# user-data directory, so query it rather than incorrectly using this shell's HOME.
|
||||||
|
templates_dir="$HOME/.local/share/godot/export_templates/$template_version"
|
||||||
|
if [[ "$GODOT_BIN" == /snap/* ]] && command -v snap >/dev/null 2>&1; then
|
||||||
|
snap_data="$(snap run --shell godot4 -c 'printf %s "$SNAP_USER_DATA"' 2>/dev/null || true)"
|
||||||
|
if [[ -n "$snap_data" ]]; then
|
||||||
|
templates_dir="$snap_data/.local/share/godot/export_templates/$template_version"
|
||||||
|
fi
|
||||||
|
elif [[ -n "${XDG_DATA_HOME:-}" ]]; then
|
||||||
|
templates_dir="$XDG_DATA_HOME/godot/export_templates/$template_version"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ ! -f "$templates_dir/linux_release.x86_64" ]]; then
|
||||||
|
echo "build-linux: missing Godot export templates for $preset at $templates_dir (expected linux_release.x86_64). Install templates matching $template_version, or set GODOT_EXPORT_TEMPLATES_DIR." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$output")"
|
||||||
|
rm -f "$output" "$output.pck"
|
||||||
|
"$GODOT_BIN" --headless --path . --export-release "$preset" "$output"
|
||||||
|
|
||||||
|
if [[ ! -x "$output" ]]; then
|
||||||
|
echo "build-linux: export did not create an executable artifact at $output." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [[ ! -s "$output" ]]; then
|
||||||
|
echo "build-linux: Linux artifact is empty: $output." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "${SKIP_SMOKE:-0}" == "1" ]]; then
|
||||||
|
echo "build-linux: exported $output (smoke skipped by SKIP_SMOKE=1)"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
runner=()
|
||||||
|
if [[ -z "${DISPLAY:-}" ]]; then
|
||||||
|
if ! command -v xvfb-run >/dev/null 2>&1; then
|
||||||
|
echo "build-linux: X11 smoke unavailable: DISPLAY is unset and xvfb-run is not installed." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
runner=(xvfb-run --auto-servernum --server-args="-screen 0 1920x1080x24")
|
||||||
|
fi
|
||||||
|
|
||||||
|
smoke_log="build/linux/smoke.log"
|
||||||
|
# Capture mode gives the deterministic test fixture a graceful exit. Exported
|
||||||
|
# PCK resources are read-only, so the capture is only an exit seam; startup
|
||||||
|
# success and an error-free log are the portable release-smoke contract.
|
||||||
|
set +e
|
||||||
|
timeout --foreground 8s "${runner[@]}" "./$output" -- --capture >"$smoke_log" 2>&1
|
||||||
|
smoke_status=$?
|
||||||
|
set -e
|
||||||
|
if [[ "$smoke_status" -ne 0 ]]; then
|
||||||
|
echo "build-linux: X11 smoke failed with status $smoke_status; see $smoke_log." >&2
|
||||||
|
exit "$smoke_status"
|
||||||
|
fi
|
||||||
|
if grep -Eq 'SCRIPT ERROR|Parse Error|^ERROR:' "$smoke_log"; then
|
||||||
|
echo "build-linux: X11 smoke reported a Godot application error; see $smoke_log." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "build-linux: exported and X11-smoke-tested $output"
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Export the Windows desktop build. Linux can validate the generated file
|
||||||
|
# manifest, but it deliberately does not claim to execute the Windows runtime.
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||||
|
cd "$root_dir"
|
||||||
|
|
||||||
|
GODOT_BIN="${GODOT_BIN:-/snap/bin/godot4}"
|
||||||
|
if [[ ! -x "$GODOT_BIN" ]]; then
|
||||||
|
GODOT_BIN="$(command -v godot4 || command -v godot || true)"
|
||||||
|
fi
|
||||||
|
if [[ -z "$GODOT_BIN" ]]; then
|
||||||
|
echo "build-windows: Godot executable not found; set GODOT_BIN." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
preset="Windows Desktop"
|
||||||
|
output="build/windows/DungeonCrawlerWorld.exe"
|
||||||
|
godot_version="$("$GODOT_BIN" --version)"
|
||||||
|
template_version="${godot_version%%.official.*}"
|
||||||
|
if [[ -n "${GODOT_EXPORT_TEMPLATES_DIR:-}" ]]; then
|
||||||
|
templates_dir="$GODOT_EXPORT_TEMPLATES_DIR"
|
||||||
|
else
|
||||||
|
# Native and Flatpak Godot use these roots. The Snap owns its isolated
|
||||||
|
# user-data directory, so query it rather than incorrectly using this shell's HOME.
|
||||||
|
templates_dir="$HOME/.local/share/godot/export_templates/$template_version"
|
||||||
|
if [[ "$GODOT_BIN" == /snap/* ]] && command -v snap >/dev/null 2>&1; then
|
||||||
|
snap_data="$(snap run --shell godot4 -c 'printf %s "$SNAP_USER_DATA"' 2>/dev/null || true)"
|
||||||
|
if [[ -n "$snap_data" ]]; then
|
||||||
|
templates_dir="$snap_data/.local/share/godot/export_templates/$template_version"
|
||||||
|
fi
|
||||||
|
elif [[ -n "${XDG_DATA_HOME:-}" ]]; then
|
||||||
|
templates_dir="$XDG_DATA_HOME/godot/export_templates/$template_version"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if [[ ! -f "$templates_dir/windows_release_x86_64.exe" ]]; then
|
||||||
|
echo "build-windows: missing Godot export templates for $preset at $templates_dir (expected windows_release_x86_64.exe). Install templates matching $template_version, or set GODOT_EXPORT_TEMPLATES_DIR." >&2
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p "$(dirname "$output")"
|
||||||
|
rm -f "$output" "$output.pck" "$output.manifest"
|
||||||
|
"$GODOT_BIN" --headless --path . --export-release "$preset" "$output"
|
||||||
|
|
||||||
|
if [[ ! -s "$output" ]]; then
|
||||||
|
echo "build-windows: export did not create a non-empty executable at $output." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Godot may embed the PCK or emit a sidecar. Capture the exact distribution
|
||||||
|
# manifest so release automation can ship every generated file without guessing.
|
||||||
|
manifest="$output.manifest"
|
||||||
|
artifact_names="$(find "$(dirname "$output")" -maxdepth 1 -type f ! -name "$(basename "$manifest")" -printf '%f\n' | LC_ALL=C sort)"
|
||||||
|
if [[ -z "$artifact_names" ]]; then
|
||||||
|
echo "build-windows: no export files found beside $output." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
{
|
||||||
|
echo "# Generated by scripts/build-windows.sh; runtime execution is not validated on Linux."
|
||||||
|
printf '%s\n' "$artifact_names"
|
||||||
|
} >"$manifest"
|
||||||
|
if ! grep -Fxq "$(basename "$output")" "$manifest"; then
|
||||||
|
echo "build-windows: artifact manifest does not include $(basename "$output")." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "build-windows: exported $output and validated $manifest; Windows runtime was not executed on this host."
|
||||||
@@ -13,9 +13,16 @@ import sys
|
|||||||
import zlib
|
import zlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
WIDTH = 1280
|
REFERENCE_WIDTH = 1920
|
||||||
HEIGHT = 720
|
REFERENCE_HEIGHT = 1080
|
||||||
VIEWPORT = (256, 40, 1024, 678)
|
EXPECTED_DIMENSIONS = {
|
||||||
|
"visual-check.png": (REFERENCE_WIDTH, REFERENCE_HEIGHT),
|
||||||
|
"visual-check-exit.png": (REFERENCE_WIDTH, REFERENCE_HEIGHT),
|
||||||
|
"visual-check-compact.png": (1280, 720),
|
||||||
|
}
|
||||||
|
# The unmasked PlayAreaFrame in the reference 1920×1080 artboard.
|
||||||
|
# This is scaled for the real 720p capture.
|
||||||
|
PLAY_AREA_REFERENCE = (498, 125, 1422, 955)
|
||||||
UNKNOWN = (1, 2, 5)
|
UNKNOWN = (1, 2, 5)
|
||||||
# Captured explored tiles are texture modulated, so classify their blue-black
|
# Captured explored tiles are texture modulated, so classify their blue-black
|
||||||
# pixels by palette range rather than expecting one flat overlay color.
|
# pixels by palette range rather than expecting one flat overlay color.
|
||||||
@@ -68,8 +75,14 @@ def read_png(path: Path) -> tuple[int, int, list[bytes]]:
|
|||||||
if header is None or not saw_iend or offset != len(data):
|
if header is None or not saw_iend or offset != len(data):
|
||||||
fail("incomplete PNG")
|
fail("incomplete PNG")
|
||||||
width, height, depth, color_type, compression, filtering, interlace = header
|
width, height, depth, color_type, compression, filtering, interlace = header
|
||||||
if (width, height) != (WIDTH, HEIGHT):
|
expected_dimensions = EXPECTED_DIMENSIONS.get(path.name)
|
||||||
fail(f"expected {WIDTH}x{HEIGHT} PNG, got {width}x{height}")
|
if expected_dimensions is None:
|
||||||
|
fail(f"unsupported visual capture name: {path.name}")
|
||||||
|
if (width, height) != expected_dimensions:
|
||||||
|
fail(
|
||||||
|
f"expected {expected_dimensions[0]}x{expected_dimensions[1]} PNG, "
|
||||||
|
f"got {width}x{height}"
|
||||||
|
)
|
||||||
if depth != 8 or color_type not in (2, 6):
|
if depth != 8 or color_type not in (2, 6):
|
||||||
fail("visual capture must be an 8-bit RGB or RGBA PNG")
|
fail("visual capture must be an 8-bit RGB or RGBA PNG")
|
||||||
if (compression, filtering, interlace) != (0, 0, 0):
|
if (compression, filtering, interlace) != (0, 0, 0):
|
||||||
@@ -140,23 +153,40 @@ def luminance(rgb: tuple[int, int, int]) -> float:
|
|||||||
|
|
||||||
|
|
||||||
def is_visible(pixel: tuple[int, int, int]) -> bool:
|
def is_visible(pixel: tuple[int, int, int]) -> bool:
|
||||||
# The unmodulated grayscale floor texture includes these neutral bright texels.
|
# Visible terrain can be either the neutral wall texture or the brown floor
|
||||||
return max(pixel) - min(pixel) <= 3 and max(pixel) >= 112
|
# texture. The authored surface begins in a large open room, so a capture is
|
||||||
|
# not required to include a wall inside the central measurement crop.
|
||||||
|
neutral_wall = max(pixel) - min(pixel) <= 3 and max(pixel) >= 112
|
||||||
|
unmodulated_floor = pixel in {
|
||||||
|
(23, 4, 0), (23, 7, 0), (10, 10, 0), (30, 13, 0),
|
||||||
|
(4, 4, 0), (41, 23, 1), (30, 9, 0), (66, 36, 6),
|
||||||
|
}
|
||||||
|
return neutral_wall or unmodulated_floor
|
||||||
|
|
||||||
|
|
||||||
def is_explored(pixel: tuple[int, int, int]) -> bool:
|
def is_explored(pixel: tuple[int, int, int]) -> bool:
|
||||||
# Tile texture remains visible under a blue-black fog overlay. This is the
|
# Texture-preserving explored terrain is rendered under a blue-black fog
|
||||||
# dominant fog-modulated floor texel; keeping the detector exact avoids HUD
|
# overlay. GPU blend rounding and the authored floor texture produce a
|
||||||
# colors and visible terrain satisfying it.
|
# palette rather than one portable exact RGB value; accept only its dark,
|
||||||
return pixel == (19, 29, 39)
|
# blue-shifted range so HUD chrome and visible brown terrain cannot match.
|
||||||
|
red, green, blue = pixel
|
||||||
|
return 4 <= red <= 14 and 7 <= green <= 22 and 16 <= blue <= 32 and blue >= green + 4 and green >= red + 3
|
||||||
|
|
||||||
|
|
||||||
|
def viewport_for(width: int, height: int) -> tuple[int, int, int, int]:
|
||||||
|
scale_x = width / REFERENCE_WIDTH
|
||||||
|
scale_y = height / REFERENCE_HEIGHT
|
||||||
|
return tuple(round(coordinate * (scale_x if index % 2 == 0 else scale_y)) for index, coordinate in enumerate(PLAY_AREA_REFERENCE))
|
||||||
|
|
||||||
|
|
||||||
def measure(path: Path) -> None:
|
def measure(path: Path) -> None:
|
||||||
|
width, height = EXPECTED_DIMENSIONS[path.name]
|
||||||
observed = list(pixels(path))
|
observed = list(pixels(path))
|
||||||
|
viewport = viewport_for(width, height)
|
||||||
dungeon_pixels = [
|
dungeon_pixels = [
|
||||||
observed[y * WIDTH + x]
|
observed[y * width + x]
|
||||||
for y in range(VIEWPORT[1], VIEWPORT[3])
|
for y in range(viewport[1], viewport[3])
|
||||||
for x in range(VIEWPORT[0], VIEWPORT[2])
|
for x in range(viewport[0], viewport[2])
|
||||||
]
|
]
|
||||||
non_black = sum(pixel != (0, 0, 0) for pixel in dungeon_pixels)
|
non_black = sum(pixel != (0, 0, 0) for pixel in dungeon_pixels)
|
||||||
unknown_pixels = [pixel for pixel in dungeon_pixels if pixel == UNKNOWN]
|
unknown_pixels = [pixel for pixel in dungeon_pixels if pixel == UNKNOWN]
|
||||||
|
|||||||
@@ -12,6 +12,9 @@ var max_hit_points: int
|
|||||||
# Legacy basic damage remains the unarmed/default weapon damage.
|
# Legacy basic damage remains the unarmed/default weapon damage.
|
||||||
var attack_damage: int
|
var attack_damage: int
|
||||||
var content_id: StringName
|
var content_id: StringName
|
||||||
|
# Non-combat authored NPC state (including protected tourist health) persists
|
||||||
|
# alongside the actor without exposing it to normal combat resolution.
|
||||||
|
var metadata: Dictionary = {}
|
||||||
|
|
||||||
# Data-backed combat stats. Defaults retain the pre-C2 prototype fixtures.
|
# Data-backed combat stats. Defaults retain the pre-C2 prototype fixtures.
|
||||||
var accuracy := 30
|
var accuracy := 30
|
||||||
@@ -65,6 +68,7 @@ func _init(new_id: StringName, new_cell: Vector2i, new_hit_points: int, new_atta
|
|||||||
max_hit_points = new_hit_points
|
max_hit_points = new_hit_points
|
||||||
attack_damage = new_attack_damage
|
attack_damage = new_attack_damage
|
||||||
content_id = new_content_id if not new_content_id.is_empty() else new_id
|
content_id = new_content_id if not new_content_id.is_empty() else new_id
|
||||||
|
metadata = combat_data.get("metadata", {}).duplicate(true)
|
||||||
accuracy = int(combat_data.get("accuracy", accuracy))
|
accuracy = int(combat_data.get("accuracy", accuracy))
|
||||||
defense = int(combat_data.get("defense", defense))
|
defense = int(combat_data.get("defense", defense))
|
||||||
armor = int(combat_data.get("armor", armor))
|
armor = int(combat_data.get("armor", armor))
|
||||||
|
|||||||
@@ -3,33 +3,40 @@ extends RefCounted
|
|||||||
|
|
||||||
const CompanionStateType = preload("res://scripts/domain/entities/companion_state.gd")
|
const CompanionStateType = preload("res://scripts/domain/entities/companion_state.gd")
|
||||||
const PathfindingType = preload("res://scripts/domain/ai/pathfinding.gd")
|
const PathfindingType = preload("res://scripts/domain/ai/pathfinding.gd")
|
||||||
|
const SUPPORT_HEAL_THRESHOLD := 0.5
|
||||||
|
const SUPPORT_HEAL_RANGE := 4
|
||||||
|
const SUPPORT_HEAL_AMOUNT := 2
|
||||||
|
|
||||||
static func decide(companion: CompanionState, player: ActorState, enemies: Dictionary[StringName, ActorState], map: GridMapState, blocked_cells: Dictionary[Vector2i, bool] = {}) -> Dictionary:
|
static func decide(companion: CompanionState, player: ActorState, enemies: Dictionary[StringName, ActorState], map: GridMapState, blocked_cells: Dictionary[Vector2i, bool] = {}, detected_cells: Dictionary[Vector2i, bool] = {}) -> Dictionary:
|
||||||
if companion == null or not companion.is_alive():
|
if companion == null or not companion.is_alive():
|
||||||
return {"kind": &"idle"}
|
return {"kind": &"idle"}
|
||||||
match companion.stance:
|
match CompanionStateType.normalize_stance(companion.stance):
|
||||||
CompanionStateType.Stance.FOLLOW:
|
CompanionStateType.Stance.STAY_BACK:
|
||||||
return _follow(companion.actor, player, map, blocked_cells)
|
return _follow(companion.actor, player, map, blocked_cells)
|
||||||
CompanionStateType.Stance.DEFEND:
|
CompanionStateType.Stance.DEFEND_ME:
|
||||||
return _defend(companion.actor, player, enemies, map, blocked_cells)
|
return _defend(companion.actor, player, enemies, map, blocked_cells)
|
||||||
CompanionStateType.Stance.SUPPORT:
|
CompanionStateType.Stance.ATTACK_ON_SIGHT:
|
||||||
return {"kind": &"idle"}
|
return _aggressive(companion.actor, player, enemies, map, blocked_cells, detected_cells)
|
||||||
_:
|
_:
|
||||||
return {"kind": &"idle"}
|
return {"kind": &"idle"}
|
||||||
|
|
||||||
|
static func _aggressive(actor: ActorState, player: ActorState, enemies: Dictionary[StringName, ActorState], map: GridMapState, blocked_cells: Dictionary[Vector2i, bool], detected_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
||||||
|
var target := _nearest_enemy(actor.cell, enemies, detected_cells)
|
||||||
|
if target == null:
|
||||||
|
return _follow(actor, player, map, blocked_cells)
|
||||||
|
if actor.cell.distance_to(target.cell) <= 1.5:
|
||||||
|
return {"kind": &"melee", "target_id": target.id}
|
||||||
|
return _move_toward(actor, target.cell, player.cell, map, blocked_cells)
|
||||||
|
|
||||||
|
static func _support(actor: ActorState, player: ActorState, map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
||||||
|
if player.is_alive() and float(player.hit_points) / float(maxi(1, player.effective_max_hit_points())) < SUPPORT_HEAL_THRESHOLD and actor.cell.distance_to(player.cell) <= SUPPORT_HEAL_RANGE:
|
||||||
|
return {"kind": &"heal_player", "amount": SUPPORT_HEAL_AMOUNT}
|
||||||
|
return _follow(actor, player, map, blocked_cells)
|
||||||
|
|
||||||
static func _follow(actor: ActorState, player: ActorState, map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
static func _follow(actor: ActorState, player: ActorState, map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
||||||
if actor.cell.distance_to(player.cell) <= 1.5:
|
if actor.cell.distance_to(player.cell) <= 1.5:
|
||||||
return {"kind": &"idle"}
|
return {"kind": &"idle"}
|
||||||
var occupied := blocked_cells.duplicate()
|
return _move_toward(actor, player.cell, player.cell, map, blocked_cells)
|
||||||
occupied.erase(actor.cell)
|
|
||||||
occupied[player.cell] = true
|
|
||||||
var goals: Array[Vector2i] = []
|
|
||||||
for direction: Vector2i in PathfindingType.CARDINAL_DIRECTIONS:
|
|
||||||
var cell := player.cell + direction
|
|
||||||
if map.is_walkable(cell) and not occupied.has(cell):
|
|
||||||
goals.append(cell)
|
|
||||||
var path := PathfindingType.find_path_to_any(map, actor.cell, goals, occupied)
|
|
||||||
return {"kind": &"move", "to_cell": path.front()} if not path.is_empty() else {"kind": &"idle"}
|
|
||||||
|
|
||||||
static func _defend(actor: ActorState, player: ActorState, enemies: Dictionary[StringName, ActorState], map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
static func _defend(actor: ActorState, player: ActorState, enemies: Dictionary[StringName, ActorState], map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
||||||
var targets: Array[ActorState] = []
|
var targets: Array[ActorState] = []
|
||||||
@@ -37,6 +44,33 @@ static func _defend(actor: ActorState, player: ActorState, enemies: Dictionary[S
|
|||||||
if enemy.is_alive() and enemy.cell.distance_to(player.cell) <= 1.5:
|
if enemy.is_alive() and enemy.cell.distance_to(player.cell) <= 1.5:
|
||||||
targets.append(enemy)
|
targets.append(enemy)
|
||||||
targets.sort_custom(func(first: ActorState, second: ActorState) -> bool: return String(first.id) < String(second.id))
|
targets.sort_custom(func(first: ActorState, second: ActorState) -> bool: return String(first.id) < String(second.id))
|
||||||
if not targets.is_empty() and actor.cell.distance_to(targets[0].cell) <= 1.5:
|
if not targets.is_empty():
|
||||||
|
if actor.cell.distance_to(targets[0].cell) <= 1.5:
|
||||||
return {"kind": &"melee", "target_id": targets[0].id}
|
return {"kind": &"melee", "target_id": targets[0].id}
|
||||||
|
return _move_toward(actor, targets[0].cell, player.cell, map, blocked_cells)
|
||||||
return _follow(actor, player, map, blocked_cells)
|
return _follow(actor, player, map, blocked_cells)
|
||||||
|
|
||||||
|
static func _move_toward(actor: ActorState, destination: Vector2i, player_cell: Vector2i, map: GridMapState, blocked_cells: Dictionary[Vector2i, bool]) -> Dictionary:
|
||||||
|
var occupied := blocked_cells.duplicate()
|
||||||
|
occupied.erase(actor.cell)
|
||||||
|
occupied[player_cell] = true
|
||||||
|
occupied[destination] = true
|
||||||
|
var goals: Array[Vector2i] = []
|
||||||
|
for direction: Vector2i in PathfindingType.CARDINAL_DIRECTIONS:
|
||||||
|
var cell := destination + direction
|
||||||
|
if map.is_walkable(cell) and not occupied.has(cell):
|
||||||
|
goals.append(cell)
|
||||||
|
var path := PathfindingType.find_path_to_any(map, actor.cell, goals, occupied)
|
||||||
|
return {"kind": &"move", "to_cell": path.front()} if not path.is_empty() else {"kind": &"idle"}
|
||||||
|
|
||||||
|
static func _nearest_enemy(origin: Vector2i, enemies: Dictionary[StringName, ActorState], detected_cells: Dictionary[Vector2i, bool]) -> ActorState:
|
||||||
|
var candidates: Array[ActorState] = []
|
||||||
|
for enemy: ActorState in enemies.values():
|
||||||
|
if enemy.is_alive() and detected_cells.has(enemy.cell):
|
||||||
|
candidates.append(enemy)
|
||||||
|
candidates.sort_custom(func(first: ActorState, second: ActorState) -> bool:
|
||||||
|
var first_distance := origin.distance_squared_to(first.cell)
|
||||||
|
var second_distance := origin.distance_squared_to(second.cell)
|
||||||
|
return String(first.id) < String(second.id) if first_distance == second_distance else first_distance < second_distance
|
||||||
|
)
|
||||||
|
return candidates[0] if not candidates.is_empty() else null
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ func _init(scripted_rolls: Array[float] = []) -> void:
|
|||||||
_rolls.assign(scripted_rolls)
|
_rolls.assign(scripted_rolls)
|
||||||
|
|
||||||
func resolve_attack(attacker: ActorState, defender: ActorState, grant_xp: bool = true) -> Dictionary:
|
func resolve_attack(attacker: ActorState, defender: ActorState, grant_xp: bool = true) -> Dictionary:
|
||||||
var events: Array[Dictionary] = [_event(&"attack_started", attacker, defender, {"stance": String(attacker.stance)})]
|
var attack_method := String(attacker.metadata.get("melee_weapon_name", "mains nues" if attacker.id == &"player" else "attaque naturelle"))
|
||||||
|
var events: Array[Dictionary] = [_event(&"attack_started", attacker, defender, {"stance": String(attacker.stance), "attack_method": attack_method})]
|
||||||
var attack_score := attacker.accuracy - attacker.wound_severity(&"arms") * ARM_WOUND_PENALTY
|
var attack_score := attacker.accuracy - attacker.wound_severity(&"arms") * ARM_WOUND_PENALTY
|
||||||
var defense_score := defender.defense * 3 - defender.wound_severity(&"legs") * LEG_WOUND_PENALTY
|
var defense_score := defender.defense * 3 - defender.wound_severity(&"legs") * LEG_WOUND_PENALTY
|
||||||
if defender.stance == &"dodge":
|
if defender.stance == &"dodge":
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ class_name ConditionEngine
|
|||||||
extends RefCounted
|
extends RefCounted
|
||||||
|
|
||||||
const StatusEffectType = preload("res://scripts/domain/combat/status_effect.gd")
|
const StatusEffectType = preload("res://scripts/domain/combat/status_effect.gd")
|
||||||
|
const SafeRoomServiceType = preload("res://scripts/domain/world/safe_room_service.gd")
|
||||||
|
const TouristServiceType = preload("res://scripts/domain/world/tourist_service.gd")
|
||||||
|
|
||||||
var diagnostics := PackedStringArray()
|
var diagnostics := PackedStringArray()
|
||||||
|
|
||||||
@@ -116,6 +118,21 @@ func apply_effect(effect: Dictionary, context: Dictionary) -> Dictionary:
|
|||||||
if not moderation_fn.is_valid():
|
if not moderation_fn.is_valid():
|
||||||
return {"applied": false, "type": kind, "reason": &"missing_moderation_context"}
|
return {"applied": false, "type": kind, "reason": &"missing_moderation_context"}
|
||||||
return moderation_fn.call(StringName(effect.get("reason", "propos_interdits")))
|
return moderation_fn.call(StringName(effect.get("reason", "propos_interdits")))
|
||||||
|
&"tourist_selfie", &"endanger_tourist":
|
||||||
|
var tourist_run: RunState = context.get("run_state")
|
||||||
|
var tourist_id := StringName(context.get("npc_id", ""))
|
||||||
|
if tourist_run == null or tourist_id.is_empty():
|
||||||
|
return {"applied": false, "type": kind, "reason": &"missing_tourist_context"}
|
||||||
|
var tourist_events := TouristServiceType.selfie(tourist_run, tourist_id) if kind == &"tourist_selfie" else TouristServiceType.endanger(tourist_run, tourist_id, int(effect.get("amount", 0)))
|
||||||
|
return {"applied": not tourist_events.is_empty(), "type": kind, "events": tourist_events}
|
||||||
|
&"give_item":
|
||||||
|
var run: RunState = context.get("run_state")
|
||||||
|
var npc_id: StringName = StringName(context.get("npc_id", ""))
|
||||||
|
var npc_content_id: StringName = StringName(context.get("npc_content_id", ""))
|
||||||
|
if run == null or npc_id.is_empty() or npc_content_id != SafeRoomServiceType.BOBKA_CONTENT_ID or StringName(effect.get("item", "")) != SafeRoomServiceType.RATION_ITEM_ID:
|
||||||
|
return {"applied": false, "type": kind, "reason": &"unsupported_item_grant"}
|
||||||
|
var ration_events := SafeRoomServiceType.give_bobka_ration(run, npc_id)
|
||||||
|
return {"applied": not ration_events.is_empty(), "type": kind, "events": ration_events}
|
||||||
&"join_party":
|
&"join_party":
|
||||||
var party: PartyState = context.get("party")
|
var party: PartyState = context.get("party")
|
||||||
var recruit: ActorState = context.get("recruit")
|
var recruit: ActorState = context.get("recruit")
|
||||||
@@ -124,7 +141,7 @@ func apply_effect(effect: Dictionary, context: Dictionary) -> Dictionary:
|
|||||||
return {"applied": false, "type": kind, "reason": &"missing_party_context"}
|
return {"applied": false, "type": kind, "reason": &"missing_party_context"}
|
||||||
var result := party.recruit(recruit, player.cell, map, context.get("blocked_cells", {}))
|
var result := party.recruit(recruit, player.cell, map, context.get("blocked_cells", {}))
|
||||||
return {"applied": bool(result.get("accepted", false)), "type": kind, "result": result}
|
return {"applied": bool(result.get("accepted", false)), "type": kind, "result": result}
|
||||||
&"message", &"give_item", &"remove_item", &"learn_spell", &"learn_random_spell", &"complete_objective", &"endanger_tourist", &"augment_companion", &"tourist_selfie":
|
&"message", &"remove_item", &"learn_spell", &"learn_random_spell", &"complete_objective", &"augment_companion":
|
||||||
# Later content slices own the corresponding inventory, quest, NPC, and spell mutations.
|
# Later content slices own the corresponding inventory, quest, NPC, and spell mutations.
|
||||||
pass
|
pass
|
||||||
_:
|
_:
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
class_name HealthRegeneration
|
||||||
|
extends RefCounted
|
||||||
|
|
||||||
|
const ENDURANCE_DIVISOR := 3
|
||||||
|
const SKILL_AMPLIFIER := 0.15
|
||||||
|
const DIFFICULTY_MULTIPLIERS := {
|
||||||
|
&"touriste": 1.5,
|
||||||
|
&"crawler": 1.0,
|
||||||
|
&"veteran": 0.75,
|
||||||
|
&"masochiste": 0.5,
|
||||||
|
}
|
||||||
|
|
||||||
|
static func amount(endurance: int, regeneration_skill: int = 1, perk_bonus: int = 0, difficulty_id: StringName = &"crawler") -> int:
|
||||||
|
var base := maxi(1, endurance / ENDURANCE_DIVISOR)
|
||||||
|
var skill_bonus := maxi(0, regeneration_skill - 1)
|
||||||
|
var total := float(base + maxi(0, perk_bonus)) * (1.0 + float(skill_bonus) * SKILL_AMPLIFIER)
|
||||||
|
return maxi(0, int(total * float(DIFFICULTY_MULTIPLIERS.get(difficulty_id, 1.0))))
|
||||||
|
|
||||||
|
static func apply(actor: ActorState, endurance: int, regeneration_skill: int = 1, perk_bonus: int = 0, difficulty_id: StringName = &"crawler") -> int:
|
||||||
|
if actor == null or not actor.is_alive():
|
||||||
|
return 0
|
||||||
|
var before := actor.hit_points
|
||||||
|
actor.hit_points = mini(actor.effective_max_hit_points(), actor.hit_points + amount(endurance, regeneration_skill, perk_bonus, difficulty_id))
|
||||||
|
return actor.hit_points - before
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://3ccnf6g0ily8
|
||||||
@@ -37,6 +37,9 @@ func resolve(map: GridMapState, attacker: ActorState, target: ActorState) -> Dic
|
|||||||
"events": events,
|
"events": events,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func validation_reason(map: GridMapState, attacker: ActorState, target: ActorState) -> StringName:
|
||||||
|
return _validation_reason(map, attacker, target)
|
||||||
|
|
||||||
func _validation_reason(map: GridMapState, attacker: ActorState, target: ActorState) -> StringName:
|
func _validation_reason(map: GridMapState, attacker: ActorState, target: ActorState) -> StringName:
|
||||||
if attacker == null or target == null or attacker == target or attacker.id == target.id or not target.is_alive():
|
if attacker == null or target == null or attacker == target or attacker.id == target.id or not target.is_alive():
|
||||||
return &"invalid_target"
|
return &"invalid_target"
|
||||||
|
|||||||
@@ -4,36 +4,70 @@ extends RefCounted
|
|||||||
# E4 deliberately owns only the companion's earned-XP ledger. F1 remains the
|
# E4 deliberately owns only the companion's earned-XP ledger. F1 remains the
|
||||||
# sole owner of level thresholds and character progression.
|
# sole owner of level thresholds and character progression.
|
||||||
class Stance:
|
class Stance:
|
||||||
|
const STAY_BACK: StringName = &"stay_back"
|
||||||
|
const DEFEND_ME: StringName = &"defend_me"
|
||||||
|
const ATTACK_ON_SIGHT: StringName = &"attack_on_sight"
|
||||||
|
# Legacy identifiers remain readable for code and saves created before the
|
||||||
|
# player-facing behavior names were introduced.
|
||||||
const FOLLOW: StringName = &"follow"
|
const FOLLOW: StringName = &"follow"
|
||||||
const DEFEND: StringName = &"defend"
|
const DEFEND: StringName = &"defend"
|
||||||
const SUPPORT: StringName = &"support"
|
const SUPPORT: StringName = &"support"
|
||||||
|
|
||||||
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
||||||
const ExperienceType = preload("res://scripts/domain/progression/experience.gd")
|
const ExperienceType = preload("res://scripts/domain/progression/experience.gd")
|
||||||
const VALID_STANCES: Array[StringName] = [Stance.FOLLOW, Stance.DEFEND, Stance.SUPPORT]
|
const VALID_STANCES: Array[StringName] = [Stance.STAY_BACK, Stance.DEFEND_ME, Stance.ATTACK_ON_SIGHT]
|
||||||
|
|
||||||
var choice_id: StringName
|
var choice_id: StringName
|
||||||
var actor: ActorState
|
var actor: ActorState
|
||||||
var stance: StringName = Stance.FOLLOW
|
var stance: StringName = Stance.STAY_BACK
|
||||||
|
var name := "Familier"
|
||||||
|
var species := "Animal"
|
||||||
|
var endurance := 4
|
||||||
|
var regeneration_skill := 1
|
||||||
|
var regeneration_perk_bonus := 0
|
||||||
|
|
||||||
func _init(new_choice_id: StringName, new_actor: ActorState) -> void:
|
func _init(new_choice_id: StringName, new_actor: ActorState) -> void:
|
||||||
choice_id = new_choice_id
|
choice_id = new_choice_id
|
||||||
actor = new_actor
|
actor = new_actor
|
||||||
|
|
||||||
static func from_choice(new_choice_id: StringName, cell: Vector2i, hit_points: int = 8) -> CompanionState:
|
static func from_choice(new_choice_id: StringName, cell: Vector2i, hit_points: int = 8, new_name: String = "Familier", new_species: String = "Animal") -> CompanionState:
|
||||||
var id := new_choice_id if not new_choice_id.is_empty() else &"moth"
|
var id := new_choice_id if not new_choice_id.is_empty() else &"moth"
|
||||||
var companion_actor := ActorStateType.new(&"companion", cell, maxi(1, hit_points), 3, id, {"accuracy": 30, "xp": 0})
|
var companion_actor := ActorStateType.new(&"companion", cell, maxi(1, hit_points), 3, id, {"accuracy": 30, "xp": 0})
|
||||||
return CompanionState.new(id, companion_actor)
|
var companion := CompanionState.new(id, companion_actor)
|
||||||
|
companion.name = new_name.strip_edges() if not new_name.strip_edges().is_empty() else "Familier"
|
||||||
|
companion.species = new_species.strip_edges() if not new_species.strip_edges().is_empty() else "Animal"
|
||||||
|
return companion
|
||||||
|
|
||||||
func is_alive() -> bool:
|
func is_alive() -> bool:
|
||||||
return actor != null and actor.is_alive()
|
return actor != null and actor.is_alive()
|
||||||
|
|
||||||
func set_stance(new_stance: StringName) -> bool:
|
func set_stance(new_stance: StringName) -> bool:
|
||||||
if not new_stance in VALID_STANCES:
|
var normalized := normalize_stance(new_stance)
|
||||||
|
if not normalized in VALID_STANCES:
|
||||||
return false
|
return false
|
||||||
stance = new_stance
|
stance = normalized
|
||||||
return true
|
return true
|
||||||
|
|
||||||
|
static func normalize_stance(value: StringName) -> StringName:
|
||||||
|
match value:
|
||||||
|
Stance.FOLLOW, &"aggressif": return Stance.ATTACK_ON_SIGHT
|
||||||
|
Stance.DEFEND, Stance.SUPPORT, &"defensif", &"soutien": return Stance.DEFEND_ME
|
||||||
|
return value
|
||||||
|
|
||||||
|
static func stance_label(value: StringName) -> String:
|
||||||
|
match normalize_stance(value):
|
||||||
|
Stance.STAY_BACK: return "Reste en arrière"
|
||||||
|
Stance.DEFEND_ME: return "Défends-moi"
|
||||||
|
Stance.ATTACK_ON_SIGHT: return "Attaque à vue"
|
||||||
|
return "Inconnu"
|
||||||
|
|
||||||
|
static func stance_description(value: StringName) -> String:
|
||||||
|
match normalize_stance(value):
|
||||||
|
Stance.STAY_BACK: return "Suit le joueur sans engager les ennemis."
|
||||||
|
Stance.DEFEND_ME: return "Intercepte et attaque les ennemis qui menacent le joueur."
|
||||||
|
Stance.ATTACK_ON_SIGHT: return "Poursuit et attaque l’ennemi visible le plus proche."
|
||||||
|
return ""
|
||||||
|
|
||||||
# This is intentionally a neutral allocation seam: it records earned XP only
|
# This is intentionally a neutral allocation seam: it records earned XP only
|
||||||
# and neither reads nor changes levels, thresholds, attributes, or skills.
|
# and neither reads nor changes levels, thresholds, attributes, or skills.
|
||||||
func share_xp(player: ActorState, amount: int) -> Dictionary:
|
func share_xp(player: ActorState, amount: int) -> Dictionary:
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const TrapEngineType = preload("res://scripts/domain/world/trap_engine.gd")
|
|||||||
const SpecialInteractionsType = preload("res://scripts/domain/world/special_interactions.gd")
|
const SpecialInteractionsType = preload("res://scripts/domain/world/special_interactions.gd")
|
||||||
const CompanionStateType = preload("res://scripts/domain/entities/companion_state.gd")
|
const CompanionStateType = preload("res://scripts/domain/entities/companion_state.gd")
|
||||||
const PartyStateType = preload("res://scripts/domain/entities/party_state.gd")
|
const PartyStateType = preload("res://scripts/domain/entities/party_state.gd")
|
||||||
|
const PLAYER_VISION_RADIUS := 6
|
||||||
|
|
||||||
var player: ActorState
|
var player: ActorState
|
||||||
# E4 keeps the selected pet run-scoped rather than making it a floor entity.
|
# E4 keeps the selected pet run-scoped rather than making it a floor entity.
|
||||||
@@ -109,7 +110,7 @@ func compute_visible_cells(game_map: GridMapState, origin: Vector2i, radius: int
|
|||||||
return visible
|
return visible
|
||||||
|
|
||||||
func update_exploration() -> void:
|
func update_exploration() -> void:
|
||||||
visible_cells = compute_visible_cells(map, player.cell, 6)
|
visible_cells = compute_visible_cells(map, player.cell, PLAYER_VISION_RADIUS)
|
||||||
for cell in visible_cells:
|
for cell in visible_cells:
|
||||||
explored_cells[cell] = true
|
explored_cells[cell] = true
|
||||||
|
|
||||||
|
|||||||
@@ -71,6 +71,11 @@ func recompute_player(player) -> void:
|
|||||||
player.normalize_resources()
|
player.normalize_resources()
|
||||||
elif player is ActorState:
|
elif player is ActorState:
|
||||||
player.recompute_equipment_modifiers(attributes, skills, combat)
|
player.recompute_equipment_modifiers(attributes, skills, combat)
|
||||||
|
var main_hand := item_in_slot(&"main_hand")
|
||||||
|
if main_hand != null and main_hand.definition != null and StringName(main_hand.definition.raw.get("weapon_kind", "")) != &"ranged":
|
||||||
|
player.metadata["melee_weapon_name"] = main_hand.definition.name
|
||||||
|
else:
|
||||||
|
player.metadata.erase("melee_weapon_name")
|
||||||
|
|
||||||
func _accumulate_combat_modifiers(item: ItemInstance, combat: Dictionary[StringName, Variant]) -> void:
|
func _accumulate_combat_modifiers(item: ItemInstance, combat: Dictionary[StringName, Variant]) -> void:
|
||||||
var raw := item.definition.raw
|
var raw := item.definition.raw
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ func add_item(item: ItemInstance) -> Dictionary:
|
|||||||
items.append(item)
|
items.append(item)
|
||||||
return _result(true, &"", item)
|
return _result(true, &"", item)
|
||||||
|
|
||||||
|
func count_by_definition(item_id: StringName) -> int:
|
||||||
|
var total := 0
|
||||||
|
for item: ItemInstance in items:
|
||||||
|
if item.definition.id == item_id:
|
||||||
|
total += item.quantity
|
||||||
|
return total
|
||||||
|
|
||||||
func item_by_id(instance_id: StringName) -> ItemInstance:
|
func item_by_id(instance_id: StringName) -> ItemInstance:
|
||||||
for item in items:
|
for item in items:
|
||||||
if item.instance_id == instance_id:
|
if item.instance_id == instance_id:
|
||||||
@@ -85,6 +92,8 @@ func use_item(instance_id: StringName, default_target, identification: ItemIdent
|
|||||||
var status := StringName(effect_data.get("status", ""))
|
var status := StringName(effect_data.get("status", ""))
|
||||||
recipient.apply_status(StatusEffect.new(status, int(effect_data.get("duration", -1)), int(effect_data.get("magnitude", 0)), item.definition.id))
|
recipient.apply_status(StatusEffect.new(status, int(effect_data.get("duration", -1)), int(effect_data.get("magnitude", 0)), item.definition.id))
|
||||||
effects.append({"type": effect_type, "status": status})
|
effects.append({"type": effect_type, "status": status})
|
||||||
|
&"learn_spell":
|
||||||
|
effects.append({"type": effect_type, "spell": StringName(effect_data.get("spell", ""))})
|
||||||
_:
|
_:
|
||||||
effects.append({"type": effect_type})
|
effects.append({"type": effect_type})
|
||||||
var consumed := remove_item(instance_id)
|
var consumed := remove_item(instance_id)
|
||||||
|
|||||||
@@ -10,15 +10,21 @@ static func resolve(table: Dictionary, seed: String, context: String = "") -> Di
|
|||||||
var items: Array[Dictionary] = []
|
var items: Array[Dictionary] = []
|
||||||
var gold := 0
|
var gold := 0
|
||||||
var entries: Array = table.get("entries", [])
|
var entries: Array = table.get("entries", [])
|
||||||
|
var selected_item_ids: Dictionary[StringName, bool] = {}
|
||||||
var rolls := maxi(0, int(table.get("rolls", 0)))
|
var rolls := maxi(0, int(table.get("rolls", 0)))
|
||||||
for _roll in range(rolls):
|
for _roll in range(rolls):
|
||||||
var entry := _choose_entry(entries, rng)
|
var eligible_entries := entries.filter(func(value) -> bool:
|
||||||
|
return not (value is Dictionary and value.has("item") and selected_item_ids.has(StringName(value.item)))
|
||||||
|
)
|
||||||
|
var entry := _choose_entry(eligible_entries, rng)
|
||||||
if entry.is_empty():
|
if entry.is_empty():
|
||||||
continue
|
continue
|
||||||
if bool(entry.get("gold", false)):
|
if bool(entry.get("gold", false)):
|
||||||
gold += _range_value(entry, "min_gold", "max_gold", rng)
|
gold += _range_value(entry, "min_gold", "max_gold", rng)
|
||||||
elif entry.has("item"):
|
elif entry.has("item"):
|
||||||
_append_item(items, StringName(entry.item), _range_value(entry, "min_qty", "max_qty", rng, 1))
|
var item_id := StringName(entry.item)
|
||||||
|
selected_item_ids[item_id] = true
|
||||||
|
_append_item(items, item_id, _range_value(entry, "min_qty", "max_qty", rng, 1))
|
||||||
return {
|
return {
|
||||||
"items": items,
|
"items": items,
|
||||||
"gold": gold,
|
"gold": gold,
|
||||||
|
|||||||
@@ -33,6 +33,17 @@ func resolve(map: GridMapState, caster: ActorState, target: ActorState, spell: D
|
|||||||
var xp_event := _event(&"xp_granted", caster, target, spell, {})
|
var xp_event := _event(&"xp_granted", caster, target, spell, {})
|
||||||
xp_event.payload = xp_payload
|
xp_event.payload = xp_payload
|
||||||
events.append(xp_event)
|
events.append(xp_event)
|
||||||
|
events.append({
|
||||||
|
"kind": &"loot_dropped",
|
||||||
|
"actor_id": target.id,
|
||||||
|
"target_id": caster.id,
|
||||||
|
"cell": target.cell,
|
||||||
|
"payload": {
|
||||||
|
"loot_table": String(target.loot_table),
|
||||||
|
"actor_content_id": target.content_id,
|
||||||
|
"target_content_id": caster.content_id,
|
||||||
|
},
|
||||||
|
})
|
||||||
return {"valid": true, "reason": &"", "damage": damage, "events": events}
|
return {"valid": true, "reason": &"", "damage": damage, "events": events}
|
||||||
|
|
||||||
func valid_targets(map: GridMapState, caster: ActorState, enemies: Dictionary[StringName, ActorState], spell: Dictionary, spells: SpellState) -> Dictionary[StringName, Vector2i]:
|
func valid_targets(map: GridMapState, caster: ActorState, enemies: Dictionary[StringName, ActorState], spell: Dictionary, spells: SpellState) -> Dictionary[StringName, Vector2i]:
|
||||||
|
|||||||
@@ -33,7 +33,15 @@ func race_definitions() -> Array[Dictionary]:
|
|||||||
var definitions: Array[Dictionary] = []
|
var definitions: Array[Dictionary] = []
|
||||||
for id: StringName in _races:
|
for id: StringName in _races:
|
||||||
definitions.append(_races[id].duplicate(true))
|
definitions.append(_races[id].duplicate(true))
|
||||||
definitions.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return String(a.id) < String(b.id))
|
definitions.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return String(a.get("name", a.id)) < String(b.get("name", b.id)))
|
||||||
|
return definitions
|
||||||
|
|
||||||
|
func class_definitions(race_id: StringName = &"") -> Array[Dictionary]:
|
||||||
|
var definitions: Array[Dictionary] = []
|
||||||
|
for id: StringName in _classes:
|
||||||
|
if race_id.is_empty() or is_compatible(race_id, id):
|
||||||
|
definitions.append(_classes[id].duplicate(true))
|
||||||
|
definitions.sort_custom(func(a: Dictionary, b: Dictionary) -> bool: return String(a.get("name", a.id)) < String(b.get("name", b.id)))
|
||||||
return definitions
|
return definitions
|
||||||
|
|
||||||
func is_compatible(race_id: StringName, class_id: StringName) -> bool:
|
func is_compatible(race_id: StringName, class_id: StringName) -> bool:
|
||||||
@@ -75,12 +83,32 @@ func apply_creation(player: PlayerState, race_id: StringName, class_id: StringNa
|
|||||||
var choice := creation_choice(race_id, class_id)
|
var choice := creation_choice(race_id, class_id)
|
||||||
if not bool(choice.get("accepted", false)):
|
if not bool(choice.get("accepted", false)):
|
||||||
return choice
|
return choice
|
||||||
var race := _races[race_id]
|
var race_result := choose_race(player, race_id)
|
||||||
|
if not bool(race_result.get("accepted", false)):
|
||||||
|
return race_result
|
||||||
|
return choose_class(player, class_id)
|
||||||
|
|
||||||
|
func choose_race(player: PlayerState, race_id: StringName) -> Dictionary:
|
||||||
|
if player == null or not player.race.is_empty():
|
||||||
|
return {"accepted": false, "reason": &"already_chosen"}
|
||||||
|
if not _races.has(race_id):
|
||||||
|
return {"accepted": false, "reason": &"unknown_race"}
|
||||||
player.race = race_id
|
player.race = race_id
|
||||||
|
_apply_bonuses(player, _races[race_id])
|
||||||
|
return {"accepted": true, "race_id": race_id}
|
||||||
|
|
||||||
|
func choose_class(player: PlayerState, class_id: StringName) -> Dictionary:
|
||||||
|
if player == null or not player.archetype.is_empty():
|
||||||
|
return {"accepted": false, "reason": &"already_chosen"}
|
||||||
|
if player.race.is_empty():
|
||||||
|
return {"accepted": false, "reason": &"race_required"}
|
||||||
|
if not _classes.has(class_id):
|
||||||
|
return {"accepted": false, "reason": &"unknown_class"}
|
||||||
|
if not is_compatible(player.race, class_id):
|
||||||
|
return {"accepted": false, "reason": &"incompatible"}
|
||||||
player.archetype = class_id
|
player.archetype = class_id
|
||||||
_apply_bonuses(player, race)
|
|
||||||
_apply_bonuses(player, _classes[class_id])
|
_apply_bonuses(player, _classes[class_id])
|
||||||
return choice
|
return {"accepted": true, "race_id": player.race, "class_id": class_id}
|
||||||
|
|
||||||
func eligible_evolutions(player: PlayerState) -> Array[Dictionary]:
|
func eligible_evolutions(player: PlayerState) -> Array[Dictionary]:
|
||||||
var eligible: Array[Dictionary] = []
|
var eligible: Array[Dictionary] = []
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
class_name EndgameState
|
||||||
|
extends RefCounted
|
||||||
|
|
||||||
|
# Kept independently from death lifecycle state: a victorious run remains
|
||||||
|
# inspectable and saveable without being treated as a defeated run.
|
||||||
|
var victory := false
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://dapwuxccswlax
|
||||||
@@ -1,9 +1,11 @@
|
|||||||
class_name FloorTransition
|
class_name FloorTransition
|
||||||
extends RefCounted
|
extends RefCounted
|
||||||
|
|
||||||
|
const FINAL_FLOOR := 18
|
||||||
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
||||||
const SurfaceGeneratorType = preload("res://scripts/domain/world/surface_generator.gd")
|
const SurfaceGeneratorType = preload("res://scripts/domain/world/surface_generator.gd")
|
||||||
const FloorGeneratorType = preload("res://scripts/domain/world/floor_generator.gd")
|
const FloorGeneratorType = preload("res://scripts/domain/world/floor_generator.gd")
|
||||||
|
const GameEventType = preload("res://scripts/domain/run/game_event.gd")
|
||||||
|
|
||||||
var catalog: ContentCatalog
|
var catalog: ContentCatalog
|
||||||
|
|
||||||
@@ -17,11 +19,32 @@ func initial_floor(run: RunState) -> FloorState:
|
|||||||
run.ensure_floor_deadline(0)
|
run.ensure_floor_deadline(0)
|
||||||
return run.current_floor_state()
|
return run.current_floor_state()
|
||||||
|
|
||||||
|
# Final descent is intentionally a separate semantic operation: it must never
|
||||||
|
# request a destination floor, while normal transitions preserve B5 behavior.
|
||||||
|
func try_descend(run: RunState) -> Array[GameEvent]:
|
||||||
|
if run.current_floor != FINAL_FLOOR or not run.current_floor_deadline().can_descend() or run.endgame_state.victory:
|
||||||
|
return []
|
||||||
|
run.endgame_state.victory = true
|
||||||
|
var event := GameEventType.new(
|
||||||
|
run.next_turn(),
|
||||||
|
run.current_floor,
|
||||||
|
&"game_victory",
|
||||||
|
{"floor": FINAL_FLOOR},
|
||||||
|
"Le donjon est vaincu.",
|
||||||
|
&"player"
|
||||||
|
)
|
||||||
|
run.append_events([event])
|
||||||
|
return [event]
|
||||||
|
|
||||||
# Returns the cached/generated destination and the stairs cell on which the
|
# Returns the cached/generated destination and the stairs cell on which the
|
||||||
# player arrives. Floor 0's sole stairs descends, while every procedural floor
|
# player arrives. Floor 0's sole stairs descends, while every procedural floor
|
||||||
# has an up stair at entrance and down stair at exit.
|
# has an up stair at entrance and down stair at exit.
|
||||||
func transition(run: RunState, source: FloorState, stairs_cell: Vector2i) -> Dictionary:
|
func transition(run: RunState, source: FloorState, stairs_cell: Vector2i) -> Dictionary:
|
||||||
var destination_number := _destination_floor_number(source, stairs_cell)
|
var destination_number := _destination_floor_number(source, stairs_cell)
|
||||||
|
# Game handles the final-floor victory before calling transition. Keep this
|
||||||
|
# guard defensive so domain consumers can never allocate floor 19.
|
||||||
|
if destination_number > FINAL_FLOOR:
|
||||||
|
return {"floor": source, "arrival": stairs_cell}
|
||||||
var destination := _floor_for(run, destination_number)
|
var destination := _floor_for(run, destination_number)
|
||||||
var arrival := destination.entrance if destination_number > source.floor_number else destination.exit
|
var arrival := destination.entrance if destination_number > source.floor_number else destination.exit
|
||||||
run.current_floor = destination_number
|
run.current_floor = destination_number
|
||||||
|
|||||||
@@ -7,17 +7,23 @@ var seed: String
|
|||||||
var difficulty_id: StringName
|
var difficulty_id: StringName
|
||||||
var permadeath: bool
|
var permadeath: bool
|
||||||
var pet_enabled: bool
|
var pet_enabled: bool
|
||||||
|
var pet_name: String
|
||||||
|
var pet_species: String
|
||||||
|
|
||||||
func _init(
|
func _init(
|
||||||
new_seed: String = "",
|
new_seed: String = "",
|
||||||
new_difficulty_id: StringName = &"crawler",
|
new_difficulty_id: StringName = &"crawler",
|
||||||
new_permadeath: bool = false,
|
new_permadeath: bool = false,
|
||||||
new_pet_enabled: bool = false
|
new_pet_enabled: bool = false,
|
||||||
|
new_pet_name: String = "Familier",
|
||||||
|
new_pet_species: String = "Animal"
|
||||||
) -> void:
|
) -> void:
|
||||||
seed = new_seed.strip_edges()
|
seed = new_seed.strip_edges()
|
||||||
difficulty_id = new_difficulty_id
|
difficulty_id = new_difficulty_id
|
||||||
permadeath = new_permadeath
|
permadeath = new_permadeath
|
||||||
pet_enabled = new_pet_enabled
|
pet_enabled = new_pet_enabled
|
||||||
|
pet_name = new_pet_name.strip_edges() if not new_pet_name.strip_edges().is_empty() else "Familier"
|
||||||
|
pet_species = new_pet_species.strip_edges() if not new_pet_species.strip_edges().is_empty() else "Animal"
|
||||||
|
|
||||||
func is_valid() -> bool:
|
func is_valid() -> bool:
|
||||||
return not seed.is_empty() and difficulty_id in DIFFICULTY_IDS
|
return not seed.is_empty() and difficulty_id in DIFFICULTY_IDS
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ extends RefCounted
|
|||||||
var seed: String
|
var seed: String
|
||||||
var settings: RunSettings
|
var settings: RunSettings
|
||||||
var player_name := "Sans-Nom"
|
var player_name := "Sans-Nom"
|
||||||
var base_archetype: StringName = &"vanguard"
|
var base_archetype: StringName = &""
|
||||||
var current_floor := 0
|
var current_floor := 0
|
||||||
var floors: Dictionary[int, FloorState] = {}
|
var floors: Dictionary[int, FloorState] = {}
|
||||||
# Deadline records are intentionally independent from generated FloorState so
|
# Deadline records are intentionally independent from generated FloorState so
|
||||||
@@ -16,6 +16,9 @@ var log: Array[GameEvent] = []
|
|||||||
var gold := 0
|
var gold := 0
|
||||||
# D1 owns inventory at run scope so it persists while the player changes floors.
|
# D1 owns inventory at run scope so it persists while the player changes floors.
|
||||||
var inventory: InventoryState = InventoryState.new()
|
var inventory: InventoryState = InventoryState.new()
|
||||||
|
# Imported dialogue effects resolve item definitions through this authoritative
|
||||||
|
# runtime catalog; it is assigned by Game for new and loaded runs.
|
||||||
|
var content_catalog: ContentCatalog
|
||||||
# D3 keeps item identity and equipment with the run so swaps persist across floors.
|
# D3 keeps item identity and equipment with the run so swaps persist across floors.
|
||||||
var equipment: EquipmentState = EquipmentState.new()
|
var equipment: EquipmentState = EquipmentState.new()
|
||||||
var identification: ItemIdentification = ItemIdentification.new()
|
var identification: ItemIdentification = ItemIdentification.new()
|
||||||
@@ -34,6 +37,9 @@ var recap_state: Dictionary = {}
|
|||||||
# independently from panels and current FloorDeadline instances.
|
# independently from panels and current FloorDeadline instances.
|
||||||
var faction_war_state: Dictionary = {}
|
var faction_war_state: Dictionary = {}
|
||||||
var moderation_state: Dictionary = {}
|
var moderation_state: Dictionary = {}
|
||||||
|
# PR-1 tracks the completed endgame separately from death lifecycle state so a
|
||||||
|
# victorious run cannot create another dungeon floor.
|
||||||
|
var endgame_state: EndgameState = EndgameState.new()
|
||||||
# F6 owns final run lifecycle state. G1's save repository can later consume the
|
# F6 owns final run lifecycle state. G1's save repository can later consume the
|
||||||
# explicit slot policy rather than inferring it from a transient death panel.
|
# explicit slot policy rather than inferring it from a transient death panel.
|
||||||
var is_game_over := false
|
var is_game_over := false
|
||||||
|
|||||||
@@ -13,6 +13,15 @@ static func resolve_player_action(state: GameState, direction: Vector2i) -> Arra
|
|||||||
return results
|
return results
|
||||||
var player: ActorState = state.player
|
var player: ActorState = state.player
|
||||||
var destination: Vector2i = player.cell + direction
|
var destination: Vector2i = player.cell + direction
|
||||||
|
if abs(direction.x) == 1 and abs(direction.y) == 1:
|
||||||
|
# Diagonal movement cannot squeeze between blocking cardinal cells. A
|
||||||
|
# closed door must therefore gate the room instead of being bypassable at
|
||||||
|
# either corner; walls and chests obey the same geometry.
|
||||||
|
var horizontal := player.cell + Vector2i(direction.x, 0)
|
||||||
|
var vertical := player.cell + Vector2i(0, direction.y)
|
||||||
|
if not state.map.is_walkable(horizontal) or not state.map.is_walkable(vertical):
|
||||||
|
results.append(TurnResultType.new(player.id, &"blocked", player.cell, destination, &"", 0, "Your way is blocked."))
|
||||||
|
return results
|
||||||
var enemy: ActorState = _enemy_at(state, destination)
|
var enemy: ActorState = _enemy_at(state, destination)
|
||||||
if enemy != null:
|
if enemy != null:
|
||||||
# A companion-owning run takes the neutral shared-XP seam. Combat must
|
# A companion-owning run takes the neutral shared-XP seam. Combat must
|
||||||
@@ -89,7 +98,8 @@ static func append_enemy_response(state: GameState, results: Array[TurnResult])
|
|||||||
var enemy: ActorState = state.enemies.get(enemy_id)
|
var enemy: ActorState = state.enemies.get(enemy_id)
|
||||||
if enemy == null or not enemy.is_alive():
|
if enemy == null or not enemy.is_alive():
|
||||||
continue
|
continue
|
||||||
var decision: Dictionary = EnemyBehaviorsType.decide(enemy, state.player, state.map, occupied)
|
var target := _enemy_target(state, enemy)
|
||||||
|
var decision: Dictionary = EnemyBehaviorsType.decide(enemy, target, state.map, occupied)
|
||||||
if decision.has("diagnostic"):
|
if decision.has("diagnostic"):
|
||||||
results.append(TurnResultType.new(
|
results.append(TurnResultType.new(
|
||||||
enemy.id,
|
enemy.id,
|
||||||
@@ -103,25 +113,33 @@ static func append_enemy_response(state: GameState, results: Array[TurnResult])
|
|||||||
))
|
))
|
||||||
match decision.get("kind", &"idle"):
|
match decision.get("kind", &"idle"):
|
||||||
&"melee":
|
&"melee":
|
||||||
if _support_companion_intercepts(state, enemy, results):
|
if target == state.player and _support_companion_intercepts(state, enemy, results):
|
||||||
continue
|
continue
|
||||||
_append_combat_results(results, CombatEngineType.new().resolve_attack(enemy, state.player), enemy.cell, state.player.cell)
|
_append_combat_results(results, CombatEngineType.new().resolve_attack(enemy, target), enemy.cell, target.cell)
|
||||||
if not state.player.is_alive():
|
if target == state.player and not state.player.is_alive():
|
||||||
return
|
return
|
||||||
&"move":
|
&"move":
|
||||||
var target: Vector2i = decision.get("to_cell", enemy.cell)
|
var move_target: Vector2i = decision.get("to_cell", enemy.cell)
|
||||||
# The behavior contract has already rejected these cells; retain the
|
# The behavior contract has already rejected these cells; retain the
|
||||||
# resolver guard as the authoritative state mutation boundary.
|
# resolver guard as the authoritative state mutation boundary.
|
||||||
if state.map.is_walkable(target) and target != state.player.cell and not occupied.has(target):
|
if state.map.is_walkable(move_target) and move_target != target.cell and not occupied.has(move_target):
|
||||||
var from: Vector2i = enemy.cell
|
var from: Vector2i = enemy.cell
|
||||||
occupied.erase(from)
|
occupied.erase(from)
|
||||||
enemy.cell = target
|
enemy.cell = move_target
|
||||||
occupied[target] = true
|
occupied[move_target] = true
|
||||||
results.append(TurnResultType.new(enemy.id, &"enemy_moved", from, target, &"", 0, "%s moves." % _actor_label(enemy.id)))
|
results.append(TurnResultType.new(enemy.id, &"enemy_moved", from, move_target, &"", 0, "%s moves." % _actor_label(enemy.id)))
|
||||||
|
|
||||||
|
static func _enemy_target(state: GameState, enemy: ActorState) -> ActorState:
|
||||||
|
var companion: CompanionState = state.companion
|
||||||
|
if companion == null or not companion.is_alive():
|
||||||
|
return state.player
|
||||||
|
var player_distance := enemy.cell.distance_squared_to(state.player.cell)
|
||||||
|
var companion_distance := enemy.cell.distance_squared_to(companion.actor.cell)
|
||||||
|
return companion.actor if companion_distance <= player_distance else state.player
|
||||||
|
|
||||||
static func _support_companion_intercepts(state: GameState, enemy: ActorState, results: Array[TurnResult]) -> bool:
|
static func _support_companion_intercepts(state: GameState, enemy: ActorState, results: Array[TurnResult]) -> bool:
|
||||||
var companion: CompanionState = state.companion
|
var companion: CompanionState = state.companion
|
||||||
if companion == null or not companion.is_alive() or companion.stance != CompanionStateType.Stance.SUPPORT:
|
if companion == null or not companion.is_alive() or CompanionStateType.normalize_stance(companion.stance) != CompanionStateType.Stance.DEFEND_ME:
|
||||||
return false
|
return false
|
||||||
if companion.actor.cell.distance_to(state.player.cell) > 1.5:
|
if companion.actor.cell.distance_to(state.player.cell) > 1.5:
|
||||||
return false
|
return false
|
||||||
@@ -143,7 +161,8 @@ static func _append_companion_response(state: GameState, results: Array[TurnResu
|
|||||||
return
|
return
|
||||||
var occupied := _occupied_enemy_cells(state)
|
var occupied := _occupied_enemy_cells(state)
|
||||||
occupied[companion.actor.cell] = true
|
occupied[companion.actor.cell] = true
|
||||||
var decision := CompanionBehaviorsType.decide(companion, state.player, state.enemies, state.map, occupied)
|
var detected_cells := state.compute_visible_cells(state.map, state.player.cell, state.PLAYER_VISION_RADIUS)
|
||||||
|
var decision := CompanionBehaviorsType.decide(companion, state.player, state.enemies, state.map, occupied, detected_cells)
|
||||||
match decision.get("kind", &"idle"):
|
match decision.get("kind", &"idle"):
|
||||||
&"move":
|
&"move":
|
||||||
var target: Vector2i = decision.get("to_cell", companion.actor.cell)
|
var target: Vector2i = decision.get("to_cell", companion.actor.cell)
|
||||||
@@ -156,9 +175,15 @@ static func _append_companion_response(state: GameState, results: Array[TurnResu
|
|||||||
if enemy != null and enemy.is_alive() and companion.actor.cell.distance_to(enemy.cell) <= 1.5:
|
if enemy != null and enemy.is_alive() and companion.actor.cell.distance_to(enemy.cell) <= 1.5:
|
||||||
_append_combat_results(results, CombatEngineType.new().resolve_attack(companion.actor, enemy), companion.actor.cell, enemy.cell)
|
_append_combat_results(results, CombatEngineType.new().resolve_attack(companion.actor, enemy), companion.actor.cell, enemy.cell)
|
||||||
results.back().kind = &"companion_melee"
|
results.back().kind = &"companion_melee"
|
||||||
results.back().message = "Your companion defends you."
|
results.back().message = "%s attacks." % companion.name
|
||||||
if not enemy.is_alive():
|
if not enemy.is_alive():
|
||||||
state.enemies.erase(enemy.id)
|
state.enemies.erase(enemy.id)
|
||||||
|
&"heal_player":
|
||||||
|
var before := state.player.hit_points
|
||||||
|
state.player.hit_points = mini(state.player.effective_max_hit_points(), before + int(decision.get("amount", 0)))
|
||||||
|
var healed := state.player.hit_points - before
|
||||||
|
if healed > 0:
|
||||||
|
results.append(TurnResultType.new(companion.actor.id, &"companion_healed_player", companion.actor.cell, state.player.cell, state.player.id, -healed, "%s restores %d PV." % [companion.name, healed], {"healing": healed}))
|
||||||
|
|
||||||
static func _occupied_enemy_cells(state: GameState) -> Dictionary[Vector2i, bool]:
|
static func _occupied_enemy_cells(state: GameState) -> Dictionary[Vector2i, bool]:
|
||||||
var occupied: Dictionary[Vector2i, bool] = {state.player.cell: true}
|
var occupied: Dictionary[Vector2i, bool] = {state.player.cell: true}
|
||||||
@@ -176,10 +201,11 @@ static func _append_combat_results(results: Array[TurnResult], outcome: Dictiona
|
|||||||
var target_id := StringName(first.target_id)
|
var target_id := StringName(first.target_id)
|
||||||
var legacy_kind := &"melee" if actor_id == &"player" else &"enemy_melee"
|
var legacy_kind := &"melee" if actor_id == &"player" else &"enemy_melee"
|
||||||
var damage := int(outcome.damage)
|
var damage := int(outcome.damage)
|
||||||
var message := "You strike the goblin for %d." % damage if actor_id == &"player" else "%s hits you for %d." % [_actor_label(actor_id), damage]
|
var attack_method := String(first.payload.get("attack_method", "mains nues" if actor_id == &"player" else "attaque naturelle"))
|
||||||
results.append(TurnResultType.new(actor_id, legacy_kind, from_cell, to_cell, target_id, damage, message, {"domain_events": descriptors}))
|
var message := "You strike the goblin with %s for %d." % [attack_method, damage] if actor_id == &"player" else "%s hits you with %s for %d." % [_actor_label(actor_id), attack_method, damage]
|
||||||
|
results.append(TurnResultType.new(actor_id, legacy_kind, from_cell, to_cell, target_id, damage, message, {"domain_events": descriptors, "attack_method": attack_method}))
|
||||||
if not bool(outcome.hit):
|
if not bool(outcome.hit):
|
||||||
results.back().message = "You miss the goblin." if actor_id == &"player" else "%s misses you." % _actor_label(actor_id)
|
results.back().message = "You miss the goblin with %s." % attack_method if actor_id == &"player" else "%s misses you with %s." % [_actor_label(actor_id), attack_method]
|
||||||
if not (results.back().payload.domain_events as Array).filter(func(event: Dictionary) -> bool: return event.kind == &"actor_died").is_empty():
|
if not (results.back().payload.domain_events as Array).filter(func(event: Dictionary) -> bool: return event.kind == &"actor_died").is_empty():
|
||||||
var defeated := target_id if actor_id == &"player" else actor_id
|
var defeated := target_id if actor_id == &"player" else actor_id
|
||||||
results.append(TurnResultType.new(defeated, &"enemy_defeated", to_cell, to_cell, actor_id, 0, "%s is defeated." % _actor_label(defeated)))
|
results.append(TurnResultType.new(defeated, &"enemy_defeated", to_cell, to_cell, actor_id, 0, "%s is defeated." % _actor_label(defeated)))
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
class_name FloorGenerator
|
class_name FloorGenerator
|
||||||
extends RefCounted
|
extends RefCounted
|
||||||
|
|
||||||
const MAP_SIZE := Vector2i(80, 50)
|
const MAX_MAP_SIZE := Vector2i(700, 350)
|
||||||
const ROOM_COUNT := 8
|
const MAX_ROOM_COUNT := 500
|
||||||
const ROOM_MIN_SIZE := Vector2i(5, 4)
|
const DEEP_ROOM_MIN_SIZE := Vector2i(4, 3)
|
||||||
const ROOM_MAX_SIZE := Vector2i(10, 8)
|
const DEEP_ROOM_MAX_SIZE := Vector2i(6, 5)
|
||||||
const ROOM_PADDING := 2
|
const ROOM_PADDING := 2
|
||||||
const ROOM_PLACEMENT_ATTEMPTS := 256
|
|
||||||
const SHOP_ACTIVE_FROM_FLOOR := 3
|
const SHOP_ACTIVE_FROM_FLOOR := 3
|
||||||
const BOSS_FLOOR_INTERVAL := 5
|
const BOSS_FLOOR_INTERVAL := 5
|
||||||
const GUILD_ROOM_CHANCE := 0.35
|
const GUILD_ROOM_CHANCE := 0.35
|
||||||
@@ -33,10 +32,26 @@ const RoomGraphType = preload("res://scripts/domain/world/room_graph.gd")
|
|||||||
const FloorPopulatorType = preload("res://scripts/domain/world/floor_populator.gd")
|
const FloorPopulatorType = preload("res://scripts/domain/world/floor_populator.gd")
|
||||||
const EconomyType = preload("res://scripts/domain/items/economy.gd")
|
const EconomyType = preload("res://scripts/domain/items/economy.gd")
|
||||||
|
|
||||||
|
# The profile deliberately caps the ASCII-inspired growth before maps become
|
||||||
|
# impractical. It is also the sole sizing input to generation, making a seed
|
||||||
|
# and floor number reproduce exactly the same layout.
|
||||||
|
static func generation_profile(floor_number: int) -> Dictionary:
|
||||||
|
var normalized_floor := maxi(1, floor_number)
|
||||||
|
return {
|
||||||
|
"map_size": Vector2i(
|
||||||
|
mini(MAX_MAP_SIZE.x, 180 + normalized_floor * 30),
|
||||||
|
mini(MAX_MAP_SIZE.y, 90 + normalized_floor * 15)
|
||||||
|
),
|
||||||
|
"target_room_count": mini(MAX_ROOM_COUNT, 150 + normalized_floor * 20),
|
||||||
|
"room_min_size": DEEP_ROOM_MIN_SIZE,
|
||||||
|
"room_max_size": DEEP_ROOM_MAX_SIZE,
|
||||||
|
}
|
||||||
|
|
||||||
static func generate(seed: String, floor_number: int, catalog: ContentCatalog) -> FloorState:
|
static func generate(seed: String, floor_number: int, catalog: ContentCatalog) -> FloorState:
|
||||||
var rng := DeterministicRngType.from_seed("%s-floor%d" % [seed, floor_number])
|
var rng := DeterministicRngType.from_seed("%s-floor%d" % [seed, floor_number])
|
||||||
var rooms := _place_rooms(rng)
|
var profile := generation_profile(floor_number)
|
||||||
var map := GridMapStateType.new(MAP_SIZE, GridMapStateType.CellKind.WALL)
|
var rooms := _place_rooms(rng, profile)
|
||||||
|
var map := GridMapStateType.new(profile["map_size"], GridMapStateType.CellKind.WALL)
|
||||||
for room in rooms:
|
for room in rooms:
|
||||||
_carve_room(map, room)
|
_carve_room(map, room)
|
||||||
|
|
||||||
@@ -51,6 +66,7 @@ static func generate(seed: String, floor_number: int, catalog: ContentCatalog) -
|
|||||||
graph.add_local_loops(rooms, rng)
|
graph.add_local_loops(rooms, rng)
|
||||||
for edge in graph.loop_edges:
|
for edge in graph.loop_edges:
|
||||||
_carve_l_corridor_preserving_doors(map, _room_center(rooms[edge.from].bounds), _room_center(rooms[edge.to].bounds))
|
_carve_l_corridor_preserving_doors(map, _room_center(rooms[edge.from].bounds), _room_center(rooms[edge.to].bounds))
|
||||||
|
tree_door_cells = _remove_nonfunctional_doors(map, tree_door_cells)
|
||||||
for serialized_door in tree_door_cells:
|
for serialized_door in tree_door_cells:
|
||||||
map.set_cell(Vector2i(int(serialized_door[0]), int(serialized_door[1])), GridMapStateType.CellKind.CLOSED_DOOR)
|
map.set_cell(Vector2i(int(serialized_door[0]), int(serialized_door[1])), GridMapStateType.CellKind.CLOSED_DOOR)
|
||||||
|
|
||||||
@@ -63,6 +79,7 @@ static func generate(seed: String, floor_number: int, catalog: ContentCatalog) -
|
|||||||
floor.entrance = _room_center(rooms[entrance_index].bounds)
|
floor.entrance = _room_center(rooms[entrance_index].bounds)
|
||||||
floor.exit = _room_center(rooms[exit_index].bounds)
|
floor.exit = _room_center(rooms[exit_index].bounds)
|
||||||
floor.map.set_cell(floor.exit, GridMapStateType.CellKind.STAIRS)
|
floor.map.set_cell(floor.exit, GridMapStateType.CellKind.STAIRS)
|
||||||
|
floor.metadata["generation_profile"] = profile.duplicate(true)
|
||||||
floor.metadata["room_graph"] = graph.to_dict()
|
floor.metadata["room_graph"] = graph.to_dict()
|
||||||
floor.metadata["tree_door_cells"] = tree_door_cells
|
floor.metadata["tree_door_cells"] = tree_door_cells
|
||||||
var colony_size := EconomyType.colony_size_for_floor(seed, floor_number)
|
var colony_size := EconomyType.colony_size_for_floor(seed, floor_number)
|
||||||
@@ -72,6 +89,28 @@ static func generate(seed: String, floor_number: int, catalog: ContentCatalog) -
|
|||||||
FloorPopulatorType.populate(floor, catalog, seed)
|
FloorPopulatorType.populate(floor, catalog, seed)
|
||||||
return floor
|
return floor
|
||||||
|
|
||||||
|
# Grid slots provide a bounded, deterministic fallback-free layout. Their
|
||||||
|
# spacing includes the existing room padding invariant, while sizes and room
|
||||||
|
# contents still consume the seeded RNG.
|
||||||
|
static func _place_rooms(rng: DeterministicRng, profile: Dictionary) -> Array[RoomState]:
|
||||||
|
var map_size: Vector2i = profile["map_size"]
|
||||||
|
var target_room_count := int(profile["target_room_count"])
|
||||||
|
var room_min_size: Vector2i = profile["room_min_size"]
|
||||||
|
var room_max_size: Vector2i = profile["room_max_size"]
|
||||||
|
var slot_size := room_max_size + Vector2i.ONE * ROOM_PADDING * 2
|
||||||
|
var columns := (map_size.x - 2) / slot_size.x
|
||||||
|
var rows := (map_size.y - 2) / slot_size.y
|
||||||
|
assert(target_room_count <= columns * rows, "Generation profile must fit its room lattice")
|
||||||
|
var rooms: Array[RoomState] = []
|
||||||
|
for room_index in range(target_room_count):
|
||||||
|
var width := room_min_size.x + rng.next_int() % (room_max_size.x - room_min_size.x + 1)
|
||||||
|
var height := room_min_size.y + rng.next_int() % (room_max_size.y - room_min_size.y + 1)
|
||||||
|
var column := room_index % columns
|
||||||
|
var row := room_index / columns
|
||||||
|
var position := Vector2i(1 + column * slot_size.x, 1 + row * slot_size.y)
|
||||||
|
rooms.append(RoomStateType.new(StringName("room_%03d" % room_index), Rect2i(position, Vector2i(width, height))))
|
||||||
|
return rooms
|
||||||
|
|
||||||
# Beds must be installed before population so the occupancy-aware population
|
# Beds must be installed before population so the occupancy-aware population
|
||||||
# pass cannot place an NPC on a safe room's resting tile.
|
# pass cannot place an NPC on a safe room's resting tile.
|
||||||
static func _materialize_safe_room_beds(floor: FloorState) -> void:
|
static func _materialize_safe_room_beds(floor: FloorState) -> void:
|
||||||
@@ -86,48 +125,6 @@ static func _materialize_safe_room_beds(floor: FloorState) -> void:
|
|||||||
bed_cells.append(bed_cell)
|
bed_cells.append(bed_cell)
|
||||||
floor.metadata["bed_cells"] = bed_cells
|
floor.metadata["bed_cells"] = bed_cells
|
||||||
|
|
||||||
static func _place_rooms(rng: DeterministicRng) -> Array[RoomState]:
|
|
||||||
var rooms: Array[RoomState] = []
|
|
||||||
for room_index in range(ROOM_COUNT):
|
|
||||||
var placed := false
|
|
||||||
for _attempt in range(ROOM_PLACEMENT_ATTEMPTS):
|
|
||||||
var bounds := _random_room_bounds(rng)
|
|
||||||
if _has_required_padding(bounds, rooms):
|
|
||||||
rooms.append(RoomStateType.new(StringName("room_%02d" % room_index), bounds))
|
|
||||||
placed = true
|
|
||||||
break
|
|
||||||
if not placed:
|
|
||||||
# The fixed 80x50 B2 map always supports this minimum-size fallback.
|
|
||||||
# Never return a partial layout after exhausting random placement attempts.
|
|
||||||
return _fallback_rooms()
|
|
||||||
return rooms
|
|
||||||
|
|
||||||
static func _fallback_rooms() -> Array[RoomState]:
|
|
||||||
var rooms: Array[RoomState] = []
|
|
||||||
var positions := [
|
|
||||||
Vector2i(3, 5), Vector2i(20, 5), Vector2i(37, 5), Vector2i(54, 5),
|
|
||||||
Vector2i(3, 20), Vector2i(20, 20), Vector2i(37, 20), Vector2i(54, 20),
|
|
||||||
]
|
|
||||||
for room_index in range(ROOM_COUNT):
|
|
||||||
rooms.append(RoomStateType.new(
|
|
||||||
StringName("room_%02d" % room_index),
|
|
||||||
Rect2i(positions[room_index], ROOM_MIN_SIZE)
|
|
||||||
))
|
|
||||||
return rooms
|
|
||||||
|
|
||||||
static func _random_room_bounds(rng: DeterministicRng) -> Rect2i:
|
|
||||||
var width := ROOM_MIN_SIZE.x + rng.next_int() % (ROOM_MAX_SIZE.x - ROOM_MIN_SIZE.x + 1)
|
|
||||||
var height := ROOM_MIN_SIZE.y + rng.next_int() % (ROOM_MAX_SIZE.y - ROOM_MIN_SIZE.y + 1)
|
|
||||||
var x := 1 + rng.next_int() % (MAP_SIZE.x - width - 1)
|
|
||||||
var y := 1 + rng.next_int() % (MAP_SIZE.y - height - 1)
|
|
||||||
return Rect2i(x, y, width, height)
|
|
||||||
|
|
||||||
static func _has_required_padding(candidate: Rect2i, rooms: Array[RoomState]) -> bool:
|
|
||||||
for room in rooms:
|
|
||||||
if candidate.grow(ROOM_PADDING).intersects(room.bounds.grow(ROOM_PADDING)):
|
|
||||||
return false
|
|
||||||
return true
|
|
||||||
|
|
||||||
static func _carve_room(map: GridMapState, room: RoomState) -> void:
|
static func _carve_room(map: GridMapState, room: RoomState) -> void:
|
||||||
for y in range(room.bounds.position.y, room.bounds.end.y):
|
for y in range(room.bounds.position.y, room.bounds.end.y):
|
||||||
for x in range(room.bounds.position.x, room.bounds.end.x):
|
for x in range(room.bounds.position.x, room.bounds.end.x):
|
||||||
@@ -171,6 +168,24 @@ static func _place_tree_boundary_doors(map: GridMapState, path: Array[Vector2i],
|
|||||||
break
|
break
|
||||||
return serialized_cells
|
return serialized_cells
|
||||||
|
|
||||||
|
static func _remove_nonfunctional_doors(map: GridMapState, serialized_doors: Array[Array]) -> Array[Array]:
|
||||||
|
var functional: Array[Array] = []
|
||||||
|
for serialized_door: Array in serialized_doors:
|
||||||
|
var cell := Vector2i(int(serialized_door[0]), int(serialized_door[1]))
|
||||||
|
var walkable_directions: Array[Vector2i] = []
|
||||||
|
for direction: Vector2i in [Vector2i.LEFT, Vector2i.RIGHT, Vector2i.UP, Vector2i.DOWN]:
|
||||||
|
if map.is_walkable(cell + direction):
|
||||||
|
walkable_directions.append(direction)
|
||||||
|
var controls_straight_passage := walkable_directions.size() == 2 and (
|
||||||
|
(walkable_directions.has(Vector2i.LEFT) and walkable_directions.has(Vector2i.RIGHT))
|
||||||
|
or (walkable_directions.has(Vector2i.UP) and walkable_directions.has(Vector2i.DOWN))
|
||||||
|
)
|
||||||
|
if controls_straight_passage:
|
||||||
|
functional.append(serialized_door)
|
||||||
|
else:
|
||||||
|
map.set_cell(cell, GridMapStateType.CellKind.FLOOR)
|
||||||
|
return functional
|
||||||
|
|
||||||
static func _is_adjacent_to_serialized_door(cell: Vector2i, serialized_doors: Array[Array]) -> bool:
|
static func _is_adjacent_to_serialized_door(cell: Vector2i, serialized_doors: Array[Array]) -> bool:
|
||||||
for serialized_door in serialized_doors:
|
for serialized_door in serialized_doors:
|
||||||
var door_cell := Vector2i(int(serialized_door[0]), int(serialized_door[1]))
|
var door_cell := Vector2i(int(serialized_door[0]), int(serialized_door[1]))
|
||||||
@@ -201,6 +216,13 @@ static func _assign_room_kinds(rng: DeterministicRng, rooms: Array[RoomState], e
|
|||||||
if UNIQUE_ROOM_KINDS.has(kind):
|
if UNIQUE_ROOM_KINDS.has(kind):
|
||||||
used_unique[kind] = true
|
used_unique[kind] = true
|
||||||
|
|
||||||
|
# Weighted room kinds can exhaust either safe kind because both are unique.
|
||||||
|
# Reserve one deterministic non-entrance/non-exit candidate when that occurs.
|
||||||
|
var has_safe_room := candidates.any(func(room_index: int) -> bool: return rooms[room_index].kind in [&"refuge", &"sanctuary"])
|
||||||
|
if not has_safe_room and not candidates.is_empty():
|
||||||
|
var safe_index := candidates[rng.next_int() % candidates.size()]
|
||||||
|
rooms[safe_index].kind = &"refuge" if rng.next_int() % 2 == 0 else &"sanctuary"
|
||||||
|
|
||||||
static func _weighted_room_kind(rng: DeterministicRng, floor_number: int, used_unique: Dictionary[StringName, bool]) -> StringName:
|
static func _weighted_room_kind(rng: DeterministicRng, floor_number: int, used_unique: Dictionary[StringName, bool]) -> StringName:
|
||||||
var available: Array[StringName] = []
|
var available: Array[StringName] = []
|
||||||
var total_weight := 0
|
var total_weight := 0
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ const DeterministicRngType = preload("res://scripts/domain/run/deterministic_rng
|
|||||||
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
||||||
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
||||||
const SpawnRulesType = preload("res://scripts/domain/world/spawn_rules.gd")
|
const SpawnRulesType = preload("res://scripts/domain/world/spawn_rules.gd")
|
||||||
|
const TouristServiceType = preload("res://scripts/domain/world/tourist_service.gd")
|
||||||
|
|
||||||
static func populate(floor: FloorState, catalog: ContentCatalog, population_seed: String) -> void:
|
static func populate(floor: FloorState, catalog: ContentCatalog, population_seed: String) -> void:
|
||||||
_clear_population(floor)
|
_clear_population(floor)
|
||||||
@@ -26,10 +27,13 @@ static func populate(floor: FloorState, catalog: ContentCatalog, population_seed
|
|||||||
_spawn_chest(floor, catalog, room, rng, occupied)
|
_spawn_chest(floor, catalog, room, rng, occupied)
|
||||||
&"trap":
|
&"trap":
|
||||||
_spawn_trap(floor, catalog, room, rng, occupied)
|
_spawn_trap(floor, catalog, room, rng, occupied)
|
||||||
&"shop", &"guild", &"sanctuary", &"refuge":
|
&"shop", &"guild":
|
||||||
serial = _spawn_npc(floor, catalog, room, rng, occupied, serial)
|
serial = _spawn_npc(floor, catalog, room, rng, occupied, serial)
|
||||||
|
&"sanctuary", &"refuge":
|
||||||
|
serial = _spawn_bobka(floor, catalog, room, rng, occupied, serial)
|
||||||
&"narrative", &"mystery", &"puzzle":
|
&"narrative", &"mystery", &"puzzle":
|
||||||
_spawn_event(floor, catalog, room, rng, occupied)
|
_spawn_event(floor, catalog, room, rng, occupied)
|
||||||
|
TouristServiceType.try_spawn(floor, catalog, rng)
|
||||||
|
|
||||||
static func _clear_population(floor: FloorState) -> void:
|
static func _clear_population(floor: FloorState) -> void:
|
||||||
floor.enemies.clear()
|
floor.enemies.clear()
|
||||||
@@ -51,11 +55,10 @@ static func _spawn_enemy(floor: FloorState, catalog: ContentCatalog, room: RoomS
|
|||||||
return serial + 1
|
return serial + 1
|
||||||
|
|
||||||
static func _spawn_chest(floor: FloorState, catalog: ContentCatalog, room: RoomState, rng: DeterministicRng, occupied: Dictionary[Vector2i, bool]) -> void:
|
static func _spawn_chest(floor: FloorState, catalog: ContentCatalog, room: RoomState, rng: DeterministicRng, occupied: Dictionary[Vector2i, bool]) -> void:
|
||||||
var definitions := SpawnRulesType.loot_tables(catalog)
|
var definition := catalog.get_loot_table(&"floor_treasure")
|
||||||
var cell := _available_cell(floor, room, rng, occupied)
|
var cell := _available_cell(floor, room, rng, occupied)
|
||||||
if definitions.is_empty() or cell == Vector2i(-1, -1):
|
if definition.is_empty() or cell == Vector2i(-1, -1):
|
||||||
return
|
return
|
||||||
var definition: Dictionary = definitions[rng.next_int() % definitions.size()]
|
|
||||||
floor.chests[cell] = {
|
floor.chests[cell] = {
|
||||||
"loot_table_id": definition["id"],
|
"loot_table_id": definition["id"],
|
||||||
"opened": false,
|
"opened": false,
|
||||||
@@ -71,6 +74,16 @@ static func _spawn_trap(floor: FloorState, catalog: ContentCatalog, room: RoomSt
|
|||||||
floor.traps[cell] = {"trap_id": definition["id"]}
|
floor.traps[cell] = {"trap_id": definition["id"]}
|
||||||
occupied[cell] = true
|
occupied[cell] = true
|
||||||
|
|
||||||
|
static func _spawn_bobka(floor: FloorState, catalog: ContentCatalog, room: RoomState, rng: DeterministicRng, occupied: Dictionary[Vector2i, bool], serial: int) -> int:
|
||||||
|
var definition := catalog.get_npc(&"npc_bobka")
|
||||||
|
var cell := _available_cell(floor, room, rng, occupied)
|
||||||
|
if definition.is_empty() or cell == Vector2i(-1, -1):
|
||||||
|
return serial
|
||||||
|
var actor_id := StringName("npc_bobka_%02d" % serial)
|
||||||
|
floor.npcs[actor_id] = ActorStateType.new(actor_id, cell, 1, 0, &"npc_bobka")
|
||||||
|
occupied[cell] = true
|
||||||
|
return serial + 1
|
||||||
|
|
||||||
static func _spawn_npc(floor: FloorState, catalog: ContentCatalog, room: RoomState, rng: DeterministicRng, occupied: Dictionary[Vector2i, bool], serial: int) -> int:
|
static func _spawn_npc(floor: FloorState, catalog: ContentCatalog, room: RoomState, rng: DeterministicRng, occupied: Dictionary[Vector2i, bool], serial: int) -> int:
|
||||||
var definition := SpawnRulesType.npc_for_role(catalog, room.kind)
|
var definition := SpawnRulesType.npc_for_role(catalog, room.kind)
|
||||||
var cell := _available_cell(floor, room, rng, occupied)
|
var cell := _available_cell(floor, room, rng, occupied)
|
||||||
|
|||||||
@@ -33,6 +33,29 @@ func _init(new_map: GridMapState, new_seed: int = 0, new_floor_number: int = 0)
|
|||||||
seed = new_seed
|
seed = new_seed
|
||||||
floor_number = new_floor_number
|
floor_number = new_floor_number
|
||||||
|
|
||||||
|
func room_at(cell: Vector2i) -> RoomState:
|
||||||
|
var room_id := map.get_room_id(cell)
|
||||||
|
for room: RoomState in rooms:
|
||||||
|
if room.id == room_id:
|
||||||
|
return room
|
||||||
|
return null
|
||||||
|
|
||||||
|
func safe_rooms() -> Array[RoomState]:
|
||||||
|
var safe_rooms: Array[RoomState] = []
|
||||||
|
for room: RoomState in rooms:
|
||||||
|
if room.kind in [&"refuge", &"sanctuary"] and not room.bounds.has_point(entrance):
|
||||||
|
safe_rooms.append(room)
|
||||||
|
return safe_rooms
|
||||||
|
|
||||||
|
func bed_cells_in(room: RoomState) -> Array[Vector2i]:
|
||||||
|
var beds: Array[Vector2i] = []
|
||||||
|
if room == null:
|
||||||
|
return beds
|
||||||
|
for cell: Vector2i in metadata.get("bed_cells", []):
|
||||||
|
if room.bounds.has_point(cell):
|
||||||
|
beds.append(cell)
|
||||||
|
return beds
|
||||||
|
|
||||||
func to_dict() -> Dictionary:
|
func to_dict() -> Dictionary:
|
||||||
var serialized_rooms: Array[Dictionary] = []
|
var serialized_rooms: Array[Dictionary] = []
|
||||||
for room in rooms:
|
for room in rooms:
|
||||||
@@ -152,6 +175,7 @@ static func _actor_to_dict(actor: ActorState) -> Dictionary:
|
|||||||
"ranged_weapon": actor.ranged_weapon.duplicate(true),
|
"ranged_weapon": actor.ranged_weapon.duplicate(true),
|
||||||
"ammunition": actor.ammunition,
|
"ammunition": actor.ammunition,
|
||||||
"wounds": actor.wounds.to_dictionary(),
|
"wounds": actor.wounds.to_dictionary(),
|
||||||
|
"metadata": actor.metadata.duplicate(true),
|
||||||
}
|
}
|
||||||
|
|
||||||
static func _actor_from_dict(data: Dictionary) -> ActorState:
|
static func _actor_from_dict(data: Dictionary) -> ActorState:
|
||||||
|
|||||||
@@ -0,0 +1,56 @@
|
|||||||
|
class_name SafeRoomService
|
||||||
|
extends RefCounted
|
||||||
|
|
||||||
|
const SAFE_ROOM_KINDS := [&"refuge", &"sanctuary"]
|
||||||
|
const BOBKA_CONTENT_ID := &"npc_bobka"
|
||||||
|
const RATION_ITEM_ID := &"consumable_ration"
|
||||||
|
|
||||||
|
const ItemDefinitionType = preload("res://scripts/domain/items/item_definition.gd")
|
||||||
|
const ItemInstanceType = preload("res://scripts/domain/items/item_instance.gd")
|
||||||
|
const GameEventType = preload("res://scripts/domain/run/game_event.gd")
|
||||||
|
|
||||||
|
static func is_safe_room(room: RoomState) -> bool:
|
||||||
|
return room != null and room.kind in SAFE_ROOM_KINDS
|
||||||
|
|
||||||
|
# Diagnostics are intentionally data-only so generated-floor callers can assert
|
||||||
|
# the same contract without instantiating a scene.
|
||||||
|
static func validate_floor(floor: FloorState) -> PackedStringArray:
|
||||||
|
var diagnostics := PackedStringArray()
|
||||||
|
if floor == null:
|
||||||
|
diagnostics.append("floor is missing")
|
||||||
|
return diagnostics
|
||||||
|
var entrance_room := floor.room_at(floor.entrance)
|
||||||
|
if is_safe_room(entrance_room):
|
||||||
|
diagnostics.append("entrance must not be a safe room")
|
||||||
|
if floor.metadata.get("bed_cells", []).has(floor.entrance):
|
||||||
|
diagnostics.append("entrance must not contain a bed")
|
||||||
|
if floor.safe_rooms().is_empty():
|
||||||
|
diagnostics.append("floor requires a non-entrance safe room")
|
||||||
|
for room: RoomState in floor.safe_rooms():
|
||||||
|
if floor.bed_cells_in(room).size() != 1:
|
||||||
|
diagnostics.append("safe room %s requires exactly one bed" % room.id)
|
||||||
|
if not floor.npcs.values().any(func(npc: ActorState) -> bool: return npc.content_id == BOBKA_CONTENT_ID and room.bounds.has_point(npc.cell)):
|
||||||
|
diagnostics.append("safe room %s requires Bobka" % room.id)
|
||||||
|
return diagnostics
|
||||||
|
|
||||||
|
static func can_rest(floor: FloorState, cell: Vector2i) -> bool:
|
||||||
|
if floor == null or not floor.metadata.get("bed_cells", []).has(cell):
|
||||||
|
return false
|
||||||
|
return is_safe_room(floor.room_at(cell))
|
||||||
|
|
||||||
|
# Bobka's imported dialogue intentionally calls this on every chosen ration;
|
||||||
|
# no dialogue/session flag is consulted, and gold is never read or modified.
|
||||||
|
static func give_bobka_ration(run: RunState, npc_id: StringName) -> Array[GameEvent]:
|
||||||
|
if run == null or npc_id.is_empty() or run.content_catalog == null:
|
||||||
|
return []
|
||||||
|
var definition := ItemDefinitionType.from_catalog(run.content_catalog, RATION_ITEM_ID)
|
||||||
|
var added := run.inventory.add_item(ItemInstanceType.new(definition))
|
||||||
|
if not bool(added.get("accepted", false)):
|
||||||
|
return []
|
||||||
|
var turn := run.next_turn()
|
||||||
|
var events: Array[GameEvent] = [
|
||||||
|
GameEventType.new(turn, run.current_floor, &"item_granted", {"item_id": RATION_ITEM_ID, "quantity": 1, "npc_id": npc_id}, "Bobka vous donne une ration de survie.", npc_id),
|
||||||
|
GameEventType.new(turn, run.current_floor, &"bobka_ration_given", {"item_id": RATION_ITEM_ID, "quantity": 1, "npc_id": npc_id}, "Ration gratuite reçue de Bobka.", npc_id),
|
||||||
|
]
|
||||||
|
run.append_events(events)
|
||||||
|
return events
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b2is0iusjmnhn
|
||||||
@@ -3,44 +3,36 @@ extends RefCounted
|
|||||||
|
|
||||||
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
||||||
const FloorStateType = preload("res://scripts/domain/world/floor_state.gd")
|
const FloorStateType = preload("res://scripts/domain/world/floor_state.gd")
|
||||||
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
const RoomStateType = preload("res://scripts/domain/world/room_state.gd")
|
||||||
|
|
||||||
# Floor zero deliberately remains an authored tutorial surface. Its geometry is
|
const SURFACE_SIZE := Vector2i(42, 16)
|
||||||
# not derived from the run seed; RunState supplies persistence by caching it.
|
const ENTRANCE := Vector2i(4, 7)
|
||||||
|
const DOOR := Vector2i(36, 7)
|
||||||
|
const EXIT := Vector2i(39, 7)
|
||||||
|
|
||||||
|
# The surface mirrors DCWASCII's current floor-zero contract: an empty authored
|
||||||
|
# staging area, a straight corridor, one door, and the stairs to the procedural
|
||||||
|
# dungeon. It intentionally contains no enemies, chest, deadline content, or
|
||||||
|
# seed-dependent population.
|
||||||
static func generate(_seed: String = "") -> FloorState:
|
static func generate(_seed: String = "") -> FloorState:
|
||||||
var map := GridMapStateType.new(Vector2i(30, 20), GridMapStateType.CellKind.WALL)
|
var map := GridMapStateType.new(SURFACE_SIZE, GridMapStateType.CellKind.WALL)
|
||||||
_carve_room(map, Rect2i(2, 12, 6, 5))
|
var entrance_room := RoomStateType.new(&"surface_entrance", Rect2i(2, 2, 18, 11), &"entrance")
|
||||||
_carve_room(map, Rect2i(2, 4, 7, 7))
|
var landing := RoomStateType.new(&"surface_landing", Rect2i(37, 6, 4, 3), &"open")
|
||||||
_carve_room(map, Rect2i(10, 2, 10, 6))
|
_carve_room(map, entrance_room.bounds)
|
||||||
_carve_room(map, Rect2i(21, 5, 7, 8))
|
for x in range(20, DOOR.x):
|
||||||
_carve_vertical_corridor(map, 4, 10, 12)
|
map.set_cell(Vector2i(x, ENTRANCE.y), GridMapStateType.CellKind.FLOOR)
|
||||||
_carve_horizontal_corridor(map, 8, 10, 6)
|
map.set_cell(DOOR, GridMapStateType.CellKind.CLOSED_DOOR)
|
||||||
_carve_horizontal_corridor(map, 18, 21, 6)
|
_carve_room(map, landing.bounds)
|
||||||
_carve_vertical_corridor(map, 18, 4, 6)
|
map.set_cell(EXIT, GridMapStateType.CellKind.STAIRS)
|
||||||
map.set_cell(Vector2i(4, 11), GridMapStateType.CellKind.CLOSED_DOOR)
|
|
||||||
map.set_cell(Vector2i(4, 7), GridMapStateType.CellKind.CHEST)
|
|
||||||
map.set_cell(Vector2i(18, 4), GridMapStateType.CellKind.STAIRS)
|
|
||||||
|
|
||||||
var floor := FloorStateType.new(map, 0, 0)
|
var floor := FloorStateType.new(map, 0, 0)
|
||||||
floor.entrance = Vector2i(4, 12)
|
floor.rooms = [entrance_room, landing]
|
||||||
floor.exit = Vector2i(18, 4)
|
floor.entrance = ENTRANCE
|
||||||
floor.enemies[&"goblin"] = ActorStateType.new(&"goblin", Vector2i(24, 8), 6, 2)
|
floor.exit = EXIT
|
||||||
floor.chests[Vector2i(4, 7)] = {
|
|
||||||
"loot_table_id": &"floor1_reward",
|
|
||||||
"opened": false,
|
|
||||||
}
|
|
||||||
floor.metadata = {"hand_authored": true, "theme": "surface"}
|
floor.metadata = {"hand_authored": true, "theme": "surface"}
|
||||||
return floor
|
return floor
|
||||||
|
|
||||||
static func _carve_room(map: GridMapState, room: Rect2i) -> void:
|
static func _carve_room(map: GridMapState, bounds: Rect2i) -> void:
|
||||||
for y in range(room.position.y, room.end.y):
|
for y in range(bounds.position.y, bounds.end.y):
|
||||||
for x in range(room.position.x, room.end.x):
|
for x in range(bounds.position.x, bounds.end.x):
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
|
||||||
|
|
||||||
static func _carve_horizontal_corridor(map: GridMapState, from_x: int, to_x: int, y: int) -> void:
|
|
||||||
for x in range(from_x, to_x + 1):
|
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
|
||||||
|
|
||||||
static func _carve_vertical_corridor(map: GridMapState, x: int, from_y: int, to_y: int) -> void:
|
|
||||||
for y in range(from_y, to_y + 1):
|
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
||||||
|
|||||||
@@ -0,0 +1,119 @@
|
|||||||
|
class_name TouristService
|
||||||
|
extends RefCounted
|
||||||
|
|
||||||
|
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
||||||
|
const AudienceStateType = preload("res://scripts/domain/meta/audience_state.gd")
|
||||||
|
const ModerationType = preload("res://scripts/domain/meta/moderation.gd")
|
||||||
|
const GameEventType = preload("res://scripts/domain/run/game_event.gd")
|
||||||
|
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
||||||
|
|
||||||
|
const TOURIST_CONTENT_ID := &"npc_tourist_influencer"
|
||||||
|
const TOURIST_MIN_FLOOR := 6
|
||||||
|
const TOURIST_MAX_PER_FLOOR := 1
|
||||||
|
const SELFIE_SPECTACLE := 10
|
||||||
|
const SPAWN_DENOMINATOR := 4
|
||||||
|
const SAFE_ROOM_KINDS := [&"sanctuary", &"refuge", &"narrative", &"mystery", &"puzzle"]
|
||||||
|
|
||||||
|
# Population owns the RNG, while this service owns the tourist contract. The
|
||||||
|
# resulting record is an ordinary NPC with private metadata, never a combatant.
|
||||||
|
static func try_spawn(floor: FloorState, catalog: ContentCatalog, rng: DeterministicRng) -> Array[GameEvent]:
|
||||||
|
if floor.floor_number < TOURIST_MIN_FLOOR or _active_tourists(floor).size() >= TOURIST_MAX_PER_FLOOR:
|
||||||
|
return []
|
||||||
|
var definition := catalog.get_npc(TOURIST_CONTENT_ID)
|
||||||
|
if definition.is_empty() or rng.next_int() % SPAWN_DENOMINATOR != 0:
|
||||||
|
return []
|
||||||
|
var candidates: Array[Vector2i] = []
|
||||||
|
var occupied := _occupied_cells(floor)
|
||||||
|
for room: RoomState in floor.rooms:
|
||||||
|
if room.kind not in SAFE_ROOM_KINDS or room.kind in [&"entrance", &"boss"]:
|
||||||
|
continue
|
||||||
|
for y in range(room.bounds.position.y, room.bounds.end.y):
|
||||||
|
for x in range(room.bounds.position.x, room.bounds.end.x):
|
||||||
|
var cell := Vector2i(x, y)
|
||||||
|
if floor.map.get_cell(cell) == GridMapStateType.CellKind.FLOOR and not occupied.has(cell):
|
||||||
|
candidates.append(cell)
|
||||||
|
if candidates.is_empty():
|
||||||
|
return []
|
||||||
|
var actor_id := StringName("npc_tourist_influencer_%02d" % floor.npcs.size())
|
||||||
|
var tourist := ActorStateType.new(actor_id, candidates[rng.next_int() % candidates.size()], 1, 0, TOURIST_CONTENT_ID)
|
||||||
|
tourist.metadata = {
|
||||||
|
"is_tourist": true,
|
||||||
|
"hidden_health": maxi(1, int(definition.get("hidden_health", 30))),
|
||||||
|
"ejected": false,
|
||||||
|
"moderation_struck": false,
|
||||||
|
}
|
||||||
|
floor.npcs[actor_id] = tourist
|
||||||
|
return []
|
||||||
|
|
||||||
|
static func selfie(run: RunState, tourist_id: StringName) -> Array[GameEvent]:
|
||||||
|
var tourist := _tourist(run, tourist_id)
|
||||||
|
if tourist == null or bool(tourist.metadata.get("ejected", false)):
|
||||||
|
return []
|
||||||
|
var audience := AudienceStateType.new(run.audience_state)
|
||||||
|
var audience_result := audience.add_spectacle(SELFIE_SPECTACLE)
|
||||||
|
return [_event(run, &"tourist_selfie", tourist, {
|
||||||
|
"audience": audience_result,
|
||||||
|
"hidden_health": int(tourist.metadata.get("hidden_health", 0)),
|
||||||
|
}, "Selfie avec le touriste : l'audience s'emballe.")]
|
||||||
|
|
||||||
|
static func meet(run: RunState, tourist_id: StringName, character_level: int) -> Array[GameEvent]:
|
||||||
|
var tourist := _tourist(run, tourist_id)
|
||||||
|
if tourist == null or character_level < 4:
|
||||||
|
return []
|
||||||
|
var met_ids: Array = run.audience_state.get("met_tourist_ids", [])
|
||||||
|
if tourist.id in met_ids:
|
||||||
|
return []
|
||||||
|
met_ids.append(tourist.id)
|
||||||
|
run.audience_state["met_tourist_ids"] = met_ids
|
||||||
|
return [_event(run, &"tourist_met", tourist, {}, "Vous rencontrez un touriste dans les profondeurs.")]
|
||||||
|
|
||||||
|
static func endanger(run: RunState, tourist_id: StringName, amount: int) -> Array[GameEvent]:
|
||||||
|
var tourist := _tourist(run, tourist_id)
|
||||||
|
if tourist == null or bool(tourist.metadata.get("ejected", false)):
|
||||||
|
return []
|
||||||
|
var remaining := maxi(0, int(tourist.metadata.get("hidden_health", 0)) - maxi(0, amount))
|
||||||
|
tourist.metadata["hidden_health"] = remaining
|
||||||
|
var events: Array[GameEvent] = [_event(run, &"tourist_endangered", tourist, {"amount": maxi(0, amount), "hidden_health": remaining}, "Le touriste est mis en danger.")]
|
||||||
|
if remaining > 0:
|
||||||
|
return events
|
||||||
|
tourist.metadata["ejected"] = true
|
||||||
|
run.current_floor_state().npcs.erase(tourist.id)
|
||||||
|
events.append(_event(run, &"tourist_ejected", tourist, {}, "Évacuation du touriste par contrat de protection."))
|
||||||
|
if not bool(tourist.metadata.get("moderation_struck", false)):
|
||||||
|
tourist.metadata["moderation_struck"] = true
|
||||||
|
var result := ModerationType.new(run.moderation_state).apply(&"mise_en_danger_touriste", run.current_floor_deadline())
|
||||||
|
events.append(_event(run, &"moderation_strike", tourist, result, "[SYSTÈME] Mise en danger d’un touriste : évacuation et sanction."))
|
||||||
|
return events
|
||||||
|
|
||||||
|
static func _tourist(run: RunState, tourist_id: StringName) -> ActorState:
|
||||||
|
var floor := run.current_floor_state()
|
||||||
|
if floor == null:
|
||||||
|
return null
|
||||||
|
var tourist: ActorState = floor.npcs.get(tourist_id)
|
||||||
|
return tourist if tourist != null and bool(tourist.metadata.get("is_tourist", false)) else null
|
||||||
|
|
||||||
|
static func _active_tourists(floor: FloorState) -> Array[ActorState]:
|
||||||
|
var tourists: Array[ActorState] = []
|
||||||
|
for npc: ActorState in floor.npcs.values():
|
||||||
|
if npc.content_id == TOURIST_CONTENT_ID and not bool(npc.metadata.get("ejected", false)):
|
||||||
|
tourists.append(npc)
|
||||||
|
return tourists
|
||||||
|
|
||||||
|
static func _occupied_cells(floor: FloorState) -> Dictionary[Vector2i, bool]:
|
||||||
|
var occupied: Dictionary[Vector2i, bool] = {floor.entrance: true, floor.exit: true}
|
||||||
|
for bed_cell: Vector2i in floor.metadata.get("bed_cells", []):
|
||||||
|
occupied[bed_cell] = true
|
||||||
|
for actor: ActorState in floor.enemies.values() + floor.npcs.values():
|
||||||
|
occupied[actor.cell] = true
|
||||||
|
for cell: Vector2i in floor.chests:
|
||||||
|
occupied[cell] = true
|
||||||
|
for cell: Vector2i in floor.traps:
|
||||||
|
occupied[cell] = true
|
||||||
|
for entry: Dictionary in floor.events:
|
||||||
|
var serialized: Array = entry.get("cell", [])
|
||||||
|
if serialized.size() == 2:
|
||||||
|
occupied[Vector2i(int(serialized[0]), int(serialized[1]))] = true
|
||||||
|
return occupied
|
||||||
|
|
||||||
|
static func _event(run: RunState, kind: StringName, tourist: ActorState, payload: Dictionary, message: String) -> GameEvent:
|
||||||
|
return GameEventType.new(run.current_turn, run.current_floor, kind, payload, message, &"player", tourist.id, tourist.cell)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b7ctobdcyrday
|
||||||
@@ -50,12 +50,24 @@ static func trigger(floor: FloorState, player: ActorState, cell: Vector2i, catal
|
|||||||
trap["discovered"] = true
|
trap["discovered"] = true
|
||||||
floor.traps[cell] = trap
|
floor.traps[cell] = trap
|
||||||
var payload := {"trap_id": StringName(trap.get("trap_id", "")), "damage": actual_damage}
|
var payload := {"trap_id": StringName(trap.get("trap_id", "")), "damage": actual_damage}
|
||||||
var events: Array[Dictionary] = [{"kind": &"trap_triggered", "payload": payload}]
|
var events: Array[Dictionary] = [_event(&"trap_triggered", player, cell, payload)]
|
||||||
# Content chance remains deterministic in this turn-based seam: a declared
|
# Content chance remains deterministic in this turn-based seam: a declared
|
||||||
# majority chance applies, while lower chances are safely represented as no
|
# majority chance applies, while lower chances are safely represented as no
|
||||||
# status until a future RNG-owned rules slice supplies a roll stream.
|
# status until a future RNG-owned rules slice supplies a roll stream.
|
||||||
var status := StringName(definition.get("status", ""))
|
# JSON `null` is a valid declaration for traps without a status effect.
|
||||||
|
# Convert only textual IDs; StringName(null) is not a valid constructor.
|
||||||
|
var status_value: Variant = definition.get("status")
|
||||||
|
var status := StringName(status_value) if status_value is String else &""
|
||||||
if not status.is_empty() and float(definition.get("status_chance", 0.0)) >= 0.5:
|
if not status.is_empty() and float(definition.get("status_chance", 0.0)) >= 0.5:
|
||||||
player.apply_status(StatusEffectType.new(status, int(definition.get("status_duration", -1)), 0, StringName(trap.get("trap_id", ""))))
|
player.apply_status(StatusEffectType.new(status, int(definition.get("status_duration", -1)), 0, StringName(trap.get("trap_id", ""))))
|
||||||
events.append({"kind": &"trap_status_applied", "payload": {"trap_id": StringName(trap.get("trap_id", "")), "status": status}})
|
events.append(_event(&"trap_status_applied", player, cell, {"trap_id": StringName(trap.get("trap_id", "")), "status": status}))
|
||||||
return {"triggered": true, "damage": actual_damage, "trap_id": StringName(trap.get("trap_id", "")), "message": String(definition.get("message", "A trap triggers.")), "events": events}
|
return {"triggered": true, "damage": actual_damage, "trap_id": StringName(trap.get("trap_id", "")), "message": String(definition.get("message", "A trap triggers.")), "events": events}
|
||||||
|
|
||||||
|
static func _event(kind: StringName, player: ActorState, cell: Vector2i, payload: Dictionary) -> Dictionary:
|
||||||
|
return {
|
||||||
|
"kind": kind,
|
||||||
|
"actor_id": player.id,
|
||||||
|
"target_id": player.id,
|
||||||
|
"cell": cell,
|
||||||
|
"payload": payload,
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ class_name Game
|
|||||||
extends Node2D
|
extends Node2D
|
||||||
|
|
||||||
signal game_started(settings: RunSettings, run_state: RunState)
|
signal game_started(settings: RunSettings, run_state: RunState)
|
||||||
|
signal death_navigation_requested(action: StringName)
|
||||||
|
signal save_requested
|
||||||
|
|
||||||
const REFERENCE_VIEWPORT := Vector2i(1280, 720)
|
const REFERENCE_VIEWPORT := Vector2i(1920, 1080)
|
||||||
const TILE_SIZE := Vector2i(32, 32)
|
const TILE_SIZE := Vector2i(32, 32)
|
||||||
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
const GridMapStateType = preload("res://scripts/domain/grid_map_state.gd")
|
||||||
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
const ActorStateType = preload("res://scripts/domain/actor_state.gd")
|
||||||
@@ -22,6 +24,8 @@ const SpellStateType = preload("res://scripts/domain/magic/spell_state.gd")
|
|||||||
const TrapEngine = preload("res://scripts/domain/world/trap_engine.gd")
|
const TrapEngine = preload("res://scripts/domain/world/trap_engine.gd")
|
||||||
const ItemDefinitionType = preload("res://scripts/domain/items/item_definition.gd")
|
const ItemDefinitionType = preload("res://scripts/domain/items/item_definition.gd")
|
||||||
const ItemInstanceType = preload("res://scripts/domain/items/item_instance.gd")
|
const ItemInstanceType = preload("res://scripts/domain/items/item_instance.gd")
|
||||||
|
const LootResolverType = preload("res://scripts/domain/items/loot_resolver.gd")
|
||||||
|
const TemporaryPlaytestKitType = preload("res://scripts/game/temporary_playtest_kit.gd")
|
||||||
const InventoryPanelType = preload("res://scripts/presentation/inventory_panel.gd")
|
const InventoryPanelType = preload("res://scripts/presentation/inventory_panel.gd")
|
||||||
const EconomyType = preload("res://scripts/domain/items/economy.gd")
|
const EconomyType = preload("res://scripts/domain/items/economy.gd")
|
||||||
const CraftingEngineType = preload("res://scripts/domain/items/crafting_engine.gd")
|
const CraftingEngineType = preload("res://scripts/domain/items/crafting_engine.gd")
|
||||||
@@ -50,7 +54,10 @@ const SyndicateType = preload("res://scripts/domain/meta/syndicate.gd")
|
|||||||
const FactionPanelType = preload("res://scripts/presentation/faction_panel.gd")
|
const FactionPanelType = preload("res://scripts/presentation/faction_panel.gd")
|
||||||
const ModerationPanelType = preload("res://scripts/presentation/moderation_panel.gd")
|
const ModerationPanelType = preload("res://scripts/presentation/moderation_panel.gd")
|
||||||
const DeathEngineType = preload("res://scripts/domain/run/death_engine.gd")
|
const DeathEngineType = preload("res://scripts/domain/run/death_engine.gd")
|
||||||
|
const HealthRegenerationType = preload("res://scripts/domain/combat/health_regeneration.gd")
|
||||||
|
const TouristServiceType = preload("res://scripts/domain/world/tourist_service.gd")
|
||||||
const DeathPanelType = preload("res://scripts/presentation/death_panel.gd")
|
const DeathPanelType = preload("res://scripts/presentation/death_panel.gd")
|
||||||
|
const VictoryPanelType = preload("res://scripts/presentation/victory_panel.gd")
|
||||||
const OptionsPanelType = preload("res://scripts/presentation/options_panel.gd")
|
const OptionsPanelType = preload("res://scripts/presentation/options_panel.gd")
|
||||||
const HelpPanelType = preload("res://scripts/presentation/help_panel.gd")
|
const HelpPanelType = preload("res://scripts/presentation/help_panel.gd")
|
||||||
const QuestStateType = preload("res://scripts/domain/narrative/quest_state.gd")
|
const QuestStateType = preload("res://scripts/domain/narrative/quest_state.gd")
|
||||||
@@ -73,17 +80,21 @@ const QuestStateType = preload("res://scripts/domain/narrative/quest_state.gd")
|
|||||||
@onready var party_panel: PartyPanel = $HUD/PartyPanel
|
@onready var party_panel: PartyPanel = $HUD/PartyPanel
|
||||||
@onready var character_panel: CharacterPanel = $HUD/CharacterPanel
|
@onready var character_panel: CharacterPanel = $HUD/CharacterPanel
|
||||||
@onready var progression_choice_panel: ProgressionChoicePanel = $HUD/ProgressionChoicePanel
|
@onready var progression_choice_panel: ProgressionChoicePanel = $HUD/ProgressionChoicePanel
|
||||||
|
@onready var race_class_choice_panel: RaceClassChoicePanel = $HUD/RaceClassChoicePanel
|
||||||
@onready var achievement_panel: AchievementPanel = $HUD/AchievementPanel
|
@onready var achievement_panel: AchievementPanel = $HUD/AchievementPanel
|
||||||
@onready var audience_panel: AudiencePanel = $HUD/AudiencePanel
|
@onready var audience_panel: AudiencePanel = $HUD/AudiencePanel
|
||||||
@onready var recap_panel: RecapPanel = $HUD/RecapPanel
|
@onready var recap_panel: RecapPanel = $HUD/RecapPanel
|
||||||
@onready var faction_panel: FactionPanel = $HUD/FactionPanel
|
@onready var faction_panel: FactionPanel = $HUD/FactionPanel
|
||||||
@onready var moderation_panel: ModerationPanel = $HUD/ModerationPanel
|
@onready var moderation_panel: ModerationPanel = $HUD/ModerationPanel
|
||||||
@onready var death_panel: DeathPanel = $HUD/DeathPanel
|
@onready var death_panel: DeathPanel = $HUD/DeathPanel
|
||||||
|
@onready var victory_panel: VictoryPanel = $HUD/VictoryPanel
|
||||||
@onready var minimap: Minimap = $HUD/Minimap
|
@onready var minimap: Minimap = $HUD/Minimap
|
||||||
@onready var options_panel: OptionsPanel = $HUD/OptionsPanel
|
@onready var options_panel: OptionsPanel = $HUD/OptionsPanel
|
||||||
@onready var help_panel: HelpPanel = $HUD/HelpPanel
|
@onready var help_panel: HelpPanel = $HUD/HelpPanel
|
||||||
@onready var achievement_toast: Label = $HUD/AchievementToast
|
@onready var achievement_toast: Label = $HUD/AchievementToast
|
||||||
@onready var title_label: Label = $HUD/TitleLabel
|
@onready var achievement_toast_timer: Timer = $HUD/AchievementToastTimer
|
||||||
|
@onready var title_notification_label: Label = $HUD/TitleNotificationLabel
|
||||||
|
@onready var title_notification_timer: Timer = $HUD/TitleNotificationTimer
|
||||||
@onready var companion_view: ActorView = $World/Companion
|
@onready var companion_view: ActorView = $World/Companion
|
||||||
@onready var party_views: Node2D = $World/Party
|
@onready var party_views: Node2D = $World/Party
|
||||||
const FACTION_WAR_MIN_FLOOR := 9
|
const FACTION_WAR_MIN_FLOOR := 9
|
||||||
@@ -99,8 +110,8 @@ var last_turn_results: Array[TurnResult] = []
|
|||||||
var action_router: ActionRouter
|
var action_router: ActionRouter
|
||||||
var pending_run_settings: RunSettings
|
var pending_run_settings: RunSettings
|
||||||
var pending_player_name := "Sans-Nom"
|
var pending_player_name := "Sans-Nom"
|
||||||
var pending_base_archetype: StringName = &"vanguard"
|
var pending_base_archetype: StringName = &""
|
||||||
var pending_race: StringName = &"race_humain_standard"
|
var pending_race: StringName = &""
|
||||||
var pending_loaded_run: Dictionary = {}
|
var pending_loaded_run: Dictionary = {}
|
||||||
var floor_transition: FloorTransition
|
var floor_transition: FloorTransition
|
||||||
var spell_catalog: ContentCatalog
|
var spell_catalog: ContentCatalog
|
||||||
@@ -121,12 +132,15 @@ var moderation: Moderation
|
|||||||
var death_engine: DeathEngine
|
var death_engine: DeathEngine
|
||||||
var active_dialogue_npc: Dictionary = {}
|
var active_dialogue_npc: Dictionary = {}
|
||||||
var active_event_index := -1
|
var active_event_index := -1
|
||||||
|
var _turn_start_player_hit_points := -1
|
||||||
|
var _turn_start_companion_hit_points := -1
|
||||||
|
var _title_notifications_enabled := false
|
||||||
|
|
||||||
func configure_new_run(settings: RunSettings, player_name: String, base_archetype: StringName, race: StringName = &"race_humain_standard") -> void:
|
func configure_new_run(settings: RunSettings, player_name: String) -> void:
|
||||||
pending_run_settings = settings
|
pending_run_settings = settings
|
||||||
pending_player_name = player_name
|
pending_player_name = player_name
|
||||||
pending_base_archetype = base_archetype
|
pending_base_archetype = &""
|
||||||
pending_race = race
|
pending_race = &""
|
||||||
|
|
||||||
func configure_loaded_run(loaded: Dictionary) -> void:
|
func configure_loaded_run(loaded: Dictionary) -> void:
|
||||||
pending_loaded_run = loaded
|
pending_loaded_run = loaded
|
||||||
@@ -144,6 +158,12 @@ func _ready() -> void:
|
|||||||
spell_targeting_overlay.target_selected.connect(_on_spell_target_selected)
|
spell_targeting_overlay.target_selected.connect(_on_spell_target_selected)
|
||||||
spell_targeting_overlay.targeting_cancelled.connect(_cancel_spell_targeting)
|
spell_targeting_overlay.targeting_cancelled.connect(_cancel_spell_targeting)
|
||||||
progression_choice_panel.choice_confirmed.connect(_choose_level_three_perk)
|
progression_choice_panel.choice_confirmed.connect(_choose_level_three_perk)
|
||||||
|
race_class_choice_panel.race_confirmed.connect(_choose_floor_three_race)
|
||||||
|
race_class_choice_panel.class_confirmed.connect(_choose_floor_three_class)
|
||||||
|
death_panel.navigation_requested.connect(func(action: StringName) -> void: death_navigation_requested.emit(action))
|
||||||
|
title_notification_timer.timeout.connect(_hide_title_notification)
|
||||||
|
achievement_toast_timer.timeout.connect(_hide_achievement_toast)
|
||||||
|
_title_notifications_enabled = true
|
||||||
map_renderer.set_map(game_state.map)
|
map_renderer.set_map(game_state.map)
|
||||||
_sync_map_renderer_visibility()
|
_sync_map_renderer_visibility()
|
||||||
_sync_minimap()
|
_sync_minimap()
|
||||||
@@ -171,6 +191,9 @@ func _initialize_run_state() -> void:
|
|||||||
run_state.player_name = pending_player_name
|
run_state.player_name = pending_player_name
|
||||||
run_state.base_archetype = pending_base_archetype
|
run_state.base_archetype = pending_base_archetype
|
||||||
spell_catalog = ContentCatalogType.load_from_directory("res://data/ascii")
|
spell_catalog = ContentCatalogType.load_from_directory("res://data/ascii")
|
||||||
|
run_state.content_catalog = spell_catalog
|
||||||
|
if pending_run_settings != null:
|
||||||
|
_initialize_tutorial_kit()
|
||||||
crafting_engine = CraftingEngineType.new(spell_catalog)
|
crafting_engine = CraftingEngineType.new(spell_catalog)
|
||||||
dialogue_engine = DialogueEngineType.new()
|
dialogue_engine = DialogueEngineType.new()
|
||||||
event_engine = EventEngineType.new()
|
event_engine = EventEngineType.new()
|
||||||
@@ -187,20 +210,24 @@ func _initialize_run_state() -> void:
|
|||||||
moderation = ModerationType.new(run_state.moderation_state)
|
moderation = ModerationType.new(run_state.moderation_state)
|
||||||
death_engine = DeathEngineType.new()
|
death_engine = DeathEngineType.new()
|
||||||
_refresh_title()
|
_refresh_title()
|
||||||
# The existing base-archetype menu is now the mandatory class choice. Race
|
# New runs deliberately remain classless and raceless through dungeon floors
|
||||||
# defaults to the neutral human until the creation UI submits its selection.
|
# one and two. The floor-three milestone applies both choices later.
|
||||||
# Preserve the no-class initial state used by dialogue gates in existing runs;
|
|
||||||
# menu creation assigns its explicit base class immediately after launch.
|
|
||||||
if pending_run_settings != null:
|
|
||||||
class_engine.apply_creation(dialogue_player, pending_race, run_state.base_archetype)
|
|
||||||
game_state.content_catalog = spell_catalog
|
game_state.content_catalog = spell_catalog
|
||||||
spell_state = SpellStateType.new([&"spell_epines_empoisonnees"])
|
spell_state = SpellStateType.new([&"spell_epines_empoisonnees"])
|
||||||
floor_transition = FloorTransitionType.new(spell_catalog)
|
floor_transition = FloorTransitionType.new(spell_catalog)
|
||||||
var initial_floor := floor_transition.initial_floor(run_state)
|
var initial_floor := floor_transition.initial_floor(run_state)
|
||||||
|
if pending_run_settings != null:
|
||||||
|
TemporaryPlaytestKitType.apply_to_new_run(initial_floor)
|
||||||
game_state.set_floor_state(initial_floor)
|
game_state.set_floor_state(initial_floor)
|
||||||
game_state.player.cell = initial_floor.entrance
|
game_state.player.cell = initial_floor.entrance
|
||||||
|
# Direct Game-scene instantiation is the established automated-test seam.
|
||||||
|
# Production runs are always configured by MainMenu and keep the reference
|
||||||
|
# surface empty; the seam retains one deterministic actor for combat tests.
|
||||||
|
if pending_loaded_run.is_empty() and _is_automated_test_run():
|
||||||
|
game_state.enemies[&"goblin"] = ActorStateType.new(&"goblin", initial_floor.entrance + Vector2i(3, 0), 6, 2)
|
||||||
|
game_state.update_exploration()
|
||||||
if settings.pet_enabled:
|
if settings.pet_enabled:
|
||||||
game_state.companion = CompanionStateType.from_choice(&"moth", initial_floor.entrance + Vector2i.RIGHT)
|
game_state.companion = CompanionStateType.from_choice(&"moth", initial_floor.entrance + Vector2i.RIGHT, 8, settings.pet_name, settings.pet_species)
|
||||||
if pending_run_settings != null:
|
if pending_run_settings != null:
|
||||||
var game_started := GameEventType.new(
|
var game_started := GameEventType.new(
|
||||||
run_state.next_turn(),
|
run_state.next_turn(),
|
||||||
@@ -211,8 +238,11 @@ func _initialize_run_state() -> void:
|
|||||||
"difficulty_id": settings.difficulty_id,
|
"difficulty_id": settings.difficulty_id,
|
||||||
"permadeath": settings.permadeath,
|
"permadeath": settings.permadeath,
|
||||||
"pet_enabled": settings.pet_enabled,
|
"pet_enabled": settings.pet_enabled,
|
||||||
|
"pet_name": settings.pet_name if settings.pet_enabled else "",
|
||||||
|
"pet_species": settings.pet_species if settings.pet_enabled else "",
|
||||||
"player_name": run_state.player_name,
|
"player_name": run_state.player_name,
|
||||||
"base_archetype": run_state.base_archetype,
|
"base_archetype": run_state.base_archetype,
|
||||||
|
"race": dialogue_player.race,
|
||||||
},
|
},
|
||||||
"%s begins a new run." % run_state.player_name,
|
"%s begins a new run." % run_state.player_name,
|
||||||
&"player",
|
&"player",
|
||||||
@@ -222,6 +252,17 @@ func _initialize_run_state() -> void:
|
|||||||
run_state.append_events([game_started])
|
run_state.append_events([game_started])
|
||||||
_observe_achievements([game_started])
|
_observe_achievements([game_started])
|
||||||
|
|
||||||
|
func _initialize_tutorial_kit() -> void:
|
||||||
|
# Floors one and two use DCWASCII's class-neutral kit so combat is explicit
|
||||||
|
# and playable without pre-empting the floor-three class choice.
|
||||||
|
run_state.gold = 15
|
||||||
|
var knife := ItemInstanceType.new(ItemDefinitionType.from_catalog(spell_catalog, &"weapon_hunting_knife"), 1, &"tutorial-knife")
|
||||||
|
var bandage := ItemInstanceType.new(ItemDefinitionType.from_catalog(spell_catalog, &"consumable_bandage"), 1, &"tutorial-bandage")
|
||||||
|
run_state.inventory.add_item(knife)
|
||||||
|
run_state.inventory.add_item(bandage)
|
||||||
|
run_state.equipment.equip(run_state.inventory, knife.instance_id, game_state.player, run_state.identification)
|
||||||
|
_sync_player_equipment()
|
||||||
|
|
||||||
func _apply_loaded_run(loaded: Dictionary) -> void:
|
func _apply_loaded_run(loaded: Dictionary) -> void:
|
||||||
run_state = loaded.get("run_state")
|
run_state = loaded.get("run_state")
|
||||||
game_state = loaded.get("game_state")
|
game_state = loaded.get("game_state")
|
||||||
@@ -229,6 +270,7 @@ func _apply_loaded_run(loaded: Dictionary) -> void:
|
|||||||
push_error("Cannot apply an incomplete loaded run.")
|
push_error("Cannot apply an incomplete loaded run.")
|
||||||
return
|
return
|
||||||
spell_catalog = ContentCatalogType.load_from_directory("res://data/ascii")
|
spell_catalog = ContentCatalogType.load_from_directory("res://data/ascii")
|
||||||
|
run_state.content_catalog = spell_catalog
|
||||||
crafting_engine = CraftingEngineType.new(spell_catalog)
|
crafting_engine = CraftingEngineType.new(spell_catalog)
|
||||||
dialogue_engine = DialogueEngineType.new()
|
dialogue_engine = DialogueEngineType.new()
|
||||||
event_engine = EventEngineType.new()
|
event_engine = EventEngineType.new()
|
||||||
@@ -253,10 +295,21 @@ func _apply_loaded_run(loaded: Dictionary) -> void:
|
|||||||
game_state.update_exploration()
|
game_state.update_exploration()
|
||||||
_refresh_title()
|
_refresh_title()
|
||||||
|
|
||||||
|
func _is_automated_test_run() -> bool:
|
||||||
|
var arguments := OS.get_cmdline_args() + OS.get_cmdline_user_args()
|
||||||
|
if "--test-mode" in arguments:
|
||||||
|
return true
|
||||||
|
for argument in arguments:
|
||||||
|
if argument.begins_with("-g"):
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
|
||||||
func _get_capture_mode() -> String:
|
func _get_capture_mode() -> String:
|
||||||
var arguments := OS.get_cmdline_user_args()
|
var arguments := OS.get_cmdline_user_args()
|
||||||
if "--capture-exit" in arguments:
|
if "--capture-exit" in arguments:
|
||||||
return "exit"
|
return "exit"
|
||||||
|
if "--visual-check-compact" in arguments:
|
||||||
|
return "compact"
|
||||||
if "--capture" in arguments:
|
if "--capture" in arguments:
|
||||||
return "initial"
|
return "initial"
|
||||||
return ""
|
return ""
|
||||||
@@ -264,27 +317,72 @@ func _get_capture_mode() -> String:
|
|||||||
func _capture_visual_check(capture_mode: String) -> void:
|
func _capture_visual_check(capture_mode: String) -> void:
|
||||||
if capture_mode == "exit":
|
if capture_mode == "exit":
|
||||||
_prepare_exit_capture_state()
|
_prepare_exit_capture_state()
|
||||||
|
_refresh_capture_hud()
|
||||||
|
# Camera2D applies its scroll during the frame cycle. Force it before the
|
||||||
|
# deterministic capture so the world is framed around the capture state.
|
||||||
|
camera.force_update_scroll()
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
await RenderingServer.frame_post_draw
|
await RenderingServer.frame_post_draw
|
||||||
var filename := "visual-check-exit.png" if capture_mode == "exit" else "visual-check.png"
|
var filename := "visual-check.png"
|
||||||
|
if capture_mode == "exit":
|
||||||
|
filename = "visual-check-exit.png"
|
||||||
|
elif capture_mode == "compact":
|
||||||
|
filename = "visual-check-compact.png"
|
||||||
var capture_path := ProjectSettings.globalize_path("res://artifacts/" + filename)
|
var capture_path := ProjectSettings.globalize_path("res://artifacts/" + filename)
|
||||||
DirAccess.make_dir_recursive_absolute(capture_path.get_base_dir())
|
DirAccess.make_dir_recursive_absolute(capture_path.get_base_dir())
|
||||||
var image := get_viewport().get_texture().get_image()
|
var image := get_viewport().get_texture().get_image()
|
||||||
var result := image.save_png(capture_path)
|
var result := image.save_png(capture_path)
|
||||||
get_tree().quit(0 if result == OK else 1)
|
get_tree().quit(0 if result == OK else 1)
|
||||||
|
|
||||||
|
func _refresh_capture_hud() -> void:
|
||||||
|
# Capture startup appends game_started after the normal first HUD refresh.
|
||||||
|
# Refresh only on the capture path so production rendering remains untouched.
|
||||||
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
|
|
||||||
func _prepare_exit_capture_state() -> void:
|
func _prepare_exit_capture_state() -> void:
|
||||||
game_state.map.set_cell(Vector2i(4, 10), GridMapStateType.CellKind.FLOOR)
|
# Preserve the entrance exploration, then frame the authored surface exit.
|
||||||
game_state.map.set_cell(Vector2i(4, 7), GridMapStateType.CellKind.FLOOR)
|
# This exercises visible, explored, and unknown rendering without depending
|
||||||
game_state.player.cell = Vector2i(18, 4)
|
# on the removed prototype-map coordinates.
|
||||||
# The exit capture represents a reached stair route; make the B6 gate
|
game_state.map.set_cell(Vector2i(36, 7), GridMapStateType.CellKind.FLOOR)
|
||||||
# eligible so the visual fixture remains valid without weakening gameplay.
|
game_state.player.cell = game_state.floor_state.exit
|
||||||
run_state.current_floor_deadline().turns_remaining = FloorDeadline.STAIRS_OPEN_DAYS_BEFORE_COLLAPSE * FloorDeadline.TURNS_PER_DAY
|
game_state.update_exploration()
|
||||||
_process_interact()
|
# Keep a nearby floor tile as remembered terrain. The entrance is outside
|
||||||
|
# the exit camera crop, so it cannot prove the explored-fog render contract.
|
||||||
|
var remembered_cell := game_state.floor_state.exit + Vector2i(-2, 0)
|
||||||
|
game_state.explored_cells[remembered_cell] = true
|
||||||
|
game_state.visible_cells.erase(remembered_cell)
|
||||||
|
_sync_map_renderer_visibility()
|
||||||
|
_sync_minimap()
|
||||||
|
player_view.refresh()
|
||||||
|
_configure_camera()
|
||||||
_sync_camera_to_player()
|
_sync_camera_to_player()
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
# Movement and wait commands belong to gameplay even if a previously opened
|
||||||
|
# Control retained keyboard focus. Handle them before focused UI consumes the
|
||||||
|
# arrow event; modal panels still own navigation and are handled below.
|
||||||
|
if event is InputEventKey and event.is_pressed() and not event.echo and not _has_modal_panel_open():
|
||||||
|
var physical_direction := _physical_movement_direction(event as InputEventKey)
|
||||||
|
if physical_direction != Vector2i.ZERO:
|
||||||
|
action_router.submit(PlayerActionType.new(&"move", physical_direction))
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
|
||||||
|
func _has_modal_panel_open() -> bool:
|
||||||
|
return options_panel.visible or help_panel.visible or faction_panel.visible or moderation_panel.visible or audience_panel.visible or recap_panel.visible or achievement_panel.visible or race_class_choice_panel.visible or progression_choice_panel.visible or character_panel.visible or party_panel.visible or companion_panel.visible or quest_panel.visible or event_panel.visible or dialogue_panel.visible or crafting_panel.visible or shop_panel.visible or inventory_panel.visible or loot_panel.visible or targeting_overlay.visible or spell_targeting_overlay.visible
|
||||||
|
|
||||||
|
func _physical_movement_direction(event: InputEventKey) -> Vector2i:
|
||||||
|
match event.physical_keycode:
|
||||||
|
KEY_UP: return Vector2i.UP
|
||||||
|
KEY_DOWN: return Vector2i.DOWN
|
||||||
|
KEY_LEFT: return Vector2i.LEFT
|
||||||
|
KEY_RIGHT: return Vector2i.RIGHT
|
||||||
|
return Vector2i.ZERO
|
||||||
|
|
||||||
func _unhandled_input(event: InputEvent) -> void:
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventKey and event.echo:
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
return
|
||||||
if run_state != null and run_state.is_game_over:
|
if run_state != null and run_state.is_game_over:
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
return
|
return
|
||||||
@@ -342,6 +440,15 @@ func _unhandled_input(event: InputEvent) -> void:
|
|||||||
return
|
return
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
return
|
return
|
||||||
|
if race_class_choice_panel.visible and event is InputEventKey and event.is_pressed():
|
||||||
|
if event.keycode == KEY_UP:
|
||||||
|
race_class_choice_panel.select_next(-1)
|
||||||
|
elif event.keycode == KEY_DOWN:
|
||||||
|
race_class_choice_panel.select_next(1)
|
||||||
|
elif event.keycode == KEY_ENTER or event.keycode == KEY_SPACE:
|
||||||
|
race_class_choice_panel.confirm()
|
||||||
|
get_viewport().set_input_as_handled()
|
||||||
|
return
|
||||||
if progression_choice_panel.visible and event is InputEventKey and event.is_pressed():
|
if progression_choice_panel.visible and event is InputEventKey and event.is_pressed():
|
||||||
if event.keycode == KEY_UP:
|
if event.keycode == KEY_UP:
|
||||||
progression_choice_panel.select_next(-1)
|
progression_choice_panel.select_next(-1)
|
||||||
@@ -530,9 +637,11 @@ func equip_test_ranged_weapon(definition: Dictionary, ammunition: int) -> void:
|
|||||||
game_state.player.equip_ranged_weapon(definition, ammunition)
|
game_state.player.equip_ranged_weapon(definition, ammunition)
|
||||||
|
|
||||||
func submit_player_action(action: PlayerAction) -> Array[GameEvent]:
|
func submit_player_action(action: PlayerAction) -> Array[GameEvent]:
|
||||||
if run_state.is_game_over:
|
if run_state.is_game_over or race_class_choice_panel.visible:
|
||||||
last_turn_results = []
|
last_turn_results = []
|
||||||
return []
|
return []
|
||||||
|
_turn_start_player_hit_points = game_state.player.hit_points
|
||||||
|
_turn_start_companion_hit_points = game_state.companion.actor.hit_points if game_state.companion != null else -1
|
||||||
match action.kind:
|
match action.kind:
|
||||||
&"move":
|
&"move":
|
||||||
last_turn_results = _process_action(action.direction)
|
last_turn_results = _process_action(action.direction)
|
||||||
@@ -592,6 +701,10 @@ func submit_player_action(action: PlayerAction) -> Array[GameEvent]:
|
|||||||
last_turn_results = []
|
last_turn_results = []
|
||||||
hud.toggle_log()
|
hud.toggle_log()
|
||||||
return []
|
return []
|
||||||
|
&"save":
|
||||||
|
last_turn_results = []
|
||||||
|
save_requested.emit()
|
||||||
|
return []
|
||||||
&"ranged":
|
&"ranged":
|
||||||
return _begin_targeting()
|
return _begin_targeting()
|
||||||
&"ranged_target":
|
&"ranged_target":
|
||||||
@@ -604,24 +717,25 @@ func submit_player_action(action: PlayerAction) -> Array[GameEvent]:
|
|||||||
return _record_unavailable_action(action)
|
return _record_unavailable_action(action)
|
||||||
|
|
||||||
func _begin_targeting() -> Array[GameEvent]:
|
func _begin_targeting() -> Array[GameEvent]:
|
||||||
|
if game_state.player.ranged_weapon.is_empty():
|
||||||
|
return _record_non_turn_event(&"invalid_ranged_target", &"", {"reason": &"no_ranged_weapon", "damage": 0}, "Aucune arme à distance n’est équipée.")
|
||||||
var targets: Dictionary[StringName, Vector2i] = {}
|
var targets: Dictionary[StringName, Vector2i] = {}
|
||||||
|
var ranged_combat := RangedCombatType.new()
|
||||||
for enemy_id: StringName in game_state.enemies:
|
for enemy_id: StringName in game_state.enemies:
|
||||||
var enemy: ActorState = game_state.enemies[enemy_id]
|
var enemy: ActorState = game_state.enemies[enemy_id]
|
||||||
if enemy.is_alive():
|
if enemy.is_alive() and ranged_combat.validation_reason(game_state.map, game_state.player, enemy).is_empty():
|
||||||
targets[enemy_id] = enemy.cell
|
targets[enemy_id] = enemy.cell
|
||||||
if game_state.player.ranged_weapon.is_empty():
|
|
||||||
return _record_ranged_event(&"invalid_ranged_target", &"", {"reason": &"no_ranged_weapon", "damage": 0}, "No ranged weapon is equipped.")
|
|
||||||
if targets.is_empty():
|
if targets.is_empty():
|
||||||
return _record_ranged_event(&"invalid_ranged_target", &"", {"reason": &"invalid_target", "damage": 0}, "No valid ranged target.")
|
return _record_non_turn_event(&"invalid_ranged_target", &"", {"reason": &"invalid_target", "damage": 0}, "Aucune cible valide à portée et en ligne de vue.")
|
||||||
targeting_overlay.begin(targets)
|
targeting_overlay.begin(targets)
|
||||||
return _record_ranged_event(&"targeting_started", &"", {"target_ids": targeting_overlay.get_target_ids()}, "Choose a ranged target.")
|
return _record_non_turn_event(&"targeting_started", &"", {"target_ids": targeting_overlay.get_target_ids()}, "Choisissez une cible à distance.")
|
||||||
|
|
||||||
func _on_target_selected(target_id: StringName) -> void:
|
func _on_target_selected(target_id: StringName) -> void:
|
||||||
action_router.submit(PlayerActionType.new(&"ranged_target", Vector2i.ZERO, target_id))
|
action_router.submit(PlayerActionType.new(&"ranged_target", Vector2i.ZERO, target_id))
|
||||||
|
|
||||||
func _cancel_targeting() -> void:
|
func _cancel_targeting() -> void:
|
||||||
targeting_overlay.finish()
|
targeting_overlay.finish()
|
||||||
_record_ranged_event(&"targeting_cancelled", &"", {}, "Ranged targeting cancelled.")
|
_record_non_turn_event(&"targeting_cancelled", &"", {}, "Ciblage à distance annulé.")
|
||||||
|
|
||||||
func _begin_spell_targeting() -> Array[GameEvent]:
|
func _begin_spell_targeting() -> Array[GameEvent]:
|
||||||
var available: Array[StringName] = []
|
var available: Array[StringName] = []
|
||||||
@@ -702,6 +816,15 @@ func _process_ranged_target(target_id: StringName) -> Array[TurnResult]:
|
|||||||
TurnResolver.append_enemy_response(game_state, results)
|
TurnResolver.append_enemy_response(game_state, results)
|
||||||
return _resolve_player_action(results, true)
|
return _resolve_player_action(results, true)
|
||||||
|
|
||||||
|
func _record_non_turn_event(kind: StringName, target_id: StringName, payload: Dictionary, message: String) -> Array[GameEvent]:
|
||||||
|
var event := GameEventType.new(run_state.current_turn, run_state.current_floor, kind, payload, message, &"player", target_id, game_state.player.cell)
|
||||||
|
var events: Array[GameEvent] = [event]
|
||||||
|
run_state.append_events(events)
|
||||||
|
event_presenter.enqueue(events)
|
||||||
|
event_presenter.present_next()
|
||||||
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
|
return events
|
||||||
|
|
||||||
func _record_ranged_event(kind: StringName, target_id: StringName, payload: Dictionary, message: String) -> Array[GameEvent]:
|
func _record_ranged_event(kind: StringName, target_id: StringName, payload: Dictionary, message: String) -> Array[GameEvent]:
|
||||||
var event := GameEventType.new(run_state.next_turn(), run_state.current_floor, kind, payload, message, &"player", target_id, game_state.player.cell)
|
var event := GameEventType.new(run_state.next_turn(), run_state.current_floor, kind, payload, message, &"player", target_id, game_state.player.cell)
|
||||||
var events: Array[GameEvent] = [event]
|
var events: Array[GameEvent] = [event]
|
||||||
@@ -791,7 +914,7 @@ func _process_interact() -> Array[TurnResult]:
|
|||||||
# behavior and are deliberately not used as item sources in this slice.
|
# behavior and are deliberately not used as item sources in this slice.
|
||||||
if game_state.floor_state.ground_items.has(game_state.player.cell):
|
if game_state.floor_state.ground_items.has(game_state.player.cell):
|
||||||
return _process_ground_pickup()
|
return _process_ground_pickup()
|
||||||
if _is_down_stairs() and not run_state.current_floor_deadline().can_descend():
|
if _is_down_stairs() and run_state.current_floor > 0 and not run_state.current_floor_deadline().can_descend():
|
||||||
var deadline := run_state.current_floor_deadline()
|
var deadline := run_state.current_floor_deadline()
|
||||||
var blocked := _deadline_result(
|
var blocked := _deadline_result(
|
||||||
&"stairs_refused",
|
&"stairs_refused",
|
||||||
@@ -808,6 +931,9 @@ func _process_interact() -> Array[TurnResult]:
|
|||||||
if not results.is_empty() and results[0].kind == &"chest_opened":
|
if not results.is_empty() and results[0].kind == &"chest_opened":
|
||||||
_show_loot_panel(results[0].payload)
|
_show_loot_panel(results[0].payload)
|
||||||
if not results.is_empty() and results[0].kind == &"stairs_used":
|
if not results.is_empty() and results[0].kind == &"stairs_used":
|
||||||
|
if run_state.current_floor == FloorTransition.FINAL_FLOOR and _is_down_stairs():
|
||||||
|
_present_victory(floor_transition.try_descend(run_state))
|
||||||
|
else:
|
||||||
_transition_floor(results[0].from_cell)
|
_transition_floor(results[0].from_cell)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
@@ -896,7 +1022,7 @@ func _toggle_character_panel() -> Array[GameEvent]:
|
|||||||
_close_character_panel(false)
|
_close_character_panel(false)
|
||||||
return _record_ranged_event(&"character_panel_closed", &"", {}, "Character panel closed.")
|
return _record_ranged_event(&"character_panel_closed", &"", {}, "Character panel closed.")
|
||||||
_sync_dialogue_player_progression()
|
_sync_dialogue_player_progression()
|
||||||
character_panel.present(dialogue_player, game_state.player.progression)
|
character_panel.present(dialogue_player, game_state.player.progression, run_state.player_name, _current_title())
|
||||||
return _record_ranged_event(&"character_panel_opened", &"", {"level": game_state.player.progression.level}, "Character panel opened.")
|
return _record_ranged_event(&"character_panel_opened", &"", {"level": game_state.player.progression.level}, "Character panel opened.")
|
||||||
|
|
||||||
func _spend_character_attribute(key: StringName) -> void:
|
func _spend_character_attribute(key: StringName) -> void:
|
||||||
@@ -1087,6 +1213,8 @@ func _quest_context() -> Dictionary:
|
|||||||
return {
|
return {
|
||||||
"player": dialogue_player,
|
"player": dialogue_player,
|
||||||
"payload": {"gold": run_state.gold, "xp": game_state.player.xp},
|
"payload": {"gold": run_state.gold, "xp": game_state.player.xp},
|
||||||
|
"npc_id": StringName(active_dialogue_npc.get("actor_id", "")),
|
||||||
|
"npc_content_id": StringName(active_dialogue_npc.get("id", "")),
|
||||||
"catalog": spell_catalog,
|
"catalog": spell_catalog,
|
||||||
"inventory": run_state.inventory,
|
"inventory": run_state.inventory,
|
||||||
"quest_manager": quest_manager,
|
"quest_manager": quest_manager,
|
||||||
@@ -1158,9 +1286,9 @@ func _record_narrative_event(kind: StringName, event_id: StringName, payload: Di
|
|||||||
|
|
||||||
func _process_ground_pickup() -> Array[TurnResult]:
|
func _process_ground_pickup() -> Array[TurnResult]:
|
||||||
var pickup := run_state.inventory.pick_up_ground_item(game_state.floor_state, game_state.player.cell)
|
var pickup := run_state.inventory.pick_up_ground_item(game_state.floor_state, game_state.player.cell)
|
||||||
var item: ItemInstance = pickup.item
|
var item: ItemInstance = pickup.get("item", null)
|
||||||
var result: TurnResult
|
var result: TurnResult
|
||||||
if bool(pickup.accepted):
|
if bool(pickup.get("accepted", false)) and item != null:
|
||||||
result = TurnResult.new(
|
result = TurnResult.new(
|
||||||
game_state.player.id,
|
game_state.player.id,
|
||||||
&"item_picked_up",
|
&"item_picked_up",
|
||||||
@@ -1169,9 +1297,14 @@ func _process_ground_pickup() -> Array[TurnResult]:
|
|||||||
&"",
|
&"",
|
||||||
0,
|
0,
|
||||||
"Picked up %s x%d." % [item.definition.name, item.quantity],
|
"Picked up %s x%d." % [item.definition.name, item.quantity],
|
||||||
{"item_id": item.definition.id, "instance_id": item.instance_id, "quantity": item.quantity, "stack_merged_into": pickup.stack_merged_into}
|
{"item_id": item.definition.id, "instance_id": item.instance_id, "quantity": item.quantity, "stack_merged_into": pickup.get("stack_merged_into", &"")}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
var reason := StringName(pickup.get("reason", &"no_ground_item"))
|
||||||
|
var payload := {"reason": reason}
|
||||||
|
if item != null:
|
||||||
|
payload.merge({"item_id": item.definition.id, "instance_id": item.instance_id, "quantity": item.quantity}, true)
|
||||||
|
var message := "Rien à ramasser." if reason == &"no_ground_item" else "Inventaire plein." if reason == &"capacity" else "Ramassage impossible."
|
||||||
result = TurnResult.new(
|
result = TurnResult.new(
|
||||||
game_state.player.id,
|
game_state.player.id,
|
||||||
&"pickup_refused",
|
&"pickup_refused",
|
||||||
@@ -1179,8 +1312,8 @@ func _process_ground_pickup() -> Array[TurnResult]:
|
|||||||
game_state.player.cell,
|
game_state.player.cell,
|
||||||
&"",
|
&"",
|
||||||
0,
|
0,
|
||||||
"Inventory is full.",
|
message,
|
||||||
{"reason": pickup.reason}
|
payload
|
||||||
)
|
)
|
||||||
_resolve_player_action([result], false)
|
_resolve_player_action([result], false)
|
||||||
return [result]
|
return [result]
|
||||||
@@ -1208,6 +1341,8 @@ func _open_dialogue(npc: Dictionary) -> void:
|
|||||||
context["recruit"] = recruit
|
context["recruit"] = recruit
|
||||||
dialogue_panel.present(dialogue_engine, dialogue_engine.start(definition, context), context)
|
dialogue_panel.present(dialogue_engine, dialogue_engine.start(definition, context), context)
|
||||||
_record_dialogue_event(&"dialogue_started", npc, {"dialogue_id": dialogue_id}, "%s vous adresse la parole." % String(npc.get("name", "Un inconnu")))
|
_record_dialogue_event(&"dialogue_started", npc, {"dialogue_id": dialogue_id}, "%s vous adresse la parole." % String(npc.get("name", "Un inconnu")))
|
||||||
|
if StringName(npc.get("id", "")) == TouristServiceType.TOURIST_CONTENT_ID:
|
||||||
|
_record_tourist_events(TouristServiceType.meet(run_state, StringName(npc.get("actor_id", "")), game_state.player.progression.level))
|
||||||
|
|
||||||
func _complete_dialogue_choice() -> void:
|
func _complete_dialogue_choice() -> void:
|
||||||
var state := dialogue_panel.current_state()
|
var state := dialogue_panel.current_state()
|
||||||
@@ -1223,6 +1358,8 @@ func _complete_dialogue_choice() -> void:
|
|||||||
_store_quest_context(dialogue_panel._context)
|
_store_quest_context(dialogue_panel._context)
|
||||||
_flush_quest_changes()
|
_flush_quest_changes()
|
||||||
_record_dialogue_event(&"dialogue_choice_selected", active_dialogue_npc, {"dialogue_id": state.dialogue_id, "node_id": choice_node_id, "choice_text": String(choice.get("text", "")), "applications": outcome.get("applications", [])}, String(choice.get("text", "")))
|
_record_dialogue_event(&"dialogue_choice_selected", active_dialogue_npc, {"dialogue_id": state.dialogue_id, "node_id": choice_node_id, "choice_text": String(choice.get("text", "")), "applications": outcome.get("applications", [])}, String(choice.get("text", "")))
|
||||||
|
for application: Dictionary in outcome.get("applications", []):
|
||||||
|
_record_tourist_events(application.get("events", []))
|
||||||
var recruit_application := _recruit_application(outcome.get("applications", []))
|
var recruit_application := _recruit_application(outcome.get("applications", []))
|
||||||
if not recruit_application.is_empty() and bool(recruit_application.get("applied", false)):
|
if not recruit_application.is_empty() and bool(recruit_application.get("applied", false)):
|
||||||
var recruited: ActorState = recruit_application.result.member
|
var recruited: ActorState = recruit_application.result.member
|
||||||
@@ -1236,6 +1373,17 @@ func _complete_dialogue_choice() -> void:
|
|||||||
elif state.is_over():
|
elif state.is_over():
|
||||||
_close_dialogue(false)
|
_close_dialogue(false)
|
||||||
|
|
||||||
|
func _record_tourist_events(events: Array) -> void:
|
||||||
|
if events.is_empty():
|
||||||
|
return
|
||||||
|
run_state.append_events(events)
|
||||||
|
_observe_achievements(events)
|
||||||
|
_observe_audience(events)
|
||||||
|
_sync_enemy_views()
|
||||||
|
event_presenter.enqueue(events)
|
||||||
|
event_presenter.present_next()
|
||||||
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
|
|
||||||
func _recruit_application(applications: Array) -> Dictionary:
|
func _recruit_application(applications: Array) -> Dictionary:
|
||||||
for application: Dictionary in applications:
|
for application: Dictionary in applications:
|
||||||
if StringName(application.get("type", "")) == &"join_party":
|
if StringName(application.get("type", "")) == &"join_party":
|
||||||
@@ -1344,6 +1492,7 @@ func _use_selected_inventory_item(target = null) -> void:
|
|||||||
return
|
return
|
||||||
var result := run_state.inventory.use_item(item.instance_id, game_state.player, run_state.identification, target)
|
var result := run_state.inventory.use_item(item.instance_id, game_state.player, run_state.identification, target)
|
||||||
if bool(result.accepted):
|
if bool(result.accepted):
|
||||||
|
_apply_item_use_effects(result.effects)
|
||||||
_record_ranged_event(&"item_used", &"", {"instance_id": item.instance_id, "effects": result.effects, "revealed": result.revealed}, "Used %s." % item.definition.name)
|
_record_ranged_event(&"item_used", &"", {"instance_id": item.instance_id, "effects": result.effects, "revealed": result.revealed}, "Used %s." % item.definition.name)
|
||||||
elif result.reason == &"target_required":
|
elif result.reason == &"target_required":
|
||||||
_record_ranged_event(&"item_targeting_started", &"", {"instance_id": item.instance_id, "target_kind": &"ally"}, "Choose an ally target for %s." % item.definition.name)
|
_record_ranged_event(&"item_targeting_started", &"", {"instance_id": item.instance_id, "target_kind": &"ally"}, "Choose an ally target for %s." % item.definition.name)
|
||||||
@@ -1351,6 +1500,11 @@ func _use_selected_inventory_item(target = null) -> void:
|
|||||||
_record_ranged_event(&"item_use_refused", &"", {"instance_id": item.instance_id, "reason": result.reason}, "Cannot use that item.")
|
_record_ranged_event(&"item_use_refused", &"", {"instance_id": item.instance_id, "reason": result.reason}, "Cannot use that item.")
|
||||||
inventory_panel.refresh()
|
inventory_panel.refresh()
|
||||||
|
|
||||||
|
func _apply_item_use_effects(effects: Array) -> void:
|
||||||
|
for effect: Dictionary in effects:
|
||||||
|
if StringName(effect.get("type", "")) == &"learn_spell":
|
||||||
|
spell_state.learn(StringName(effect.get("spell", "")))
|
||||||
|
|
||||||
# Public hook for the future party selector: it applies the currently selected
|
# Public hook for the future party selector: it applies the currently selected
|
||||||
# ally-target consumable without coupling this D3 slice to a party UI.
|
# ally-target consumable without coupling this D3 slice to a party UI.
|
||||||
func submit_inventory_ally_target(target) -> Array[GameEvent]:
|
func submit_inventory_ally_target(target) -> Array[GameEvent]:
|
||||||
@@ -1397,15 +1551,19 @@ func _take_all_loot() -> void:
|
|||||||
else:
|
else:
|
||||||
refused_items.append({"item_id": StringName(item_data.get("item_id", "")), "quantity": int(item_data.get("quantity", 1)), "reason": result.reason})
|
refused_items.append({"item_id": StringName(item_data.get("item_id", "")), "quantity": int(item_data.get("quantity", 1)), "reason": result.reason})
|
||||||
var gold := int(pending_loot.get("gold", 0))
|
var gold := int(pending_loot.get("gold", 0))
|
||||||
|
var ammunition := maxi(0, int(pending_loot.get("ammunition", 0)))
|
||||||
run_state.gold += gold
|
run_state.gold += gold
|
||||||
|
game_state.player.ammunition += ammunition
|
||||||
loot_panel.dismiss()
|
loot_panel.dismiss()
|
||||||
var message := "Butin récupéré"
|
var message := "Butin récupéré"
|
||||||
if gold > 0:
|
if gold > 0:
|
||||||
message += " : +%d or" % gold
|
message += " : +%d or" % gold
|
||||||
|
if ammunition > 0:
|
||||||
|
message += " : +%d munitions" % ammunition
|
||||||
if not refused_items.is_empty():
|
if not refused_items.is_empty():
|
||||||
message += " (inventaire plein pour certains objets)"
|
message += " (inventaire plein pour certains objets)"
|
||||||
message += "."
|
message += "."
|
||||||
_record_ranged_event(&"loot_taken", &"", {"items": accepted_items, "gold": gold, "refused_items": refused_items}, message)
|
_record_ranged_event(&"loot_taken", &"", {"items": accepted_items, "gold": gold, "ammunition": ammunition, "refused_items": refused_items}, message)
|
||||||
pending_loot.clear()
|
pending_loot.clear()
|
||||||
|
|
||||||
func _process_rest() -> Array[TurnResult]:
|
func _process_rest() -> Array[TurnResult]:
|
||||||
@@ -1456,6 +1614,12 @@ func _is_bed() -> bool:
|
|||||||
func _deadline_result(kind: StringName, message: String) -> TurnResult:
|
func _deadline_result(kind: StringName, message: String) -> TurnResult:
|
||||||
return TurnResult.new(game_state.player.id, kind, game_state.player.cell, game_state.player.cell, &"", 0, message)
|
return TurnResult.new(game_state.player.id, kind, game_state.player.cell, game_state.player.cell, &"", 0, message)
|
||||||
|
|
||||||
|
func _present_victory(events: Array[GameEvent]) -> void:
|
||||||
|
if events.is_empty():
|
||||||
|
return
|
||||||
|
victory_panel.present(run_state.player_name, run_state.current_floor, game_state.player.progression.level)
|
||||||
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
|
|
||||||
func _transition_floor(stairs_cell: Vector2i) -> void:
|
func _transition_floor(stairs_cell: Vector2i) -> void:
|
||||||
var transition := floor_transition.transition(run_state, game_state.floor_state, stairs_cell)
|
var transition := floor_transition.transition(run_state, game_state.floor_state, stairs_cell)
|
||||||
var destination: FloorState = transition["floor"]
|
var destination: FloorState = transition["floor"]
|
||||||
@@ -1463,14 +1627,59 @@ func _transition_floor(stairs_cell: Vector2i) -> void:
|
|||||||
game_state.set_floor_state(destination)
|
game_state.set_floor_state(destination)
|
||||||
game_state.content_catalog = spell_catalog
|
game_state.content_catalog = spell_catalog
|
||||||
game_state.player.cell = transition["arrival"]
|
game_state.player.cell = transition["arrival"]
|
||||||
|
_place_companion_near_player()
|
||||||
game_state.update_exploration()
|
game_state.update_exploration()
|
||||||
map_renderer.set_map(game_state.map)
|
map_renderer.set_map(game_state.map)
|
||||||
_sync_map_renderer_visibility()
|
_sync_map_renderer_visibility()
|
||||||
_sync_minimap()
|
_sync_minimap()
|
||||||
player_view.set_actor(game_state.player)
|
player_view.set_actor(game_state.player)
|
||||||
_sync_camera_to_player()
|
# Camera bounds are map-specific. Recompute them before positioning the
|
||||||
|
# camera whenever a floor transition swaps the active map dimensions.
|
||||||
|
_configure_camera()
|
||||||
_sync_enemy_views()
|
_sync_enemy_views()
|
||||||
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
|
_check_floor_three_race_class_milestone()
|
||||||
|
|
||||||
|
func _place_companion_near_player() -> void:
|
||||||
|
if game_state.companion == null or not game_state.companion.is_alive():
|
||||||
|
return
|
||||||
|
var occupied: Dictionary[Vector2i, bool] = {game_state.player.cell: true}
|
||||||
|
for enemy: ActorState in game_state.enemies.values():
|
||||||
|
if enemy.is_alive():
|
||||||
|
occupied[enemy.cell] = true
|
||||||
|
for member: ActorState in game_state.party.living_members():
|
||||||
|
occupied[member.cell] = true
|
||||||
|
for direction: Vector2i in [Vector2i.LEFT, Vector2i.DOWN, Vector2i.RIGHT, Vector2i.UP]:
|
||||||
|
var candidate := game_state.player.cell + direction
|
||||||
|
if game_state.map.is_walkable(candidate) and not occupied.has(candidate):
|
||||||
|
game_state.companion.actor.cell = candidate
|
||||||
|
return
|
||||||
|
|
||||||
|
func _check_floor_three_race_class_milestone() -> void:
|
||||||
|
if run_state.current_floor != 3 or (not dialogue_player.race.is_empty() and not dialogue_player.archetype.is_empty()):
|
||||||
|
return
|
||||||
|
race_class_choice_panel.present_races(class_engine.race_definitions())
|
||||||
|
_record_ranged_event(
|
||||||
|
&"race_class_choice_required",
|
||||||
|
&"",
|
||||||
|
{"floor": run_state.current_floor},
|
||||||
|
"Niveau 3 du Donjon : choisissez votre race, puis votre classe."
|
||||||
|
)
|
||||||
|
|
||||||
|
func _choose_floor_three_race(race_id: StringName) -> void:
|
||||||
|
var result := class_engine.choose_race(dialogue_player, race_id)
|
||||||
|
if not bool(result.get("accepted", false)):
|
||||||
|
return
|
||||||
|
_record_ranged_event(&"race_chosen", race_id, {}, "Race choisie : %s." % race_id)
|
||||||
|
race_class_choice_panel.present_classes(class_engine.class_definitions(dialogue_player.race))
|
||||||
|
|
||||||
|
func _choose_floor_three_class(class_id: StringName) -> void:
|
||||||
|
var result := class_engine.choose_class(dialogue_player, class_id)
|
||||||
|
if not bool(result.get("accepted", false)):
|
||||||
|
return
|
||||||
|
run_state.base_archetype = dialogue_player.archetype
|
||||||
|
race_class_choice_panel.dismiss()
|
||||||
|
_record_ranged_event(&"class_chosen", class_id, {}, "Classe choisie : %s." % class_id)
|
||||||
|
|
||||||
func _process_action(direction: Vector2i) -> Array[TurnResult]:
|
func _process_action(direction: Vector2i) -> Array[TurnResult]:
|
||||||
var results := game_state.try_player_action(direction)
|
var results := game_state.try_player_action(direction)
|
||||||
@@ -1501,14 +1710,18 @@ func _append_collapse_damage(results: Array[TurnResult]) -> void:
|
|||||||
# journal: results from one resolved player action are converted and appended once,
|
# journal: results from one resolved player action are converted and appended once,
|
||||||
# and every resulting GameEvent shares that action's turn number.
|
# and every resulting GameEvent shares that action's turn number.
|
||||||
func _resolve_player_action(results: Array[TurnResult], sync_camera: bool) -> Array[TurnResult]:
|
func _resolve_player_action(results: Array[TurnResult], sync_camera: bool) -> Array[TurnResult]:
|
||||||
|
if _results_consume_turn(results):
|
||||||
|
_apply_passive_health_regeneration(results)
|
||||||
_sync_map_renderer_visibility()
|
_sync_map_renderer_visibility()
|
||||||
_sync_minimap()
|
_sync_minimap()
|
||||||
player_view.refresh()
|
player_view.refresh()
|
||||||
_sync_companion_view()
|
_sync_companion_view()
|
||||||
_sync_party_views()
|
_sync_party_views()
|
||||||
|
_sync_enemy_views()
|
||||||
if sync_camera:
|
if sync_camera:
|
||||||
_sync_camera_to_player()
|
_sync_camera_to_player()
|
||||||
_dispatch_audio(results)
|
_dispatch_audio(results)
|
||||||
|
_resolve_enemy_loot(results)
|
||||||
var events := _record_events(results)
|
var events := _record_events(results)
|
||||||
_resolve_player_death_if_needed()
|
_resolve_player_death_if_needed()
|
||||||
_append_level_up_events(events)
|
_append_level_up_events(events)
|
||||||
@@ -1534,6 +1747,39 @@ func _resolve_player_action(results: Array[TurnResult], sync_camera: bool) -> Ar
|
|||||||
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
hud.refresh(game_state, run_state.recent_events(run_state.log.size()), run_state)
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
func _results_consume_turn(results: Array[TurnResult]) -> bool:
|
||||||
|
if results.is_empty():
|
||||||
|
return false
|
||||||
|
return not results.all(func(result: TurnResult) -> bool:
|
||||||
|
return result.kind in [&"blocked", &"nothing_to_interact", &"rest_refused", &"stairs_refused"]
|
||||||
|
)
|
||||||
|
|
||||||
|
func _apply_passive_health_regeneration(results: Array[TurnResult]) -> void:
|
||||||
|
_sync_dialogue_player_progression()
|
||||||
|
var player_took_damage := (_turn_start_player_hit_points >= 0 and game_state.player.hit_points < _turn_start_player_hit_points) or results.any(func(result: TurnResult) -> bool:
|
||||||
|
return result.damage > 0 and (result.target_id == game_state.player.id or result.kind == &"collapse_damage")
|
||||||
|
)
|
||||||
|
var perk_bonus := int(perk_engine.modifiers().get("regen_bonus", 0)) if perk_engine != null else 0
|
||||||
|
if not player_took_damage:
|
||||||
|
HealthRegenerationType.apply(
|
||||||
|
game_state.player,
|
||||||
|
dialogue_player.effective_attribute(&"end"),
|
||||||
|
dialogue_player.effective_skill(&"regeneration"),
|
||||||
|
perk_bonus,
|
||||||
|
run_state.settings.difficulty_id
|
||||||
|
)
|
||||||
|
var companion_took_damage := game_state.companion != null and ((_turn_start_companion_hit_points >= 0 and game_state.companion.actor.hit_points < _turn_start_companion_hit_points) or results.any(func(result: TurnResult) -> bool:
|
||||||
|
return result.damage > 0 and result.target_id == game_state.companion.actor.id
|
||||||
|
))
|
||||||
|
if game_state.companion != null and game_state.companion.is_alive() and not companion_took_damage:
|
||||||
|
HealthRegenerationType.apply(
|
||||||
|
game_state.companion.actor,
|
||||||
|
game_state.companion.endurance,
|
||||||
|
game_state.companion.regeneration_skill,
|
||||||
|
game_state.companion.regeneration_perk_bonus,
|
||||||
|
run_state.settings.difficulty_id
|
||||||
|
)
|
||||||
|
|
||||||
func _resolve_player_death_if_needed() -> void:
|
func _resolve_player_death_if_needed() -> void:
|
||||||
if game_state.player.is_alive() or run_state.is_game_over:
|
if game_state.player.is_alive() or run_state.is_game_over:
|
||||||
return
|
return
|
||||||
@@ -1578,6 +1824,8 @@ func _observe_achievements(events: Array[GameEvent]) -> void:
|
|||||||
var achievement_id := StringName(definition.get("id", ""))
|
var achievement_id := StringName(definition.get("id", ""))
|
||||||
var message := "Succès débloqué : %s" % String(definition.get("name", achievement_id))
|
var message := "Succès débloqué : %s" % String(definition.get("name", achievement_id))
|
||||||
achievement_toast.text = message
|
achievement_toast.text = message
|
||||||
|
achievement_toast.visible = true
|
||||||
|
achievement_toast_timer.start()
|
||||||
run_state.log.insert(insertion_index, GameEventType.new(
|
run_state.log.insert(insertion_index, GameEventType.new(
|
||||||
event.turn,
|
event.turn,
|
||||||
event.floor,
|
event.floor,
|
||||||
@@ -1629,6 +1877,8 @@ func _achievement_trigger_for(event: GameEvent) -> StringName:
|
|||||||
return &"player_hit_landed" if event.actor_id == game_state.player.id and int(event.payload.get("damage", 0)) > 0 else &""
|
return &"player_hit_landed" if event.actor_id == game_state.player.id and int(event.payload.get("damage", 0)) > 0 else &""
|
||||||
&"actor_died":
|
&"actor_died":
|
||||||
return &"enemy_killed" if event.actor_id != game_state.player.id else &""
|
return &"enemy_killed" if event.actor_id != game_state.player.id else &""
|
||||||
|
&"tourist_met":
|
||||||
|
return &"tourist_met"
|
||||||
&"level_up", &"item_picked_up", &"trap_triggered", &"chest_opened", &"quest_started", &"quest_completed":
|
&"level_up", &"item_picked_up", &"trap_triggered", &"chest_opened", &"quest_started", &"quest_completed":
|
||||||
return event.kind
|
return event.kind
|
||||||
_:
|
_:
|
||||||
@@ -1645,13 +1895,31 @@ func _current_title() -> Dictionary:
|
|||||||
return title_engine.refresh(_title_context()) if title_engine != null else {}
|
return title_engine.refresh(_title_context()) if title_engine != null else {}
|
||||||
|
|
||||||
func _refresh_title() -> void:
|
func _refresh_title() -> void:
|
||||||
var title := _current_title()
|
if run_state == null:
|
||||||
if title.is_empty():
|
|
||||||
run_state.current_title_id = &""
|
|
||||||
title_label.text = ""
|
|
||||||
return
|
return
|
||||||
run_state.current_title_id = StringName(title.get("id", ""))
|
var title := _current_title()
|
||||||
title_label.text = "Titre : %s" % String(title.get("name", title.get("id", "")))
|
var previous_title_id := run_state.current_title_id
|
||||||
|
var current_title_id := StringName(title.get("id", ""))
|
||||||
|
run_state.current_title_id = current_title_id
|
||||||
|
if title.is_empty():
|
||||||
|
# A title loss is not an announcement; it must also clear a still-visible
|
||||||
|
# notification from the prior title.
|
||||||
|
_hide_title_notification()
|
||||||
|
return
|
||||||
|
# Boot and load establish the state silently. Only a real later transition
|
||||||
|
# deserves the temporary overlay; the permanent top bar belongs to GameHud.
|
||||||
|
if _title_notifications_enabled and current_title_id != previous_title_id:
|
||||||
|
title_notification_label.text = String(title.get("name", current_title_id))
|
||||||
|
title_notification_label.visible = true
|
||||||
|
title_notification_timer.start()
|
||||||
|
|
||||||
|
func _hide_title_notification() -> void:
|
||||||
|
title_notification_label.visible = false
|
||||||
|
title_notification_label.text = ""
|
||||||
|
|
||||||
|
func _hide_achievement_toast() -> void:
|
||||||
|
achievement_toast.visible = false
|
||||||
|
achievement_toast.text = ""
|
||||||
|
|
||||||
func _append_level_up_events(events: Array[GameEvent]) -> void:
|
func _append_level_up_events(events: Array[GameEvent]) -> void:
|
||||||
var levels_gained := 0
|
var levels_gained := 0
|
||||||
@@ -1675,6 +1943,30 @@ func _append_level_up_events(events: Array[GameEvent]) -> void:
|
|||||||
run_state.append_events([level_event])
|
run_state.append_events([level_event])
|
||||||
_check_progression_choices_and_evolutions()
|
_check_progression_choices_and_evolutions()
|
||||||
|
|
||||||
|
func _resolve_enemy_loot(results: Array[TurnResult]) -> void:
|
||||||
|
var resolved_enemy_ids: Dictionary[StringName, bool] = {}
|
||||||
|
for result: TurnResult in results:
|
||||||
|
var descriptors: Array = result.payload.get("domain_events", [])
|
||||||
|
for descriptor: Dictionary in descriptors:
|
||||||
|
if descriptor.kind != &"loot_dropped" or descriptor.actor_id == &"player" or resolved_enemy_ids.has(StringName(descriptor.actor_id)):
|
||||||
|
continue
|
||||||
|
resolved_enemy_ids[StringName(descriptor.actor_id)] = true
|
||||||
|
var table_id := StringName(descriptor.payload.get("loot_table", ""))
|
||||||
|
var table := spell_catalog.get_loot_table(table_id) if spell_catalog != null else {}
|
||||||
|
var reward := LootResolverType.resolve(table, run_state.seed, "enemy:%d:%s" % [run_state.current_floor, descriptor.actor_id])
|
||||||
|
reward["loot_table"] = table_id
|
||||||
|
descriptor.payload = reward
|
||||||
|
var drop_cell: Vector2i = result.to_cell
|
||||||
|
for item_data: Dictionary in reward.items:
|
||||||
|
var definition := ItemDefinitionType.from_catalog(spell_catalog, StringName(item_data.get("item_id", "")))
|
||||||
|
if not definition.is_valid():
|
||||||
|
continue
|
||||||
|
if not game_state.floor_state.ground_items.has(drop_cell):
|
||||||
|
game_state.floor_state.ground_items[drop_cell] = []
|
||||||
|
game_state.floor_state.ground_items[drop_cell].append(ItemInstanceType.new(definition, int(item_data.get("quantity", 1))))
|
||||||
|
run_state.gold += int(reward.gold)
|
||||||
|
_sync_map_renderer_visibility()
|
||||||
|
|
||||||
func _record_events(results: Array[TurnResult]) -> Array[GameEvent]:
|
func _record_events(results: Array[TurnResult]) -> Array[GameEvent]:
|
||||||
var events: Array[GameEvent] = []
|
var events: Array[GameEvent] = []
|
||||||
if results.is_empty():
|
if results.is_empty():
|
||||||
@@ -1731,41 +2023,27 @@ func _get_actor_view(actor_id: StringName) -> ActorView:
|
|||||||
return enemy_views.get(actor_id) as ActorView
|
return enemy_views.get(actor_id) as ActorView
|
||||||
|
|
||||||
func _create_initial_state() -> GameState:
|
func _create_initial_state() -> GameState:
|
||||||
var map := GridMapStateType.new(Vector2i(30, 20), GridMapStateType.CellKind.WALL)
|
# Run initialization immediately replaces this neutral shell with the authored
|
||||||
_carve_room(map, Rect2i(2, 12, 6, 5))
|
# surface. Keeping the shell content-free prevents the removed prototype map
|
||||||
_carve_room(map, Rect2i(2, 4, 7, 7))
|
# from becoming an accidental gameplay source again.
|
||||||
_carve_room(map, Rect2i(10, 2, 10, 6))
|
var map := GridMapStateType.new(Vector2i.ONE, GridMapStateType.CellKind.FLOOR)
|
||||||
_carve_room(map, Rect2i(21, 5, 7, 8))
|
var player := ActorStateType.new(&"player", Vector2i.ZERO, 12, 3)
|
||||||
_carve_vertical_corridor(map, 4, 10, 12)
|
return GameStateType.new(map, player, {})
|
||||||
_carve_horizontal_corridor(map, 8, 10, 6)
|
|
||||||
_carve_horizontal_corridor(map, 18, 21, 6)
|
|
||||||
_carve_vertical_corridor(map, 18, 4, 6)
|
|
||||||
map.set_cell(Vector2i(4, 11), GridMapStateType.CellKind.CLOSED_DOOR)
|
|
||||||
map.set_cell(Vector2i(4, 7), GridMapStateType.CellKind.CHEST)
|
|
||||||
map.set_cell(Vector2i(18, 4), GridMapStateType.CellKind.STAIRS)
|
|
||||||
var player := ActorStateType.new(&"player", Vector2i(4, 12), 12, 3)
|
|
||||||
var goblin := ActorStateType.new(&"goblin", Vector2i(24, 8), 6, 2)
|
|
||||||
return GameStateType.new(map, player, {&"goblin": goblin})
|
|
||||||
|
|
||||||
func _carve_room(map: GridMapState, room: Rect2i) -> void:
|
|
||||||
for y in range(room.position.y, room.end.y):
|
|
||||||
for x in range(room.position.x, room.end.x):
|
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
|
||||||
|
|
||||||
func _carve_horizontal_corridor(map: GridMapState, from_x: int, to_x: int, y: int) -> void:
|
|
||||||
for x in range(from_x, to_x + 1):
|
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
|
||||||
|
|
||||||
func _carve_vertical_corridor(map: GridMapState, x: int, from_y: int, to_y: int) -> void:
|
|
||||||
for y in range(from_y, to_y + 1):
|
|
||||||
map.set_cell(Vector2i(x, y), GridMapStateType.CellKind.FLOOR)
|
|
||||||
|
|
||||||
func _configure_camera() -> void:
|
func _configure_camera() -> void:
|
||||||
var map_size := game_state.map.size * TILE_SIZE
|
var map_size := game_state.map.size * TILE_SIZE
|
||||||
camera.limit_left = $World.position.x
|
# Camera2D clamps against its full engine viewport, while opaque HUD masks
|
||||||
camera.limit_top = $World.position.y
|
# expose only PlayAreaFrame. Extend each map edge by the difference between
|
||||||
camera.limit_right = $World.position.x + map_size.x
|
# those half-extents so actors at a map edge remain inside the framed area
|
||||||
camera.limit_bottom = $World.position.y + map_size.y
|
# instead of being pinned against its border.
|
||||||
|
var frame := hud.get_node_or_null("ResponsiveLayout/PlayAreaFrame") as Control
|
||||||
|
var viewport_half := get_viewport().get_visible_rect().size / camera.zoom * 0.5
|
||||||
|
var frame_half := frame.get_global_rect().size / camera.zoom * 0.5 if frame != null else viewport_half
|
||||||
|
var limit_padding := viewport_half - frame_half
|
||||||
|
camera.limit_left = floori($World.position.x - limit_padding.x)
|
||||||
|
camera.limit_top = floori($World.position.y - limit_padding.y)
|
||||||
|
camera.limit_right = ceili($World.position.x + map_size.x + limit_padding.x)
|
||||||
|
camera.limit_bottom = ceili($World.position.y + map_size.y + limit_padding.y)
|
||||||
_sync_camera_to_player()
|
_sync_camera_to_player()
|
||||||
|
|
||||||
func _sync_camera_to_player() -> void:
|
func _sync_camera_to_player() -> void:
|
||||||
@@ -1785,6 +2063,7 @@ func _sync_minimap() -> void:
|
|||||||
minimap.set_state(game_state.map, game_state.player.cell, game_state.visible_cells, game_state.explored_cells, threats)
|
minimap.set_state(game_state.map, game_state.player.cell, game_state.visible_cells, game_state.explored_cells, threats)
|
||||||
|
|
||||||
func _sync_map_renderer_visibility() -> void:
|
func _sync_map_renderer_visibility() -> void:
|
||||||
|
map_renderer.set_viewport_center(game_state.player.cell)
|
||||||
map_renderer.set_visibility(game_state.visible_cells, game_state.explored_cells)
|
map_renderer.set_visibility(game_state.visible_cells, game_state.explored_cells)
|
||||||
map_renderer.set_special_markers(game_state.floor_state.traps, game_state.floor_state.shrines, game_state.floor_state.quest_boards)
|
map_renderer.set_special_markers(game_state.floor_state.traps, game_state.floor_state.shrines, game_state.floor_state.quest_boards)
|
||||||
map_renderer.set_ground_items(game_state.floor_state.ground_items)
|
map_renderer.set_ground_items(game_state.floor_state.ground_items)
|
||||||
@@ -1829,4 +2108,8 @@ func _sync_enemy_views() -> void:
|
|||||||
view.texture = preload("res://assets/dcss/goblin.png")
|
view.texture = preload("res://assets/dcss/goblin.png")
|
||||||
enemies.add_child(view)
|
enemies.add_child(view)
|
||||||
enemy_views[enemy_id] = view
|
enemy_views[enemy_id] = view
|
||||||
enemy_views[enemy_id].set_actor(game_state.enemies[enemy_id])
|
var enemy: ActorState = game_state.enemies[enemy_id]
|
||||||
|
enemy_views[enemy_id].set_actor(enemy)
|
||||||
|
# Actor sprites must obey the same current-FOV contract as special map
|
||||||
|
# markers. Explored memory never reveals a live enemy.
|
||||||
|
enemy_views[enemy_id].visible = enemy.is_alive() and game_state.visible_cells.has(enemy.cell)
|
||||||
|
|||||||
@@ -4,6 +4,9 @@ extends RefCounted
|
|||||||
# The Input Map owns physical bindings; this catalog gives every rebindable action
|
# The Input Map owns physical bindings; this catalog gives every rebindable action
|
||||||
# its stable identifier, player command and user-facing French help name.
|
# its stable identifier, player command and user-facing French help name.
|
||||||
const ACTIONS: Array[StringName] = [
|
const ACTIONS: Array[StringName] = [
|
||||||
|
# Modifier shortcuts must be checked before their unmodified key (Ctrl+S
|
||||||
|
# before south), otherwise Godot also considers the physical S match.
|
||||||
|
&"save",
|
||||||
&"interact",
|
&"interact",
|
||||||
&"move_north",
|
&"move_north",
|
||||||
&"move_south",
|
&"move_south",
|
||||||
@@ -14,7 +17,6 @@ const ACTIONS: Array[StringName] = [
|
|||||||
&"move_southwest",
|
&"move_southwest",
|
||||||
&"move_southeast",
|
&"move_southeast",
|
||||||
&"wait",
|
&"wait",
|
||||||
&"attack",
|
|
||||||
&"ranged",
|
&"ranged",
|
||||||
&"cast",
|
&"cast",
|
||||||
&"talk",
|
&"talk",
|
||||||
@@ -47,8 +49,8 @@ const HELP_NAMES := {
|
|||||||
&"move_southeast": "Déplacer vers le sud-est",
|
&"move_southeast": "Déplacer vers le sud-est",
|
||||||
&"wait": "Attendre",
|
&"wait": "Attendre",
|
||||||
&"interact": "Interagir",
|
&"interact": "Interagir",
|
||||||
&"attack": "Attaquer",
|
&"ranged": "Attaque à distance / choisir une cible",
|
||||||
&"ranged": "Attaque à distance",
|
&"save": "Sauvegarder manuellement (V ou Ctrl+S)",
|
||||||
&"cast": "Lancer un sort",
|
&"cast": "Lancer un sort",
|
||||||
&"talk": "Parler",
|
&"talk": "Parler",
|
||||||
&"rest": "Se reposer",
|
&"rest": "Se reposer",
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
class_name TemporaryPlaytestKit
|
||||||
|
extends RefCounted
|
||||||
|
|
||||||
|
## TEMPORARY PLAYTEST FIXTURE
|
||||||
|
##
|
||||||
|
## Remove this file and its single call in Game once normal early-game loot and
|
||||||
|
## encounter balance can exercise melee, ranged, and offensive magic naturally.
|
||||||
|
## It deliberately does not modify procedural generation or authored loot tables.
|
||||||
|
|
||||||
|
const CHESTS := {
|
||||||
|
Vector2i(3, 6): {
|
||||||
|
"label": "MÊLÉE",
|
||||||
|
"items": [{"item_id": &"weapon_rusty_sword", "quantity": 1}],
|
||||||
|
"ammunition": 0,
|
||||||
|
},
|
||||||
|
Vector2i(5, 6): {
|
||||||
|
"label": "DISTANCE",
|
||||||
|
"items": [{"item_id": &"weapon_hand_crossbow", "quantity": 1}],
|
||||||
|
"ammunition": 20,
|
||||||
|
},
|
||||||
|
Vector2i(6, 6): {
|
||||||
|
"label": "MAGIE OFFENSIVE",
|
||||||
|
"items": [{"item_id": &"misc_grimoire_ombre", "quantity": 1}],
|
||||||
|
"ammunition": 0,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
static func apply_to_new_run(floor: FloorState) -> void:
|
||||||
|
if floor == null or floor.floor_number != 0:
|
||||||
|
return
|
||||||
|
floor.metadata["temporary_playtest_chests"] = true
|
||||||
|
for cell: Vector2i in CHESTS:
|
||||||
|
var reward: Dictionary = CHESTS[cell]
|
||||||
|
floor.chests[cell] = {
|
||||||
|
"loot_table_id": &"",
|
||||||
|
"opened": false,
|
||||||
|
"temporary_playtest": true,
|
||||||
|
"label": reward.label,
|
||||||
|
"reward": {
|
||||||
|
"items": reward.items.duplicate(true),
|
||||||
|
"gold": 0,
|
||||||
|
"empty": false,
|
||||||
|
"trap": &"",
|
||||||
|
"ammunition": int(reward.ammunition),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
floor.map.set_cell(cell, GridMapState.CellKind.CHEST)
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://b1f30fl11cbkt
|
||||||
@@ -12,6 +12,11 @@ const AMBIENCE_CONTEXTS := [&"exploration", &"combat", &"danger"]
|
|||||||
const SFX_EVENTS := [&"attack_given", &"attack_received", &"menu_select", &"menu_cancel", &"item_use", &"death"]
|
const SFX_EVENTS := [&"attack_given", &"attack_received", &"menu_select", &"menu_cancel", &"item_use", &"death"]
|
||||||
const USER_AUDIO_DIRECTORY := "user://audio"
|
const USER_AUDIO_DIRECTORY := "user://audio"
|
||||||
const USER_MANIFEST_PATH := "user://audio/audio_import_manifest.tres"
|
const USER_MANIFEST_PATH := "user://audio/audio_import_manifest.tres"
|
||||||
|
const BUNDLED_AMBIENCE_PATHS := {
|
||||||
|
&"exploration": "res://assets/audio/dungeon_exploration.wav",
|
||||||
|
&"combat": "res://assets/audio/dungeon_combat.wav",
|
||||||
|
&"danger": "res://assets/audio/dungeon_danger.wav",
|
||||||
|
}
|
||||||
|
|
||||||
var ambience_streams: Dictionary = {}
|
var ambience_streams: Dictionary = {}
|
||||||
var sfx_streams: Dictionary = {}
|
var sfx_streams: Dictionary = {}
|
||||||
@@ -46,9 +51,23 @@ static func save_user_manifest(manifest: AudioImportManifest) -> Error:
|
|||||||
return ResourceSaver.save(manifest, USER_MANIFEST_PATH)
|
return ResourceSaver.save(manifest, USER_MANIFEST_PATH)
|
||||||
|
|
||||||
static func load_user_manifest() -> AudioImportManifest:
|
static func load_user_manifest() -> AudioImportManifest:
|
||||||
|
var manifest := load_bundled_manifest()
|
||||||
if not FileAccess.file_exists(USER_MANIFEST_PATH):
|
if not FileAccess.file_exists(USER_MANIFEST_PATH):
|
||||||
return AudioImportManifest.new()
|
return manifest
|
||||||
var resource := ResourceLoader.load(USER_MANIFEST_PATH, "AudioImportManifest", ResourceLoader.CACHE_MODE_IGNORE)
|
var resource := ResourceLoader.load(USER_MANIFEST_PATH, "AudioImportManifest", ResourceLoader.CACHE_MODE_IGNORE)
|
||||||
if resource is AudioImportManifest:
|
if not resource is AudioImportManifest:
|
||||||
return resource as AudioImportManifest
|
return manifest
|
||||||
return AudioImportManifest.new()
|
var user_manifest := resource as AudioImportManifest
|
||||||
|
for context: StringName in user_manifest.ambience_streams:
|
||||||
|
manifest.register_ambience(context, user_manifest.ambience_for(context))
|
||||||
|
for event: StringName in user_manifest.sfx_streams:
|
||||||
|
manifest.register_sfx(event, user_manifest.sfx_for(event))
|
||||||
|
return manifest
|
||||||
|
|
||||||
|
static func load_bundled_manifest() -> AudioImportManifest:
|
||||||
|
var manifest := AudioImportManifest.new()
|
||||||
|
for context: StringName in BUNDLED_AMBIENCE_PATHS:
|
||||||
|
var stream := ResourceLoader.load(String(BUNDLED_AMBIENCE_PATHS[context])) as AudioStream
|
||||||
|
if stream != null:
|
||||||
|
manifest.register_ambience(context, stream)
|
||||||
|
return manifest
|
||||||
|
|||||||