Class SkillSet

java.lang.Object
com.csse3200.game.progression.skilltree.SkillSet

public class SkillSet extends Object
The SkillSet class manages all available skills in the game and tracks which skills have been unlocked by a player. Contains a static list of all predefined skills Tracks unlocked skills for a player which get activated from the Skilltree Screen
  • Constructor Details

    • SkillSet

      public SkillSet()
  • Method Details

    • getSkills

      public static List<Skill> getSkills()
      Returns the list of all predefined skills in the game.
      Returns:
      a static list of Skills
    • addSkill

      public void addSkill(Skill skill)
      Adds a skill to this instance's unlocked skills list.
      Parameters:
      skill - to be added to list
    • removeSkill

      public void removeSkill(Skill.StatType type)
    • getUnlockedSkills

      public List<Skill> getUnlockedSkills()
      Returns the list of skills that have been unlocked for this instance/player.
      Returns:
      a list of unlocked Skill objects
    • checkIfUnlocked

      public boolean checkIfUnlocked(String name)
      Checks if a skill with the given name has been unlocked.
      Parameters:
      name - the name of the skill to check
      Returns:
      true if the skill is unlocked, false otherwise
    • getSkill

      public Skill getSkill(String name)
      Searches for a skill by name in the static list of all skills.
      Parameters:
      name - the name of the skill to search for
      Returns:
      the Skill object if found; null otherwise
    • getUpgradeValue

      public float getUpgradeValue(Skill.StatType type)
      Parameters:
      type - the StatType of the skill to be checked
      Returns:
      a float that represents the percentage increase of the input stat
    • getLevel

      public int getLevel(String skillName)
      Parameters:
      skillName - the name of the skill
      Returns:
      an integer that corresponds to the level associated with the input
    • getCurrentLevel

      public int getCurrentLevel(Skill.StatType type)
      Parameters:
      type - the StateType of the skill
      Returns:
      an integer that corresponds to the furthest unlocked level of that skill
    • isUnlockable

      public boolean isUnlockable(String skillName)
      Checks if a skill with the given name has been unlocked.
      Parameters:
      skillName - the name of the skill to check
      Returns:
      true if the skill is either Basic or previous levels with same type have been unlocked and false if otherwise