|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmegamek.common.InfernoTracker
public class InfernoTracker
This class records and defines the effects of hits by Inferno rounds on units and hexes. It does not *apply* the effect, it just defines it.
It makes use of an inner class to define an Inferno round. This inner class should not be directly accessed, but instead refered to by the constants:STANDARD_ROUND and INFERNO_IV_ROUND.
| Nested Class Summary | |
|---|---|
(package private) static class |
InfernoTracker.Inferno
This class defines the effects of a single hit by an Inferno round. |
| Field Summary | |
|---|---|
static InfernoTracker.Inferno |
INFERNO_IV_ROUND
The hit from a Inferno IV round. |
static InfernoTracker.Inferno |
INFERNO_IV_TURN
A single burn turn from an Inferno IV round. |
static InfernoTracker.Inferno |
STANDARD_ROUND
The hit from a standard Inferno round. |
static InfernoTracker.Inferno |
STANDARD_TURN
A single burn turn from a standard Inferno round. |
| Constructor Summary | |
|---|---|
InfernoTracker()
Create an empty tracker. |
|
| Method Summary | |
|---|---|
void |
add(InfernoTracker.Inferno round,
int hits)
Add the number of hits with the given inferno round to the tracker. |
void |
clear()
Clear the effects of the inferno rounds (the unit got a bath). |
int |
getArrowIVTurnsLeftToBurn()
Determine just the number of turns left for Arrow IV Infernos to burn. |
int |
getHeat()
Determine the number of heat points generated in the current turn. |
int |
getTurnsLeftToBurn()
Determine the total number of turns left for the Infernos to burn. |
boolean |
isStillBurning()
Determine if the unit or hex still has inferno rounds that are burning. |
void |
newRound(int roundNumber)
The infernos have burned for a round. |
void |
setTurnsLeftToBurn(int turnsLeftToBurn)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final InfernoTracker.Inferno STANDARD_ROUND
public static final InfernoTracker.Inferno INFERNO_IV_ROUND
public static final InfernoTracker.Inferno STANDARD_TURN
public static final InfernoTracker.Inferno INFERNO_IV_TURN
| Constructor Detail |
|---|
public InfernoTracker()
| Method Detail |
|---|
public void add(InfernoTracker.Inferno round,
int hits)
round - - the Inferno round that hits. If this value
is not STANDARD_ROUND or
INFERNO_IV_ROUND, then an
IllegalArgumentException will be thrown.hits - - the int number of rounds that hit. If a
negative number is passed, then an
IllegalArgumentException will be thrown.public void clear()
public boolean isStillBurning()
true if there are inferno rounds that are still
still burning. false if no inferno rounds have hit
yet, or if they have burned out.public void newRound(int roundNumber)
newRound in interface RoundUpdatedpublic int getTurnsLeftToBurn()
int number of turns that this unit or hex will
suffer the effects of an Inferno round (either standard or
Inferno IV). This number will be positive when the
isStillBurning() method returns true.
It will not be negative.public int getArrowIVTurnsLeftToBurn()
int number of turns that this unit or hex will
suffer the effects of an Inferno IV round (ignore any standard
inferno rounds). This number will be positive when the
isStillBurning() method returns true.
It will not be negative.public int getHeat()
int number of heat points added this turn.
This value will be positive when isStillBurning()
returns true. It will not be negative.public void setTurnsLeftToBurn(int turnsLeftToBurn)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||