import java.util.*; public class Grow3 extends GaiasLore { String target; String spellName = "Strength of the mountaion"; int manaCost = 25; int level= 3; String[] targets = {"dragon"}; String description = "The dragons Strength will increase and he will be able to do the most unusual deeds"; /** * 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 "+spellName+"on "+arg); Object o = game.dragons.get(arg); if(o!=null){ Dragon d = (Dragon)o; d.incStr(15); d.incSpd(-5); 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; } }