Package megamek.common
Class ECMInfo
java.lang.Object
megamek.common.ECMInfo
A class that keeps track of information related to an ECM field.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlliedECMEffects(ECMInfo other) Compute the ECMInfo from another instance into this one, where this ECMInfo contains information about fields allied to the owner.voidaddOpposingECMEffects(ECMInfo other) Compute the ECMInfo from another instance into this one, where this ECMInfo contains information about fields opposed to the owner.booleanintintintintdoublegetOwner()getPos()intgetRange()inthashCode()booleanisAngel()booleanbooleanbooleanisECCM()booleanisECM()booleanisNova()booleanbooleanbooleanvoidsetAngelECCMStrength(int angelECCMStrength) voidsetAngelECMStrength(int angelStrength) voidsetDirection(int direction) voidsetECCMStrength(int eccmStrength) voidsetECMNova(boolean isECMNova) voidvoidvoidvoidsetRange(int range) toString()
-
Constructor Details
-
ECMInfo
public ECMInfo() -
ECMInfo
-
ECMInfo
-
ECMInfo
-
ECMInfo
-
ECMInfo
- Parameters:
range- Range of ECMposition-Coordsfor centerstrength- Strength of ECM
-
-
Method Details
-
isAngel
public boolean isAngel() -
isECCM
public boolean isECCM()- Returns:
- true if this ECMInfo is considered to be ECCM; that is, if the strength of ECCM is greater than the strength of ECCM.
-
isAngelECCM
public boolean isAngelECCM() -
isECM
public boolean isECM()- Returns:
- True if the number of ECM fields is greater than the number of ECCM fields (which default to 0).
-
isAngelECM
public boolean isAngelECM() -
addOpposingECMEffects
Compute the ECMInfo from another instance into this one, where this ECMInfo contains information about fields opposed to the owner. All enemy ECM strength is added, and all allied ECCM strength is added.- Parameters:
other- OtherECMInfoInstance
-
addAlliedECMEffects
Compute the ECMInfo from another instance into this one, where this ECMInfo contains information about fields allied to the owner. All allied ECM strength is added, and all enemy ECCM strength is added.- Parameters:
other- OtherECMInfoInstance
-
toString
-
isOpposed
- Parameters:
other- OtherECMInfoInstance- Returns:
- true if the supplied ECMInfo is opposed to this one.
-
isOpposed
- Parameters:
other- OtherECMInfoInstance- Returns:
- true if the supplied ECMInfo is opposed to this one.
-
equals
-
hashCode
public int hashCode() -
getRange
public int getRange() -
setRange
public void setRange(int range) -
getPos
-
setPos
-
getOwner
-
setOwner
-
getECMStrength
public double getECMStrength() -
getAngelECMStrength
public int getAngelECMStrength() -
setAngelECMStrength
public void setAngelECMStrength(int angelStrength) -
getECCMStrength
public int getECCMStrength() -
setECCMStrength
public void setECCMStrength(int eccmStrength) -
getAngelECCMStrength
public int getAngelECCMStrength() -
setAngelECCMStrength
public void setAngelECCMStrength(int angelECCMStrength) -
getDirection
public int getDirection() -
setDirection
public void setDirection(int direction) -
isNovaECM
public boolean isNovaECM() -
isNova
public boolean isNova() -
setECMNova
public void setECMNova(boolean isECMNova) -
getEntity
-
setEntity
-