|
|||||||||
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. |
int |
getTitanPower()
|
CreatureType |
getType()
|
boolean |
hasMoved()
|
boolean |
hasStruck()
|
void |
heal()
|
boolean |
isDead()
|
boolean |
isDemiLord()
|
boolean |
isFlier()
|
boolean |
isImmortal()
|
boolean |
isLord()
|
boolean |
isLordOrDemiLord()
|
boolean |
isNativeAt(HazardHexside hexside)
|
boolean |
isNativeIn(HazardTerrain terrain)
|
boolean |
isRangestriker()
|
boolean |
isSummonable()
|
boolean |
isTitan()
|
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()
|
boolean |
wouldDieFrom(int additionalDamage)
|
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 int getTitanPower()
public java.lang.String getMarkerId()
public java.lang.String getName()
public boolean isTitan()
public java.lang.String getDescription()
public BattleHex getStartingHex()
public void setStartingHex(BattleHex hex)
public BattleHex getCurrentHex()
public void setCurrentHex(BattleHex hex)
public void moveToHex(BattleHex hex)
public void commitMove()
public boolean hasMoved()
public void setMoved(boolean moved)
public boolean isDemiLord()
public boolean isFlier()
public boolean isImmortal()
public boolean isLord()
public boolean isLordOrDemiLord()
public boolean isRangestriker()
public boolean useMagicMissile()
public boolean isSummonable()
public boolean isNativeAt(HazardHexside hexside)
public boolean isNativeIn(HazardTerrain terrain)
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 java.lang.String[] getImageNames()
public java.lang.String getPluralName()
public int getMaxCount()
public void heal()
public boolean wouldDieFrom(int additionalDamage)
public int wound(int damage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |