MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / spendRemainingTU

Method spendRemainingTU

game/state/battle/battleunit.cpp:1321–1329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1319}
1320
1321void BattleUnit::spendRemainingTU(GameState &state, bool allowInterrupt)
1322{
1323 agent->modified_stats.time_units = 0;
1324 if (allowInterrupt)
1325 {
1326 state.current_battle->giveInterruptChanceToUnits(state, {&state, id},
1327 agent->getReactionValue());
1328 }
1329}
1330
1331int BattleUnit::getPickupCost() const { return initialTU * 10 / 100; }
1332

Callers 1

updateTBMethod · 0.80

Calls 2

getReactionValueMethod · 0.80

Tested by

no test coverage detected