import java.util.*; public class KillCity1 extends Necromancy { String spellName = "Gift of Stinking Waters"; int manaCost = 15; int level = 1; String description = "This spell contaminates the water supplies of the city. People will get sick..."; 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(-(2+Dice.rand(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; } }