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

Method ok_if_overcharge_unlocked

battlecode-engine/src/unit.rs:874–877  ·  view source on GitHub ↗

Ok if the unit can overcharge. InappropriateUnitType - the unit is not a healer. ResearchNotUnlocked - the required technology is not unlocked.

(&self)

Source from the content-addressed store, hash-verified

872 /// * InappropriateUnitType - the unit is not a healer.
873 /// * ResearchNotUnlocked - the required technology is not unlocked.
874 pub(crate) fn ok_if_overcharge_unlocked(&self) -> Result<(), GameError> {
875 self.ok_if_unit_type(Healer)?;
876 Ok(self.ok_if_ability_unlocked()?)
877 }
878
879 /// Updates the unit as if it has overcharged.
880 pub(crate) fn overcharge(&mut self) {

Callers 2

ok_if_can_overchargeMethod · 0.80

Calls 2

ok_if_unit_typeMethod · 0.80

Tested by

no test coverage detected