Class ComboManager

java.lang.Object
studio.magemonkey.fabled.manager.ComboManager

public class ComboManager extends Object
Manages click combos with what combos are active and what skills result from various combinations
  • Field Details

  • 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

      public List<Click> convertId(int id)
      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 ID
      c2 - 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

      public int convertCombo(Click[] clicks, int amount)
      Converts a click combination to an ID
      Parameters:
      clicks - clicks to convert
      amount - number of clicks to convert
      Returns:
      combo ID
    • convertCombo

      public int convertCombo(Click[] clicks)
      Converts a click combination to an ID
      Parameters:
      clicks - clicks to convert
      Returns:
      combo ID
    • convertCombo

      public int convertCombo(Collection<Click> clicks)
      Converts a click combination to an ID
      Parameters:
      clicks - clicks to convert
      Returns:
      combo ID
    • getComboString

      public String getComboString(int combo)
      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

      public String getComboString(List<Click> clicks)
      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

      public String getSaveString(int combo)
      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

      public String getSaveString(List<Click> clicks)
      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

      public int parseCombo(String combo)
      Parses a combo from a string using spaces as breaks
      Parameters:
      combo - combo string
      Returns:
      ID of the combo or -1 if invalid