public int Attack(Unit enemy, int range = 1) { var dice = new Dice.Dice(this.AttackDice, enemy.DefenceDice); DiceOutcome roll = dice.Roll(); int damage = this.ResolveSurges(roll, range); enemy.Health -= damage; // if (resetAbilities) { this.ResetAbilities(); // } return(damage); }
public BaseClass(string classDescription, int primaryAbility, Proficiencies.SavingThrows.SavingThrows savingThrows, Dice.Dice dice, List <ProficiencyBools> armorProficiencies, List <ProficiencyBools> weaponProficiencies, List <ProficiencyBools> toolProficiencies, List <Skill> skills) { #region set input data to local values ClassDescription = classDescription; PrimaryAbility = primaryAbility; SavingThrows = savingThrows; Dice = dice; ArmorProficiencies = armorProficiencies; WeaponProficiencies = weaponProficiencies; ToolProficiencies = toolProficiencies; Skills = skills; #endregion }