Example #1
0
 public Henchmen(string name, int move, int health, int stamina,
                 AttackDice attack, DefenceDice defence, int might,
                 int knowledge, int willpower, int awareness)
     : base(name, move, health, attack, defence, might, knowledge,
            willpower, awareness)
 {
 }
Example #2
0
 public Unit(string name, int move, int health, AttackDice attack,
             DefenceDice defence)
 {
     Name             = name;
     Move             = move;
     MaxHealth        = Health = health;
     this.AttackDice  = attack;
     this.DefenceDice = defence;
     Abilities        = new List <Ability>();
 }
Example #3
0
 public EliteUnit(string name, int move, int health, AttackDice attack,
                  DefenceDice defence, int might, int knowledge,
                  int willpower, int awareness) :
     base(name, move, health, attack, defence)
 {
     Might     = might;
     Knowledge = knowledge;
     Willpower = willpower;
     Awareness = awareness;
 }
        public virtual int RollAttackDie()
        {
            int    damageTotal = 0;
            Random rollDie     = new Random();

            //Roll attack dice for the aggressor and get a damage total
            AttackDice.ForEach(attackDie =>
            {
                damageTotal += (byte)attackDie.DieFaces[rollDie.Next(0, 5)];
            });

            return(damageTotal);
        }
Example #5
0
        public virtual void CalculateDiceState()
        {
            AttackDice.Clear();
            AttackDice.AddRange(HeroWeapon.Dice);

            DefenceDice.Clear();
            DefenceDice.AddRange(ChestSlot.Dice);
            DefenceDice.AddRange(FeetSlot.Dice);
            DefenceDice.AddRange(HandSlot.Dice);
            DefenceDice.AddRange(HeadSlot.Dice);
            DefenceDice.AddRange(LegSlot.Dice);
            DefenceDice.AddRange(NecklaceSlot.Dice);
            DefenceDice.AddRange(RingSlot.Dice);
        }
Example #6
0
 private IEnumerable <WeoponItem> IterMainHand(string source)
 {
     foreach (string[] tabs in IterFile(source, "main_hand.tsv"))
     {
         string         name       = tabs[0];
         ItemCatagory[] catagories = ParseCatagories(tabs[1]);
         HandCatagory   type       = (HandCatagory)Enum.Parse(
             typeof(HandCatagory), tabs[2]);
         int        hands     = Int32.Parse(tabs[3]);
         AttackDice attack    = new AttackDice(tabs[4].Split(','));
         Ability[]  abilities = ParseAbilities(tabs[5]);
         yield return(new WeoponItem(name, attack, type, abilities,
                                     catagories, hands));
     }
 }
Example #7
0
        public static Hero GetLeoric()
        {
            var defence = new DefenceDice(new GreyDie());
            var leoric  = new Hero("Leoric", 4, 8, 5, defence, 1, 5, 3, 2, 0);

            var attack    = new AttackDice("blue", "power", "yellow");
            var abilities = new Ability[] {
                new Ability(3, AbilityType.Damage, 2),
                new Ability(1, AbilityType.Damage, 1),
                new Ability(2, AbilityType.Pierce, 1),
                new Ability(2, AbilityType.Range, 1)
            };
            var catagories = new ItemCatagory[] { ItemCatagory.Staff,
                                                  ItemCatagory.Magic };

            WeoponItem fancyStaff = new WeoponItem("Fancy Staff", attack,
                                                   HandCatagory.RangeWeopon, abilities, catagories, 2);

            leoric.Equip(fancyStaff);

            return(leoric);
        }
Example #8
0
 public Monster(string name, int move, int health, AttackDice attack,
                DefenceDice defence) :
     base(name, move, health, attack, defence)
 {
 }
Example #9
0
 public WeoponItem(string name, AttackDice attack, HandCatagory weoponType,
                   Ability[] abilities, ItemCatagory[] catagories, int hands)
     : base(name, abilities, catagories, weoponType, hands)
 {
     this.AttackDice = attack;
 }