add C++, Typescript and more stuff

This commit is contained in:
2026-10-28 00:15:08 +01:00
parent e99e6386e8
commit ea0f475cae
108 changed files with 2488 additions and 980 deletions
+17 -3
View File
@@ -8,10 +8,22 @@ Use Unity **6000.4.8f1**, with Windows build support. Open this directory throug
Keep Unity `.meta` files alongside their assets in version control. `Library`, `Temp`, `Logs`, builds and local recovery scenes are excluded. Do not delete or regenerate metadata to resolve missing references.
In `ls ~/collection/languages`, unlocked playable languages offer **Learn more / practice fight**. C, Rust, Python, JavaScript, Haskell, Java, and Go each have a replayable guided fight with a fixed loan deck, followed by free practice. Exit with Escape or the training button; completion returns to the selected language, with a retry option. Practice does not replace campaign checkpoints, advance daily quests, award currencies, or change mandatory tutorial progress. Languages whose cards are still planned show an availability note instead.
In `ls ~/collection/languages`, unlocked playable languages offer **Learn more / practice fight**. C, C++, Rust, Python, JavaScript, TypeScript, Haskell, Java, and Go each have a replayable guided fight with a fixed loan deck, followed by free practice. Exit with Escape or the training button; completion returns to the selected language, with a retry option. Practice does not replace campaign checkpoints, advance daily quests, award currencies, or change mandatory tutorial progress. Languages whose cards are still planned show an availability note instead.
The mandatory tutorial retains the basic queue/stack turn-order demonstration. Python's detailed preparation, automation, modifier and payload lesson now lives in its optional fight, where players perform the combo and watch the captured payload replay.
## Campaign evolutions and combat feedback
Clear all ten campaign waves with **C selected as either run language** to permanently unlock **C++**, or with **JavaScript selected** to unlock **TypeScript**. Selecting both unlocks both. The unlock is saved at the completion boundary, including when continuing into endless survival, and remains available in collection, run setup and practice. Generated cards and distro exclusives do not qualify by themselves; optional training and legacy five-wave campaigns never qualify. Failed saves show a retry action and never announce a saved unlock.
Each evolution has three distinct starter cards (four cards including the duplicate) and eight repository cards, mirroring its base language's costs, rarities and roles. C++ strengthens C's effects, retains its elevated critical chance, transfers all remaining overkill and never causes segfault recoil. Its pointer chains after C++, and its sizeof counts both C and C++ cards in hand. TypeScript uses fixed damage without critical rolls: console.log deals 9, fetch 13, typeof always deals 16, Math.random 20, Promise.all 10 three times, Array.map 6 per enemy, Promise.resolve 5, JSON.parse 9 plus a draw, and eval 30. Its defensive and copy cards also improve. External buffs, distro mechanics and enemy defenses still apply.
The combat workspace includes **Turn resolution**: Go, Python automation, FIFO, Haskell LIFO, enemies and cleanup, with the active action highlighted and a bounded journal of actual damage, Shield and host losses. Completed results remain available during planning. The separate execution preview still shows public estimates rather than guaranteed outcomes. These observers never consume randomness or delay gameplay.
Run reports and recent history now include full-run totals, per-card plays/damage/Shield contributions and the final deck with its upgrades. Contributions group copies by card type and include Go ticks, Python payload replays and overkill spill without counting them as additional plays. Utility effects are not ranked. Statistics survive repository save/resume; older checkpoints explicitly report statistics only since resuming. Original-build loading retains its existing behavior.
New campaigns use encounter revision 3, adding alternate compositions and threat advice for waves 5–9. Old checkpoints retain their saved encounter revision. The boss remains wave 10. Combat repository/report screens, menu history, and collection language panels live in separate controller partial files; reusable turn-resolution and performance views own their own presentation.
## NixOS and Go
NixOS is a standard-pool five-star distro with 60 Uptime, 6 RAM and 3 Cycles. Ownership unlocks Go; Haskell and Go are recommendations, so any two unlocked playable languages remain valid. Select four of its five exclusive cards for the usual twelve-card starting deck. Existing pity, package/distro odds, duplicate Merges and upgrade prices are unchanged.
@@ -34,7 +46,7 @@ Each goroutine snapshots its card magnitude once, while governor, Compilation an
Card assets follow one layout: distro exclusives in `Assets/Data/Cards/<Distro>/`, language starters in `Assets/Data/Cards/Languages/<Language>/`, and repository cards in `Assets/Data/Cards/Shop/`. Language deck definitions and their database stay directly under `Languages/`. NixOS and Go use these same folders, alongside `GoDeck.asset`, `NixOS.asset` and `NixRebuildSwitch.asset`, registered in the existing databases. Runtime integration is in `CombatManager.NixGo.cs`, `NixGovernorState.cs`, `GoroutineScheduler.cs` and `GoEffect.cs`; `CombatSceneController.NixGo.cs` supplies the compact governor controls and PID rows. Saves retain the existing schema and language enum values; the Goroutine track is appended without renumbering existing tracks.
`NixGoTests`, `NixGoProgressionTests` and `CombatLayoutTests` cover gameplay, content registration, equipment, progression and UI. A development player can run the isolated UI/combat check with `--kernel-panic-smoke --kernel-panic-nixos-go-smoke --kernel-panic-save-path <absolute-unused-path>`. The equivalent `--kernel-panic-language-training-smoke` checks all seven lessons. Neither harness uses the real profile.
`NixGoTests`, `NixGoProgressionTests` and `CombatLayoutTests` cover gameplay, content registration, equipment, progression and UI. A development player can run the isolated UI/combat check with `--kernel-panic-smoke --kernel-panic-nixos-go-smoke --kernel-panic-save-path <absolute-unused-path>`. The equivalent `--kernel-panic-language-training-smoke` checks all nine lessons. Neither harness uses the real profile.
## Repository language coverage
@@ -60,6 +72,8 @@ Build the game through **File > Build Profiles**, using the scenes configured in
For seeded balance measurements, use the editor entry point `KernelPanic.Editor.BalanceComparison.RunBatch`. These are bot measurements, not human win rates.
Campaign improvement validation: `Logs/improvements-tests-final.xml` records 998 passing EditMode tests. The additional unlock save-failure/retry check passes with the five settlement tests in `Logs/improvements-unlock-save-tests.xml`; the final responsive resolution panel passes all 23 combat layout tests in `Logs/improvements-layout-tests.xml`. `Logs/improvements-build-final.log` records a successful Windows development build with zero errors at `Builds/Improvements/KernelPanic.exe`. All nine language lessons pass isolated player checks at 1280x720 and 390x844, including actual-resolution captures, retry, exit and unchanged practice progression. Final captures and results are under `Logs/ImprovementsFinalWide-ad85afbdcdb147e69230db196c9c9bb1/` and `Logs/ImprovementsFinalNarrow-47ef11a7be2e4a44960a0ccb3fc3ccdc/`.
## Current run decisions
C balance tuning: C damage now has a 35% critical chance (down from 50%); critical damage remains 1.5x. Each C overkill jump transfers 50% of the remaining excess, rounded down, after the previous target's defenses. For example, 11 excess damage spills 5; if that target consumes 2, the next jump carries 1. Java still transfers all remaining excess, and Rust's overkill-to-Shield is unchanged. Base card damage and segfault rules are unchanged.
@@ -72,7 +86,7 @@ C balance tuning: C damage now has a 35% critical chance (down from 50%); critic
Focusing a hand card reveals its name and Cycles cost, including when its rules are taller than the hand viewport. Cards fit the available hand width on narrow screens; the rules remain freely scrollable.
Checkpoint versions 1–3 still load; older campaigns retain their original encounter timing and wave-five completion choice. New saves use envelope schema 8 and checkpoint version 4, including route topology, event results, and travel history. Seeded retries require the same game content and action sequence.
Checkpoint versions 1–4 still load; older campaigns retain their original encounter timing and wave-five completion choice. New saves use envelope schema 9 and checkpoint version 5, including route topology, event results, travel history and run statistics. Seeded retries require the same game content and action sequence.
## Daily quests