public Player(String name, int health, int x, int y) : base(name, health, x, y, true) { ammo = new CappedStatistic("ammo", 0); this.width = 32; this.height = 32; strength = new Statistic("strength", 0); intelligence = new Statistic("intelligence", 0); credits = new CappedStatistic("credits", 500); // stamina = new Statistic("stamina", 0); speed = new Statistic("speed", 0); wisdom = new Statistic("wisdom", 0); playerClass = PlayerClass.ROGUE; EquippableItem shirt = (EquippableItem)ItemFactoryManager.getInstance().createEquippableItem("Shirt.xml"); EquippableItem pants = (EquippableItem)ItemFactoryManager.getInstance().createEquippableItem("Pants.xml"); EquippableItem boots = (EquippableItem)ItemFactoryManager.getInstance().createEquippableItem("Boots.xml"); EquippableItem helm = (EquippableItem)ItemFactoryManager.getInstance().createEquippableItem("Helm.xml"); Weapon weapon = (Weapon)ItemFactoryManager.getInstance().createWeapon(); this.chest = this.boots = this.helm = this.weapon = this.legs = ""; weapon.addUsableEffect(new TimedEffectTest(weapon, 7 * 1000, 2 * 1000)); getAmmo().setMaxValue(120); getAmmo().setValue(16); credits.setValue(0); setIntelligenceValue(5); setWisdomValue(7); setStrengthValue(8); this.add(shirt); this.add(pants); this.add(boots); this.add(helm); this.add(weapon); equipItem(shirt); equipItem(pants); equipItem(boots); equipItem(helm); equipItem(weapon); }
public Weapon(String hash, string name, CappedStatistic durability, Statistic attack, Statistic speed) : base(hash,name,durability, EquipSlot.UNDEFINED) { this.attack = attack; this.speed = speed; }
public Weapon(String name, string hash, int durability, int attack, int speed) : base(name, hash, durability) { this.attack = new Statistic("attack", attack); this.speed = new Statistic("speed", speed); }