Class ClassRecord

java.lang.Object
ClassRecord

public class ClassRecord extends Object
Record of one class gained by a character (XP, level, hit points, etc.).
Since:
2014-05-22
  • Field Details

    • LEVEL_ZERO_HIT_DIE

      static final int LEVEL_ZERO_HIT_DIE
      Hit die for level 0.
      See Also:
    • character

      Character character
      Character reference.
    • classType

      ClassType classType
      Class type for this class.
    • level

      int level
      Level in this class.
    • hitPoints

      int hitPoints
      Hit points earned for this class.
    • XP

      int XP
      Experience points earned towards this class.
    • spellsKnown

      SpellMemory spellsKnown
      Spells known for this class.
    • featsKnown

      Set<Feat> featsKnown
      Feats known for this class.
  • Constructor Details

    • ClassRecord

      public ClassRecord(Character character, ClassType type, int level)
      Constructor (by ClassInfo, level, random hit points).
  • Method Details

    • getClassType

      public ClassType 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

      public boolean hasFeat(Feat f)
      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

      public SpellMemory getSpellMemory()
      Access our spell memory.
    • spellsString

      String spellsString()
      String representation of spells known.
    • getHitDice

      public Dice 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

      private Dice boostInitHitDice(Dice hitDice)
      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

      public String toString()
      Identify this object as a string.
      Overrides:
      toString in class Object