Introduced new room safe mode mechanics. It will replace room novice walls protection, and allow to arbitrarily safeguard your rooms while you are offline.
Safe mode is enabled on the room controller when a new player spawns in the world initially. It also can be triggered by any player manually using either the StructureController.activateSafeMode()
method, or the button in the controller UI. When activated, it blocks attack
, rangedAttack
, rangedMassAttack
, dismantle
, heal
, rangedHeal
, attackController
and withdraw
methods of all hostile creeps in the room.
Only one room can be in safe mode at the same time. Safe mode period lasts for 20,000 ticks. It cannot be activated again during the 50,000 ticks cooldown period. But in Novice Areas, there is no cooldown at all.
In order to activate safe mode you spend available activations (StructureController.safeModeAvailable
property). You obtain one activation on each controller level upgrade, and also can generate it by Creep.generateSafeMode()
method using 1000 ghodium resource.
If the controller is downgraded, it loses all its available safe mode activations, and triggers the cooldown period.
Changelog
- Introduced new properties
StructureController.safeMode
,StructureController.safeModeAvailable
,StructureController.safeModeCooldown
. - Introduced new method
StructureController.activateSafeMode
. - Introduced new method
Creep.generateSafeMode
. - The room owner can create up to 5 invader creeps using the Invasion UI in order to test room defences. These invaders will not drop resources when they die and can be removed using their UI. If another player’s creeps appear in the room, they suicide immediately.
- Renamed
Game.map.isRoomProtected
property toGame.map.isRoomAvailable
(with the opposite meaning). The old name is still available, but deprecated and will be removed in the future. Rooms in safe mode are considered available. - Added
StructureContainer.ticksToDecay
property.