import java.util.*; public class Animate1 extends Necromancy { String target; String spellName = "Animate Zombie Workers"; int manaCost= 5; int level= 1; String[] targets = {"city"}; String description= "You will cast this spell to wake up the corpses of your dead citizens and make them work for you in your city. Moral may sink when skeletons are walking the streets though."; /** * Should as the string argument take cityname */ public void cast(Fod game, int playerNr, String arg) { System.out.println("Player "+playerNr+" casts "+spellName+" on "+arg); Object o = game.cities.get(arg); if (o != null){ City c = (City)o; c.increasePopulation(5); c.incDev(1); c.incDef(-3); } } ////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; } }