feat(mc-climate): add seismic, impact, tsunami event categories
Implements the three geological event categories end-to-end in
src/simulator/crates/mc-climate/src/events.rs, following the exact
same pattern as wildfire/drought/volcanic:
seismic:
apply_seismic — shifts tile.elevation by elevation_delta × distance
falloff over radius disk (clamped [0,1])
dispatch_seismic — reads radius + elevation_delta from tiers JSON,
picks non-water center
impact:
apply_impact — two paths: T5 extinction (crater disk → desert,
global sulfate_aerosol injection, biome collapse
jungle→grassland/swamp→desert, site→mana_node) and
T1-T4 standard (crater terrain, elevation delta,
heat pulse via magic_heat_delta, local aerosol)
dispatch_impact — reads elevation_delta/crater_radius/heat_*/aerosol_*
from tiers JSON; T5 uses aerosol_global path
tsunami:
apply_tsunami — floods non-water tiles in disk: moisture += moisture_gain,
quality = quality_reset (if >0); water tiles with
reef_destruction lose 0.5 reef_health
dispatch_tsunami — picks IsCoast tile (returns None if no coast exists,
matching GDScript early-return); reads inland_reach/
moisture_gain/quality_reset/reef_destruction from tiers JSON
process_events match arms added for seismic, impact, tsunami.
pub mod events declared in lib.rs (was missing).
16 events tests total; all pass (cargo test -p mc-climate).
Config key notes:
seismic JSON: elevation_delta (matches GDScript .get('elevation_delta'))
impact JSON T5: uses crater_radius + elevation_loss (NOT elevation_delta)
impact JSON T1-4: uses elevation_delta (may be negative for crater depression)
tsunami JSON: inland_reach (not radius; radius in JSON is for T6+ global variants)
scatter_resource/wonder_anchor bits: Game-3 deferred (same as volcanic)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
58b608804a
commit
af4a7a4aff
2 changed files with 1137 additions and 0 deletions
1136
src/simulator/crates/mc-climate/src/events.rs
Normal file
1136
src/simulator/crates/mc-climate/src/events.rs
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,4 +1,5 @@
|
|||
pub mod anomalous;
|
||||
pub mod events;
|
||||
pub mod atmosphere;
|
||||
pub mod climate_effects;
|
||||
pub mod derive;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue