Class Attack
java.lang.Object
Attack
Attack routine specification (sword, claw, rock, etc.).
- Since:
- 2014-05-20
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final int
Base damage die type.(package private) int
Attack bonus added to d20 hit rolls.(package private) Dice
Damage dice on successful hit.(package private) EnergyType
Energy type applicable to this attack.(package private) String
Name descriptor of this attack form.(package private) int
Rate of attacks per round. -
Constructor Summary
ConstructorDescriptionAttack
(int bonus, int damDice) Constructor (bonus, damage dice).Attack
(int rate, int bonus, int damDice) Constructor (rate, bonus, damage dice).Constructor (name, rate, bonus, damage).Attack
(String name, int rate, int bonus, Dice damage, EnergyType energy) Constructor (full fields). -
Method Summary
-
Field Details
-
BASE_DIE
private static final int BASE_DIEBase damage die type.- See Also:
-
name
String nameName descriptor of this attack form. -
bonus
int bonusAttack bonus added to d20 hit rolls. -
rate
int rateRate of attacks per round. -
damage
Dice damageDamage dice on successful hit. -
energy
EnergyType energyEnergy type applicable to this attack.
-
-
Constructor Details
-
Attack
Attack(String name, int rate, int bonus, Dice damage, EnergyType energy) Constructor (full fields). -
Attack
Constructor (name, rate, bonus, damage). -
Attack
Attack(int rate, int bonus, int damDice) Constructor (rate, bonus, damage dice). -
Attack
Attack(int bonus, int damDice) Constructor (bonus, damage dice).
-
-
Method Details
-
getName
-
getBonus
public int getBonus() -
getRate
public int getRate() -
getDamage
-
getEnergy
-
setBonus
public void setBonus(int bonus) -
setRate
public void setRate(int rate) -
rollDamage
public int rollDamage()Roll damage for successful hit. -
toString
Identify this object as a string. -
main
Main test function.
-