[−][src]Trait screeps::objects::Attackable
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
.