* @return a int.
     */
    static public int getNeededXDamage(SpellAbility ability) {
        //when targeting a creature, make sure the AI won't overkill on X damage
        Card target = ability.getTargetCard();
        int neededDamage = -1;

        Card c = ability.getSourceCard();

        if (target != null && c.getText().contains("deals X damage to target") && !c.getName().equals("Death Grasp"))
            neededDamage = target.getNetDefense() - target.getDamage();

        return neededDamage;
    }