// wound a random defender public void WoundRandomDefender(ArrayList reports) { int length = 0; foreach (Survivor s in _survivors) { if (Random.Range(0, 10) > 5 && (s.AssignedTask == Survivor.task.Defend || s.AssignedTask == Survivor.task.Heal || s.AssignedTask == Survivor.task.Resting || s.AssignedTask == Survivor.task.Unassigned)) { Report r = new Report(); Survivor.wound w = Survivor.wound.Uninjured; s.WoundCheck(this, r, 0, "defending", "defend", ref w); if (w != Survivor.wound.Uninjured) { if (s.Health > 0) { r.SetMessage(s.Name + " died defending."); } else { r.SetMessage(s.Name + " sustained a " + w.ToString() + " wound defending."); } reports.Add(r); } } } }
public void AddWoundMessage(Survivor.wound sustainedWound) { _message += " In the process a " + sustainedWound.ToString().ToLower() + " wound was sustained."; }