Class Equipment

java.lang.Object
Equipment
Direct Known Subclasses:
Armor, Weapon

public class Equipment extends Object
One piece of equipment on a character.
Since:
2016-01-17
  • Field Details

    • MAX_MAGIC_BONUS

      static final int MAX_MAGIC_BONUS
      Maximum magic bonus allowed.
      See Also:
    • ONE_THIRD

      public static final float ONE_THIRD
      One-third of a stone.
      See Also:
    • name

      String name
      Name of this piece of equipment.
    • material

      Material type.
    • weight

      float weight
      Encumbrance in stone units.
    • magicBonus

      int magicBonus
      Magic bonus value.
  • Constructor Details

  • Method Details

    • getName

      public String getName()
    • getMaterial

      public Equipment.Material getMaterial()
    • getWeight

      public float getWeight()
    • getMagicBonus

      public int getMagicBonus()
    • setMagicBonus

      public void setMagicBonus(int bonus)
      Set the magic bonus.
    • incMagicBonus

      public void incMagicBonus()
      Increment the magic bonus.
    • isMetallic

      public boolean isMetallic()
      Is this piece of equipment made of metal?
    • rollSave

      public boolean rollSave()
      Roll a saving throw for this equipment. Roughly equal to that seen on OD&D Vol-2, p. 38.
    • toString

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