Example #1
0
 public WeaponStats(string description, DiceRoll damage, int critModifier, int critRangeStart, string imageName)
 {
     Description = description;
     Damage = damage;
     CritModifier = critModifier;
     CritRangeStart = critRangeStart;
     ImageName = imageName;
 }
Example #2
0
 public MonsterData(string identifier, string name, string imageName, DiceRoll hitDice, int initiative, int armorClass, float challengeRating, int attackBonus, WeaponStats weaponStats, List<AreaType> areaTypes, List<string> loot)
     : this()
 {
     Identifier = identifier;
     Name = name;
     BaseImageName = imageName;
     HitDice = hitDice;
     Initiative = initiative;
     ArmorClass = armorClass;
     ChallengeRating = challengeRating;
     AttackModifier = attackBonus;
     WeaponStats = weaponStats;
     AreaTypes = areaTypes;
     Loot = loot;
 }
Example #3
0
 public int Roll(DiceRoll roll)
 {
     int total = 0;
     for (int i = 0; i < roll.Number; ++i)
     {
         total += (int)(random.NextDouble() * roll.Sides) + 1;
     }
     return total + roll.Modifier;
 }