public class XPTable extends Object
Modifier and Type | Class and Description |
---|---|
static class |
XPTable.XPMode
Modes for XP awards.
|
(package private) class |
XPTable.XPRecord |
Modifier and Type | Field and Description |
---|---|
(package private) static XPTable.XPMode |
DEFAULT_MODE
Default mode for XP awards.
|
(package private) static XPTable |
instance
The singleton class instance.
|
(package private) XPTable.XPMode |
xpMode
Active mode for awards.
|
(package private) ArrayList<XPTable.XPRecord> |
xpRecordArray
Array of XPRecords.
|
(package private) String |
XPTABLE_FILE
Name of file with information.
|
Modifier | Constructor and Description |
---|---|
protected |
XPTable()
Constructor (read from dedicated file).
|
Modifier and Type | Method and Description |
---|---|
(package private) int |
computeXPBase(Dice HD)
Compute base XP by HD * 100, as per Vol-1.
|
static XPTable |
getInstance()
Access the singleton class instance.
|
XPTable.XPMode |
getMode()
Get the XP award mode.
|
(package private) XPTable.XPRecord |
getRecordByNum(int num)
Get record by high hit die number.
|
(package private) XPTable.XPRecord |
getRecordByText(String text)
Get record by hit dice text.
|
int |
getXPAward(Monster monster)
Get XP award for one monster.
|
(package private) XPTable.XPRecord |
getXPRecord(Dice HD)
Lookup XP record in table, as per Sup-I.
|
(package private) int |
getXPSupI(Monster monster)
Get total XP for monster as per Sup-I.
|
(package private) int |
getXPVol1(Monster monster)
Get total XP for monster as per Vol-1.
|
static void |
main(String[] args)
Main test method.
|
void |
setMode(XPTable.XPMode mode)
Set the XP award mode.
|
final String XPTABLE_FILE
static final XPTable.XPMode DEFAULT_MODE
static XPTable instance
ArrayList<XPTable.XPRecord> xpRecordArray
XPTable.XPMode xpMode
protected XPTable() throws IOException
IOException
public static XPTable getInstance()
public XPTable.XPMode getMode()
public void setMode(XPTable.XPMode mode)
public int getXPAward(Monster monster)
int getXPVol1(Monster monster)
int getXPSupI(Monster monster)
int computeXPBase(Dice HD)
XPTable.XPRecord getXPRecord(Dice HD)
XPTable.XPRecord getRecordByText(String text)
XPTable.XPRecord getRecordByNum(int num)
public static void main(String[] args)