Claim this structure to take control over the room. The controller structure cannot be damaged or destroyed.
It can be addressed by
Room.controller
property.
Level | Upgrade to next level | Downgrade timer |
---|---|---|
1 | 200 energy | 20,000 ticks |
2 | 45,000 energy | 10,000 ticks |
3 | 135,000 energy | 20,000 ticks |
4 | 405,000 energy | 40,000 ticks |
5 | 1,215,000 energy | 80,000 ticks |
6 | 3,645,000 energy | 120,000 ticks |
7 | 10,935,000 energy | 150,000 ticks |
8 | — | 200,000 ticks |
Effect |
Blocks
attack
,
rangedAttack
,
rangedMassAttack
,
dismantle
,
heal
,
rangedHeal
,
attackController
, and
withdraw
methods of all hostile creeps in the room, plus
enableRoom
and
usePower
methods of hostile Power Creeps. Only one room can be in safe mode at the same time.
When safe mode is active, all hostile creeps become visually transparent and passable - your creeps can move through them freely (but not vice versa). |
Duration | 20,000 ticks |
Cooldown | 50,000 ticks (no cooldown in Novice Areas, also no cooldown for initial Safe Mode in your first room) |
Generation |
|
Applied effects, an array of objects with the following properties:
parameter | type | description |
---|---|---|
effect
|
number |
Effect ID of the applied effect. Can be either natural effect ID or Power ID. |
level
optional |
number |
Power level of the applied effect. Absent if the effect is not a Power effect. |
ticksRemaining
|
number |
How many ticks will the effect last. |
An object representing the position of this object in the room.
The link to the Room object. May be undefined in case if an object is a flag or a construction site and is placed in a room that is not visible to you.
The current amount of hit points of the structure.
The total amount of hit points of the structure.
A unique object identificator. You can use
Game.getObjectById
method to retrieve an object instance by its
id
.
One of the
STRUCTURE_*
constants.
Destroy this structure immediately.
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this structure. |
ERR_BUSY
|
-4 |
Hostile creeps are in the room. |
Check whether this structure can be used. If room controller level is insufficient, then this method will return false, and the structure will be highlighted with red in the game.
A boolean value.
Toggle auto notification when the structure is under attack. The notification will be sent to your account email. Turned on by default.
parameter | type | description |
---|---|---|
enabled
|
boolean |
Whether to enable notification or disable. |
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this structure. |
ERR_INVALID_ARGS
|
-10 |
|
Whether this is your own structure.
An object with the structure’s owner info containing the following properties:
parameter | type | description |
---|---|---|
username
|
string |
The name of the owner user. |
Whether using power is enabled in this room. Use
PowerCreep.enableRoom
to turn powers on.
Current controller level, from 0 to 8.
The current progress of upgrading the controller to the next level.
The progress needed to reach the next level.
An object with the controller reservation info if present:
parameter | type | description |
---|---|---|
username
|
string |
The name of a player who reserved this controller. |
ticksToEnd
|
number |
The amount of game ticks when the reservation will end. |
How many ticks of safe mode remaining, or undefined.
Safe mode activations available to use.
During this period in ticks new safe mode activations will be blocked, undefined if cooldown is inactive.
An object with the controller sign info if present:
parameter | type | description |
---|---|---|
username
|
string |
The name of a player who signed this controller. |
text
|
string |
The sign text. |
time
|
number |
The sign time in game ticks. |
datetime
|
Date |
The sign real date. |
The amount of game ticks when this controller will lose one level. This timer is set to 50% on level upgrade or downgrade, and it can be increased by using
Creep.upgradeController
. Must be full to upgrade the controller to the next level.
The amount of game ticks while this controller cannot be upgraded due to attack. Safe mode is also unavailable during this period.
room.controller.activateSafeMode();
Activate safe mode if available.
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this controller. |
ERR_BUSY
|
-4 |
There is another room in safe mode already. |
ERR_NOT_ENOUGH_RESOURCES
|
-6 |
There is no safe mode activations available. |
ERR_TIRED
|
-11 |
The previous safe mode is still cooling down, or the controller is
|
room.controller.unclaim();
Make your claimed controller neutral again.
One of the following codes:
constant | value | description |
---|---|---|
OK
|
0 |
The operation has been scheduled successfully. |
ERR_NOT_OWNER
|
-1 |
You are not the owner of this controller. |