Skip to content

Camp beta ​

Interface of @v12-engine/engine

ts
export interface Camp

A group of creeps guarding a spot

Members ​

aggro ​

ts
aggro: CampAggro[];

Who the camp is fighting, as its creeps pick (campTarget): fed by every hit on one of them (the damage done, as threat) and by their own hits, rid of the dead and of what is past the leash, emptied as the camp goes home

alarm ​

ts
alarm: EntityId;

The last it went for: what wakes one of them wakes the rest

chaseTime ​

ts
chaseTime?: number;

Seconds a creep of it chases what it neither hits nor is hit by before it lets it go: the rules' chaseTime when left out

clearedAt ​

ts
clearedAt?: number;

When it was found empty, in seconds of the game: it comes back respawn seconds after

foughtAt ​

ts
foughtAt?: number;

When one of its creeps last hit or was hit, in seconds of the game: it goes home resetAfter after. None at peace

helpAtOnce ​

ts
helpAtOnce?: boolean;

Whether all of it answers a hit at once: the rules' helpAtOnce when left out

id ​

ts
id: number;

The camp's number: its place in the world's camps, plus one

leash ​

ts
leash: number;

How far from the camp's centre its creeps fight: what goes past it is let go of (CampSettings.leash)

level ​

ts
level: number;

Levels of its creeps added up, as it was set up

members ​

ts
members: EntityId[];

The entity ids of its creeps

name ​

ts
name?: string;

The name it was given on the map, for the rules to find it by (campNamed)

owner ​

ts
owner?: PlayerId;

Who its creeps are, and of what types, for it to come back the same (see respawn). None in saves of before

resetAfter ​

ts
resetAfter?: number;

Seconds without a blow before it goes home: the rules' resetAfter when left out

respawn ​

ts
respawn?: number;

Seconds after it was cleared that it comes back, its creeps where they stood, as a hero arena game's jungle camps do. Never when left out, as in classic RTS games. Set it from code as the game goes (campsOf) to change it

types ​

ts
types?: string[];

The unit type ids of its creeps, kept for it to come back the same after respawn

x ​

ts
x: number;

Where the middle of the camp is, east-west in cells

z ​

ts
z: number;

Where the middle of the camp is, north-south in cells