Class AttackInfo

java.lang.Object
Pokemon.Attributes.AttackInfo

public class AttackInfo extends Object
Encapsulates information about a Pokémon attack.

An AttackInfo object stores the attack's name, description, and base damage. Instances of this class are used by Pokemon objects to define the moves a Pokémon can perform during battle.

Example usage:


 AttackInfo thunderbolt = new AttackInfo("Thunderbolt",
                                         "A strong electric attack",
                                         40);
 System.out.println(thunderbolt.getAttackName());
 
  • Field Details

    • attackName

      private final String attackName
      The name of the attack.
    • attackDescription

      private final String attackDescription
      A textual description of the attack's effect.
    • attackDamage

      private int attackDamage
      The base damage dealt by the attack.
  • Constructor Details

    • AttackInfo

      public AttackInfo(String attackName, String attackDescription, int attackDamage)
      Constructs a new AttackInfo instance with the specified attributes.
      Parameters:
      attackName - the name of the attack
      attackDescription - a brief description of the attack's effect
      attackDamage - the base damage value of the attack
  • Method Details

    • getAttackName

      public String getAttackName()
      Returns the name of the attack.
      Returns:
      the attack's name
    • getAttackDescription

      public String getAttackDescription()
      Returns the description of the attack.
      Returns:
      the attack's description
    • getAttackDamage

      public int getAttackDamage()
      Returns the base damage of the attack.
      Returns:
      the attack's damage value