/* start ItemFactory */ public static Item getItem(ItemEnum item) { /* start getItem */ Item items = null; if (item == ItemEnum.HEALTHPOTION) items = new Ability("Heals a character's health by 25%", "Health Potion", Ability.MAGIC, Ability.SINGLETARGET, Ability.HEALING, 25, 0, ItemType.ABILITY); if (item == ItemEnum.MANAPOTION) {/* start if */ items = new Ability("Restores a character's mana by 25%", "Mana Potion", Ability.MAGIC, Ability.HEALING, false, 25, 0, ItemType.ABILITY); items.IsMana = true; }/* end if */ if (item == ItemEnum.GANDALFSSTAFF) items = new Weapon("Gandalf's Staff", "YOU SHALL NOT PASS!", 100, new int[Character.MAXSTATS] { 5, 100, 5, 20 }, ItemType.WEAPON); if (item == ItemEnum.UBERSWORD) items = new Weapon("Uber Sword", "Used to PWN noobs.", 100, new int[Character.MAXSTATS] { 100, 15, 30, 30 }, ItemType.WEAPON); if (item == ItemEnum.BOMB) items = new Ability("Blow up the enemy.", "Bomb", Ability.PHYSICAL, Ability.PARTYTARGET, Ability.DAMAGING, 25, 0, ItemType.ABILITY); return items; }
public Enemy( Armor[] armor, string name, int[] stats, Weapon weapon, int experienceWorth, AI ai, EnemyType type ) : base(armor, name, stats, weapon, ai) { /* start constructor */ mExperienceWorth = experienceWorth; mAI = ai; mIsPlayer = false; mType = type; mAI.Enemy = this; }
public PlayerCharacter( Armor[] armor, string name, int[] stats, Weapon weapon, LevelTract pclass, ClassEnum classes ) : base(armor, name, stats, weapon, pclass) { /* start constructor */ mExperience = 1000; mClass = pclass; mIsPlayer = true; mClassEnum = classes; mClass.LevelUp(1); }
protected Character( Armor[] armor, string name, int[] stats, Weapon weapon, AbilitiesHolder abilities) { /* start constructor */ mArmor = armor; mName = name; mStats = stats; mWeapon = weapon; mAbilities = abilities; mHealth = this.MaximumHealth; mMana = this.MaximumMana; }
private void setBlackMage() { /* start setBlackMage */ mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 1; mStats[(int)StatEnum.MAGIC] = 30; mStats[(int)StatEnum.STAMINA] = 3; mStats[(int)StatEnum.STRENGTH] = 10; mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.BLACKMAGE); mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETRIEDSTAFF); mClass = new BlackMage(mStats); }
public Enemy getDragon() { /* start getDragon */ Random random = new Random(); mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.WARRIOR); mName = "The Dragon"; mType = EnemyType.DRAGON; mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD); mExperienceWorth = 100000; mAi = new Striker(); mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 50 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 50 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 50 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 50 + random.Next(STATVARIANCE); mAi.addAbility( AbilitiesFactory.getInstance().getAbility(AbilitesEnum.BLAZE)); return new Enemy(mArmor, mName, mStats, mWeapon, mExperienceWorth, mAi, mType); }
private void setWarrior() { /* start setWarrior */ mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 15; mStats[(int)StatEnum.MAGIC] = 1; mStats[(int)StatEnum.STAMINA] = 5; mStats[(int)StatEnum.STRENGTH] = 30; mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.WARRIOR); mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD); mClass = new Warrior(mStats); }
private void setTheif() { /* start setTheif */ mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 30; mStats[(int)StatEnum.MAGIC] = 1; mStats[(int)StatEnum.STAMINA] = 3; mStats[(int)StatEnum.STRENGTH] = 15; mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.THIEF); ; mWeapon = WeaponFactory.getWeapon( WeaponEnum.WETRIEDKNIFE ); mClass = new Thief( mStats ); }
private void setRedMage() { /* start setRedMage */ mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 15; mStats[(int)StatEnum.MAGIC] = 10; mStats[(int)StatEnum.STAMINA] = 3; mStats[(int)StatEnum.STRENGTH] = 13; mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.REDMAGE); mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD); mClass = new RedMage(mStats); }
private void setTroll() { /* start setTroll */ Random random = new Random(); mArmor = null; mName = "Troll"; mType = EnemyType.TROLL; mWeapon = WeaponFactory.getWeapon( WeaponEnum.WETIREDSWORD ); mExperienceWorth = 150; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 10 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 6 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 15 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 8 + random.Next(STATVARIANCE); mAi.addAbility( AbilitiesFactory.getInstance().getAbility(AbilitesEnum.STRIKE) ); }
private void setThePredator() { /* start setThePredator */ Random random = new Random(); mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.WARRIOR); mName = "The Predator"; mType = EnemyType.THEPREDATOR; mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD); mExperienceWorth = 250; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 20 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 15 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 30 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 20 + random.Next(STATVARIANCE); }
private void setSpider() { /* start setSpider */ Random random = new Random(); mArmor = null; mName = "Spider"; mType = EnemyType.SPIDER; mWeapon = WeaponFactory.NullWeapon(); mExperienceWorth = 25; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 10 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 2 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 3 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 1 + random.Next(STATVARIANCE); }
private void setLion() { /* start setLion */ Random random = new Random(); mArmor = null; mName = "Lion"; mType = EnemyType.LION; mWeapon = WeaponFactory.NullWeapon(); mExperienceWorth = 125; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 12 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 4 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 13 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 6 + random.Next(STATVARIANCE); }
private void setBear() { /* start setBear */ Random random = new Random(); mArmor = null; mName = "Bear"; mType = EnemyType.BEAR; mWeapon = WeaponFactory.NullWeapon(); mExperienceWorth = 75; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 5 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 4 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 9 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 4 + random.Next(STATVARIANCE); }
private void setGoblin() { /* start setGoblin */ Random random = new Random(); mArmor = ArmorFactory.getInstance().getBasicArmorSet(ClassEnum.WARRIOR); mName = "Goblin"; mType = EnemyType.GOBLIN; mWeapon = WeaponFactory.getWeapon(WeaponEnum.WETIREDSWORD); mExperienceWorth = 800; mStats = new int[Character.MAXSTATS]; mStats[(int)StatEnum.AGILITY] = 10 + random.Next(STATVARIANCE); mStats[(int)StatEnum.MAGIC] = 6 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STRENGTH] = 20 + random.Next(STATVARIANCE); mStats[(int)StatEnum.STAMINA] = 10 + random.Next(STATVARIANCE); }