Class Skill
java.lang.Object
com.csse3200.game.progression.skilltree.Skill
Represents a skill in the game's skill tree Each skill has a name, a type of stat it affects, a
percentage bonus, a cost and is either un/locked.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Enumeration of all possible stats that a skill can modify. -
Constructor Summary
ConstructorsConstructorDescriptionSkill()
Skill
(String name, Skill.StatType statType, float percentage, int cost) Constructs a new Skill with the specified parameters. -
Method Summary
Modifier and TypeMethodDescriptionint
getCost()
Returns the cost required to unlock this skill.Returns a brief description of a Skill based on its other attributesgetName()
Returns the name of the skill.float
Returns the percentage bonus this skill provides.Returns the type of stat this skill affects.
-
Constructor Details
-
Skill
public Skill() -
Skill
Constructs a new Skill with the specified parameters.- Parameters:
name
- the name of the skillstatType
- the type of stat the skill affectspercentage
- the percentage bonus the skill providescost
- the cost to unlock the skill
-
-
Method Details
-
getName
Returns the name of the skill.- Returns:
- the skill name
-
getStatType
Returns the type of stat this skill affects.- Returns:
- the stat type
-
getCost
public int getCost()Returns the cost required to unlock this skill.- Returns:
- the skill cost
-
getPercentage
public float getPercentage()Returns the percentage bonus this skill provides.- Returns:
- the bonus percentage
-
getDescription
Returns a brief description of a Skill based on its other attributes- Returns:
- a string describing the skill
-