Class AISwimRisk
- Namespace
- FishMMO.Server.Implementation.World.SceneServer.AI
- Assembly
- FishMMO.Server.dll
The decision an NPC makes when the way to its target is through deep water: scored, never scripted. The risk is how long it would be in the water against how good a swimmer it is, with its breath on top for one that swims under; its appetite for risk is its courage, scaled by how much it wants this target. In if the appetite covers the risk; otherwise it waits on the shore; and past its leash, it lets the target go.
public static class AISwimRisk
- Inheritance
-
AISwimRisk
- Inherited Members
Remarks
Pure, so a designer's numbers can be checked without a scene (AISwimRiskTests).
Fields
BreathBudget
How much of its breath a diver will spend getting there: the rest is for the fight and the way back.
public const float BreathBudget = 0.4
Field Value
DiveSpeed
Metres a second divers rise and dive.
public const float DiveSpeed = 1.5
Field Value
EasyWaterMetres
Metres of open water a perfect swimmer counts as no risk at all; a poor one, a fifth of it.
public const float EasyWaterMetres = 200
Field Value
Methods
Evaluate(AISwimSettings, in AISwimRiskInput)
public static WaterVerdict Evaluate(AISwimSettings swim, in AISwimRiskInput input)
Parameters
swimAISwimSettingsinputAISwimRiskInput