java.lang.Object
com.csse3200.game.components.collectables.effects.HealEffect
All Implemented Interfaces:
ItemEffectHandler

public class HealEffect extends Object implements ItemEffectHandler
An item effect that restores health to the player.
  • Constructor Details

    • HealEffect

      public HealEffect()
  • Method Details

    • apply

      public boolean apply(Entity player, EffectConfig cfg)
      Applies the heal effect to the given player entity.
      Specified by:
      apply in interface ItemEffectHandler
      Parameters:
      player - the entity to heal (must have a CombatStatsComponent)
      cfg - the effect configuration containing the heal value
      Returns:
      true if the effect was successfully applied, otherwise false