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)); } }
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; }
public void EquipArmour(Armour armour) { equippedArmour[armour.Location] = armour; this.OnLoadoutChanged(); }
public void UnequipArmour(ArmourLocation location) { equippedArmour[location] = new Armour(location); this.OnLoadoutChanged(); }