/* 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;
        }
Beispiel #2
0
 public ArrayList getAbilityTargets(Ability selectedAbility)
 {
     ArrayList targetlist = new ArrayList();
     for (int i = 0; i < turnOrder.Length; i++)
     {
         if (turnOrder[i].isPlayer && !selectedAbility.AffectEnemy || !turnOrder[i].isPlayer && selectedAbility.AffectEnemy)
         {
             targetlist.Add(turnOrder[i]);
         }
     }
     return targetlist;
 }
Beispiel #3
0
        public void addAbility(Ability ability)
        {
            /* start addAbility */

            mAbilities.Add(ability);
        }
Beispiel #4
0
 public ItemAction(Item itemToUse, Character targetedCharacter)
 {
     usedItem = (Ability)itemToUse;
     specificTarget = targetedCharacter;
 }
Beispiel #5
0
 public ItemAction(Item itemToUse)
 {
     usedItem = (Ability)itemToUse;
 }
 public AbilityAction(Ability abilityToUse, Character targetedCharacter)
 {
     usedAbility = abilityToUse;
     specificTarget = targetedCharacter;
 }
 public AbilityAction(Ability abilityToUse)
 {
     usedAbility = abilityToUse;
 }