Package megamek.server
Class SmokeCloud
java.lang.Object
megamek.server.SmokeCloud
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
ConstructorsConstructorDescriptionSmokeCloud(List<Coords> coords, int boardId, int level, int duration, int roundOfGeneration) -
Method Summary
Modifier and TypeMethodDescriptionbooleandidDrift()intintintintReturns the level of smoke, odd levels will correspond to light smoke while even levels will be heavy smoke.booleanbooleanvoidReduces the level of smoke, heavy goes to light, LI heavy goes to LI light.voidreplaceCoords(Collection<Coords> newCoords) Removes all the previously stored Coords of this SmokeCloud and stores the given Coords instead.voidsetDrift(boolean drift) voidsetDuration(int duration) voidsetSmokeLevel(int level)
-
Field Details
-
SMOKE_NONE
public static final int SMOKE_NONE- See Also:
-
SMOKE_LIGHT
public static final int SMOKE_LIGHT- See Also:
-
SMOKE_HEAVY
public static final int SMOKE_HEAVY- See Also:
-
SMOKE_LI_LIGHT
public static final int SMOKE_LI_LIGHT- See Also:
-
SMOKE_LI_HEAVY
public static final int SMOKE_LI_HEAVY- See Also:
-
SMOKE_CHAFF_LIGHT
public static final int SMOKE_CHAFF_LIGHT- See Also:
-
SMOKE_GREEN
public static final int SMOKE_GREEN- See Also:
-
-
Constructor Details
-
SmokeCloud
-
-
Method Details
-
setSmokeLevel
public void setSmokeLevel(int level) -
reduceSmokeLevel
public void reduceSmokeLevel()Reduces the level of smoke, heavy goes to light, LI heavy goes to LI light. -
getSmokeLevel
public int getSmokeLevel()Returns the level of smoke, odd levels will correspond to light smoke while even levels will be heavy smoke.- Returns:
- The smoke level
-
isCompletelyDissipated
public boolean isCompletelyDissipated()- Returns:
- True when this SmokeCloud is at a smoke level of SMOKE_NONE (= 0).
-
getCoordsList
-
replaceCoords
Removes all the previously stored Coords of this SmokeCloud and stores the given Coords instead. -
hasNoHexes
public boolean hasNoHexes()- Returns:
- True when this SmokeCloud has no remaining smoke hex coordinates.
-
setDuration
public void setDuration(int duration) -
getDuration
public int getDuration() -
setDrift
public void setDrift(boolean drift) -
didDrift
public boolean didDrift() -
getRoundOfGeneration
public int getRoundOfGeneration() -
getBoardId
public int getBoardId()
-