import java.util.*; public class KillCity2 extends Necromancy { String spellName = "Commanding of Vermin"; int manaCost = 15; int level = 2; String description = "You use your black powers to command all the locals vermins to invade the city."; String[] targets = {"city"}; String target; 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; if (c.Development<40 && !c.isHomeCity(game.players)) c.increasePopulation(-(5+Dice.rand(10))); } } ////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; } }