Build the full combat-system experiment from its spec, no slices deferred.
combat-core — pure, headless, deterministic engine (the single source of truth):
- One combined Vigor pool (HP+mana+stamina merged) with the two-axis
(fill, ceiling) cost model; offense spends survival.
- Stagger cascade (absorbed/dazed/unconscious/dead), capacity = current fill,
ceiling collapse via fatigue as the real loss condition; revive-on-recovery.
- Unified ability model (skills == spells) with the delivery+effects+potency+
targets cost composer and a full effect library (fill/ceiling damage, DoT/HoT,
regen-sabotage, fatigue-amp, mitigation buff/debuff, recovery).
- Ordered mitigation pipeline, config-driven con curve, competency/fizzle/resist,
loadout/memorization, active-defense windows.
- Symmetric actors; pluggable controllers (SwingOnCooldown, ScriptedPlayer{skill},
HoldAndPunish). Fixed-tick loop with the canonical within-tick resolution order;
decisions are simultaneous within a tick so mirror matches are fair.
- Determinism is load-bearing: vendored order-independent RNG fork (+ integer
chance_bp so no f64 touches the hot path) and integer fixed-point magnitudes
with banker's rounding. 48 tests incl. bit-reproducible event-log integration.
combat-sim — batch harness: loads the config "table", runs con-tier x skill and
archetype sweeps (tens of thousands of fights), exports per-fight CSV, an
aggregated summary, and one fight's full event log.
analysis — pandas/matplotlib layer: difficulty curve, duration tent, anti-turtle
guardrail, stagger frequency, and one fight's fill/ceiling time series.
The sim did its job: the first default numbers produced a one-tick cliff and 82%
mutual-KO draws and surfaced the spec's deepest risk live (a poke skill strictly
worse than free auto-attack, so auto-only out-won the full kit). Tuning the table
moved it to the intended shape — duration tent peaking ~22s at even con, a
monotone skill->win-rate gradient (auto ~3% -> skill100 44% at even con), and a
green anti-turtle guardrail. That sim->measure->tune loop is the deliverable.
Own Cargo workspace, fully decoupled from the root reikhelm workspace.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
190 lines
4.5 KiB
TOML
190 lines
4.5 KiB
TOML
# This file is automatically @generated by Cargo.
|
|
# It is not intended for manual editing.
|
|
version = 4
|
|
|
|
[[package]]
|
|
name = "combat-core"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"rand_chacha",
|
|
"serde",
|
|
"serde_json",
|
|
]
|
|
|
|
[[package]]
|
|
name = "combat-sim"
|
|
version = "0.1.0"
|
|
dependencies = [
|
|
"combat-core",
|
|
"csv",
|
|
"serde",
|
|
"serde_json",
|
|
]
|
|
|
|
[[package]]
|
|
name = "csv"
|
|
version = "1.4.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "52cd9d68cf7efc6ddfaaee42e7288d3a99d613d4b50f76ce9827ae0c6e14f938"
|
|
dependencies = [
|
|
"csv-core",
|
|
"itoa",
|
|
"ryu",
|
|
"serde_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "csv-core"
|
|
version = "0.1.13"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "704a3c26996a80471189265814dbc2c257598b96b8a7feae2d31ace646bb9782"
|
|
dependencies = [
|
|
"memchr",
|
|
]
|
|
|
|
[[package]]
|
|
name = "itoa"
|
|
version = "1.0.18"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
|
[[package]]
|
|
name = "memchr"
|
|
version = "2.8.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
|
|
|
|
[[package]]
|
|
name = "ppv-lite86"
|
|
version = "0.2.21"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
|
|
dependencies = [
|
|
"zerocopy",
|
|
]
|
|
|
|
[[package]]
|
|
name = "proc-macro2"
|
|
version = "1.0.106"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
|
|
dependencies = [
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "quote"
|
|
version = "1.0.45"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
]
|
|
|
|
[[package]]
|
|
name = "rand_chacha"
|
|
version = "0.10.0"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3e6af7f3e25ded52c41df4e0b1af2d047e45896c2f3281792ed68a1c243daedb"
|
|
dependencies = [
|
|
"ppv-lite86",
|
|
"rand_core",
|
|
]
|
|
|
|
[[package]]
|
|
name = "rand_core"
|
|
version = "0.10.1"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69"
|
|
|
|
[[package]]
|
|
name = "ryu"
|
|
version = "1.0.23"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
|
|
|
|
[[package]]
|
|
name = "serde"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
dependencies = [
|
|
"serde_core",
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_core"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
dependencies = [
|
|
"serde_derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_derive"
|
|
version = "1.0.228"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "serde_json"
|
|
version = "1.0.150"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9"
|
|
dependencies = [
|
|
"itoa",
|
|
"memchr",
|
|
"serde",
|
|
"serde_core",
|
|
"zmij",
|
|
]
|
|
|
|
[[package]]
|
|
name = "syn"
|
|
version = "2.0.117"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"unicode-ident",
|
|
]
|
|
|
|
[[package]]
|
|
name = "unicode-ident"
|
|
version = "1.0.24"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
|
|
[[package]]
|
|
name = "zerocopy"
|
|
version = "0.8.50"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1"
|
|
dependencies = [
|
|
"zerocopy-derive",
|
|
]
|
|
|
|
[[package]]
|
|
name = "zerocopy-derive"
|
|
version = "0.8.50"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639"
|
|
dependencies = [
|
|
"proc-macro2",
|
|
"quote",
|
|
"syn",
|
|
]
|
|
|
|
[[package]]
|
|
name = "zmij"
|
|
version = "1.0.21"
|
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
|