import java.util.*; public class DragonLoc2 extends GaiasLore { String spellName = "Whispers of the Wind"; int manaCost = 30; int level = 2; String description = "Using the power of nature, you collect information about the location of all your enemies' dragons. 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(); while (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; } }