Skip to content

five-on-it / packages/sim/src/weapons / WeaponDef

Interface: WeaponDef ​

Defined in: packages/sim/src/weapons.ts:62

One weapon of the table.

Properties ​

ammo? ​

optional ammo?: string

Defined in: packages/sim/src/weapons.ts:86

The item a shot uses up, by id (a round, a shell, a rocket, a dart, the grenade itself); none for the fists.


damage ​

damage: number

Defined in: packages/sim/src/weapons.ts:80

Hit points taken per pellet or punch; at the centre of a blast, fading to zero at its edge.


fuse ​

fuse: number

Defined in: packages/sim/src/weapons.ts:78

Ticks a projectile lives before it blows up.


item? ​

optional item?: string

Defined in: packages/sim/src/weapons.ts:84

The item that is this weapon, by id (items.ts); none for the fists.


kind ​

kind: WeaponKind

Defined in: packages/sim/src/weapons.ts:66

How it delivers its shot.


name ​

name: string

Defined in: packages/sim/src/weapons.ts:64

Display name.


noise ​

noise: number

Defined in: packages/sim/src/weapons.ts:82

How far its shot is heard (m): NPCs within it hear it (@foi/ai), a loud one wakes sleepers (status.ts).


pellets ​

pellets: number

Defined in: packages/sim/src/weapons.ts:74

Rays per shot (a shotgun's pellets).


range ​

range: number

Defined in: packages/sim/src/weapons.ts:72

Reach of a hitscan ray or a punch (m).


rateTicks ​

rateTicks: number

Defined in: packages/sim/src/weapons.ts:68

Ticks between two shots with the trigger held.


speed ​

speed: number

Defined in: packages/sim/src/weapons.ts:76

Launch speed of a projectile (m/s).


spread ​

spread: number

Defined in: packages/sim/src/weapons.ts:70

Half-angle of the random spread per pellet (rad); of the arc a punch covers.