public class Weapon extends Equipment
Modifier and Type | Class and Description |
---|---|
(package private) static class |
Weapon.Material |
Modifier and Type | Field and Description |
---|---|
(package private) Dice |
baseDamage
Base damage.
|
(package private) int |
handsUsed
Hands used.
|
(package private) Weapon.Material |
material
Material.
|
magicBonus, MAX_MAGIC_BONUS, name
Constructor and Description |
---|
Weapon(String name,
Dice baseDamage,
int handsUsed)
Constructor (name, damage, hands).
|
Weapon(String name,
Dice baseDamage,
int handsUsed,
int magicBonus)
Constructor (no material).
|
Weapon(String name,
Dice baseDamage,
int handsUsed,
int magicBonus,
Weapon.Material material)
Constructor (all fields).
|
Weapon(Weapon w)
Constructor (copy)
|
Modifier and Type | Method and Description |
---|---|
Dice |
getBaseDamage() |
int |
getHandsUsed() |
Weapon.Material |
getMaterial() |
static Weapon |
randomPrimary()
Make a random primary melee weapon.
|
static Weapon |
randomSecondary()
Make a random secondary melee weapon.
|
static Weapon |
silverDagger()
Make a silver dagger.
|
String |
toString()
Identify this object as a string.
|
formatBonus, getMagicBonus, getName, incMagicBonus, setMagicBonus
Weapon.Material material
Dice baseDamage
int handsUsed
Weapon(String name, Dice baseDamage, int handsUsed, int magicBonus, Weapon.Material material)
Weapon(String name, Dice baseDamage, int handsUsed, int magicBonus)
Weapon(Weapon w)
public Dice getBaseDamage()
public Weapon.Material getMaterial()
public int getHandsUsed()
public static Weapon randomPrimary()
public static Weapon randomSecondary()
public static Weapon silverDagger()