Exemplo n.º 1
0
        //returns the damage of the ability, note this does not include the effect's damage
        public int getDamage()
        {
            int damage = 0;

            if (spell != null)
            {
                damage = spell.getDamage();
                if (damage >= 0)
                {
                    damage += thing.getMagicalAP();
                }
                else
                {
                    damage -= thing.getMagicalAP();
                }
            }
            else if (melee != null)
            {
                damage = melee.getDamage() + thing.getMeleeAP();
            }
            else if (ranged != null)
            {
                damage = ranged.getDamage() + thing.getRangedAP();
            }
            return(damage);
        }