public class Trinket extends Equippable
Modifier and Type | Field and Description |
---|---|
static int |
ARTIFACT |
static int |
FINGER |
static int |
NECK |
Constructor and Description |
---|
Trinket(java.lang.String id,
long serial,
TrinketType type,
int value,
java.lang.String imgName,
int reqLevel,
Modifiers bonuses,
java.util.List<java.lang.String> equipEffects,
Action onUse,
org.newdawn.slick.GameContainer gc)
Trinket constructor (with specified serial number)
|
Trinket(java.lang.String id,
TrinketType type,
int value,
java.lang.String imgName,
int reqLevel,
Modifiers bonuses,
java.util.List<java.lang.String> equipEffects,
Action onUse,
org.newdawn.slick.GameContainer gc)
Trinket constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
use(Targetable user,
Targetable target)
Activates object on-use action
|
getEffect, getEffects, getEffectsIds, getOwner, getSpriteFor, reset, type
draw, getActionType, getId, getMaxStack, getNumber, getSerialId, getTile, getValue, setOwner, setTile, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
getId, getSerialId
public static final int FINGER
public static final int NECK
public static final int ARTIFACT
public Trinket(java.lang.String id, TrinketType type, int value, java.lang.String imgName, int reqLevel, Modifiers bonuses, java.util.List<java.lang.String> equipEffects, Action onUse, org.newdawn.slick.GameContainer gc) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
id
- Item IDtype
- Trinket typevalue
- Item valueimgName
- Item icon image file namereqLevel
- Level required to use this itembonuses
- Bonuses for ownerequippEffects
- List with IDs of all equip effectsonUse
- Action on usegc
- Slick game containerorg.newdawn.slick.SlickException
java.io.IOException
java.awt.FontFormatException
public Trinket(java.lang.String id, long serial, TrinketType type, int value, java.lang.String imgName, int reqLevel, Modifiers bonuses, java.util.List<java.lang.String> equipEffects, Action onUse, org.newdawn.slick.GameContainer gc) throws org.newdawn.slick.SlickException, java.io.IOException, java.awt.FontFormatException
id
- Item IDserial
- Item serial numbertype
- Trinket typevalue
- Item valueimgName
- Item icon image file namereqLevel
- Level required to use this itembonuses
- Bonuses for ownerequippEffects
- List with IDs of all equip effectsonUse
- Action on usegc
- Slick game containerorg.newdawn.slick.SlickException
java.io.IOException
java.awt.FontFormatException
public boolean use(Targetable user, Targetable target)
Usable
user
- Object usertarget
- Object user target