Weather systems, atmospheric conditions, environmental hazard zones, and their effects on entity fatigue, temperature, and survival.
Environmental effects are applied per-tick. Hazard zones have physical extent (radius_Sm) and intensity (intensity_Q). Effect rates scale linearly with proximity. Weather affects thermoregulation which feeds into fatigue and consciousness.
Diffuse cloud cover. Slight temperature drop; minor sensor attenuation from reduced contrast.
To add a custom weather condition: define it in src/sim/weather.ts, write a test in test/sim/weather.test.ts, then open a pull request ↗ with the title feat: add [NAME] weather condition.
Campfire-sized heat source. At full intensity (centre), drains 2% fatigue per second, pushes surface temperature +5.4°C/s, and inflicts minor skin damage. Effects fall off linearly to zero at radius edge.
Permanent contaminated zone (e.g. reactor core, ancient curse site). Accumulates radiation dose at 1% Q/s at centre. Host applies cumulative dose effects (nausea, fatigue, long-term organ damage) separately. No thermal or immediate surface damage.
Heavier-than-air toxic gas cloud. Drains fatigue at 1%/s at centre, falls off with distance. Critically: exposes entities to marsh_fever disease — entities inside the zone on each tick have a chance to contract it via deriveHazardEffect.diseaseExposureId. Duration 30 min then dispersed.
Small caustic pool (industrial spill, alchemist's lab, volcanic acid lake). Primarily causes surface damage (1.5%/s at full) — much higher than campfire. Also drains fatigue from chemical burn pain. Very small 2 m radius: step in and step out quickly or suffer permanent scarring.
Mountain blizzard or arctic exposure. Large 100 m radius represents the storm envelope. Rapidly drops body temperature: −10.8°C/s at centre pushes entities into hypothermia within seconds unless clothed. Fatigue drain models shivering and wind-chill exertion. 6-hour duration covers a full storm event.
Define a custom hazard zone and save it to localStorage, or export it as a TypeScript snippet to add to src/sim/hazard.ts via pull request.
To add a custom hazard to the codebase: download the .ts snippet, add it to src/sim/hazard.ts, write a test in test/sim/hazard.test.ts, then open a pull request ↗ with the title feat: add [NAME] hazard profile.
import { CAMPFIRE, RADIATION_ZONE } from '@its-not-rocket-science/ananke/hazard'computeHazardExposure(dist_Sm, zone) for each entity/zone pair. Apply the returned Q to deriveHazardEffect.isInsideHazard(x_Sm, y_Sm, zone) for broad-phase filtering before computing exact effects.stepHazardZone(zone, elapsedSeconds). Check isHazardExpired(zone) to remove finished zones.docs/validation-hazard-fatigue-drain.md for calibration against real fire/cold exposure data.