megamek.common
Class INarcPod
java.lang.Object
megamek.common.INarcPod
- All Implemented Interfaces:
- java.io.Serializable, Targetable
public class INarcPod
- extends java.lang.Object
- implements java.io.Serializable, Targetable
- Author:
- Sebastian Brocks This class represents an iNarc pod attached to an
entity. This class is immutable. Once it is created, it can not be
changed. An iNarc pod can be targeted for a "brush off" attack.
- See Also:
- Serialized Form
| Fields inherited from interface megamek.common.Targetable |
TYPE_BLDG_IGNITE, TYPE_BUILDING, TYPE_ENTITY, TYPE_FLARE_DELIVER, TYPE_FUEL_TANK, TYPE_FUEL_TANK_IGNITE, TYPE_HEX_AERO_BOMB, TYPE_HEX_ARTILLERY, TYPE_HEX_BOMB, TYPE_HEX_CLEAR, TYPE_HEX_EXTINGUISH, TYPE_HEX_IGNITE, TYPE_HEX_SCREEN, TYPE_INARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SEARCHLIGHT |
|
Constructor Summary |
INarcPod(int team,
int type,
int location)
Creates a new INarcPod, from the team and of the type
specified. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
HOMING
public static final int HOMING
- See Also:
- Constant Field Values
ECM
public static final int ECM
- See Also:
- Constant Field Values
HAYWIRE
public static final int HAYWIRE
- See Also:
- Constant Field Values
NEMESIS
public static final int NEMESIS
- See Also:
- Constant Field Values
INarcPod
public INarcPod(int team,
int type,
int location)
- Creates a new
INarcPod, from the team and of the type
specified.
getTeam
public int getTeam()
getType
public int getType()
getLocation
public int getLocation()
equals
public boolean equals(java.lang.Object other)
- Determine if the other object is an equivalent INarc pod. Overrides
Object#equals(Object).
- Overrides:
equals in class java.lang.Object
- Parameters:
other - the other Object which may be an equivalent
INarc pod.
- Returns:
true if the other object matches this one,
false otherwise.
toString
public java.lang.String toString()
- Get a
String representing this INarc pod. Overrides
Object#toString().
- Overrides:
toString in class java.lang.Object
- Returns:
- a
String that represents this INarc pod.
idToInstance
public static INarcPod idToInstance(int id)
- Create a new iNarc pod that is equivalent to the given ID.
- Parameters:
id - the int ID of the iNarc pod.
- Returns:
- a new
INarcPod that matches the ID.
getTargetType
public int getTargetType()
- Specified by:
getTargetType in interface Targetable
getTargetId
public int getTargetId()
- Specified by:
getTargetId in interface Targetable
getPosition
public Coords getPosition()
- Specified by:
getPosition in interface Targetable
- Returns:
- the coordinates of the hex containing the target
absHeight
public int absHeight()
- Specified by:
absHeight in interface Targetable
- Returns:
- elevation of the top (e.g. torso) of the target relative to
surface
getHeight
public int getHeight()
- Specified by:
getHeight in interface Targetable
- Returns:
- height of the target in elevation levels
getElevation
public int getElevation()
- Specified by:
getElevation in interface Targetable
- Returns:
- elevation of the bottom (e.g. legs) of the target relative to
surface
isImmobile
public boolean isImmobile()
- Specified by:
isImmobile in interface Targetable
- Returns:
- true if the target is immobile (-4 to hit)
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName in interface Targetable
- Returns:
- name of the target for ui purposes
sideTable
public int sideTable(Coords src)
- Specified by:
sideTable in interface Targetable
- Returns:
- side hit from location
sideTable
public int sideTable(Coords src,
boolean usePrior)
- Specified by:
sideTable in interface Targetable
- Returns:
- side hit from location
isOffBoard
public boolean isOffBoard()
- Specified by:
isOffBoard in interface Targetable
- Returns:
- if this is off the board
isAirborne
public boolean isAirborne()
- Specified by:
isAirborne in interface Targetable
- Returns:
- Is the entity airborne in the fashion of an aerospace unit?
Does not include VTOL movement (see
Targetable.isAirborneVTOL()
isAirborneVTOL
public boolean isAirborneVTOL()
- Specified by:
isAirborneVTOL in interface Targetable
- Returns:
- is the entity airborne in the fashion of a VTOL
Not used for aerospace units, see
Targetable.isAirborne()
getAltitude
public int getAltitude()
- Specified by:
getAltitude in interface Targetable
- Returns:
- altitude of target