|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.LosEffects
public class LosEffects
Keeps track of the cumulative effects of intervening terrain on LOS
| Nested Class Summary | |
|---|---|
static class |
LosEffects.AttackInfo
|
| Field Summary | |
|---|---|
(package private) boolean |
arcedShot
|
(package private) int |
attackerCover
|
(package private) boolean |
blocked
|
(package private) boolean |
blockedByHill
|
(package private) boolean |
blockedByWater
|
(package private) int |
buildingLevelsOrHexes
|
static int |
COVER_75LEFT
|
static int |
COVER_75RIGHT
|
static int |
COVER_FULL
|
static int |
COVER_HORIZONTAL
|
static int |
COVER_LEFT
|
static int |
COVER_LOWLEFT
|
static int |
COVER_LOWRIGHT
|
static int |
COVER_NONE
|
static int |
COVER_RIGHT
|
static int |
COVER_UPPER
|
(package private) boolean |
deadZone
|
(package private) int |
hardBuildings
|
(package private) boolean |
hasLoS
|
(package private) int |
heavyIndustrial
|
(package private) int |
heavySmoke
|
(package private) int |
heavyWoods
|
(package private) boolean |
infProtected
|
(package private) int |
lightSmoke
|
(package private) int |
lightWoods
|
(package private) int |
minimumWaterDepth
|
(package private) int |
plantedFields
|
(package private) int |
screen
|
(package private) int |
softBuildings
|
(package private) int |
targetCover
|
(package private) Building |
thruBldg
|
(package private) int |
ultraWoods
|
| Constructor Summary | |
|---|---|
LosEffects()
|
|
| Method Summary | |
|---|---|
void |
add(LosEffects other)
|
static LosEffects.AttackInfo |
buildAttackInfo(Coords c1,
Coords c2,
int h1,
int h2,
int h1Floor,
int h2Floor)
Build line of sight effects between coordinates c1 and c2 at height h1 and h2 respectivly. |
static LosEffects |
calculateLos(IGame game,
int attackerId,
Targetable target)
Returns a LosEffects object representing the LOS effects of interveing terrain between the attacker and target. |
static LosEffects |
calculateLos(IGame game,
int attackerId,
Targetable target,
boolean spotting)
|
static LosEffects |
calculateLos(IGame game,
LosEffects.AttackInfo ai)
|
boolean |
canSee()
LOS check from ae to te. |
static int |
dividedLeftBetter(java.util.ArrayList<Coords> in,
IGame game,
LosEffects.AttackInfo ai,
boolean targetInBuilding,
LosEffects los)
find out if the left or right side of the divided LOS is better for the target return 0 if right is better, 1 if left is better, 2 if both are equal |
int |
getAttackerCover()
|
int |
getHardBuildings()
|
int |
getHeavyIndustrial()
|
int |
getHeavySmoke()
|
int |
getHeavyWoods()
|
int |
getLightSmoke()
|
int |
getLightWoods()
|
int |
getMinimumWaterDepth()
|
int |
getPlantedFields()
|
int |
getScreen()
|
int |
getSoftBuildings()
|
int |
getTargetCover()
|
Building |
getThruBldg()
Getter for property thruBldg. |
int |
getUltraWoods()
|
static boolean |
hasFireBetween(Coords start,
Coords end,
IGame game)
|
boolean |
isAttackerCover()
Getter for property attackerCover. |
boolean |
isBlocked()
|
boolean |
isBlockedByHill()
|
boolean |
isBlockedByWater()
|
boolean |
isTargetCover()
Getter for property targetCover. |
ToHitData |
losModifiers(IGame game)
Returns ToHitData indicating the modifiers to fire for the specified LOS effects data. |
ToHitData |
losModifiers(IGame game,
int eistatus)
|
void |
setArcedAttack(boolean attack)
|
void |
setAttackerCover(int attackerCover)
Setter for property attackerCover. |
void |
setMinimumWaterDepth(int inVal)
|
void |
setTargetCover(int targetCover)
Setter for property targetCover. |
void |
setThruBldg(Building thruBldg)
Setter for property thruBldg. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COVER_NONE
public static final int COVER_LOWLEFT
public static final int COVER_LOWRIGHT
public static final int COVER_LEFT
public static final int COVER_RIGHT
public static final int COVER_HORIZONTAL
public static final int COVER_UPPER
public static final int COVER_FULL
public static final int COVER_75LEFT
public static final int COVER_75RIGHT
boolean blocked
boolean deadZone
boolean infProtected
boolean hasLoS
int plantedFields
int heavyIndustrial
int lightWoods
int heavyWoods
int ultraWoods
int lightSmoke
int heavySmoke
int screen
int softBuildings
int hardBuildings
int buildingLevelsOrHexes
boolean blockedByHill
boolean blockedByWater
int targetCover
int attackerCover
Building thruBldg
int minimumWaterDepth
boolean arcedShot
| Constructor Detail |
|---|
public LosEffects()
| Method Detail |
|---|
public int getMinimumWaterDepth()
public void setMinimumWaterDepth(int inVal)
public void add(LosEffects other)
public int getPlantedFields()
public int getHeavyIndustrial()
public int getLightWoods()
public int getHeavyWoods()
public int getUltraWoods()
public int getLightSmoke()
public int getHeavySmoke()
public int getScreen()
public int getSoftBuildings()
public int getHardBuildings()
public boolean isBlocked()
public boolean isBlockedByHill()
public boolean isBlockedByWater()
public boolean isTargetCover()
public int getTargetCover()
public void setTargetCover(int targetCover)
targetCover - New value of property targetCover.public boolean isAttackerCover()
public int getAttackerCover()
public void setAttackerCover(int attackerCover)
attackerCover - New value of property attackerCover.public Building getThruBldg()
public void setThruBldg(Building thruBldg)
thruBldg - New value of property thruBldg.public boolean canSee()
public static LosEffects calculateLos(IGame game,
int attackerId,
Targetable target)
public static LosEffects calculateLos(IGame game,
int attackerId,
Targetable target,
boolean spotting)
public static LosEffects calculateLos(IGame game,
LosEffects.AttackInfo ai)
public ToHitData losModifiers(IGame game)
public ToHitData losModifiers(IGame game,
int eistatus)
public static boolean hasFireBetween(Coords start,
Coords end,
IGame game)
public void setArcedAttack(boolean attack)
public static LosEffects.AttackInfo buildAttackInfo(Coords c1,
Coords c2,
int h1,
int h2,
int h1Floor,
int h2Floor)
c1 - the source coordiantes.c2 - the target coordinates.h1 - the height in the source tile that is being shot from.h2 - the height of the target tile to shoot for.
public static int dividedLeftBetter(java.util.ArrayList<Coords> in,
IGame game,
LosEffects.AttackInfo ai,
boolean targetInBuilding,
LosEffects los)
in - game - ai - targetInBuilding - los -
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||