Class HealthPotion

java.lang.Object
com.mg105.entities.Item
com.mg105.entities.items.HealthPotion
All Implemented Interfaces:
Consumable

public class HealthPotion extends Item implements Consumable
A health potion is an item that can be used to heal a character by a certain amount of points.
  • Constructor Details

    • HealthPotion

      public HealthPotion()
      Creates a new instance of health potion
  • Method Details

    • getHealingPoints

      public static int getHealingPoints()
      Gets the healing points that the potion provides to a character.
      Returns:
      the healing points that this potion has.
    • consume

      public void consume(@NotNull @NotNull GameState state, @NotNull @NotNull String characterName)
      Heals the battleCharacter provided
      Specified by:
      consume in interface Consumable
      Parameters:
      state - the state of the game
      characterName - the name of the character to use the item on