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

Method getGuardCount

game/state/shared/organisation.cpp:23–27  ·  view source on GitHub ↗

Returns 100% +- 25%, with a max of 20

Source from the content-addressed store, hash-verified

21
22// Returns 100% +- 25%, with a max of 20
23int Organisation::getGuardCount(GameState &state) const
24{
25 return std::min(
26 20, randBoundsInclusive(state.rng, average_guards * 75 / 100, average_guards * 125 / 100));
27}
28
29StateRef<Building> Organisation::pickRandomBuilding(GameState &state, StateRef<City> city) const
30{

Callers 2

createBattleMethod · 0.80
customizeForcesMethod · 0.80

Calls 1

randBoundsInclusiveFunction · 0.85

Tested by

no test coverage detected