[][src]Trait screeps::objects::Attackable

pub unsafe trait Attackable: RoomObjectProperties {
    fn hits(&self) -> u32 { ... }
fn hits_max(&self) -> u32 { ... } }

Trait for all wrappers over Screeps JavaScript objects which can be the target of Creep.attack.

Contracts

The reference returned from AsRef<Reference>::as_ref must be a valid target for Creep.attack.

Provided methods

fn hits(&self) -> u32

Retrieve this hits of this structure, or 0 if this structure doesn't have a hit count.

For instance, this retrieves the hitpoints of a Creep. Or for a StructureWall that's part of a novice area border, this will return 0.

fn hits_max(&self) -> u32

Retrieve the maximum hits of this structure, or 0 if this structure doesn't have a hit count.

For instance, this retrieves the maximum full health of a Creep. Or for a StructureWall that's part of a novice area border, this will return 0.

Loading content...

Implementors

impl Attackable for Creep[src]

impl Attackable for OwnedStructure[src]

impl Attackable for StructureContainer[src]

impl Attackable for StructureExtension[src]

impl Attackable for StructureExtractor[src]

impl Attackable for StructureKeeperLair[src]

impl Attackable for StructureLab[src]

impl Attackable for StructureLink[src]

impl Attackable for StructureNuker[src]

impl Attackable for StructureObserver[src]

impl Attackable for StructurePowerBank[src]

impl Attackable for StructurePowerSpawn[src]

impl Attackable for StructureRampart[src]

impl Attackable for StructureRoad[src]

impl Attackable for StructureSpawn[src]

impl Attackable for StructureStorage[src]

impl Attackable for StructureTerminal[src]

impl Attackable for StructureTower[src]

impl Attackable for StructureWall[src]

Loading content...