ShotDef beta
Interface of @v12-engine/client
export interface ShotDefWhat an attack sends on its way
Members
arc
arc?: number;How high shots at the ground rise, as a part of how far they go
color
color?: [number, number, number];The shot's colour as red, green, blue (0..1); the client's when left out
draw
draw?: (shot: ShotContext) => ShotDrawing;Draws the shot the game's own way, in the place of the ball or the model: a beam from the shooter to it, a bolt of lightning, a spinning blade. Made as it leaves, told where it is every frame as the client flies it, disposed as it lands
from
from?: string;The point of the shooter's model it leaves from (ModelDef.points): its launch point when left out, and the height of its hands when it has neither
fx
fx?: ShotFx;An effect carried with it as it flies (fireball's flames, its streak), turned the way it goes, let finish as it lands: what is left behind ends by itself. In the place of the ball where it names no model. By name, as it is, or with knobs of its own ({ fx: 'fireball', params: { size: 0.6 } })
hidden
hidden?: boolean;Nothing drawn: a shot as quick as a bullet, which the game shows its own way (its hit, a flash), or not at all
impact
impact?: ShotFx | false;An effect played where it lands (explosion): where it names none, what its fx's knob impact names, at its impactSize (as fireball has); false for none
model
model?: string;A model under public/models in the place of the ball, made one unit long and pointing ahead, like 'props/arrow.glb'
size
size?: number;How big the ball is, or how long the model
trail
trail?: TrailDef;Sparks left behind by the shot as it flies; none when left out
whileBuff
whileBuff?: Record<string, Omit<ShotDef, 'whileBuff'>>;What is different about it while whoever shoots carries a buff, by the id of the buff: any of its fields (a model, a colour, a trail, its effects, where it lands), over its own. The first buff named that the shooter carries