Class ClassRecord
java.lang.Object
ClassRecord
Record of one class gained by a character (XP, level, hit points, etc.).
- Since:
- 2014-05-22
-
Field Summary
Modifier and TypeFieldDescription(package private) Character
Character reference.(package private) ClassType
Class type for this class.Feats known for this class.(package private) int
Hit points earned for this class.(package private) int
Level in this class.(package private) static final int
Hit die for level 0.(package private) SpellMemory
Spells known for this class.(package private) int
Experience points earned towards this class. -
Constructor Summary
ConstructorDescriptionClassRecord
(Character character, ClassType type, int level) Constructor (by ClassInfo, level, random hit points). -
Method Summary
Modifier and TypeMethodDescription(package private) void
Choose all feats for new character.(package private) void
Add all expected wizard spells.(package private) void
addFeat()
Add a random feat to this character.void
addLevel()
Increment the level.(package private) void
addNewHitPoints
(int newLevel, boolean initBoost) Add hit points for a given level.void
addXP
(int awardXP) Add XP to this class.int
Return the base attack bonus for this class/level.private Dice
boostInitHitDice
(Dice hitDice) Convert hit dice for init boost (no 1's or 2's).(package private) String
String representation of feats known.Get adjusted hit dice for this class.int
int
getLevel()
Access our spell memory.int
getXP()
void
handleConChange
(int oldCon) Handle a Constitution change to hit points.boolean
Is this feat known by this class record?boolean
Does this class have spells?(package private) boolean
isFeatLevel
(int newLevel) Is this a level where we gain a feat?(package private) void
loseFeat()
Lose a random feat for this character.void
Decrement the level.(package private) void
Roll full hit points from start to current level.(package private) String
String representation of skills known.(package private) String
String representation of spells known.toString()
Identify this object as a string.
-
Field Details
-
LEVEL_ZERO_HIT_DIE
static final int LEVEL_ZERO_HIT_DIEHit die for level 0.- See Also:
-
character
Character characterCharacter reference. -
classType
ClassType classTypeClass type for this class. -
level
int levelLevel in this class. -
hitPoints
int hitPointsHit points earned for this class. -
XP
int XPExperience points earned towards this class. -
spellsKnown
SpellMemory spellsKnownSpells known for this class. -
featsKnown
Feats known for this class.
-
-
Constructor Details
-
ClassRecord
Constructor (by ClassInfo, level, random hit points).
-
-
Method Details
-
getClassType
-
getLevel
public int getLevel() -
getHitPoints
public int getHitPoints() -
getXP
public int getXP() -
attackBonus
public int attackBonus()Return the base attack bonus for this class/level. -
addXP
public void addXP(int awardXP) Add XP to this class. -
addLevel
public void addLevel()Increment the level. Cap XP at one less than the next level. -
loseLevel
public void loseLevel()Decrement the level. -
isFeatLevel
boolean isFeatLevel(int newLevel) Is this a level where we gain a feat? -
addAllFeats
void addAllFeats()Choose all feats for new character. -
addFeat
void addFeat()Add a random feat to this character. -
loseFeat
void loseFeat()Lose a random feat for this character. -
hasFeat
Is this feat known by this class record? -
featsString
String featsString()String representation of feats known. -
skillsString
String skillsString()String representation of skills known. -
addAllSpells
void addAllSpells()Add all expected wizard spells. -
hasSpells
public boolean hasSpells()Does this class have spells? -
getSpellMemory
Access our spell memory. -
spellsString
String spellsString()String representation of spells known. -
getHitDice
Get adjusted hit dice for this class. -
rollFullHitPoints
void rollFullHitPoints()Roll full hit points from start to current level. -
addNewHitPoints
void addNewHitPoints(int newLevel, boolean initBoost) Add hit points for a given level. Per OED rules, at initial generation, we do not accept 1 or 2 hp die-rolls. -
boostInitHitDice
Convert hit dice for init boost (no 1's or 2's). -
handleConChange
public void handleConChange(int oldCon) Handle a Constitution change to hit points. -
toString
Identify this object as a string.
-