Class ClassType

java.lang.Object
ClassType

public class ClassType extends Object
One RPG character class type (fighter, thief, wizard, etc.).
Since:
2014-05-22
  • Field Details

    • name

      String name
      Name of this class.
    • abbreviation

      String abbreviation
      Abbreviation for this class.
    • primeRequisite

      Ability primeRequisite
      Prime requisite ability.
    • atkBonusNumer

      int atkBonusNumer
      Attack bonus numerator.
    • atkBonusDenom

      int atkBonusDenom
      Attack bonus denominator.
    • hitDiceType

      int hitDiceType
      Hit dice type (sides).
    • hitDiceMax

      int hitDiceMax
      Hit dice maximum.
    • advancedHpInc

      int advancedHpInc
      Hit points added after max dice.
    • saveAsClass

      String saveAsClass
      Save as this class.
    • useFeats

      boolean useFeats
      Does this class use feats?
    • useSkills

      boolean useSkills
      Does this class use skills?
    • useSpells

      boolean useSpells
      Does this class use spells?
    • xpReqs

      int[] xpReqs
      Array of low-level XP requirements.
    • titles

      String[] titles
      Array of level titles.
  • Constructor Details

    • ClassType

      public ClassType(String[] indexData, String[][] levelData)
      Constructor (from String arrays).
      Parameters:
      indexData - Top-level data about this class.
      levelData - Level-specific information (title, XP, etc.)
  • Method Details

    • getName

      public String getName()
      Get the class name.
    • getAbbreviation

      public String getAbbreviation()
      Get the class abbreviation.
    • getPrimeReq

      public Ability getPrimeReq()
      Get the prime requisite.
    • getHitDiceType

      public int getHitDiceType()
      Get the hit dice type.
    • getAttackBonus

      public int getAttackBonus(int level)
      Compute the attack bonus.
    • getHitDiceInc

      public Dice getHitDiceInc(int level)
      Returns added hit dice at a given level.
    • getHitDiceTotal

      public Dice getHitDiceTotal(int level)
      Returns total hit dice at a given level.
    • getTitleFromLevel

      public String getTitleFromLevel(int level)
      Get the title for a given level.
    • getLevelFromTitle

      public int getLevelFromTitle(String title)
      Get the level indicated by a given title.
    • getXpReq

      public int getXpReq(int level)
      Compute the experience required for a level.
    • getXpReqNext

      public int getXpReqNext(int level)
      Get the experience required for the following level.
    • getXpMidpoint

      public int getXpMidpoint(int level)
      Get experience midpoint for a given level.
    • getSaveAsClass

      public String getSaveAsClass()
      Get the name of the class that we save as.
    • usesFeats

      public boolean usesFeats()
      Get whether we use feats.
    • usesSkills

      public boolean usesSkills()
      Get whether we use skills.
    • usesSpells

      public boolean usesSpells()
      Get whether we use spells.
    • getAbilityPriority

      public Ability[] getAbilityPriority()
      Get the ability priority list.
    • toString

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