import java.util.*; public class Grow2 extends GaiasLore { String target; String spellName = "Speed of wind"; int manaCost; int level; String[] targets = {"dragon","city"}; String description; Grow2(){ manaCost = 10; level = 2; description = "The target will be fast as a squirrel running up at tree"; } /** * Should as the string argument take city#cityname or dragon#dragonname */ public void cast(Fod game, int playerNr, String arg) { System.out.println("Player "+playerNr+" casts grow on "+arg); Object o = game.dragons.get(arg); if(o!=null){ Dragon d = (Dragon)o; d.incStr(-1); d.incSpd(3); d.Looks[1] = 1; } o = game.cities.get(arg); if (o != null){ City c = (City)o; c.increasePopulation(1); c.incDev(-1); } } ////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; } }