|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.colossus.game.Creature
net.sf.colossus.server.CreatureServerSide
net.sf.colossus.gui.ShowCreatureDetails.SimulatedCritter
final class ShowCreatureDetails.SimulatedCritter
helper class to simulate a battle of the creature in question against
an other creature. especially distance and hazard must be simulated.
very fragile class, i suppose. but it might be worth it.
TODO this gets harder and harder to maintain the more typesafe the model gets.
Figure out what it is really good for and solve the actual problem. Currently
it even causes assertion errors since it passes nulls where nulls aren't allowed.
TODO this is the only reference to CreatureServerSide
left in the client
code and it probably doesn't need the specific model. If this should stay, it
should probably changed to use Creature
instead.
Field Summary | |
---|---|
private ShowCreatureDetails.SimulatedBattleHex |
hex
catch calls to "underlying" battle hex and proxy it to this. |
Fields inherited from class net.sf.colossus.game.Creature |
---|
IMPORTANCE_ORDER, legion |
Constructor Summary | |
---|---|
ShowCreatureDetails.SimulatedCritter(CreatureType creature)
in hazard Plains. |
|
ShowCreatureDetails.SimulatedCritter(CreatureType creature,
HazardTerrain hazard)
|
Method Summary | |
---|---|
protected int |
countBrambleHexes(BattleHex targetHex)
Deprecated. another function with explicit reference to Bramble that should be fixed. |
BattleHex |
getCurrentHex()
prox to simulated hex. |
java.awt.Color |
getHazardColor()
color of hex i stand on. |
java.awt.Color |
getHexsideColor()
|
int |
getSimulatedDiceCount(Creature target)
power of this creature hitting target. |
int |
getSimulatedStrikeNr(Creature target)
skill of this creature hitting target. |
protected boolean |
isInContact(boolean countDead)
fake -- true or false as wished. |
void |
setHexsideHazard(HazardHexside hexside)
|
void |
setNewHazardHex(HazardTerrain hazard)
create the simulated hex. |
Methods inherited from class net.sf.colossus.server.CreatureServerSide |
---|
getDice, getStrikeNumber, hashCode, toString |
Methods inherited from class net.sf.colossus.game.Creature |
---|
commitMove, getDescription, getHits, getImageNames, getLegion, getMarkerId, getMaxCount, getName, getPlayer, getPluralName, getPointValue, getPower, getSkill, getStartingHex, getStrikingPower, getStrikingSkill, getType, hasMoved, hasStruck, heal, isDead, isDemiLord, isFlier, isImmortal, isLord, isLordOrDemiLord, isNativeBramble, isNativeDune, isNativeHexside, isNativeRiver, isNativeSlope, isNativeStone, isNativeTerrain, isNativeVolcano, isRangestriker, isSummonable, isTitan, isWaterDwelling, moveToHex, setCurrentHex, setDead, setHits, setMoved, setStartingHex, setStruck, useMagicMissile, wound |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private ShowCreatureDetails.SimulatedBattleHex hex
Constructor Detail |
---|
ShowCreatureDetails.SimulatedCritter(CreatureType creature, HazardTerrain hazard)
creature
- to create a critter forhazard
- that stands in this hazardShowCreatureDetails.SimulatedCritter(CreatureType creature)
Method Detail |
---|
public void setNewHazardHex(HazardTerrain hazard)
public void setHexsideHazard(HazardHexside hexside)
public int getSimulatedDiceCount(Creature target)
public int getSimulatedStrikeNr(Creature target)
public java.awt.Color getHazardColor()
public java.awt.Color getHexsideColor()
public BattleHex getCurrentHex()
getCurrentHex
in class Creature
protected boolean isInContact(boolean countDead)
isInContact
in class CreatureServerSide
@Deprecated protected int countBrambleHexes(BattleHex targetHex)
countBrambleHexes
in class CreatureServerSide
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |