Skip to content

Missile beta ​

Interface of @v12-engine/engine

ts
export interface Missile

What an ability sent on its way: it travels in a line and does something to everything it passes through

Members ​

ability ​

ts
ability: string;

The id of the ability it was sent by

bounces ​

ts
bounces: number;

How many times it has sprung on to another

delay ​

ts
delay: number;

Seconds until it sets off, and how long that took in all

dx ​

ts
dx: number;

Direction, of length 1

dz ​

ts
dz: number;

North-south part of its direction

effect ​

ts
effect: EffectOf<'missile'>;

The missile effect of the ability that made it, which says what it does to what it hits

floor ​

ts
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 ​

ts
forms: number;

Seconds it takes to take shape before it sets off: delay starts from it and counts down

height ​

ts
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 ​

ts
held?: number;

How full the ability that sent it was held (EffectContext.held), for one held and let go

hit ​

ts
hit: Set<EntityId>;

Whom it has passed through already. Missiles sent together share it: what one of them hit the others pass by

id ​

ts
id: number;

The missile's id, from world.newId

last ​

ts
last?: EntityId;

The last one it hit, for what happens where it meets a wall (onWall)

left ​

ts
left: number;

How far it still goes

leg ​

ts
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 ​

ts
level: number;

The ability's level when it was sent

owner ​

ts
owner: PlayerId;

The player whose unit sent it

prevX ​

ts
prevX: number;

Where it was at the last tick, east-west

prevZ ​

ts
prevZ: number;

Where it was at the last tick, north-south

radius ​

ts
radius: number;

How far from its path it hits things, in world units

returning ​

ts
returning?: boolean;

On its way back to the caster (EffectFields.returns): it touches nobody (unless it hitsOnReturn), and ends where the caster is

source ​

ts
source: EntityId;

The caster entity that sent it

speed ​

ts
speed: number;

World units it travels per second

steerTo ​

ts
steerTo?: Vec2;

Where its owner steers it (steer, steerMissile)

stopped ​

ts
stopped: boolean;

Something got in its way: what happens where it ends does not

struck ​

ts
struck?: number;

How many it went through, for one that goes through so many (pierce) or less on each (falloff)

target ​

ts
target: EntityId;

The unit it flies after, for the ones that do

travelled ​

ts
travelled: number;

How far it has come

x ​

ts
x: number;

Where it is now, east-west, in world units

z ​

ts
z: number;

Where it is now, north-south, in world units