Enum Class Ability

All Implemented Interfaces:
Serializable, Comparable<Ability>, Constable

public enum Ability extends Enum<Ability>
Ability scores enumeration and methods.
Since:
2014-05-21
  • Enum Constant Details

    • Str

      public static final Ability Str
    • Int

      public static final Ability Int
    • Wis

      public static final Ability Wis
    • Dex

      public static final Ability Dex
    • Con

      public static final Ability Con
    • Cha

      public static final Ability Cha
  • Field Details

    • BONUS_RULE

      private static final Ability.BonusRule BONUS_RULE
      Constant switch for bonus formula.
    • abilityPriority

      private static final Ability[][] abilityPriority
      Prioritized preference for any class based on prime requisite.
    • fullName

      private static final String[] fullName
      Long-form names for abilities.
    • BonusValueBX

      private static final int[] BonusValueBX
      Array of B/X style ability bonuses (for performance.)
    • BonusValueOED

      private static final int[] BonusValueOED
      Array of OED style ability bonuses (for performance).
  • Constructor Details

    • Ability

      private Ability()
  • Method Details

    • values

      public static Ability[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Ability valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getFullName

      public static String getFullName(Ability ability)
      Get long-form name for an ability.
    • getBonus

      public static int getBonus(int score)
      Gives the bonus for a given ability score.
    • getBonusBX

      static int getBonusBX(int score)
      BX-style bonus for a given ability score.
    • getBonusOED

      static int getBonusOED(int score)
      OED-style bonus for a given ability score.
    • bonusPercentXP

      public static int bonusPercentXP(int score)
      Return bonus percent of XP for prime requisite.
    • getPriorityList

      public static Ability[] getPriorityList(Ability primeReq)
      Get ability priority list based on prime requisite.
    • main

      public static void main(String[] args)
      Main test function.