Class BuffItem

java.lang.Object
model.item.Item
model.item.BuffItem
All Implemented Interfaces:
Applicable

public class BuffItem extends Item
Increases the user's attack power. The effect is removed after the battle ends (reset).
  • Field Details

    • attackBonus

      private final int attackBonus
      Attack bonus to apply.
  • Constructor Details

    • BuffItem

      public BuffItem(int attackBonus)
      create BuffItem
      Parameters:
      attackBonus - Attack bonus to apply.
  • Method Details

    • apply

      public void apply(Entity target)
      Increases the target entity's attack power.
      Specified by:
      apply in interface Applicable
      Specified by:
      apply in class Item
      Parameters:
      target - Entity to buff
    • getEffectDescription

      public String getEffectDescription()
      Returns a description of the effect for display in the UI.
      Specified by:
      getEffectDescription in interface Applicable
      Specified by:
      getEffectDescription in class Item
      Returns:
      Effect description text
    • getAttackBonus

      public int getAttackBonus()
      get Attack bonus to apply.
      Returns:
      attackBonus