Enum Class FairyRing

java.lang.Object
java.lang.Enum<FairyRing>
net.storm.api.movement.pathfinder.model.FairyRing
All Implemented Interfaces:
Serializable, Comparable<FairyRing>, Constable

public enum FairyRing extends Enum<FairyRing>
Enumeration of all Fairy Ring destinations with their three-letter codes.

FairyRing represents the fairy ring transportation network accessible after starting the Fairy Tale Part II quest. Each ring is identified by a unique three-letter code (e.g., AIQ, BKR, DKS).

Code System

Fairy ring codes consist of three dials:

  • First dial - A, B, C, D
  • Second dial - I, J, K, L
  • Third dial - P, Q, R, S

Requirements

Some fairy rings have additional requirements:

  • Quest progress (e.g., AJQ requires Death to the Dorgeshuun)
  • Region visitation (e.g., AIS requires Varlamore visit)
  • Light source items (for underground locations)

Special Codes

  • Zanaris - The central hub, not a standard three-letter code
  • DIQ - Can be configured for POH fairy ring

Usage Example


 FairyRing destination = FairyRing.DKS; // Snowy Hunter area

 // Check current code
 String currentCode = FairyRing.getCurrentCode();

 // Set and travel to destination
 if (!destination.validate()) {
     destination.setCode();
 } else {
     destination.travel();
 }
 
See Also:
  • Enum Constant Details

  • Method Details

    • values

      public static FairyRing[] 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 FairyRing 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
    • getCurrentCode

      public static String getCurrentCode()
      Gets the currently dialed fairy ring code from the interface.
      Returns:
      the current three-letter code
    • getNearest

      public static FairyRing getNearest()
      Finds the nearest fairy ring to the player by distance.
      Returns:
      the nearest fairy ring, or null if none found
    • getAll

      public static FairyRing[] getAll()
      Gets all fairy ring destinations.
      Returns:
      array of all fairy rings
    • getAllWithNoRequirements

      public static Set<FairyRing> getAllWithNoRequirements()
      Gets all fairy rings that have no special requirements.
      Returns:
      set of fairy rings with no requirements
    • getTransports

      public static List<Transport> getTransports()
      Generates Transport objects for all valid fairy ring connections.

      Creates a transport from every accessible fairy ring to every other accessible fairy ring, based on the user's configuration.

      Returns:
      list of fairy ring transport connections
    • validate

      public boolean validate()
      Validates that the current dial code matches this fairy ring's code.
      Returns:
      true if the code matches, false otherwise
    • validateCode

      public static boolean validateCode(String code)
      Validates that the current dial code matches the given code.
      Parameters:
      code - the code to validate against
      Returns:
      true if the codes match, false otherwise
    • setCode

      public void setCode()
      Sets the dials to this fairy ring's code.
    • setCode

      public static void setCode(String targetCode)
      Sets the fairy ring dials to the specified code.

      First checks the travel log for quick selection, then falls back to manually turning dials one position at a time.

      Parameters:
      targetCode - the three-letter code to dial
    • travel

      public void travel()
      Travels to this fairy ring destination.
    • travel

      public static void travel(String code)
      Travels to the specified fairy ring code.

      If the code is already dialed, confirms travel. Otherwise, sets the code first.

      Parameters:
      code - the destination code to travel to
    • toString

      public String toString()
      Returns a formatted display string for this fairy ring.
      Overrides:
      toString in class Enum<FairyRing>
      Returns:
      the formatted code with spaces (e.g., "D K S")