Skip to content

DefenceOptions beta ​

Interface of @v12-engine/engine/ai

ts
export interface DefenceOptions

How a brain defends its bases (BrainDef.defence, the seat's AiOptions.defence over it, the defence() module's own under both). Data, kept in a save

Members ​

odds ​

ts
odds?: number;

The odds of the fight (Strength.odds) the defenders sent against a raid are to have: two in three when left out (about four tenths stronger than the raid)

quiet ​

ts
quiet?: number;

Seconds a base stands clear before a raid on it is over: 15 when left out

radius ​

ts
radius?: number;

How near one of its buildings a rival's unit is an intruder: the seat's defendRadius, else 16

recall ​

ts
recall?: boolean;

Whether a raid more than what is at home can meet brings the army home (the goal is urgent: it takes squads out, whole, once it scores past what they are on): yes when left out

tower ​

ts
tower?: string;

The tower to build, by type id: the cheapest of the tower role its workers build when left out

towerAfter ​

ts
towerAfter?: number;

Raids at one base before it wants towers: 2 when left out

towers ​

ts
towers?: number;

Towers a base wants once raided towerAfter times: 1 when left out. 0 for none