|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colossus.game.Creature
public class Creature
A particular creature in a game. This represents a creature in a game, such as a specific Cyclops as part of a legion. TODO it should include the state for battles, i.e. the damage taken so far. Currently that happens only on the server side.
Field Summary | |
---|---|
private BattleHex |
currentHex
|
private int |
hits
Damage taken |
static java.util.Comparator<Creature> |
IMPORTANCE_ORDER
Implements an order on Critters by some definition of importance. |
protected Legion |
legion
|
private static java.util.logging.Logger |
LOGGER
|
private BattleHex |
startingHex
|
private boolean |
struck
|
private CreatureType |
type
|
Constructor Summary | |
---|---|
Creature(CreatureType type,
Legion legion)
|
Method Summary | |
---|---|
void |
commitMove()
|
BattleHex |
getCurrentHex()
|
java.lang.String |
getDescription()
|
int |
getHits()
|
java.lang.String[] |
getImageNames()
|
Legion |
getLegion()
|
java.lang.String |
getMarkerId()
|
int |
getMaxCount()
|
java.lang.String |
getName()
|
Player |
getPlayer()
|
java.lang.String |
getPluralName()
|
int |
getPointValue()
|
int |
getPower()
|
int |
getSkill()
|
BattleHex |
getStartingHex()
|
int |
getStrikingPower(Creature target,
int myElevation,
int targetElevation,
HazardTerrain myHexTerrain,
HazardTerrain targetHexTerrain,
HazardHexside myHexside,
HazardHexside targetHexside)
Calculates the Striking Power of this Creature when striking directly at target under the circumstances in parameters. |
int |
getStrikingSkill(Creature target,
int myElevation,
int targetElevation,
HazardTerrain myHexTerrain,
HazardTerrain targetHexTerrain,
HazardHexside myHexside,
HazardHexside targetHexside)
Calculates the Striking Skill of this Creature when striking directly at target under the circumstances in parameters. |
CreatureType |
getType()
|
boolean |
hasMoved()
|
boolean |
hasStruck()
|
void |
heal()
|
boolean |
isDead()
|
boolean |
isDemiLord()
|
boolean |
isFlier()
|
boolean |
isImmortal()
|
boolean |
isLord()
|
boolean |
isLordOrDemiLord()
|
boolean |
isNativeBramble()
Deprecated. all isNative |
boolean |
isNativeDune()
|
boolean |
isNativeHexside(HazardHexside hazard)
|
boolean |
isNativeRiver()
|
boolean |
isNativeSlope()
|
boolean |
isNativeStone()
Deprecated. all isNative |
boolean |
isNativeTerrain(HazardTerrain t)
|
boolean |
isNativeVolcano()
Deprecated. all isNative |
boolean |
isRangestriker()
|
boolean |
isSummonable()
|
boolean |
isTitan()
|
boolean |
isWaterDwelling()
Deprecated. |
void |
moveToHex(BattleHex hex)
|
void |
setCurrentHex(BattleHex hex)
|
void |
setDead(boolean dead)
|
void |
setHits(int hits)
|
void |
setMoved(boolean moved)
|
void |
setStartingHex(BattleHex hex)
|
void |
setStruck(boolean struck)
|
boolean |
useMagicMissile()
|
int |
wound(int damage)
Apply damage to this critter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.util.Comparator<Creature> IMPORTANCE_ORDER
private static final java.util.logging.Logger LOGGER
private final CreatureType type
protected Legion legion
private BattleHex currentHex
private BattleHex startingHex
private int hits
private boolean struck
Constructor Detail |
---|
public Creature(CreatureType type, Legion legion)
Method Detail |
---|
public CreatureType getType()
public int getStrikingPower(Creature target, int myElevation, int targetElevation, HazardTerrain myHexTerrain, HazardTerrain targetHexTerrain, HazardHexside myHexside, HazardHexside targetHexside)
target
- The Creature that is struck by the current CreaturemyElevation
- Height of the Hex on which stands the current CreaturetargetElevation
- Height of the hex on which stands the target CreaturemyHexTerrain
- Type of Hazard of the current HextargetHexTerrain
- Type of Hazard of the target hexmyHexside
- Type of hexside hazard between the current hex and the target hextargetHexside
- Type of hexside hazard between the target hex and the current hex
public int getStrikingSkill(Creature target, int myElevation, int targetElevation, HazardTerrain myHexTerrain, HazardTerrain targetHexTerrain, HazardHexside myHexside, HazardHexside targetHexside)
target
- The Creature that is struck by the current CreaturemyElevation
- Height of the Hex on which stands the current CreaturetargetElevation
- Height of the hex on which stands the target CreaturemyHexTerrain
- Type of Hazard of the current HextargetHexTerrain
- Type of Hazard of the target hexmyHexside
- Type of hexside hazard between the current hex and the target hextargetHexside
- Type of hexside hazard between the target hex and the current hex
public Legion getLegion()
public Player getPlayer()
public int getPower()
public java.lang.String getMarkerId()
public boolean isTitan()
public BattleHex getCurrentHex()
public java.lang.String getDescription()
public BattleHex getStartingHex()
public void setCurrentHex(BattleHex hex)
public void setStartingHex(BattleHex hex)
public java.lang.String getName()
public void moveToHex(BattleHex hex)
public boolean isDemiLord()
public boolean isFlier()
public boolean isImmortal()
public boolean isLord()
public boolean isLordOrDemiLord()
public boolean isNativeHexside(HazardHexside hazard)
public boolean isNativeTerrain(HazardTerrain t)
public boolean isRangestriker()
public boolean isSummonable()
public int getPointValue()
public int getSkill()
public int getHits()
public boolean hasStruck()
public void setHits(int hits)
public void setStruck(boolean struck)
public boolean isDead()
public void setDead(boolean dead)
public boolean hasMoved()
public void setMoved(boolean moved)
public java.lang.String[] getImageNames()
public int getMaxCount()
public java.lang.String getPluralName()
public void heal()
@Deprecated public boolean isNativeBramble()
public boolean isNativeDune()
public boolean isNativeRiver()
public boolean isNativeSlope()
@Deprecated public boolean isNativeStone()
@Deprecated public boolean isNativeVolcano()
@Deprecated public boolean isWaterDwelling()
public boolean useMagicMissile()
public int wound(int damage)
public void commitMove()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |