Class Attack


public class Attack extends Object
Attack routine specification (sword, claw, rock, etc.).
Since:
2014-05-20
  • Field Details

    • BASE_DIE

      private static final int BASE_DIE
      Base damage die type.
      See Also:
    • name

      String name
      Name descriptor of this attack form.
    • bonus

      int bonus
      Attack bonus added to d20 hit rolls.
    • rate

      int rate
      Rate of attacks per round.
    • damage

      Dice damage
      Damage dice on successful hit.
    • energy

      EnergyType energy
      Energy type applicable to this attack.
  • Constructor Details

    • Attack

      Attack(String name, int rate, int bonus, Dice damage, EnergyType energy)
      Constructor (full fields).
    • Attack

      Attack(String name, int rate, int bonus, Dice damage)
      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

      public String getName()
    • getBonus

      public int getBonus()
    • getRate

      public int getRate()
    • getDamage

      public Dice getDamage()
    • getEnergy

      public EnergyType getEnergy()
    • setBonus

      public void setBonus(int bonus)
    • setRate

      public void setRate(int rate)
    • rollDamage

      public int rollDamage()
      Roll damage for successful hit.
    • toString

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

      public static void main(String[] args)
      Main test function.