Package studio.magemonkey.fabled.manager
Class ComboManager
java.lang.Object
studio.magemonkey.fabled.manager.ComboManager
Manages click combos with what combos are active and
what skills result from various combinations
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInitializes the combo manager, grabbing settings from the configuration to prepare data -
Method Summary
Modifier and TypeMethodDescriptionboolean
conflicts
(int c1, int c2) Compares two combo IDs to see if they conflictint
convertCombo
(Collection<Click> clicks) Converts a click combination to an IDint
convertCombo
(Click[] clicks) Converts a click combination to an IDint
convertCombo
(Click[] clicks, int amount) Converts a click combination to an IDconvertId
(int id) Converts a combo ID to clicksint
Retrieves the accepted size of combosgetComboString
(int combo) Retrieves a formatted display of the combo based on the language configgetComboString
(List<Click> clicks) Retrieves a formatted display of the combo based on the language configgetSaveString
(int combo) Retrieves a formatted display of the combo used to save the combo to diskgetSaveString
(List<Click> clicks) Retrieves a formatted display of the combo used to save the combo to diskboolean
isClickEnabled
(int id) Checks whether the click with the given ID is enabledboolean
isValidCombo
(int id) Checks whether the combo is a valid oneboolean
isValidDefaultCombo
(int id) Checks whether the combo is a valid oneint
parseCombo
(String combo) Parses a combo from a string using spaces as breaksint
reverse
(int id) Reverses a combo order
-
Field Details
-
DISPLAY_KEY
- See Also:
-
-
Constructor Details
-
ComboManager
public ComboManager()Initializes the combo manager, grabbing settings from the configuration to prepare data
-
-
Method Details
-
getComboSize
public int getComboSize()Retrieves the accepted size of combos- Returns:
- the accepted size of combos
-
isClickEnabled
public boolean isClickEnabled(int id) Checks whether the click with the given ID is enabled- Parameters:
id
- ID of the click- Returns:
- true if enabled, false otherwise
-
isValidCombo
public boolean isValidCombo(int id) Checks whether the combo is a valid one- Parameters:
id
- ID of the combo- Returns:
- true if valid, false otherwise
-
isValidDefaultCombo
public boolean isValidDefaultCombo(int id) Checks whether the combo is a valid one- Parameters:
id
- ID of the combo- Returns:
- true if valid, false otherwise
-
convertId
Converts a combo ID to clicks- Parameters:
id
- combo ID- Returns:
- click combination or null if invalid
-
conflicts
public boolean conflicts(int c1, int c2) Compares two combo IDs to see if they conflict- Parameters:
c1
- first combo IDc2
- second combo ID- Returns:
- true if conflicts, false otherwise
-
reverse
public int reverse(int id) Reverses a combo order- Parameters:
id
- combo ID- Returns:
- reversed combo ID
-
convertCombo
Converts a click combination to an ID- Parameters:
clicks
- clicks to convertamount
- number of clicks to convert- Returns:
- combo ID
-
convertCombo
Converts a click combination to an ID- Parameters:
clicks
- clicks to convert- Returns:
- combo ID
-
convertCombo
Converts a click combination to an ID- Parameters:
clicks
- clicks to convert- Returns:
- combo ID
-
getComboString
Retrieves a formatted display of the combo based on the language config- Parameters:
combo
- the ID of the combo- Returns:
- formatted string for the combo
-
getComboString
Retrieves a formatted display of the combo based on the language config- Parameters:
clicks
- clicks of the combo- Returns:
- formatted string for the combo
-
getSaveString
Retrieves a formatted display of the combo used to save the combo to disk- Parameters:
combo
- the ID of the combo- Returns:
- formatted string for the combo
-
getSaveString
Retrieves a formatted display of the combo used to save the combo to disk- Parameters:
clicks
- clicks of the combo- Returns:
- formatted string for the combo
-
parseCombo
Parses a combo from a string using spaces as breaks- Parameters:
combo
- combo string- Returns:
- ID of the combo or -1 if invalid
-