MCPcopy Create free account
hub / github.com/OpenDungeons/OpenDungeons / needsToEat

Method needsToEat

source/entities/Creature.cpp:3222–3231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3220}
3221
3222bool Creature::needsToEat(bool forced) const
3223{
3224 if (forced && getHunger() < 5.0)
3225 return false;
3226
3227 if (!forced && (getHunger() <= Random::Double(0.0, 15.0)))
3228 return false;
3229
3230 return true;
3231}
3232
3233void Creature::changeSeat(Seat* newSeat)
3234{

Callers 2

handleSearchFoodMethod · 0.80
useRoomMethod · 0.80

Calls 1

DoubleFunction · 0.85

Tested by

no test coverage detected