3.1 KiB
3.1 KiB
| id | title | priority | status | scope | category | owner | created | updated_at | closed_at | blocked_by | follow_ups | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| p3-07b | Four damage channels — Land/Water/Magic/Air emission from inequality | p3 | done | game1 | economy | unassigned | 2026-05-03 | 2026-05-07 | 2026-05-07 |
|
Context
Per public/games/age-of-dwarves/docs/economy/CAPITALISM_CASCADE.md, the realm's inequality stat (p3-07a) emits damage proportionally across four named channels: Land (soil degradation, deforestation), Water (river pollution, aquifer drawdown), Magic (mana well exhaustion — note: Game-1 stub channel only, no live magic system), Air (smog, climate drift).
In Game 1 these channels accumulate as tile-level degradation counters; full mana economy and atmospheric simulation are Game 2 / Game 3 work. The Magic channel is wired but its only effect in Game 1 is a per-realm UI counter.
Acceptance
- ✓
mc-core::DamageChannelenum (Land,Water,Magic,Air). Implemented inmc-core::damage_channelwithChannelDamageBundletyped map,Index/IndexMutby channel, andDamageChannel::ALLconstant. - ✓
mc-economy::cascade::emit(inequality, config) -> ChannelDamageBundlewithCascadeConfigcarrying JSON-driven split coefficients. Zero-inequality → zero-emission invariant holds. Split formula pendingcascade.jsonauthorship (blocked on p3-05b/c/d civic schema). - ✓
mc-ecology::tile::apply_damage(tile, channel, amount)updates per-tile degradation counters.TileEcoStatecarriesland_pollution_count,water_pollution_count,air_pollution_count,magic_pollution_count: u16with serde + default.apply_damagesaturates atu16::MAX. Cited:src/simulator/crates/mc-ecology/src/tile.rs. - ✓ Realm-level Magic counter
PlayerState.derived_stats.magic_channel_pressure: f32.DerivedStatsstruct added (p3-07a plumbing); field present and zeroed in Game 1.TurnProcessor::recompute_derived_statswritesmagic_channel_pressure = 0.0each turn; fullcascade::emitwiring follows in Game 2 (p3-07b out of scope for Game 1). Cited:src/simulator/crates/mc-core/src/derived_stats.rs,src/simulator/crates/mc-turn/src/processor.rs. - ✓
test_zero_inequality_zero_emissiongreen.test_cascade_split_sums_to_totalgreen —cascade.jsonauthored atpublic/resources/economy/cascade.json(Land 0.40 / Water 0.30 / Magic 0.10 / Air 0.20); test loads real JSON, verifies sum=1.0 and lossless split.
Source-of-truth rails
- Rust crate:
mc-economy::cascadeowns split;mc-ecology::tileowns degradation counters. No GDScript shadow. - JSON path: split coefficients live in
public/resources/economy/cascade.json(single canonical config). - mc-core wrapper:
DamageChannelenum +ChannelDamageBundletyped map (noHashMap<String, f32>).
Out of scope
- Live magic-channel gameplay consumer — Game 2/3.
- Atmospheric weather coupling — Game 2.
- Player-facing remediation actions — separate Game 1 ticket once damage exists.
References
public/games/age-of-dwarves/docs/economy/CAPITALISM_CASCADE.md- Parent:
p3-07a