Human: don't hardcode max food

This commit is contained in:
Dylan K. Taylor 2018-05-19 16:48:21 +01:00
parent 1f73c08762
commit 6111ce7df1

View File

@ -641,7 +641,7 @@ class Human extends Creature implements ProjectileSource, InventoryHolder{
}
if($difficulty === Level::DIFFICULTY_PEACEFUL and $this->foodTickTimer % 10 === 0){
if($food < 20){
if($food < $this->getMaxFood()){
$this->addFood(1.0);
$food = $this->getFood();
}