Class PoisonStatus
java.lang.Object
games.stendhal.server.entity.status.Status
games.stendhal.server.entity.status.PoisonStatus
- All Implemented Interfaces:
Killer,Cloneable,Comparable<games.stendhal.server.entity.status.ConsumableStatus>
poison status
Note: this class has a natural ordering that is inconsistent with equals.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(games.stendhal.server.entity.status.ConsumableStatus other) compares to ComsumableStatus objects to sorts the status with the largest effect firstintconsume()Consumes a part of this status.booleanconsumed()Checks whether this item has already been fully consumed.intgets the total ammountintgets the frequency of eventsintgetRegen()gets the amount of change per eventreturns the status type
-
Constructor Details
-
PoisonStatus
public PoisonStatus(int amount, int frequency, int regen) Poison- Parameters:
amount- total amountfrequency- frequency of eventsregen- hp change on each event
-
-
Method Details
-
getStatusType
returns the status type- Specified by:
getStatusTypein classStatus- 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:
compareToin interfaceComparable<games.stendhal.server.entity.status.ConsumableStatus>- Parameters:
other- consumable status- Returns:
- result of comparison
-