Enum Class FairyRing
- All Implemented Interfaces:
Serializable,Comparable<FairyRing>,Constable
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic FairyRing[]getAll()Gets all fairy ring destinations.Gets all fairy rings that have no special requirements.static StringGets the currently dialed fairy ring code from the interface.static FairyRingFinds the nearest fairy ring to the player by distance.Generates Transport objects for all valid fairy ring connections.voidsetCode()Sets the dials to this fairy ring's code.static voidSets the fairy ring dials to the specified code.toString()Returns a formatted display string for this fairy ring.voidtravel()Travels to this fairy ring destination.static voidTravels to the specified fairy ring code.booleanvalidate()Validates that the current dial code matches this fairy ring's code.static booleanvalidateCode(String code) Validates that the current dial code matches the given code.static FairyRingReturns the enum constant of this class with the specified name.static FairyRing[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AIQ
-
AIR
-
AIS
-
AJP
-
AJQ
-
AJR
-
AJS
-
AKP
-
AKQ
-
AKS
-
AKR
-
ALP
-
ALQ
-
ALR
-
ALS
-
BIP
-
BIQ
-
BIS
-
BJP
-
BJR
-
BJS
-
BKP
-
BKQ
-
BKR
-
BLP
-
BLR
-
BLS
-
CIP
-
CIS
-
CIR
-
CIQ
-
CJQ
-
CJR
-
CKP
-
CKQ
-
CKR
-
CKS
-
CLP
-
CLR
-
CLS
-
DIP
-
DIS
-
DIR
-
DJP
-
DJR
-
DKP
-
DKR
-
DKS
-
DLP
-
DLS
-
DLQ
-
DLR
-
ZANARIS
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getCurrentCode
Gets the currently dialed fairy ring code from the interface.- Returns:
- the current three-letter code
-
getNearest
Finds the nearest fairy ring to the player by distance.- Returns:
- the nearest fairy ring, or null if none found
-
getAll
Gets all fairy ring destinations.- Returns:
- array of all fairy rings
-
getAllWithNoRequirements
Gets all fairy rings that have no special requirements.- Returns:
- set of fairy rings with no requirements
-
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
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
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
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
Returns a formatted display string for this fairy ring.
-