Class SkillSet
java.lang.Object
com.csse3200.game.progression.skilltree.SkillSet
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a skill to this instance's unlocked skills list.boolean
checkIfUnlocked
(String name) Checks if a skill with the given name has been unlocked.int
int
Searches for a skill by name in the static list of all skills.Returns the list of all predefined skills in the game.Returns the list of skills that have been unlocked for this instance/player.float
boolean
isUnlockable
(String skillName) Checks if a skill with the given name has been unlocked.void
removeSkill
(Skill.StatType type)
-
Constructor Details
-
SkillSet
public SkillSet()
-
-
Method Details
-
getSkills
Returns the list of all predefined skills in the game.- Returns:
- a static list of Skills
-
addSkill
Adds a skill to this instance's unlocked skills list.- Parameters:
skill
- to be added to list
-
removeSkill
-
getUnlockedSkills
Returns the list of skills that have been unlocked for this instance/player.- Returns:
- a list of unlocked
Skill
objects
-
checkIfUnlocked
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
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
- Parameters:
type
- the StatType of the skill to be checked- Returns:
- a float that represents the percentage increase of the input stat
-
getLevel
- Parameters:
skillName
- the name of the skill- Returns:
- an integer that corresponds to the level associated with the input
-
getCurrentLevel
- Parameters:
type
- the StateType of the skill- Returns:
- an integer that corresponds to the furthest unlocked level of that skill
-
isUnlockable
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
-