Class BreathRules
The arithmetic of breath and drowning, apart from any character, so it can be tested on its own.
public static class BreathRules
- Inheritance
-
BreathRules
- Inherited Members
Remarks
The rules (2026-10-05): a meter drains while the head is under water and refills in about three seconds at the surface; at zero, a FLAT tenth of maximum health a second. Lava burns 50 fire a second, which fire resistance takes off one for one and from which fire races are immune.
Fields
DrowningShare
The share of maximum health drowning takes each second.
public const float DrowningShare = 0.1
Field Value
LavaDamagePerSecond
Fire damage lava does each second, before resistance.
public const int LavaDamagePerSecond = 50
Field Value
RefillSeconds
Seconds an empty breath takes to fill again with the head out of the water.
public const float RefillSeconds = 3
Field Value
Methods
DrowningDamage(int)
Damage one second of drowning does to a character with maxHealth: never less than one.
public static int DrowningDamage(int maxHealth)
Parameters
maxHealthint
Returns
IsPulseTick(uint, double)
True on the ticks a once-a-second environmental pulse lands: the first tick of each synced second.
public static bool IsPulseTick(uint syncedTick, double tickDelta)
Parameters
Returns
Step(float, float, bool, float)
Breath after seconds: down a second a second while holding it, up to full in RefillSeconds while breathing.
public static float Step(float breath, float max, bool holding, float seconds)