Enum Class SpellBook.Standard

java.lang.Object
java.lang.Enum<SpellBook.Standard>
net.storm.api.magic.SpellBook.Standard
All Implemented Interfaces:
Serializable, Comparable<SpellBook.Standard>, Constable, Spell
Enclosing class:
SpellBook

public static enum SpellBook.Standard extends Enum<SpellBook.Standard> implements Spell
The Standard spellbook containing basic magic spells.

This is the default spellbook available to all players. It includes:

  • Strike, Bolt, Blast, Wave, and Surge combat spells
  • God spells (Saradomin Strike, Claws of Guthix, Flames of Zamorak)
  • Teleportation spells to major cities
  • Enchantment spells for jewelry and bolts
  • Utility spells (Alchemy, Superheat, Bones to Bananas)
  • Curse spells (Confuse, Weaken, Bind, etc.)

  • Enum Constant Details

  • Method Details

    • values

      public static SpellBook.Standard[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SpellBook.Standard valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSpellBook

      public SpellBook getSpellBook()
      Gets the spellbook that contains this spell.
      Specified by:
      getSpellBook in interface Spell
      Returns:
      SpellBook.STANDARD
    • canCast

      public boolean canCast()
      Checks whether this spell can currently be cast.

      This method verifies all requirements including:

      • The correct spellbook is active
      • The player has the required Magic level
      • The player has all required runes
      • The player meets any quest requirements
      • The player is in a members world (if required)
      • Any special equipment requirements are met

      For Standard spells, this checks:

      • The Standard spellbook is active
      • Player is in a members world (if required)
      • Home Teleport cooldown (for Home Teleport only)
      • Magic level requirement
      • Quest requirements for specific teleports
      • Equipment requirements (god staves, Iban's staff, etc.)
      • Item requirements (unpowered orbs, bananas)
      • Rune requirements

      Specified by:
      canCast in interface Spell
      Returns:
      true if the spell can be cast, false otherwise
    • haveRunesAvailable

      public boolean haveRunesAvailable()
      Checks if the player has all required runes to cast this spell.

      This method iterates through all rune requirements and verifies that each requirement is met using inventory runes, rune pouch, or equipped items that provide unlimited runes.

      Returns:
      true if all rune requirements are met, false otherwise
    • haveEquipment

      public boolean haveEquipment()
      Checks if the player has the required equipment to cast this spell.

      Some spells require specific weapons or items to be equipped:

      • Iban Blast - Requires Iban's staff
      • Magic Dart - Requires Slayer staff or Staff of the Dead variant
      • Saradomin Strike - Requires Saradomin staff or Staff of Light
      • Flames of Zamorak - Requires Zamorak staff or Staff of the Dead variant
      • Claws of Guthix - Requires Guthix staff, Void knight mace, or Staff of Balance

      Returns:
      true if equipment requirements are met, false otherwise
    • haveItem

      public boolean haveItem()
      Checks if the player has required items in inventory for this spell.

      Some spells require specific items:

      • Teleport to Ape Atoll - Requires a banana
      • Charge Orb spells - Require unpowered orbs

      Returns:
      true if item requirements are met, false otherwise