Class Equipment
java.lang.Object
Equipment
One piece of equipment on a character.
- Since:
- 2016-01-17
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static enum
Material types enumeration. -
Field Summary
Modifier and TypeFieldDescription(package private) int
Magic bonus value.(package private) Equipment.Material
Material type.(package private) static final int
Maximum magic bonus allowed.(package private) String
Name of this piece of equipment.static final float
One-third of a stone.(package private) float
Encumbrance in stone units. -
Constructor Summary
ConstructorDescriptionEquipment
(String name, Equipment.Material material, float weight, int magic) Constructor -
Method Summary
Modifier and TypeMethodDescriptionint
getName()
float
void
Increment the magic bonus.boolean
Is this piece of equipment made of metal?boolean
rollSave()
Roll a saving throw for this equipment.void
setMagicBonus
(int bonus) Set the magic bonus.toString()
Identify this object as a string.
-
Field Details
-
MAX_MAGIC_BONUS
static final int MAX_MAGIC_BONUSMaximum magic bonus allowed.- See Also:
-
ONE_THIRD
public static final float ONE_THIRDOne-third of a stone.- See Also:
-
name
String nameName of this piece of equipment. -
material
Equipment.Material materialMaterial type. -
weight
float weightEncumbrance in stone units. -
magicBonus
int magicBonusMagic bonus value.
-
-
Constructor Details
-
Equipment
Equipment(String name, Equipment.Material material, float weight, int magic) Constructor
-
-
Method Details
-
getName
-
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
Identify this object as a string.
-