Launches a nuke to another room dealing huge damage to the landing area. Each launch has a cooldown and requires energy and ghodium resources. Launching creates a Nuke object at the target room position which is visible to any player until it is landed. Incoming nuke cannot be moved or cancelled. Nukes cannot be launched from or to novice rooms. Resources placed into a StructureNuker cannot be withdrawn.
Controller level | |
1-7 | — |
8 | 1 nuke |
Cost | 100,000 |
Hits | 1,000 |
Range | 10 rooms |
Launch cost |
300,000 energy
5,000 ghodium |
Launch cooldown | 100,000 ticks |
Landing time | 50,000 ticks |
Effect |
All creeps, construction sites and dropped resources in the room are removed immediately, even inside ramparts. Damage to structures:
Note that you can stack multiple nukes from different rooms at the same target position to increase damage. Nuke landing does not generate tombstones and ruins, and destroys all existing tombstones and ruins in the room If the room is in safe mode, then the safe mode is cancelled immediately, and the safe mode cooldown is reset to 0.
The room controller is hit by triggering
|
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. |
This property is deprecated and will be removed soon.
An alias for
.store[RESOURCE_ENERGY]
.
This property is deprecated and will be removed soon.
An alias for
.store.getCapacity(RESOURCE_ENERGY)
.
This property is deprecated and will be removed soon.
An alias for
.store[RESOURCE_GHODIUM]
.
This property is deprecated and will be removed soon.
An alias for
.store.getCapacity(RESOURCE_GHODIUM)
.
The amount of game ticks until the next launch is possible.
if(structure.store.getFreeCapacity(RESOURCE_ENERGY) > 0) {
creep.transfer(structure, RESOURCE_ENERGY);
}
A
Store
object that contains cargo of this structure.
nuker.launchNuke(new RoomPosition(20,30, 'W1N1'));
Launch a nuke to the specified position.
parameter | type | description |
---|---|---|
pos
|
RoomPosition |
The target room position. |
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_NOT_ENOUGH_RESOURCES
|
-6 |
The structure does not have enough energy and/or ghodium. |
ERR_INVALID_TARGET
|
-7 |
The nuke can't be launched to the specified RoomPosition (see Start Areas ). |
ERR_NOT_IN_RANGE
|
-9 |
The target room is out of range. |
ERR_INVALID_ARGS
|
-10 |
The target is not a valid RoomPosition. |
ERR_TIRED
|
-11 |
This structure is still cooling down. |
ERR_RCL_NOT_ENOUGH
|
-14 |
Room Controller Level insufficient to use this structure. |