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 TypeMethodDescriptionbooleanconflicts(int c1, int c2) Compares two combo IDs to see if they conflictintconvertCombo(Collection<Click> clicks) Converts a click combination to an IDintconvertCombo(Click[] clicks) Converts a click combination to an IDintconvertCombo(Click[] clicks, int amount) Converts a click combination to an IDconvertId(int id) Converts a combo ID to clicksintRetrieves 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 diskbooleanisClickEnabled(int id) Checks whether the click with the given ID is enabledbooleanisValidCombo(int id) Checks whether the combo is a valid onebooleanisValidDefaultCombo(int id) Checks whether the combo is a valid oneintparseCombo(String combo) Parses a combo from a string using spaces as breaksintreverse(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
-