Skip to content

five-on-it / packages/sim/src/gear / soak

Function: soak() ​

soak(sim, eid, amount, weapon): number

Defined in: packages/sim/src/gear.ts:93

Takes what armour soaks of a hit of amount points by weapon off a character's armour (armourShare, at most what it has left) and returns what is left for its health. A suit whose armour is gone comes off.

Parameters ​

sim ​

SimWorld

eid ​

number

amount ​

number

weapon ​

number

Returns ​

number