public function applyEffect(Fish &$fish) { // time goes by, health is going down $fish->setHealth($fish->getHealth() - 1); $fish->addLifeTick(); $fish->setHunger($fish->getHunger() + 1); $fish->setSleepiness($fish->getSleepiness() + 0.5); $fish->setPlayfull($fish->getPlayfull() + 3); }
public function applyEffect(Fish &$fish) { if ($fish->getPlayfull() >= 8) { $fish->setHealth($fish->getHealth() - 1); } }