MCPcopy Index your code
hub / github.com/battlecode/battlecode-2018 / is_attack_ready

Method is_attack_ready

battlecode-engine/src/world.rs:1121–1123  ·  view source on GitHub ↗

Whether the robot is ready to attack. Tests whether the robot's attack heat is sufficiently low. Healers cannot attack, and should use `is_heal_ready()` instead.

(&self, robot_id: UnitID)

Source from the content-addressed store, hash-verified

1119 ///
1120 /// Healers cannot attack, and should use `is_heal_ready()` instead.
1121 pub fn is_attack_ready(&self, robot_id: UnitID) -> bool {
1122 self.ok_if_attack_ready(robot_id).is_ok()
1123 }
1124
1125 /// Commands a robot to attack a unit, dealing the
1126 /// robot's standard amount of damage.

Callers 3

run.pyFile · 0.45
run.pyFile · 0.45
examplefuncsplayerFunction · 0.45

Calls 1

ok_if_attack_readyMethod · 0.45

Tested by

no test coverage detected