Magic.java
jmud-0.11/src/Magic.java · 670 B
From the archive jmud-0_11.tgz
Download the archive « Back to the archive contents
import java.util.StringTokenizer;
abstract class Magic {
static protected Manager theManager = null;
static protected World theWorld = null;
static void setManager(Manager aManager) {
theManager = aManager;
}
static void setWorld(World aWorld) {
theWorld = aWorld;
}
protected String theName;
Magic(String name) {
theName = name;
}
String getName() {
return theName;
}
boolean hasName(String name) {
return getName().startsWith(name);
}
void spellEcho(Char ch, Char vict) {
ch.getPlace().action("$p lança uma magia em $P.", true, ch, vict);
}
abstract void spell(Char ch, StringTokenizer toker);
}