|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrl.common.game.elements.GameElement
rl.common.game.elements.Vehicle
public class Vehicle
| Nested Class Summary | |
|---|---|
static class |
Vehicle.Compartment
|
static class |
Vehicle.CrewStatus
|
class |
Vehicle.DamagedSystem
This class captures the information around a damaged internal system |
class |
Vehicle.EquipmentMountStatus
This class captures the information about an equipment mount |
class |
Vehicle.MultiBlockSystemStatus
This class captures the information about a system that has more than one internal block and the statuses of those blocks |
static class |
Vehicle.Side
|
| Nested classes/interfaces inherited from class rl.common.game.elements.GameElement |
|---|
GameElement.StatusPhase |
| Field Summary | |
|---|---|
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
Vehicle(VehicleDesign design,
VehicleInternalStructureTemplate internalStructureTemplate)
|
|
| Method Summary | |
|---|---|
void |
addDamageListener(VehicleDamageListener Listener)
|
void |
addFiringListener(VehicleFiringListener Listener)
|
void |
addMovementListener(VehicleMovementListener Listener)
|
void |
addPaintingListener(VehiclePaintingListener Listener)
|
void |
applyCrashDamage(int damage,
int turn)
|
void |
applyDamageSummary(GameElementDamageSummary geds)
|
void |
applyFiringSummary(GameElementFiringSummary gefs)
function called to apply firing summary to element. |
void |
applyGroundingDamage(int damage,
int turn)
|
void |
applyMovementSummary(GameElementMovementSummary gems)
applies the summary of movement to the element. |
void |
applyPaintingSummary(GameElementPaintingSummary geps)
This routine will synch the painting summary information from the element on the server to the one on the client. |
void |
applyWeaponDamage(int turn,
WeaponDamageTemplate wdt,
Vehicle.Side side,
int column)
|
GameElementDamageSummary |
calculateStatus(int turn,
GameElement.StatusPhase phase)
|
boolean |
canCallArtillery()
|
boolean |
canFire(int turn)
Returns whether this unit can make a firing attempt on a particular turn |
boolean |
canFireDiggingCannon()
|
boolean |
canFireHull1Weapons()
|
boolean |
canFireHull2Weapons()
|
boolean |
canFireIndirect(int turn)
Returns whether this unit can make an indirect firing attempt on a particular turn |
boolean |
canFireTurretWeapons()
|
boolean |
canMove(int turn)
returns whether the element can move in a given turn |
boolean |
canPaint(int turn)
Returns whether this unit can make a painting attempt on a particular turn |
boolean |
canTurnLeft()
|
boolean |
canTurnRight()
|
boolean |
canUseOtherPainting()
|
boolean |
destroyedByExplosion()
|
java.util.Vector<EquipmentMount> |
getAllHullWeapons(int turn,
int range)
|
java.util.Vector<EquipmentMount> |
getAllWeapons(int turn,
int range)
|
VehicleArmour |
getArmour()
|
Vehicle.CrewStatus |
getCommanderStatus()
|
int |
getDamageGunneryModifier()
|
double |
getDamageSummary(int turn)
|
VehicleDesign |
getDesign()
|
Vehicle.CrewStatus |
getDriverStatus()
|
java.lang.String |
getElementType()
|
java.util.Vector<Vehicle.EquipmentMountStatus> |
getEquipmentMountStatuses()
|
GameElementFiringSummary |
getFiringSummary(int turn)
get a new GameElementFiringSummary object appropriate to the object implementing this interface |
Vehicle.CrewStatus |
getGunnerStatus()
|
java.util.Vector<EquipmentMount> |
getHull1Weapons(int turn,
int range)
|
java.util.Vector<EquipmentMount> |
getHull2Weapons(int turn,
int range)
|
java.util.Vector<EquipmentMount> |
getIndirectWeapons(EquipmentMount.EquipmentLocation location,
int turn,
int range)
|
int |
getInfantryCompartmentCellsDestroyed(int turn)
|
double |
getInternalDamageSummary(int turn)
|
VehicleInternalStructure |
getInternalStructure()
|
int |
getMaximumPaintingRange()
Returns the maximum range at which this element can paint a target |
int |
getMaximumWeaponRange(java.util.Vector<EquipmentMount> weapons)
|
GameElementMovementSummary |
getMovementSummary(int turn)
return a new GameElementMovementSummary appropriate for the element implementing this interface |
java.lang.String |
getName()
|
GameElementPaintingSummary |
getPaintingSummary(int turn)
returns a new GameElementPaintingSummary appropriate to the object implementing this interface |
java.util.Vector<EquipmentMount> |
getPointDefenceWeapons(int turn)
|
int |
getShieldModifier(Vehicle.Side side)
|
int |
getShieldModifier(VehicleSystem vehicleSystem,
Vehicle.Side vehicleSide)
|
int |
getThrust()
|
java.util.Vector<EquipmentMount> |
getTurretWeapons(int turn,
int range)
|
java.lang.String |
getUnitType()
|
EquipmentMount |
getWeaponMountByIndex(int index)
|
java.util.Vector<EquipmentMount> |
getWeapons(EquipmentMount.EquipmentLocation location,
int turn,
int range)
|
void |
handleGeneralSystemDamaged(int gameTurn,
VehicleSystem system)
|
void |
handleShieldSystemDamaged(int gameTurn,
VehicleSystem system,
Vehicle.Side side,
int blockIndex)
|
void |
handleTSRSystemDamaged(int gameTurn,
int blockIndex)
|
boolean |
hasGravDriveFailed(int turn)
|
boolean |
hasInternalStructure()
|
boolean |
hasMoved(int turn)
returns whether a unit has moved in a given turn |
boolean |
hasPainted(int turn)
Returns whether this unit made a painting attempt on a particular turn |
boolean |
isDestroyed(int turn)
|
boolean |
isGravElement()
|
boolean |
isInfantryCompartmentDestroyed(int turn)
|
boolean |
isTSROk()
|
void |
processDamagedArmourAndInternal()
|
void |
removeDamageListener(VehicleDamageListener Listener)
|
void |
removeFiringListener(VehicleFiringListener Listener)
|
void |
removeMovementListener(VehicleMovementListener Listener)
|
void |
removePaintingListener(VehiclePaintingListener Listener)
|
void |
setCrashed(int turn)
Called when the vehicle has exceeded the speed limit and failed the piloting check |
void |
setGrounded(int turn)
Called when the vehicle is grounded either voluntarily or involuntarily |
void |
setMadePaintingAttempt(int turn)
Sets that this unit has made a painting attempt on this turn |
void |
setMoved(int turn)
sets the status of an element that has moved in a given turn |
void |
systemDamaged(VehicleSystem system,
int gameTurn,
int blockIndex)
|
java.lang.String |
toString()
|
void |
weaponFired(java.lang.String weaponName,
java.lang.String ammoType,
int weaponIndex)
This is called when an element fires a weapon |
void |
widowArmour()
|
| Methods inherited from class rl.common.game.elements.GameElement |
|---|
equals, getID, getIdentifier, getUnit, hashCode, setUnit |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
| Constructor Detail |
|---|
public Vehicle(VehicleDesign design,
VehicleInternalStructureTemplate internalStructureTemplate)
| Method Detail |
|---|
public java.lang.String getName()
getName in class GameElementpublic boolean isGravElement()
public VehicleDesign getDesign()
public java.lang.String getUnitType()
public void addMovementListener(VehicleMovementListener Listener)
public void removeMovementListener(VehicleMovementListener Listener)
public void addPaintingListener(VehiclePaintingListener Listener)
public void removePaintingListener(VehiclePaintingListener Listener)
public void addFiringListener(VehicleFiringListener Listener)
public void removeFiringListener(VehicleFiringListener Listener)
public void addDamageListener(VehicleDamageListener Listener)
public void removeDamageListener(VehicleDamageListener Listener)
public java.lang.String toString()
toString in class GameElementpublic java.lang.String getElementType()
getElementType in class GameElementpublic final VehicleInternalStructure getInternalStructure()
public final VehicleArmour getArmour()
public boolean isDestroyed(int turn)
isDestroyed in class GameElementpublic boolean hasGravDriveFailed(int turn)
public int getThrust()
public boolean canTurnLeft()
public boolean canTurnRight()
public boolean canCallArtillery()
public int getDamageGunneryModifier()
public int getShieldModifier(Vehicle.Side side)
public boolean canFireTurretWeapons()
public boolean canFireHull1Weapons()
public boolean canFireHull2Weapons()
public boolean canUseOtherPainting()
public boolean isTSROk()
public boolean canFireDiggingCannon()
public Vehicle.CrewStatus getCommanderStatus()
public Vehicle.CrewStatus getDriverStatus()
public Vehicle.CrewStatus getGunnerStatus()
public boolean destroyedByExplosion()
public java.util.Vector<EquipmentMount> getAllWeapons(int turn,
int range)
public java.util.Vector<EquipmentMount> getTurretWeapons(int turn,
int range)
public java.util.Vector<EquipmentMount> getAllHullWeapons(int turn,
int range)
public java.util.Vector<EquipmentMount> getHull1Weapons(int turn,
int range)
public java.util.Vector<EquipmentMount> getHull2Weapons(int turn,
int range)
public java.util.Vector<EquipmentMount> getWeapons(EquipmentMount.EquipmentLocation location,
int turn,
int range)
public java.util.Vector<EquipmentMount> getIndirectWeapons(EquipmentMount.EquipmentLocation location,
int turn,
int range)
public java.util.Vector<EquipmentMount> getPointDefenceWeapons(int turn)
public int getMaximumWeaponRange(java.util.Vector<EquipmentMount> weapons)
public EquipmentMount getWeaponMountByIndex(int index)
public GameElementDamageSummary calculateStatus(int turn,
GameElement.StatusPhase phase)
calculateStatus in class GameElement
public int getShieldModifier(VehicleSystem vehicleSystem,
Vehicle.Side vehicleSide)
public void systemDamaged(VehicleSystem system,
int gameTurn,
int blockIndex)
public void handleGeneralSystemDamaged(int gameTurn,
VehicleSystem system)
public void handleShieldSystemDamaged(int gameTurn,
VehicleSystem system,
Vehicle.Side side,
int blockIndex)
public void handleTSRSystemDamaged(int gameTurn,
int blockIndex)
public java.util.Vector<Vehicle.EquipmentMountStatus> getEquipmentMountStatuses()
public void applyWeaponDamage(int turn,
WeaponDamageTemplate wdt,
Vehicle.Side side,
int column)
public void applyCrashDamage(int damage,
int turn)
public void applyGroundingDamage(int damage,
int turn)
public void processDamagedArmourAndInternal()
public void widowArmour()
public void applyDamageSummary(GameElementDamageSummary geds)
applyDamageSummary in class GameElementpublic boolean hasInternalStructure()
hasInternalStructure in class GameElementpublic double getDamageSummary(int turn)
getDamageSummary in class GameElementpublic double getInternalDamageSummary(int turn)
getInternalDamageSummary in class GameElementpublic boolean canMove(int turn)
MovementCapableElement
canMove in interface MovementCapableElementpublic boolean hasMoved(int turn)
MovementCapableElement
hasMoved in interface MovementCapableElementpublic void setMoved(int turn)
MovementCapableElement
setMoved in interface MovementCapableElementpublic void setCrashed(int turn)
turn - public void setGrounded(int turn)
turn - public GameElementMovementSummary getMovementSummary(int turn)
MovementCapableElement
getMovementSummary in interface MovementCapableElementpublic void applyMovementSummary(GameElementMovementSummary gems)
MovementCapableElement
applyMovementSummary in interface MovementCapableElementpublic boolean canPaint(int turn)
PaintingCapableElement
canPaint in interface PaintingCapableElementpublic boolean hasPainted(int turn)
PaintingCapableElement
hasPainted in interface PaintingCapableElementpublic void setMadePaintingAttempt(int turn)
PaintingCapableElement
setMadePaintingAttempt in interface PaintingCapableElementpublic int getMaximumPaintingRange()
PaintingCapableElement
getMaximumPaintingRange in interface PaintingCapableElementpublic GameElementPaintingSummary getPaintingSummary(int turn)
PaintingCapableElement
getPaintingSummary in interface PaintingCapableElementpublic void applyPaintingSummary(GameElementPaintingSummary geps)
PaintingCapableElement
applyPaintingSummary in interface PaintingCapableElementpublic boolean canFire(int turn)
FiringCapableElement
canFire in interface FiringCapableElementturn - The turn that we're checking the element can fire
public boolean canFireIndirect(int turn)
FiringCapableElement
canFireIndirect in interface FiringCapableElementturn - The turn that we're checking the element can fire indirectly
public GameElementFiringSummary getFiringSummary(int turn)
FiringCapableElement
getFiringSummary in interface FiringCapableElementpublic void applyFiringSummary(GameElementFiringSummary gefs)
FiringCapableElement
applyFiringSummary in interface FiringCapableElementgefs - Applies all of the firing information contained in the GameElementFiringSummary.
This is primarily used to capture ammunition expenditure
public void weaponFired(java.lang.String weaponName,
java.lang.String ammoType,
int weaponIndex)
FiringCapableElement
weaponFired in interface FiringCapableElementweaponName - The name of the weapon system firingammoType - The ammo type used in the firing attemptweaponIndex - The index of the weapon system firingpublic boolean isInfantryCompartmentDestroyed(int turn)
public int getInfantryCompartmentCellsDestroyed(int turn)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||