Completes weather→scouting. weather.gd gains vision_penalty_at(col,row) (worst penalty from active events covering the tile, hex-distance footprint); world_map_vision.recalculate_vision cuts each unit's sight radius by it (floored at 1) before computing visible_hexes — so a unit standing in a storm/blizzard/dust storm reveals fewer tiles. The penalty VALUE is Rust-derived (WeatherEvent.vision_penalty, data); GDScript only reads + applies it. Headless path has compute_vision_with_penalties. Verified: mc-climate 45/0, mc-vision 30/0, GUT vision_penalty_at (within/outside/ worst-overlap); dylib rebuilt + deployed; canonical GUT 747/0. p3-20 → done. Next: p3-21 (weather-driven migration). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3.3 KiB
| id | title | priority | status | scope | owner | updated_at | evidence | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| p3-20 | Weather affects scouting — vision/LoS penalty under storms, blizzards, dust | p3 | done | game1 | warcouncil | 2026-06-25 |
|
Summary
The runtime weather system (mc-climate::weather, six Game-1 types: Storm, Heat
Wave, Blizzard, Drought, Flood, Dust Storm) derives events per turn and applies a
movement_penalty to units, with real unit HP damage wired into the played turn
(climate_effects.gd:125). But WeatherEvent carries no vision/line-of-sight
effect — weather slows movement and hurts units, but does not reduce scouting
range. So storms/blizzards/dust have no effect on exploration, fog reveal, or
surprise — a missed gameplay lever for the weather system.
Progress (2026-06-25)
Weather-producer side done: WeatherEvent.vision_penalty: i32 added (mc-climate); derive_events sets it per kind (storm 1, blizzard 2, dust_storm 2; heat_wave/drought/flood 0). Tests assert the per-kind values (mc-climate 45/0). Vision-consumer side DONE: compute_vision_with_penalties (mc-vision) shrinks a unit's effective sight by the per-tile penalty (floored at WEATHER_MIN_VISION=1); compute_vision delegates with an empty map so existing callers are unchanged. Test weather_vision_penalty_shrinks_unit_sight (mc-vision 30/0). Remaining: the bridge/GDScript wiring — build the per-tile penalty map from live weather events + call compute_vision_with_penalties in the playable vision path + dylib/GUT. (Per-kind values inline for now; data-drive to WeatherThresholds/climate_spec.json is a follow-up.)
Acceptance
WeatherEvent.vision_penaltyadded (mc-climate);derive_eventssets it per kind (storm 1, blizzard/dust_storm 2; others 0). (Inline per-kind; thresholds/json data-drive is a noted follow-up.)- Vision reduces sight under weather: rendered fog (
world_map_vision.recalculate_visioncuts a unit's radius byweather.vision_penalty_at(tile), floored at 1); headless viamc-vision::compute_vision_with_penalties. - Rendered fog wired + GUT-verified; headless capability ready
(
compute_vision_with_penalties). The penalty VALUE is Rust-derived (data); GDScript consumes it. (Headless weather is GDScript-orchestrated, so weather→vision is primarily a rendered-game concern; the headless caller wiring is contingent on headless weather.) - Surfaced: the rendered TileMap fog reveals fewer tiles under weather.
- Tests: mc-climate per-kind vision_penalty (45/0), mc-vision
weather_vision_penalty_shrinks_unit_sight(30/0), GUTvision_penalty_atwithin/outside/ worst-overlap; dylib rebuilt + canonical GUT 747/0.
Code sites
mc-climate/src/weather.rs(WeatherEvent+ thresholds)- the vision computation (
mc-vision/PlayerVision;pathfinder.gd::visible_hexes- the Rust vision projection)
public/resources/.../weather*.json(per-type vision_penalty authoring)
Notes
Verified 2026-06-25 — weather is movement_penalty-only; no vision field exists.