Class AttackInfo
java.lang.Object
Pokemon.Attributes.AttackInfo
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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAttackInfo(String attackName, String attackDescription, int attackDamage) Constructs a newAttackInfoinstance with the specified attributes. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the base damage of the attack.Returns the description of the attack.Returns the name of the attack.
-
Field Details
-
attackName
The name of the attack. -
attackDescription
A textual description of the attack's effect. -
attackDamage
private int attackDamageThe base damage dealt by the attack.
-
-
Constructor Details
-
AttackInfo
Constructs a newAttackInfoinstance with the specified attributes.- Parameters:
attackName- the name of the attackattackDescription- a brief description of the attack's effectattackDamage- the base damage value of the attack
-
-
Method Details
-
getAttackName
-
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
-