five-on-it / packages/sim/src/damage / hurt
Function: hurt()
hurt(
sim,eid,amount,owner,weapon,point,nonLethal?):number
Defined in: packages/sim/src/damage.ts:128
Takes amount hit points off an entity (a trailer's tractor; a camera, destroyed at zero) and records a hit event at point (of 0 points when the entity is invincible, a ghost, or a player owner may not hurt); nothing happens to what isHittable refuses. A non-lethal hit (a dart, a knockout) never takes a character's last hit point, may deal none, and says so on its event. Returns the hit points dealt.
Parameters
sim
eid
number
amount
number
owner
number
weapon
number
point
x
number
y
number
z
number
nonLethal?
boolean = false
Returns
number