Interface ElementType

All Known Implementing Classes:
ElectricType, FireType, GrassType, WaterType

public interface ElementType
Represents an elemental type in the game (e.g., Fire, Water, Grass).

Each ElementType defines how much bonus attack damage is applied when attacking a Pokémon of another elemental type. Concrete implementations must implement the bonus damage calculation based on type effectiveness.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    tellerOfBonusAttackDamage(ElementType elementTypeOfOpponentPokemon)
    Determines the bonus attack damage applied when a Pokémon of this elemental type attacks an opponent Pokémon of a specific elemental type.
  • Method Details

    • tellerOfBonusAttackDamage

      int tellerOfBonusAttackDamage(ElementType elementTypeOfOpponentPokemon)
      Determines the bonus attack damage applied when a Pokémon of this elemental type attacks an opponent Pokémon of a specific elemental type.

      Implementations should define the bonus based on type matchups. For example, Fire-type attacks may deal bonus damage against Grass-type Pokémon, while Grass-type attacks may not have any bonus.

      Parameters:
      elementTypeOfOpponentPokemon - the elemental type of the opponent Pokémon
      Returns:
      the bonus attack damage applied, which may be 0 if there is no type advantage