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
-
Method Summary
Modifier and TypeMethodDescriptionint
compareTo(games.stendhal.server.entity.status.ConsumableStatus other)
compares to ComsumableStatus objects to sorts the status with the largest effect firstint
consume()
Consumes a part of this status.boolean
consumed()
Checks whether this item has already been fully consumed.int
gets the total ammountint
gets the frequency of eventsint
getRegen()
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:
getStatusType
in 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:
compareTo
in interfaceComparable<games.stendhal.server.entity.status.ConsumableStatus>
- Parameters:
other
- consumable status- Returns:
- result of comparison
-