|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrl.common.game.elements.GameElement
rl.leviathan.game.elements.CapitalShip
public class CapitalShip
| Nested Class Summary | |
|---|---|
class |
CapitalShip.DamagedSystem
|
static class |
CapitalShip.ShieldStatus
|
class |
CapitalShip.ShieldStatusStruct
|
class |
CapitalShip.WeaponMountStatus
This class captures the information about a weapon mount |
| Nested classes/interfaces inherited from class rl.common.game.elements.GameElement |
|---|
GameElement.StatusPhase |
| Field Summary | |
|---|---|
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
CapitalShip(CapitalShipDesign design,
CapitalShipInternalStructure internalStructure)
|
|
| Method Summary | |
|---|---|
void |
addDamageListener(CapitalShipDamageListener Listener)
|
void |
addFiringListener(CapitalShipFiringListener Listener)
|
void |
addListener(CapitalShipStatusListener cssl)
|
void |
addMovementListener(CapitalShipMovementListener Listener)
|
void |
applyArmourDamage(ShipSide side,
GridReference ref)
|
void |
applyDamageSummary(GameElementDamageSummary geds)
|
void |
applyFiringSummary(GameElementFiringSummary gefs)
function called to apply firing summary to element. |
void |
applyInternalDamage(int gameTurn,
GridReference ref,
ShipSide side)
|
void |
applyMovementSummary(GameElementMovementSummary gems)
applies the summary of movement to the element. |
void |
applyWeaponDamage(int turn,
CapitalShipWeapon w,
ShipSide side,
int range,
int column)
|
GameElementDamageSummary |
calculateStatus(int turn,
GameElement.StatusPhase phase)
|
boolean |
canAllocatePower()
|
boolean |
canFire(int turn)
Returns whether this unit can make a firing attempt on a particular turn |
boolean |
canFireIndirect(int turn)
Returns whether this unit can make an indirect firing attempt on a particular turn |
boolean |
canJumpFTL()
|
boolean |
canManouver()
|
boolean |
canMove(int turn)
returns whether the element can move in a given turn |
boolean |
canRoll()
|
boolean |
canTurnLeft()
|
boolean |
canTurnRight()
|
boolean |
destroyedByExplosion(int turn)
|
java.util.Vector<CapitalShipWeaponMount> |
getAllPointDefenceWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
|
java.util.Vector<CapitalShipWeaponMount> |
getAllWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
|
CapitalShipArmour |
getArmour()
|
int |
getBayWeaponFireControlDamageModifier(CapitalShipWeaponMount cswm)
|
java.util.Vector<CapitalShipWeaponMount> |
getBayWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
|
double |
getDamageSummary(int turn)
|
CapitalShipDesign |
getDesign()
|
java.lang.String |
getElementType()
|
int |
getFireControlDamageModifier(int index)
|
GameElementFiringSummary |
getFiringSummary(int turn)
get a new GameElementFiringSummary object appropriate to the object implementing this interface |
double |
getInternalDamageSummary(int turn)
|
CapitalShipInternalStructure |
getInternalStructure()
|
java.util.Vector<CapitalShipWeaponMount> |
getMissileWeapons(int turn)
|
GameElementMovementSummary |
getMovementSummary(int turn)
return a new GameElementMovementSummary appropriate for the element implementing this interface |
java.lang.String |
getName()
|
CapitalShipPowerAllocation |
getPowerAllocation()
|
int |
getShieldFactor(ShipSide side)
|
CapitalShipWeaponMount |
getSpinalMount(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
|
int |
getThrustForAcceleration()
|
int |
getThrustForManouvering()
|
int |
getTurretFireControlDamageModifier(CapitalShipWeaponMount cswm)
|
java.util.Vector<CapitalShipWeaponMount> |
getTurretWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
|
CapitalShipWeaponMount |
getWeaponMountByIndex(int index)
|
CapitalShip.WeaponMountStatus |
getWeaponMountStatusByIndex(int index)
|
boolean |
hasInternalStructure()
|
boolean |
hasMoved(int turn)
returns whether a unit has moved in a given turn |
boolean |
isDestroyed(int turn)
|
boolean |
isManouverPowerSystemDamaged()
|
boolean |
isShieldOk(ShipSide side)
|
boolean |
isShipDestroyed()
|
boolean |
isWeaponMountDamaged(int index)
|
boolean |
isWeaponMountDestroyed(int index)
|
boolean |
isWeaponMountOk(int index)
|
boolean |
isWeaponPowerSystemDamaged()
|
void |
notifySelectionOfDestroyedShieldRequired(java.util.Vector<ShipSide> sides)
|
int |
powerBlocksAvailable()
|
void |
processDamagedArmourAndInternal()
|
void |
removeDamageListener(CapitalShipDamageListener Listener)
|
void |
removeFiringListener(CapitalShipFiringListener Listener)
|
void |
removeListener(CapitalShipStatusListener cssl)
|
void |
removeMovementListener(CapitalShipMovementListener Listener)
|
void |
setMoved(int turn)
sets the status of an element that has moved in a given turn |
void |
setName(java.lang.String name)
|
void |
setPowerAllocation(CapitalShipPowerAllocation cspa)
|
void |
systemDamaged(CapitalShipSystem system,
int gameTurn,
ShipSide side,
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 |
boolean |
weaponIgnoresShields(int index)
|
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 CapitalShip(CapitalShipDesign design,
CapitalShipInternalStructure internalStructure)
| Method Detail |
|---|
public void addMovementListener(CapitalShipMovementListener Listener)
public void removeMovementListener(CapitalShipMovementListener Listener)
public void addFiringListener(CapitalShipFiringListener Listener)
public void removeFiringListener(CapitalShipFiringListener Listener)
public void addDamageListener(CapitalShipDamageListener Listener)
public void removeDamageListener(CapitalShipDamageListener Listener)
public 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 applyMovementSummary(GameElementMovementSummary gems)
MovementCapableElement
applyMovementSummary in interface MovementCapableElementpublic GameElementMovementSummary getMovementSummary(int turn)
MovementCapableElement
getMovementSummary in interface MovementCapableElementpublic boolean isDestroyed(int turn)
isDestroyed in class GameElementpublic boolean destroyedByExplosion(int turn)
public final CapitalShipInternalStructure getInternalStructure()
public final CapitalShipArmour getArmour()
public void setName(java.lang.String name)
public java.lang.String getName()
getName in class GameElementpublic CapitalShipDesign getDesign()
public java.lang.String getElementType()
getElementType in class GameElementpublic java.lang.String toString()
toString in class GameElementpublic void setPowerAllocation(CapitalShipPowerAllocation cspa)
public CapitalShipPowerAllocation getPowerAllocation()
public void applyArmourDamage(ShipSide side,
GridReference ref)
public void applyInternalDamage(int gameTurn,
GridReference ref,
ShipSide side)
public double getDamageSummary(int turn)
getDamageSummary in class GameElementpublic boolean hasInternalStructure()
hasInternalStructure in class GameElementpublic double getInternalDamageSummary(int turn)
getInternalDamageSummary in class GameElement
public GameElementDamageSummary calculateStatus(int turn,
GameElement.StatusPhase phase)
calculateStatus in class GameElementpublic void applyDamageSummary(GameElementDamageSummary geds)
applyDamageSummary in class GameElementpublic void addListener(CapitalShipStatusListener cssl)
public void removeListener(CapitalShipStatusListener cssl)
public boolean isShipDestroyed()
public boolean isShieldOk(ShipSide side)
public boolean isWeaponPowerSystemDamaged()
public boolean isManouverPowerSystemDamaged()
public boolean canAllocatePower()
public boolean canManouver()
public int getThrustForAcceleration()
public int getThrustForManouvering()
public int powerBlocksAvailable()
public boolean canRoll()
public boolean canTurnLeft()
public boolean canTurnRight()
public boolean canJumpFTL()
public int getShieldFactor(ShipSide side)
public boolean weaponIgnoresShields(int index)
public int getFireControlDamageModifier(int index)
public int getTurretFireControlDamageModifier(CapitalShipWeaponMount cswm)
public int getBayWeaponFireControlDamageModifier(CapitalShipWeaponMount cswm)
public void systemDamaged(CapitalShipSystem system,
int gameTurn,
ShipSide side,
int blockIndex)
public boolean isWeaponMountOk(int index)
public boolean isWeaponMountDamaged(int index)
public boolean isWeaponMountDestroyed(int index)
public CapitalShipWeaponMount getWeaponMountByIndex(int index)
public CapitalShip.WeaponMountStatus getWeaponMountStatusByIndex(int index)
public java.util.Vector<CapitalShipWeaponMount> getAllWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
public java.util.Vector<CapitalShipWeaponMount> getAllPointDefenceWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
public CapitalShipWeaponMount getSpinalMount(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
public java.util.Vector<CapitalShipWeaponMount> getBayWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
public java.util.Vector<CapitalShipWeaponMount> getTurretWeapons(int turn,
java.util.HashMap<ShipSide,java.lang.Integer> sides)
public java.util.Vector<CapitalShipWeaponMount> getMissileWeapons(int turn)
public void notifySelectionOfDestroyedShieldRequired(java.util.Vector<ShipSide> sides)
public void applyWeaponDamage(int turn,
CapitalShipWeapon w,
ShipSide side,
int range,
int column)
public void processDamagedArmourAndInternal()
public void widowArmour()
public 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 firing
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||