Class RuneRequirement

java.lang.Object
net.storm.api.magic.RuneRequirement

public class RuneRequirement extends Object
Represents a rune requirement for casting a spell.

Each spell that requires runes will have one or more RuneRequirement instances specifying which runes are needed and in what quantity. This class is immutable and uses Lombok's @Value annotation for automatic generation of getters, equals, hashCode, and toString methods.

Example usage:


 // Create a requirement for 3 Fire runes
 RuneRequirement fireReq = new RuneRequirement(3, Rune.FIRE);

 // Check if the player meets this requirement
 if (fireReq.meetsRequirements()) {
     // Player has at least 3 Fire runes available
 }
 

See Also:
  • Constructor Details

    • RuneRequirement

      public RuneRequirement()
  • Method Details

    • meetsRequirements

      public boolean meetsRequirements()
      Checks if the player currently meets this rune requirement.

      This method delegates to Rune.getQuantity() which checks all available sources of runes including:

      • Inventory runes (including combination runes)
      • Rune Pouch contents
      • Equipped items that provide unlimited runes (staves, tomes, etc.)

      Returns:
      true if the player has at least the required quantity of this rune type, false otherwise