import java.util.*; public class KillDragon3 extends Necromancy { String spellName = "Hand of Death"; int manaCost = 25; int level = 3; String description = "You use the powers of the dead to reach for the heart of a dragon, and then you slowly cruch its heart..."; String[] targets = {"dragon"}; String target; public void cast(Fod game, int playerNr, String arg) { System.out.println("-->Player "+playerNr+" casts "+spellName+" on "+arg); Object o = game.dragons.get(arg); if(o!=null){ Dragon d = (Dragon)o; if (d.Wisdom<60 ) { //wisdom protects d.Health -= 5 + Dice.rand(10); d.Wisdom += 5; } } } ////Primitves public String getSpellName(){ return spellName; } public String getDescription(){ return description; } public int getManaCost(){ return manaCost; } public int getLevel(){ return level; } public String[] getTargetProfile(){ return targets; } public String getTarget(){ return target; } public String setTarget(String t){ target = t; return target; } }