Esempio n. 1
0
    // =================================================== tasks
    // scout
    public ArrayList Scout(Shelter s)
    {
        int boost = 0;

        if (s.ConsumeFood(1))
        {
            boost++;
        }

        Report rTemporary = new Report();

        int spillover = 0;

        if (Fatigue < 0)
        {
            spillover = Mathf.Abs(Fatigue);
        }
        int fatigueModifier = -Fatigue / 10;

        int proficiency = GetProficiency(task.Scout) + 10 + fatigueModifier;

        wound sWound = wound.Uninjured;

        ArrayList NewReps = new ArrayList();

        if (WoundCheck(s, rTemporary, proficiency, "scouting", "scout", ref sWound))
        {
            int locationBonus = (int)Mathf.Pow(Random.Range(1.0f, 4.0f) * proficiency, .36f);


            _gameWorld.AddScoutingBonus(locationBonus);
            if (sWound == wound.Uninjured)
            {
                rTemporary.SetMessage(_name + " successfully scouted and helped to locate a scavenging target.");
            }
            else
            {
                rTemporary.SetMessage(_name + " sustained a " + sWound.ToString() + " wound while scouting but still helped to locate a scavenging target.");
            }
            //Look for enemy camps
            NewReps = _gameWorld.ScoutForShelters(proficiency + boost);
        }
        if (rTemporary.IsInitialized())
        {
            NewReps.Add(rTemporary);
        }
        return(NewReps);
    }