Class PotionFactory

java.lang.Object
com.deco2800.game.entities.factories.PotionFactory

public class PotionFactory extends Object
Factory to create a potion entity.

Each Potion entity type has a creation method returning the corresponding potion.

  • Constructor Details

    • PotionFactory

      public PotionFactory()
  • Method Details

    • createBasePotion

      public static Entity createBasePotion()
      Creates the base potion which can be modified to other types of potion. This potion on its own has no effects
      Returns:
      base potion
    • createSpeedPotion

      public static Entity createSpeedPotion()
      Creates speed potion which increases the players movement speed by a set amount
      Returns:
      speed potion
    • createHealthPotion

      public static Entity createHealthPotion()
      Creates a health potion which gives the player health all at once
      Returns:
      health potion
    • createStaminaPotion

      public static Entity createStaminaPotion()
      Creates a stamina potion which gives the player health all at once
      Returns:
      stamina potion
    • createDefencePotion

      public static Entity createDefencePotion()
      creates a defence potion. This is scheduled for removal as it is too similar to other potions and because too many potions already exist in the game
      Returns:
      defence potion
    • createHealthRegenPotion

      public static Entity createHealthRegenPotion()
      Create a health regen potion which slows gives the player health every few frames
      Returns:
      health regen potion
    • createTestSpeedPotion

      public static Entity createTestSpeedPotion()
      Creates speed potion without rendering Component.
      Returns:
      speed potion for testing purposes
    • createTestHealthPotion

      public static Entity createTestHealthPotion()
      Creates health potion without rendering Component.
      Returns:
      health potion for testing purposes
    • createTestHealthRegenPotion

      public static Entity createTestHealthRegenPotion()
      Creates health regen potion without rendering Component.
      Returns:
      health regen potion for testing purposes