import java.util.*; public class KillDragon1 extends Necromancy { String spellName = "Frosty Touch"; int manaCost = 5; int level = 1; String description = "You use the powers of the dead to touch a dragon. The victim will tremble with a shill from hell. Be sure not to chose your own dragon!"; 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<40 ) { //wisdom protects d.Health -= 1+Dice.rand(5); d.Wisdom += 2; } } } ////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; } }