|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.Mounted
public class Mounted
This describes equipment mounted on a mech.
| Field Summary | |
|---|---|
protected int |
baseDamageAbsorptionRate
|
protected int |
baseDamageCapacity
|
protected int |
damageTaken
|
static int |
MINE_ACTIVE
|
static int |
MINE_COMMAND_DETONATED
|
static int |
MINE_CONVENTIONAL
|
static int |
MINE_EMP
|
static int |
MINE_INFERNO
|
static int |
MINE_NONE
|
static int |
MINE_VIBRABOMB
|
| Constructor Summary | |
|---|---|
Mounted(Entity entity,
EquipmentType type)
Creates new Mounted |
|
| Method Summary | |
|---|---|
void |
addAmmoToBay(int a)
|
void |
addWeaponToBay(int w)
|
boolean |
ammoInBay(int mAmmoId)
|
boolean |
byShot()
|
boolean |
canFire()
Confirm that the given entity can fire the indicated equipment. |
boolean |
canInstantSwitch(int newMode)
Can the switch from the current mode to the new mode happen instantly? |
void |
changeAmmoType(AmmoType at)
Changing ammo loadouts allows updating AmmoTypes of existing bins. |
void |
clearQuirks()
|
int |
countQuirks()
count all the quirks for this unit, positive and negative |
EquipmentMode |
curMode()
|
int |
getBaseDamageAbsorptionRate()
|
int |
getBaseDamageCapacity()
|
java.util.Vector<java.lang.Integer> |
getBayAmmo()
|
java.util.Vector<java.lang.Integer> |
getBayWeapons()
|
CalledShot |
getCalledShot()
|
int |
getCurrentDamageCapacity(Entity entity,
int location)
Rules say every time a shield is critted it loses 5 points from its Damage Capacity. basically count down from the top then subtract the amount of damage its already take. |
int |
getCurrentHeat()
returns the heat for this weapon taking account of rapid-fire weapon status |
int |
getCurrentShots()
Returns how many shots the weapon is using |
int |
getDamageAbsorption(Entity entity,
int location)
Rules state that every time the shield takes a crit its damage absorption for each attack is reduced by 1. |
int |
getDamageTaken()
|
java.lang.String |
getDesc()
|
Entity |
getEntity()
|
int |
getExplosionDamage()
|
int |
getFoundCrits()
|
Mounted |
getLinked()
|
Mounted |
getLinkedBy()
|
int |
getLocation()
|
int |
getMineType()
|
java.lang.String |
getName()
Shortcut to type.getName() |
int |
getNSantaAnna()
|
int |
getNWeapons()
|
java.lang.String |
getQuirkList(java.lang.String sep)
Returns a string of all the quirk "codes" for this entity, using sep as the separator |
WeaponQuirks |
getQuirks()
|
int |
getSecondLocation()
|
int |
getShotsLeft()
|
EquipmentType |
getType()
|
int |
getVibraSetting()
get the vibrabomb sensitivity |
boolean |
hasChargedCapacitor()
does this Mounted have a linked and charged PPC Capacitor? |
boolean |
isAmmoUsable()
Returns false if this ammo should not be loaded. |
boolean |
isArmored()
|
boolean |
isBodyMounted()
|
boolean |
isBombMounted()
|
boolean |
isBreached()
|
boolean |
isDestroyed()
|
boolean |
isDumping()
|
boolean |
isFired()
|
boolean |
isHit()
|
boolean |
isHotLoaded()
Checks to see if the current ammo for this weapon is hotloaded |
boolean |
isInoperable()
|
boolean |
isJammed()
|
boolean |
isMissing()
|
boolean |
isPendingDump()
|
boolean |
isRapidfire()
|
boolean |
isReady()
|
boolean |
isRearMounted()
|
boolean |
isRepairable()
|
boolean |
isSplit()
|
boolean |
isSplitable()
|
boolean |
isUsedThisRound()
|
boolean |
isWeaponGroup()
|
void |
newRound(int roundNumber)
|
EquipmentMode |
pendingMode()
|
void |
restore()
Restores the equipment from the name |
void |
setArmored(boolean armored)
|
void |
setBodyMounted(boolean bodyMounted)
|
void |
setBombMounted(boolean b)
|
void |
setBreached(boolean breached)
|
void |
setByShot(boolean b)
|
void |
setDestroyed(boolean destroyed)
Set this Mounted's destroyed status NOTE: only set this if this Mounted cannot be used in the current phase anymore. |
void |
setDumping(boolean b)
|
void |
setFired(boolean val)
|
void |
setFoundCrits(int n)
|
void |
setHit(boolean hit)
set that this mounted was or was not hit with a crit this phase Note: stuff that was hit in a phase can still be used in that phase, if that's not desired, use setDestroyed instead |
void |
setHotLoad(boolean hotload)
Sets the hotloading parameter for this weapons ammo. |
void |
setJammed(boolean j)
|
void |
setLinked(Mounted linked)
|
protected void |
setLinkedBy(Mounted linker)
|
void |
setLocation(int location)
|
void |
setLocation(int location,
boolean rearMounted)
|
void |
setMineType(int mineType)
set the type of mine this should be |
void |
setMissing(boolean missing)
|
boolean |
setMode(int newMode)
Sets the equipment mode to the mode denoted by the given mode number |
int |
setMode(java.lang.String newMode)
Sets the equipment mode to the mode denoted by the given mode name |
void |
setNSantaAnna(int n)
|
void |
setNWeapons(int i)
|
void |
setPendingDump(boolean b)
|
void |
setQuirks(WeaponQuirks quirks)
|
void |
setRapidfire(boolean rapidfire)
|
void |
setRepairable(boolean repair)
|
void |
setSecondLocation(int location)
|
void |
setSecondLocation(int location,
boolean rearMounted)
|
void |
setShotsLeft(int shotsLeft)
|
void |
setSplit(boolean b)
|
void |
setUsedThisRound(boolean usedThisRound)
|
void |
setVibraSetting(int vibraSetting)
set the vibrabomb sensitivity |
void |
setWeaponGroup(boolean b)
|
int |
switchMode()
Switches the equipment mode to the next available. |
java.lang.String |
toString()
|
void |
unlink()
|
IGame.Phase |
usedInPhase()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int MINE_NONE
public static final int MINE_CONVENTIONAL
public static final int MINE_VIBRABOMB
public static final int MINE_ACTIVE
public static final int MINE_INFERNO
public static final int MINE_EMP
public static final int MINE_COMMAND_DETONATED
protected int baseDamageAbsorptionRate
protected int baseDamageCapacity
protected int damageTaken
| Constructor Detail |
|---|
public Mounted(Entity entity,
EquipmentType type)
| Method Detail |
|---|
public void changeAmmoType(AmmoType at)
public void restore()
public EquipmentType getType()
public EquipmentMode curMode()
null if it's
not available.public EquipmentMode pendingMode()
public int switchMode()
-1 if it's not available.public int setMode(java.lang.String newMode)
newMode - the name of the desired new mode
-1 otherwise.public boolean setMode(int newMode)
newMode - the number of the desired new modepublic boolean canInstantSwitch(int newMode)
newMode - - integer for the new mode
public void newRound(int roundNumber)
newRound in interface RoundUpdatedpublic java.lang.String getName()
public java.lang.String getDesc()
public boolean isReady()
public boolean isUsedThisRound()
public void setUsedThisRound(boolean usedThisRound)
public IGame.Phase usedInPhase()
public boolean isBreached()
public void setBreached(boolean breached)
public boolean isDestroyed()
public void setDestroyed(boolean destroyed)
destroyed - setHit(boolean)public boolean isInoperable()
public boolean isHit()
public void setHit(boolean hit)
hit - setDestroyed(boolean)public boolean isMissing()
public void setMissing(boolean missing)
public boolean isJammed()
public void setJammed(boolean j)
public int getShotsLeft()
public void setShotsLeft(int shotsLeft)
public int getCurrentShots()
public boolean isPendingDump()
public void setPendingDump(boolean b)
public boolean isDumping()
public void setDumping(boolean b)
public boolean isRapidfire()
public void setRapidfire(boolean rapidfire)
public boolean isHotLoaded()
true if ammo is hotloaded or false
if notpublic void setHotLoad(boolean hotload)
hotload - public boolean hasChargedCapacitor()
Mounted have a linked and charged PPC Capacitor?
public int getLocation()
public int getSecondLocation()
public boolean isRearMounted()
public void setLocation(int location)
public void setSecondLocation(int location)
public void setLocation(int location,
boolean rearMounted)
public void setSecondLocation(int location,
boolean rearMounted)
public Mounted getLinked()
public Mounted getLinkedBy()
public void setLinked(Mounted linked)
protected void setLinkedBy(Mounted linker)
public int getFoundCrits()
public void setFoundCrits(int n)
public boolean isSplit()
public boolean isSplitable()
public void setSplit(boolean b)
public int getExplosionDamage()
public boolean isFired()
public void setFired(boolean val)
public boolean canFire()
true if the equipment can be fired by the entity;
false otherwise.public boolean isAmmoUsable()
public int getMineType()
-1 if it
isn't a minepublic void setMineType(int mineType)
mineType - public void setVibraSetting(int vibraSetting)
vibraSetting - the int sensitivity to setpublic int getVibraSetting()
int vibrabomb sensitity this mine is set to.public java.lang.String toString()
toString in class java.lang.Objectpublic int getBaseDamageAbsorptionRate()
public int getBaseDamageCapacity()
public int getDamageAbsorption(Entity entity,
int location)
entity - location -
public int getCurrentDamageCapacity(Entity entity,
int location)
entity - location -
public int getDamageTaken()
public void addWeaponToBay(int w)
public java.util.Vector<java.lang.Integer> getBayWeapons()
public void addAmmoToBay(int a)
public java.util.Vector<java.lang.Integer> getBayAmmo()
public void setByShot(boolean b)
public boolean byShot()
public boolean isBombMounted()
public void setBombMounted(boolean b)
public boolean ammoInBay(int mAmmoId)
public int getCurrentHeat()
public int getNSantaAnna()
public void setNSantaAnna(int n)
public boolean isBodyMounted()
public void setBodyMounted(boolean bodyMounted)
public boolean isWeaponGroup()
public void setWeaponGroup(boolean b)
public int getNWeapons()
public void setNWeapons(int i)
public void unlink()
public void setArmored(boolean armored)
public boolean isArmored()
public void setQuirks(WeaponQuirks quirks)
public WeaponQuirks getQuirks()
public void clearQuirks()
public int countQuirks()
public java.lang.String getQuirkList(java.lang.String sep)
public CalledShot getCalledShot()
public void setRepairable(boolean repair)
public boolean isRepairable()
public Entity getEntity()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||