import java.util.*; public class DragonLoc3 extends GaiasLore { String spellName = "Speech of Birds"; int manaCost = 30; int level = 3; String description = "This spell gives you the ability to understand the speech of birds. You will learn all about the areas aound one dragon of your choice."; String[] targets = {"dragon"}; String target; public void cast(Fod game, int playerNr, String arg) { Vector loc = null; Object o = game.dragons.get(arg); //collect areas if(o!=null){ Dragon d = (Dragon)o; loc = Area.getSurroundings(game.Map, (int)d.X_position, (int)d.Y_position, 9); } Enumeration e = loc.elements(); if (e.hasMoreElements()) { Area a = (Area) e.nextElement(); if (!game.players[playerNr].scannedareas.contains(a)) game.players[playerNr].scannedareas.addElement(a); System.out.println("-->Possibly adding area: "+a.x+" "+a.y); } } ////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; } }