Class Weapon
java.lang.Object
Equipment
Weapon
Weapon on a character.
- Since:
- 2016-01-17
-
Nested Class Summary
Nested classes/interfaces inherited from class Equipment
Equipment.Material
-
Field Summary
Modifier and TypeFieldDescription(package private) Dice
Damage basis.(package private) EnergyType
Energy type.(package private) int
Hands used.(package private) static final float
One-third of a stone weight.Fields inherited from class Equipment
magicBonus, material, MAX_MAGIC_BONUS, name, weight
-
Constructor Summary
ConstructorDescriptionConstructor (name, damage, weight, hands).Weapon
(String name, Equipment.Material material, float weight, int magic, Dice damage, EnergyType energy, int hands) Constructor (all fields).Constructor (copy) -
Method Summary
Modifier and TypeMethodDescriptionstatic Weapon
dagger()
Make a normal dagger.int
static Weapon
Make a random primary melee weapon.static Weapon
Make a random secondary melee weapon.static Weapon
Make a random melee weapon for a thief.static Weapon
Make a silver dagger.static Weapon
sword
(int bonus) Make a possibly-magic sword.static Weapon
torch()
Make a torch.toString()
Identify this object as a string.Methods inherited from class Equipment
getMagicBonus, getMaterial, getName, getWeight, incMagicBonus, isMetallic, rollSave, setMagicBonus
-
Field Details
-
ONE_THIRD
static final float ONE_THIRDOne-third of a stone weight.- See Also:
-
damage
Dice damageDamage basis. -
energy
EnergyType energyEnergy type. -
hands
int handsHands used.
-
-
Constructor Details
-
Weapon
Weapon(String name, Equipment.Material material, float weight, int magic, Dice damage, EnergyType energy, int hands) Constructor (all fields). -
Weapon
Constructor (name, damage, weight, hands). -
Weapon
Weapon(Weapon w) Constructor (copy)
-
-
Method Details
-
getBaseDamage
-
getEnergy
-
getHandsUsed
public int getHandsUsed() -
randomPrimary
Make a random primary melee weapon. -
randomSecondary
Make a random secondary melee weapon. -
randomThieving
Make a random melee weapon for a thief. -
dagger
Make a normal dagger. -
silverDagger
Make a silver dagger. -
sword
Make a possibly-magic sword. -
torch
Make a torch. -
toString
Identify this object as a string.
-