| 1234567891011121314151617181920212223242526272829 |
- using Infrastructure;
- namespace Domain.Weapons;
- public class Bolter : Weapon
- {
- public override int DamageAmount(int successDegree)
- {
- var throws = new List<int>();
- for (var i = 0; i < successDegree; i++)
- {
- var currentThrow = DiceService.RollDices(3, 10);
- throws.Add(currentThrow);
- }
- return throws.Sum() + 5 * successDegree;
- }
- public override int Attack(int bonusCt, int ct, string amo = null, bool? isHorde = null)
- {
- int successDegree;
- var ctDice = ct - DiceService.RollDices(1, 100) + bonusCt;
- if (ctDice > 0)
- successDegree = 1 + Utilities.Round(ctDice, 10);
- else
- successDegree = 0;
- return DamageAmount(successDegree);
- }
- }
|