Class SkillDeprecationTool
SkillDeprecationTool
class checks and manages deprecated skills for a Person
.
It identifies deprecated skills from the person's current skill set and allows the user to remove them while refunding the appropriate amount of XP. This process involves calculating XP refunds using the skill's cost and reasoning multiplier, and providing a dialog for managing the refund.
The class is initialized with a Campaign
and a Person
, and directly modifies the person's
skills and XP as necessary.
Resources such as messages and button labels are loaded from a localized resource bundle.
-
Field Summary
FieldsModifier and TypeFieldDescriptionA list of deprecated skills. -
Constructor Summary
ConstructorsConstructorDescriptionSkillDeprecationTool
(Campaign campaign, Person person) Deprecated, for removal: This API element is subject to removal in a future version.SkillDeprecationTool
(Campaign campaign, Person person, boolean refundAll) Constructs a newSkillDeprecationTool
for the specified campaign and person. -
Method Summary
Modifier and TypeMethodDescriptionint
getRefundValue
(Skills skills, SkillType skillType, String skillName) Calculates the total XP refund value for a deprecated skill by summing the XP required to reach the current level of the skill.boolean
boolean
-
Field Details
-
DEPRECATED_SKILLS
A list of deprecated skills.These are skills that have been scheduled for removal.
Once the skill is removed from this list, players will no longer be able to benefit from skill refund. This list should be updated following each Milestone release. If there are no skills in the list an empty array MUST be left; otherwise we will run into NPEs during campaign loading.
Last Updated: 50.05
-
-
Constructor Details
-
SkillDeprecationTool
Constructs a newSkillDeprecationTool
for the specified campaign and person.Upon initialization, this constructor immediately checks the person's skills for any deprecated skills and handles them if necessary.
-
SkillDeprecationTool
@Deprecated(since="0.50.05", forRemoval=true) public SkillDeprecationTool(Campaign campaign, Person person) Deprecated, for removal: This API element is subject to removal in a future version.useSkillDeprecationTool(Campaign, Person, boolean)
instead.
-
-
Method Details
-
isSkipAll
public boolean isSkipAll() -
isRefundAll
public boolean isRefundAll() -
getRefundValue
Calculates the total XP refund value for a deprecated skill by summing the XP required to reach the current level of the skill.
-
SkillDeprecationTool(Campaign, Person, boolean)
instead.