Table of Contents

Class BreathRules

Namespace
FishMMO.Shared
Assembly
FishMMO.Shared.dll

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

float

LavaDamagePerSecond

Fire damage lava does each second, before resistance.

public const int LavaDamagePerSecond = 50

Field Value

int

RefillSeconds

Seconds an empty breath takes to fill again with the head out of the water.

public const float RefillSeconds = 3

Field Value

float

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

maxHealth int

Returns

int

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

syncedTick uint
tickDelta double

Returns

bool

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)

Parameters

breath float
max float
holding bool
seconds float

Returns

float