Skip to content

five-on-it / apps/server/src/chaos / setOffChaos

Function: setOffChaos() ​

setOffChaos(ai, event, at): boolean

Defined in: apps/server/src/chaos.ts:29

Sets a chaos event off at a point: a riot there, the bridge nearest it raised, the district of the substation nearest it blacked out, the pump nearest it lit (its forecourt goes up after it). Returns whether anything happened.

Parameters ​

ai ​

AiWorld

event ​

"riot" | "bridge" | "blackout" | "petrol"

at ​

x ​

number

z ​

number

Returns ​

boolean