Class Blastoise

java.lang.Object
Pokemon.Pokemon
Pokemon.Water.Blastoise

public class Blastoise extends Pokemon
Represents the Pokémon Blastoise, a Water-type Pokémon.

Blastoise has a single attack:

  • Hydro Pump: Deals base damage plus any elemental bonus against the opponent. After each use, the attack damage increases by 10 for subsequent uses.
This class defines Blastoise's specific attack logic and overrides the abstract Pokemon.hitOpponent(Pokemon, int) method.
  • Field Details

    • attackInfo

      private final AttackInfo[] attackInfo
      Array of attacks available to Blastoise.
  • Constructor Details

    • Blastoise

      public Blastoise()
      Constructs a new Blastoise Pokémon with default health, element type, ASCII art, and its single attack.
  • Method Details

    • getAttackResult1

      public int getAttackResult1(ElementType elementTypeOfOpponentPokemon)
      Executes Blastoise's Hydro Pump attack.

      Damage is calculated as the base attack damage plus any elemental bonus. Each subsequent use of this attack increases damage by 10.

      Parameters:
      elementTypeOfOpponentPokemon - the element type of the opponent Pokémon
      Returns:
      total damage dealt by Hydro Pump, including any bonus for repeated use
    • hitOpponent

      public void hitOpponent(Pokemon OpponentPokemon, int attack)
      Performs an attack on an opponent Pokémon.

      Since Blastoise has only one attack, this method always executes Hydro Pump, applying the increasing damage logic on each subsequent use.

      Specified by:
      hitOpponent in class Pokemon
      Parameters:
      OpponentPokemon - the Pokémon being attacked
      attack - the index of the attack to use (ignored, as Blastoise has only one attack)