public class Ich extends Wesen
Modifier and Type | Field and Description |
---|---|
int |
aktion
Der Typ der Aktion, die der Golem gerade ausführt.
|
int |
erde
Sein Erdvorrat.
|
boolean |
flexiblerAngreifer
Gibt an, ob der Golem beim Angreifen laufen kann.
|
int |
holz
Sein Holzvorrat.
|
int |
id
Die ID des Golems.
|
double |
leben
Die aktuellen Leben des Golems in Prozent.
|
double |
level
Der aktuelle Level des Golems. 1 ist der Startwert.
|
int |
luft
Sein Luftvorrat.
|
double |
reichweite
Gibt die Angriffsreichweite des Golems an.
|
int |
wasser
Sein Wasservorrat.
|
int |
zeit
Die Anzahl der bereits vergangenen Denkzyklen.
|
istFlieger, trifftFlieger
Constructor and Description |
---|
Ich(Golem ich,
double tx,
double ty)
Konstruktor, wird vom Spiel verwendet; nicht benutzen!
|
Modifier and Type | Method and Description |
---|---|
boolean |
antworte(int antwort,
Freund du)
Identisch mit "sage(antwort, du)", falls du nicht null.
|
boolean |
arbeite()
Startet den Abbauprozess einer Ressource.
|
boolean |
attackiere(Feind du)
Greift den verfeindeten Golem an.
|
boolean |
attackiere(Turm rivale)
Greift den verfeindeten Turm an, falls rivale nicht null.
|
void |
gehe(double x,
double y)
Setzt die Laufrichtung des Golems.
|
void |
geheZu(double x,
double y)
Identisch mit "gehe(x - this.x, y - this.y)", aus der Sicht des Denkers also "ich.gehe(x - ich.x, y - ich.y)".
|
void |
geheZu(Interaktionsobjekt o)
Identisch mit "geheZu(o.x, o.y)".
|
void |
geheZuTurm()
Identisch mit "geheZu(0, 0)".
|
boolean |
lege()
Legt alle Rohstoffe im Vorrat ab.
|
boolean |
lege(int h,
int w,
int l,
int e)
Legt die entsprechenden Rohstoffe ab (h: Holz, w: Wasser, l: Luft, e: Erde).
|
boolean |
nehme(int h,
int w,
int l,
int e,
Rohstoff r)
Nimmt die entsprechenden Rohstoffe von einem Rohstoffhaufen und legt sie in seinen Vorrat (h: Holz, w: Wasser, l: Luft, e: Erde).
|
boolean |
nehme(Rohstoff r)
Nimmt alle Rohstoffe von einem Rohstoffhaufen und legt sie in seinen Vorrat.
|
boolean |
sage(int nachricht,
Freund... ihr)
Sendet allen Freunden aus "ihr" eine Nachricht.
|
void |
status(java.lang.String status)
Setzt den Status, der angezeigt wird, wenn man den Golem fokussiert.
|
void |
stehe()
Hält den Golem an.
|
abstand, abstand, abstand
public final int aktion
public final int erde
public final boolean flexiblerAngreifer
public final int holz
public final int id
public final double leben
public final double level
public final int luft
public final double reichweite
public final int wasser
public final int zeit
public Ich(Golem ich, double tx, double ty)
public boolean antworte(int antwort, Freund du)
public boolean arbeite()
public boolean attackiere(Feind du)
public boolean attackiere(Turm rivale)
public void gehe(double x, double y)
public void geheZu(double x, double y)
public void geheZu(Interaktionsobjekt o)
public void geheZuTurm()
public boolean lege()
public boolean lege(int h, int w, int l, int e)
public boolean nehme(int h, int w, int l, int e, Rohstoff r)
public boolean nehme(Rohstoff r)
public boolean sage(int nachricht, Freund... ihr)
public void status(java.lang.String status)
public void stehe()