# Hazards beyond the weather (design section 3, "Weather and hazards"; read by src/world/terrain/Hazards.cpp).
#
# Not generation: each hazard is worked out from the seed, a place and the world clock, and nothing
# about it is saved or sent, so a value here can change without touching a sample hash. (Whether a
# star is the flaring kind is fixed when its system is made, from `luminosity` and `chance`.)

# Solar flares. A star is the flaring kind when it is at most `luminosity` as bright as the reference
# star (dim red stars), and then with `chance`, from its system's seed. The system a world starts in
# never flares. A flaring star flares once in each stretch of `every` s, at a time of its own: it
# builds over `rise` s to its peak and fades over `fade` s, and the HUD warns `warning` s before the
# peak. At the peak it does `hurt` damage a second to anyone out in the open by day, in space or on
# a world with less than `air` atm. A ship's air, a sealed cockpit, a roof or the ground stops it.
[flares Star]
luminosity = 0.8
chance = 0.6
every = 1800
rise = 40
fade = 60
warning = 90
hurt = 8
air = 0.03

# Meteor showers on worlds with less than `air` atm. One shower in each stretch of `every` s, at a
# time of its own, lasting `lasts` s, with `rate` falls a minute on each square km. A fall is seen
# for `fall` s before it lands, digs a crater `crater` m across, lines `ore` of its floor with the
# world's ore, and hurts anyone within `reach` m by up to `hurt` (at the point it lands).
[meteors Shower]
air = 0.03
every = 1200
lasts = 90
rate = 6
fall = 3
crater = 3 .. 6
ore = 0.35
hurt = 60
reach = 6

# Gas pockets in caves on worlds at least this `toxicity` or `volcanism`: at most one in each `cell` m
# cube, with `chance`, `radius` m across, at least `depth` m under the ground. Inside one the air
# can't be breathed and stings `hurt` a second through an open suit. The visor's pulse marks them.
[gas Pocket]
toxicity = 0.3
volcanism = 0.5
cell = 40
chance = 0.35
radius = 4 .. 8
depth = 6
hurt = 3

# Vents on worlds at least this `volcanism`: at most one in each `cell` m square of dry ground, with
# `chance`; `geysers` of them erupt. A geyser's cycle is `every` s (its own, in the range): it rumbles
# for `build` s and erupts for `erupt` s. Within `reach` m of an erupting geyser you're thrown up at
# `throw` m/s and burned `burn` a second; a vent's steam burns `vent burn` a second.
[vents Geyser]
volcanism = 0.6
cell = 48
chance = 0.5
geysers = 0.5
every = 30 .. 70
build = 4
erupt = 6
reach = 1.6
throw = 18
burn = 15
vent burn = 4

# Thin ice: a cold sea's frozen top, one block over the water. Stood on for `crack` s it cracks, and
# `break` s later it breaks. A ship coming down on it breaks it at once.
[ice Thin]
crack = 0.8
break = 1.6
