Missile beta
Interface of @v12-engine/engine
export interface MissileWhat an ability sent on its way: it travels in a line and does something to everything it passes through
Members
ability
ability: string;The id of the ability it was sent by
bounces
bounces: number;How many times it has sprung on to another
delay
delay: number;Seconds until it sets off, and how long that took in all
dx
dx: number;Direction, of length 1
dz
dz: number;North-south part of its direction
effect
effect: EffectOf<'missile'>;The missile effect of the ability that made it, which says what it does to what it hits
floor
floor?: number;The level of the ground it set off from, for one that stops at a wall (onWall): a cliff above it is a wall
forms
forms: number;Seconds it takes to take shape before it sets off: delay starts from it and counts down
height
height: number;How high above the ground its arc carries it now, for whoever draws it: 0 for what is not thrown in an arc
held
held?: number;How full the ability that sent it was held (EffectContext.held), for one held and let go
hit
hit: Set<EntityId>;Whom it has passed through already. Missiles sent together share it: what one of them hit the others pass by
id
id: number;The missile's id, from world.newId
last
last?: EntityId;The last one it hit, for what happens where it meets a wall (onWall)
left
left: number;How far it still goes
leg
leg: number;How far it has come since it set off, or sprang on last (EffectFields.bounce): how far along its arc it is
level
level: number;The ability's level when it was sent
owner
owner: PlayerId;The player whose unit sent it
prevX
prevX: number;Where it was at the last tick, east-west
prevZ
prevZ: number;Where it was at the last tick, north-south
radius
radius: number;How far from its path it hits things, in world units
returning
returning?: boolean;On its way back to the caster (EffectFields.returns): it touches nobody (unless it hitsOnReturn), and ends where the caster is
source
source: EntityId;The caster entity that sent it
speed
speed: number;World units it travels per second
steerTo
steerTo?: Vec2;Where its owner steers it (steer, steerMissile)
stopped
stopped: boolean;Something got in its way: what happens where it ends does not
struck
struck?: number;How many it went through, for one that goes through so many (pierce) or less on each (falloff)
target
target: EntityId;The unit it flies after, for the ones that do
travelled
travelled: number;How far it has come
x
x: number;Where it is now, east-west, in world units
z
z: number;Where it is now, north-south, in world units