import java.util.*; public class Fake1 extends Illusions { String target; String spellName = "Jest of the Eye"; int manaCost = 25; int level= 2; String[] targets = {"area"}; String description = "You will make up an illusion of a dragon in an Area of your choice."+ " The dragon can however not figth or do anything else"; /** * 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); StringTokenizer tok = new StringTokenizer(arg,"+"); int x = Integer.parseInt(tok.nextToken()); int y = Integer.parseInt(tok.nextToken()); Area a = game.Map[x][y]; if(a!=null){ Dragon d = new Dragon(a); d.fake = true; d.Owner = (short)playerNr; d.Strength = 0; d.Health = 0; d.Speed = 0; d.Perception = 0; d.Wisdom = 0; d.Looks[1] = 0; game.dragons.put(d.name,d); } } ////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; } }