Beispiel #1
0
    // Eat.
    public Report Eat(Shelter s)
    {
        Report r           = new Report();
        int    consumption = Random.Range(_appetite, _appetite + 4);

        if (s.EatFood(consumption) == false)
        {
            r = AdvanceHunger();

            if (_starvation == hunger.Starving)
            {
                Health--;
            }
            if (Health < 0)
            {
                r.SetMessage(_name + " has starved to death.");
                s.KillSurvivor(this.Name);
            }
            if (_starvation == hunger.Famished || _starvation == hunger.Starving)
            {
                return(r);
            }
            else
            {
                return(null);
            }
        }
        else
        {
            _starvation = hunger.Content;
        }
        return(null);
    }