Exemple #1
0
        public Player(string name, int hp, int level, int nextlevel, int xp, int accuracy, int strength, int speed, int gold, List<Item> inventory, Weapon weapon, Armour headArmour, Armour torsoArmour, Armour handArmour, Armour legArmour, Armour feetArmour)
        {
            this.name = name;
            this.hp = this.basemaxhp = hp;
            this.level = level;
            this.nextlevel = nextlevel;
            this.xp = xp;
            this.accuracy = accuracy;
            this.basestrength = strength;
            this.basespeed = speed;
            this.gold = gold;

            this.inventory = inventory;
            this.equipment = new Equipment();

            this.baseDamageReduction = 0;

            this.unique = true;
            this.primaryAbility = new UnarmedAttack(this, DamageType.Crushing, 0, 0, null);

            //adding some items to debug inventory controls:
            for (int i = 1; i < 7; i++)
            {
                inventory.Add(ItemGenerator.CreateItem(i));
            }
        }
Exemple #2
0
        public static Player StartGame(string name)
        {
            List<Item> inventory = new List<Item>();
            inventory.Add(ItemGenerator.CreateItem(7));
            Weapon weapon = new Weapon();
            Armour headArmour = new Armour(ArmourLocation.Head);
            Armour torsoArmour = new Armour(ArmourLocation.Torso);
            Armour handArmour = new Armour(ArmourLocation.Hands);
            Armour legArmour = new Armour(ArmourLocation.Legs);
            Armour feetArmour = new Armour(ArmourLocation.Feet);

            Player player = new Player(name, 10, 1, 100, 0, 80, 3, 7, 1001, inventory, weapon, headArmour, torsoArmour, handArmour, legArmour, feetArmour);
            GameInProgress = true;
            return player;
        }
Exemple #3
0
 public void EquipArmour(Armour armour)
 {
     equippedArmour[armour.Location] = armour;
     this.OnLoadoutChanged();
 }
Exemple #4
0
 public void UnequipArmour(ArmourLocation location)
 {
     equippedArmour[location] = new Armour(location);
     this.OnLoadoutChanged();
 }