Esempio n. 1
0
    /// <summary>
    /// Raid the specified shelter.
    /// </summary>
    /// <param name="s">S.</param>
    public Report Raid(Shelter s)
    {
        // boost up to 3 points by using 3 food, 3 medicine and 3 parts
        int boost = 0;

        if (s.ConsumeFood(3))
        {
            boost++;
        }
        if (s.ConsumeMedicine(3))
        {
            boost++;
        }

        if (s.ConsumeParts(3))
        {
            boost++;
        }

        int spillover = 0;

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

        int proficiency = GetProficiency(task.Raiding) + fatigueModifier + boost;
        int newAttack   = s.BolsterAttack(proficiency);

        Report r = new Report();

        r.SetMessage(_name + " bolstered attack strength to " + newAttack);
        return(r);
    }