Class EatStatus

java.lang.Object
games.stendhal.server.entity.status.Status
games.stendhal.server.entity.status.EatStatus
All Implemented Interfaces:
Cloneable, Comparable<games.stendhal.server.entity.status.ConsumableStatus>

public class EatStatus extends Status
eat status Note: this class has a natural ordering that is inconsistent with equals.
  • Constructor Summary

    Constructors
    Constructor
    Description
    EatStatus​(int amount, int frequency, int regen)
    eat
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    compareTo​(games.stendhal.server.entity.status.ConsumableStatus other)
    compares to ComsumableStatus objects to sorts the status with the largest effect first
    int
    Consumes a part of this status.
    boolean
    Checks whether this item has already been fully consumed.
    int
    gets the total ammount
    int
    gets the frequency of events
    int
    gets the amount of change per event
    returns the status type

    Methods inherited from class games.stendhal.server.entity.status.Status

    clone, getName

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • EatStatus

      public EatStatus(int amount, int frequency, int regen)
      eat
      Parameters:
      amount - total amount
      frequency - frequency of events
      regen - hp change on each event
  • Method Details

    • getStatusType

      public StatusType getStatusType()
      returns the status type
      Specified by:
      getStatusType in class Status
      Returns:
      StatusType
    • getAmount

      public int getAmount()
      gets the total ammount
      Returns:
      amount
    • getFrecuency

      public int getFrecuency()
      gets the frequency of events
      Returns:
      frequency
    • getRegen

      public int getRegen()
      gets the amount of change per event
      Returns:
      regen
    • consume

      public int consume()
      Consumes a part of this status.
      Returns:
      The amount that has been consumed
    • consumed

      public boolean consumed()
      Checks whether this item has already been fully consumed.
      Returns:
      true iff this item has been consumed
    • compareTo

      public int compareTo(games.stendhal.server.entity.status.ConsumableStatus other)
      compares to ComsumableStatus objects to sorts the status with the largest effect first
      Specified by:
      compareTo in interface Comparable<games.stendhal.server.entity.status.ConsumableStatus>
      Parameters:
      other - consumable status
      Returns:
      result of comparison