Class Bulbasaur
java.lang.Object
Pokemon.Pokemon
Pokemon.Grass.Bulbasaur
Represents the Pokémon Bulbasaur, a Grass-type Pokémon.
Bulbasaur has a single attack:
Leech Seed: Deals base damage plus any elemental bonus against the opponent, and heals 10 HP for Bulbasaur itself.
Pokemon.hitOpponent(Pokemon, int) method.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AttackInfo[]Array of attacks available to Bulbasaur.Fields inherited from class Pokemon.Pokemon
elementType, tellsIfPokemonIsInvincible, tellsIfPokemonIsPoisoned -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Bulbasaur Pokémon with default health, element type, ASCII art, and its single attack. -
Method Summary
Modifier and TypeMethodDescriptionintgetAttackResult1(ElementType elementTypeOfOpponentPokemon) Executes Bulbasaur'sLeech Seedattack.voidhitOpponent(Pokemon OpponentPokemon, int attack) Performs an attack on an opponent Pokémon.Methods inherited from class Pokemon.Pokemon
getAsciiArt, getAttackAndDamageInfo, getAttackInfo, getCounterToIncreaseAttackDamage, getElementType, getHealth, getName, getTellsIfPokemonIsInvincible, getTellsIfPokemonIsPoisoned, ifPoisonedChangeHealth, IncreaseCounterToIncreaseAttackDamage, printBuffsAndDebuffs, setHealth, setHealthIfPokemonDamagesItsSelf, setHealthIfPokemonHealsItsSelf, setTellsIfPokemonIsInvincible, setTellsIfPokemonIsPoisoned
-
Field Details
-
attackInfo
Array of attacks available to Bulbasaur.
-
-
Constructor Details
-
Bulbasaur
public Bulbasaur()Constructs a new Bulbasaur Pokémon with default health, element type, ASCII art, and its single attack.
-
-
Method Details
-
getAttackResult1
Executes Bulbasaur'sLeech Seedattack.Deals damage equal to the attack's base damage plus any elemental bonus against the opponent's type. Additionally, heals Bulbasaur for 10 HP.
- Parameters:
elementTypeOfOpponentPokemon- the element type of the opponent Pokémon- Returns:
- the total damage dealt by
Leech Seed
-
hitOpponent
Performs an attack on an opponent Pokémon.Since Bulbasaur has only one attack, this method always executes
Leech Seed.- Specified by:
hitOpponentin classPokemon- Parameters:
OpponentPokemon- the Pokémon being attackedattack- the index of the attack to use (ignored, as Bulbasaur has only one attack)
-