public Boolean IsOut() { Boolean res = false; //A character is out of combat when his incap level is wounded //Normally, the incap level is the last one in the health track if (CurrentHealthLevels.Last().Key.Equals(Constants.HL_INC)) { res = Constants.IsWoundedHealthLevel(CurrentHealthLevels.Last().Value); } else { throw new Exception("Incorrect last health level. It should be " + Constants.HL_INC + ", but it is " + CurrentHealthLevels.Last().Key); } return(res); }
public Character(string name, CharacterTemplate template) : base(template.Type, template.Essence, template.Willpower, template.PeripheralEssence, template.PersonalEssence, template.HealthLevels, template.Battlegroup) { this.Name = name; this.CurrentInitiative = 0; this.CurrentPeripheralEssence = this.PeripheralEssence; this.CurrentPersonalEssence = this.PersonalEssence; this.CurrentWillPower = this.Willpower; this.CurrentOnslaught = 0; this.CurrentEffects = new List <Effect>(); this.CurrentHealthLevels = new List <KeyValuePair <string, Constants.HealthState> >(); foreach (String level in HealthLevels) { CurrentHealthLevels.Add(new KeyValuePair <String, Constants.HealthState>(level, Constants.HealthState.UNWOUNDED)); } this.HasActedThisRound = false; this.KeepOnslaughtOnAct = false; }