Ejemplo n.º 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)
 {
 }
Ejemplo n.º 2
0
 public ArmorItem(string name, DefenceDice defence,
                  ItemCatagory armorType, Ability[] abilities)
     : base(name, EquipmentType.Armor, abilities,
            new ItemCatagory[1] {
     armorType
 })
 {
     this.DefenceDice = defence;
 }
Ejemplo n.º 3
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>();
 }
Ejemplo n.º 4
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;
 }
Ejemplo n.º 5
0
 public Hero(string name, int move, int health, int stamina,
             DefenceDice defence, int might, int knowledge, int willpower,
             int awareness, int xp = 0)
     : base(name, move, health, new AttackDice(), defence, might,
            knowledge, willpower, awareness)
 {
     this.BaseDefence = defence;
     this.MaxStamina  = stamina;
     this.Stamina     = stamina;
     this.XP          = xp;
 }
Ejemplo n.º 6
0
 private IEnumerable <ArmorItem> IterArmors(string source)
 {
     foreach (string[] tabs in IterFile(source, "armor.tsv"))
     {
         string       name      = tabs[0];
         DefenceDice  defence   = new DefenceDice(tabs[1].Split(','));
         ItemCatagory armorType = ParseCatagories(tabs[2])[0];
         Ability[]    abilities = ParseAbilities(tabs[3]);
         yield return(new ArmorItem(name, defence, armorType, abilities));
     }
 }
Ejemplo n.º 7
0
        public FileDataStore()
        {
            GearFactory gf = new GearFactory("ActI", false);

            MainHand = gf.MainHand;
            OffHand  = gf.OffHand;
            Armor    = gf.Armor;
            Trinket  = gf.Trinket;
            var baseDefence = new DefenceDice(new GreyDie());

            Hero = new Hero("Leoric", 4, 8, 5, baseDefence, 1, 5, 3, 2, 0);
        }
Ejemplo n.º 8
0
        public virtual int RollDefenceDie()
        {
            int    defenceTotal = 0;
            Random rollDie      = new Random();

            //Roll defence dice for the defender and get a defence total
            DefenceDice.ForEach(defenceDie =>
            {
                defenceTotal += (byte)defenceDie.DieFaces[rollDie.Next(0, 5)];
            });

            return(defenceTotal);
        }
Ejemplo n.º 9
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);
        }
Ejemplo n.º 10
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);
        }
Ejemplo n.º 11
0
        public StaticDataStore()
        {
            var baseDefence = new DefenceDice(new GreyDie());

            Hero     = new Hero("Leoric", 4, 8, 5, baseDefence, 1, 5, 3, 2, 0);
            MainHand = GetWeoponItems();
            OffHand  = new List <ShieldItem> {
                new ShieldItem("Standard Shield", new Ability[0])
            };
            Armor = new List <ArmorItem> {
                new ArmorItem("Brown Armor", new DefenceDice(new BrownDie()),
                              ItemCatagory.LightArmor, new Ability[0]),
                new ArmorItem("Grey Armor", new DefenceDice(new GreyDie()),
                              ItemCatagory.MediumArmor, new Ability[0]),
                new ArmorItem("Black Armor", new DefenceDice(new BlackDie()),
                              ItemCatagory.HeavyArmor, new Ability[0])
            };
            var c = new ItemCatagory[] { ItemCatagory.Ring };

            Trinket = new List <TrinketItem> {
                new TrinketItem("Pretty Ring", c, new Ability[0]),
                new TrinketItem("Ugly Ring", c, new Ability[0])
            };
        }
Ejemplo n.º 12
0
 public Monster(string name, int move, int health, AttackDice attack,
                DefenceDice defence) :
     base(name, move, health, attack, defence)
 {
 }