five-on-it / packages/sim/src/weapons / WeaponDef
Interface: WeaponDef
Defined in: packages/sim/src/weapons.ts:69
One weapon of the table.
Properties
ammo?
optionalammo?:string
Defined in: packages/sim/src/weapons.ts:93
The item a shot uses up, by id (a round, a shell, a rocket, a dart, the grenade itself); none for the fists.
blast?
optionalblast?:BlastSize
Defined in: packages/sim/src/weapons.ts:108
Its blast, when it is not a grenade's or a rocket's (a charge's bigger one, a launcher's smaller).
charges?
optionalcharges?:number
Defined in: packages/sim/src/weapons.ts:110
A taser's charges: it fires without ammunition, each shot one charge, each charge back in recharge ticks.
damage
damage:
number
Defined in: packages/sim/src/weapons.ts:87
Hit points taken per pellet or punch; at the centre of a blast, fading to zero at its edge.
effect?
optionaleffect?:WeaponEffect
Defined in: packages/sim/src/weapons.ts:100
What its projectile does where it goes off (ordnance.ts): a blast (the default), a cloud of smoke or tear gas, a ground fire, a flash that stuns, an EMP's pulse, a GPS tag on the car it stuck to (tracking.ts); what its dart does: put to sleep (the default) or stun (a taser's).
fuse
fuse:
number
Defined in: packages/sim/src/weapons.ts:85
Ticks a projectile lives before it blows up.
impact?
optionalimpact?:"burst"|"stick"
Defined in: packages/sim/src/weapons.ts:106
A projectile that flies its own arc (no body; gravity pulls it) and goes off where it hits (burst: a bottle, a launcher's grenade), or sticks to what it hits and goes off at its fuse from there (stick: a charge on a car). Thrown, it never cooks in the hand.
item?
optionalitem?:string
Defined in: packages/sim/src/weapons.ts:91
The item that is this weapon, by id (items.ts); none for the fists.
kind
kind:
WeaponKind
Defined in: packages/sim/src/weapons.ts:73
How it delivers its shot.
moveSpread?
optionalmoveSpread?:number
Defined in: packages/sim/src/weapons.ts:120
The spread a shot takes when the shooter moves (rad): a rifle that wants its shooter still.
name
name:
string
Defined in: packages/sim/src/weapons.ts:71
Display name.
noise
noise:
number
Defined in: packages/sim/src/weapons.ts:89
How far its shot is heard (m): NPCs within it hear it (@foi/ai), a loud one wakes sleepers (status.ts).
nonLethal?
optionalnonLethal?:boolean
Defined in: packages/sim/src/weapons.ts:122
It never kills and takes people down instead (a taser, a dart, a flashbang, tear gas, smoke): what @foi/ai's police count as a non-lethal takedown.
pace?
optionalpace?:number
Defined in: packages/sim/src/weapons.ts:118
The share of its pace a character keeps while it holds it (a minigun's weight).
pellets
pellets:
number
Defined in: packages/sim/src/weapons.ts:81
Rays per shot (a shotgun's pellets).
range
range:
number
Defined in: packages/sim/src/weapons.ts:79
Reach of a hitscan ray or a punch (m).
rateTicks
rateTicks:
number
Defined in: packages/sim/src/weapons.ts:75
Ticks between two shots with the trigger held.
recharge?
optionalrecharge?:number
Defined in: packages/sim/src/weapons.ts:112
Ticks a charge takes to come back.
speed
speed:
number
Defined in: packages/sim/src/weapons.ts:83
Launch speed of a projectile (m/s).
spinUp?
optionalspinUp?:number
Defined in: packages/sim/src/weapons.ts:116
Ticks the barrels spin with the trigger held before the first round goes (a minigun's).
spread
spread:
number
Defined in: packages/sim/src/weapons.ts:77
Half-angle of the random spread per pellet (rad); of the arc a punch covers.
stun?
optionalstun?:number
Defined in: packages/sim/src/weapons.ts:114
Ticks a dart's stun lasts (a taser's).