Enum Magic
- java.lang.Object
-
- java.lang.Enum<Magic>
-
- com.runemate.game.api.osrs.local.hud.interfaces.Magic
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Magic.Ancient
static class
Magic.Arceuus
static class
Magic.Book
static class
Magic.Filter
static class
Magic.Lunar
-
Enum Constant Summary
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
activate()
Activates the given spell using the action "Cast".boolean
activate(java.lang.String action)
Passes a custom string to Magic#active() to allow for interaction with spells with more than one action.boolean
deactivate()
Deactivates a spell which is currently activated.static Spell
getAutocastingSpell()
InterfaceComponent
getComponent()
Gets theInterfaceComponent
used to select/deselect the spellstatic Magic
getSelected()
SpellBook
getSpellBook()
int
getSpriteIdWhenAvailable()
Deprecated.int
getSpriteIdWhenUnavailable()
Deprecated.boolean
isAutocasting()
boolean
isSelected()
Determines whether or not a spell is currently selected by the border it has in the spellbook interface.static Magic
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static Magic[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LUMBRIDGE_HOME_TELEPORT
public static final Magic LUMBRIDGE_HOME_TELEPORT
-
WIND_STRIKE
public static final Magic WIND_STRIKE
-
CONFUSE
public static final Magic CONFUSE
-
ENCHANT_CROSSBOW_BOLT
public static final Magic ENCHANT_CROSSBOW_BOLT
-
WATER_STRIKE
public static final Magic WATER_STRIKE
-
LVL_1_ENCHANT
public static final Magic LVL_1_ENCHANT
-
EARTH_STRIKE
public static final Magic EARTH_STRIKE
-
WEAKEN
public static final Magic WEAKEN
-
FIRE_STRIKE
public static final Magic FIRE_STRIKE
-
BONES_TO_BANANAS
public static final Magic BONES_TO_BANANAS
-
WIND_BOLT
public static final Magic WIND_BOLT
-
CURSE
public static final Magic CURSE
-
BIND
public static final Magic BIND
-
LOW_LEVEL_ALCHEMY
public static final Magic LOW_LEVEL_ALCHEMY
-
WATER_BOLT
public static final Magic WATER_BOLT
-
VARROCK_TELEPORT
public static final Magic VARROCK_TELEPORT
-
GRAND_EXCHANGE_TELEPORT
public static final Magic GRAND_EXCHANGE_TELEPORT
-
LVL_2_ENCHANT
public static final Magic LVL_2_ENCHANT
-
EARTH_BOLT
public static final Magic EARTH_BOLT
-
LUMBRIDGE_TELEPORT
public static final Magic LUMBRIDGE_TELEPORT
-
TELEKINETIC_GRAB
public static final Magic TELEKINETIC_GRAB
-
FIRE_BOLT
public static final Magic FIRE_BOLT
-
FALADOR_TELEPORT
public static final Magic FALADOR_TELEPORT
-
CRUMBLE_UNDEAD
public static final Magic CRUMBLE_UNDEAD
-
TELEPORT_TO_HOUSE
public static final Magic TELEPORT_TO_HOUSE
-
TELEPORT_OUTSIDE_HOUSE
public static final Magic TELEPORT_OUTSIDE_HOUSE
-
WIND_BLAST
public static final Magic WIND_BLAST
-
SUPERHEAT_ITEM
public static final Magic SUPERHEAT_ITEM
-
CAMELOT_TELEPORT
public static final Magic CAMELOT_TELEPORT
-
SEERS_TELEPORT
public static final Magic SEERS_TELEPORT
-
WATER_BLAST
public static final Magic WATER_BLAST
-
LVL_3_ENCHANT
public static final Magic LVL_3_ENCHANT
-
IBAN_BLAST
public static final Magic IBAN_BLAST
-
SNARE
public static final Magic SNARE
-
MAGIC_DART
public static final Magic MAGIC_DART
-
ARDOUGNE_TELEPORT
public static final Magic ARDOUGNE_TELEPORT
-
EARTH_BLAST
public static final Magic EARTH_BLAST
-
HIGH_LEVEL_ALCHEMY
public static final Magic HIGH_LEVEL_ALCHEMY
-
CHARGE_WATER_ORB
public static final Magic CHARGE_WATER_ORB
-
LVL_4_ENCHANT
public static final Magic LVL_4_ENCHANT
-
WATCHTOWER_TELEPORT
public static final Magic WATCHTOWER_TELEPORT
-
YANILLE_TELEPORT
public static final Magic YANILLE_TELEPORT
-
FIRE_BLAST
public static final Magic FIRE_BLAST
-
CHARGE_EARTH_ORB
public static final Magic CHARGE_EARTH_ORB
-
BONES_TO_PEACHES
public static final Magic BONES_TO_PEACHES
-
SARADOMIN_STRIKE
public static final Magic SARADOMIN_STRIKE
-
CLAWS_OF_GUTHIX
public static final Magic CLAWS_OF_GUTHIX
-
FLAMES_OF_ZAMORAK
public static final Magic FLAMES_OF_ZAMORAK
-
TROLLHEIM_TELEPORT
public static final Magic TROLLHEIM_TELEPORT
-
WIND_WAVE
public static final Magic WIND_WAVE
-
CHARGE_FIRE_ORB
public static final Magic CHARGE_FIRE_ORB
-
TELEPORT_TO_APE_ATOLL
public static final Magic TELEPORT_TO_APE_ATOLL
-
WATER_WAVE
public static final Magic WATER_WAVE
-
CHARGE_AIR_ORB
public static final Magic CHARGE_AIR_ORB
-
VULNERABILITY
public static final Magic VULNERABILITY
-
LVL_5_ENCHANT
public static final Magic LVL_5_ENCHANT
-
KOUREND_CASTLE_TELEPORT
public static final Magic KOUREND_CASTLE_TELEPORT
-
EARTH_WAVE
public static final Magic EARTH_WAVE
-
ENFEEBLE
public static final Magic ENFEEBLE
-
TELEOTHER_LUMBRIDGE
public static final Magic TELEOTHER_LUMBRIDGE
-
FIRE_WAVE
public static final Magic FIRE_WAVE
-
ENTANGLE
public static final Magic ENTANGLE
-
STUN
public static final Magic STUN
-
CHARGE
public static final Magic CHARGE
-
WIND_SURGE
public static final Magic WIND_SURGE
-
TELEOTHER_FALADOR
public static final Magic TELEOTHER_FALADOR
-
WATER_SURGE
public static final Magic WATER_SURGE
-
TELE_BLOCK
public static final Magic TELE_BLOCK
-
TELEPORT_TO_BOUNTY_TARGET
public static final Magic TELEPORT_TO_BOUNTY_TARGET
-
LVL_6_ENCHANT
public static final Magic LVL_6_ENCHANT
-
TELEOTHER_CAMELOT
public static final Magic TELEOTHER_CAMELOT
-
EARTH_SURGE
public static final Magic EARTH_SURGE
-
LEVEL_7_ENCHANT
public static final Magic LEVEL_7_ENCHANT
-
FIRE_SURGE
public static final Magic FIRE_SURGE
-
-
Method Detail
-
values
public static Magic[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Magic c : Magic.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Magic valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
getSelected
public static Magic getSelected()
- Returns:
- the currently selected spell from the enumeration, null if none is selected or an unrecognised spell is selected.
-
getAutocastingSpell
public static Spell getAutocastingSpell()
-
getSpriteIdWhenAvailable
@Deprecated public int getSpriteIdWhenAvailable()
Deprecated.Implementation detail so no longer exposed.- Returns:
- an int that should be the sprite id when a spell is castable.
-
getSpriteIdWhenUnavailable
@Deprecated public int getSpriteIdWhenUnavailable()
Deprecated.Implementation detail so no longer exposed.- Returns:
- an int that should be the sprite id when a spell is not castable.
-
activate
public boolean activate(java.lang.String action)
Passes a custom string to Magic#active() to allow for interaction with spells with more than one action. For example, Camelot Teleport and Varrock Teleport have more than one action upon completion of Achievement Diaries.This defaults to cast if #active() is called (without the custom action string).
- Parameters:
action
- The action to perform. eg. "Cast" or "Camelot"- Returns:
- true the spell was successfully interacted with using the String provided.
-
activate
public boolean activate()
Activates the given spell using the action "Cast".- Specified by:
activate
in interfaceSpell
- Returns:
- true if the spell was successfully interacted with
- See Also:
activate(String)
-
deactivate
public boolean deactivate()
Deactivates a spell which is currently activated.- Returns:
- If the spell was successfully deactivated or the spell was already deactivated.
-
getComponent
public InterfaceComponent getComponent()
Gets theInterfaceComponent
used to select/deselect the spell- Specified by:
getComponent
in interfaceSpell
- Returns:
- the
InterfaceComponent
used to interact with the spell
-
isSelected
public boolean isSelected()
Determines whether or not a spell is currently selected by the border it has in the spellbook interface. eg. High Level Alchemy has been selected but has not yet been cast on an item.- Specified by:
isSelected
in interfaceSpell
- Returns:
- true if the spell is currently selected
-
isAutocasting
public boolean isAutocasting()
- Specified by:
isAutocasting
in interfaceSpell
-
getSpellBook
public SpellBook getSpellBook()
- Specified by:
getSpellBook
in interfaceSpell
-
-