import java.util.*; public class DragonLoc1 extends GaiasLore { String spellName = "Whisper of the Grass"; int manaCost = 5; int level = 1; String description = "Using the power of nature, you collect information about the location of one dragon you do not own. What information you get, is whatever nature chooses to reveal to you, and it may not always be up to date..."; String[] targets = {}; String target; public void cast(Fod game, int playerNr, String arg) { //collect positions Vector loc = new Vector(5,5); Enumeration e = game.dragons.elements(); while(e.hasMoreElements()) { Dragon d = (Dragon)e.nextElement(); if (d.Owner != playerNr) { loc.addElement(d.getArea(game.Map)); } } e = loc.elements(); if (e.hasMoreElements()) { Area a = (Area) e.nextElement(); if (!game.players[playerNr].scannedareas.contains(a)) game.players[playerNr].scannedareas.addElement(a); } } ////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; } }