Atavism Version 2018.1AGIS API

atavism.agis.objects
Class SkillInfo

java.lang.Object
  extended by atavism.agis.objects.SkillInfo
All Implemented Interfaces:
java.io.Serializable

public class SkillInfo
extends java.lang.Object
implements java.io.Serializable

The SkillInfo class stores information about the skills a player has and provides functions for learning skills, along with increasing and decreasing skill levels.

Author:
Andrew Harrison
See Also:
Serialized Form

Field Summary
protected  int category
           
protected  int pointsSpent
           
protected  int skillPoints
           
protected  java.util.HashMap<java.lang.Integer,SkillData> skills
           
 
Constructor Summary
SkillInfo()
           
SkillInfo(int category)
           
 
Method Summary
 SkillData addSkill(SkillTemplate tmpl)
          Adds a
static void applyNewAbilities(CombatInfo info, SkillTemplate tmpl, int skillValue)
           
static void applyPassiveEffects(AgisAbility ability, CombatInfo player)
          Applies the effects from the given ability to the player.
static void applyStatModifications(CombatInfo info, SkillTemplate tmpl, int skillValue)
          Applies stat modifications to the players CombatInfo based on their skill level for the specified skill template.
static void decreaseSkill(SkillInfo skillInfo, int skillType, int aspect, CombatInfo info)
          Decrease the level of the given skill.
 int getCategory()
           
 int getPointsSpent()
           
 int getSkillPoints()
           
 java.util.HashMap<java.lang.Integer,SkillData> getSkills()
           
static java.lang.String getStatSkillKey(SkillTemplate tmpl, int statNum)
           
static void increaseSkill(SkillInfo skillInfo, int skillType, int aspect, CombatInfo info, boolean increaseCurrent)
          Increase the skill level of the given skill.
static void increaseSkillCurrent(SkillInfo skillInfo, int skillType, int alterValue, CombatInfo info)
          Not used.
static void learnAbility(CombatInfo info, int abilityID)
          Adds the given ability to the players list of abilities they know.
static void learnSkill(SkillInfo skillInfo, int skillType, int aspect, CombatInfo info)
           
static void levelChanged(SkillInfo skillInfo, CombatInfo info, int newLevel)
          Gives players skill points for having leveled up.
static void newSkillGained(CombatInfo info, int skillType)
          Helper function.
static void removePassiveEffect(AgisAbility ability, CombatInfo player)
          Removed the effects from the given ability from the player.
static void resetSkills(SkillInfo skillInfo, CombatInfo info)
          Clear all skills and give the player back their skill points.
 void setCategory(int category)
           
 void setPointsSpent(int pointsSpent)
           
 void setSkillPoints(int skillPoints)
           
 void setSkills(java.util.HashMap<java.lang.Integer,SkillData> skills)
           
static void skillLost(CombatInfo info, int skillType)
          Helper function.
static void skillPointGain(CombatInfo info, int skillType, int skillValue)
          Helper function.
static void skillPointLoss(CombatInfo info, int skillType, int skillValue)
          Helper function.
static void skillUpAttempt(SkillInfo skillInfo, int skillType, CombatInfo info)
          Attempt to increase the players level and max level of the given skill.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

category

protected int category

skillPoints

protected int skillPoints

pointsSpent

protected int pointsSpent

skills

protected java.util.HashMap<java.lang.Integer,SkillData> skills
Constructor Detail

SkillInfo

public SkillInfo()

SkillInfo

public SkillInfo(int category)
Method Detail

addSkill

public SkillData addSkill(SkillTemplate tmpl)
Adds a

Parameters:
tmpl -
Returns:

getCategory

public int getCategory()

setCategory

public void setCategory(int category)

getSkillPoints

public int getSkillPoints()

setSkillPoints

public void setSkillPoints(int skillPoints)

getPointsSpent

public int getPointsSpent()

setPointsSpent

public void setPointsSpent(int pointsSpent)

getSkills

public java.util.HashMap<java.lang.Integer,SkillData> getSkills()

setSkills

public void setSkills(java.util.HashMap<java.lang.Integer,SkillData> skills)

learnSkill

public static void learnSkill(SkillInfo skillInfo,
                              int skillType,
                              int aspect,
                              CombatInfo info)

increaseSkill

public static void increaseSkill(SkillInfo skillInfo,
                                 int skillType,
                                 int aspect,
                                 CombatInfo info,
                                 boolean increaseCurrent)
Increase the skill level of the given skill.

Parameters:
skillInfo -
skillType -
aspect -
info -

decreaseSkill

public static void decreaseSkill(SkillInfo skillInfo,
                                 int skillType,
                                 int aspect,
                                 CombatInfo info)
Decrease the level of the given skill. The skill will be removed from the player if it reaches 0 unless it belongs to the same class as the player.

Parameters:
skillInfo -
skillType -
aspect -
info -

skillUpAttempt

public static void skillUpAttempt(SkillInfo skillInfo,
                                  int skillType,
                                  CombatInfo info)
Attempt to increase the players level and max level of the given skill.

Parameters:
skillInfo -
skillType -
info -

resetSkills

public static void resetSkills(SkillInfo skillInfo,
                               CombatInfo info)
Clear all skills and give the player back their skill points. WARNING: Needs tested and possibly fixed.

Parameters:
skillInfo -
info -

levelChanged

public static void levelChanged(SkillInfo skillInfo,
                                CombatInfo info,
                                int newLevel)
Gives players skill points for having leveled up. WARNING: Verify this function is still used, and open it up to allow the amount of points to be set.

Parameters:
skillInfo -
info -
newLevel -

increaseSkillCurrent

public static void increaseSkillCurrent(SkillInfo skillInfo,
                                        int skillType,
                                        int alterValue,
                                        CombatInfo info)
Not used.

Parameters:
skillInfo -
skillType -
alterValue -
info -

newSkillGained

public static void newSkillGained(CombatInfo info,
                                  int skillType)
Helper function. When a player learns a new skill this function will give them the start abilities from that skill.

Parameters:
oid -
skillType -

skillLost

public static void skillLost(CombatInfo info,
                             int skillType)
Helper function. When a player loses a skill this function will remove the starting abilities.

Parameters:
oid -
skillType -

skillPointGain

public static void skillPointGain(CombatInfo info,
                                  int skillType,
                                  int skillValue)
Helper function. When a player gains a point in a skill this function will increase the player stats and give them any abilities they have now unlocked.

Parameters:
oid: - The oid of the player who increased their skill value
skillType: - The type of skill that was increased
skillValue: - The new value of the skill

skillPointLoss

public static void skillPointLoss(CombatInfo info,
                                  int skillType,
                                  int skillValue)
Helper function. When a player loses a point in a skill this function will decrease the player stats and remove any abilities they can no longer use.

Parameters:
oid: - The oid of the player who decreased their skill value
skillType: - The type of skill that was decreased
skillValue: - The new value of the skill

learnAbility

public static void learnAbility(CombatInfo info,
                                int abilityID)
Adds the given ability to the players list of abilities they know. Adds the ability to their action bar if there is space and it isn't a passive ability.

Parameters:
info -
abilityID -

applyPassiveEffects

public static void applyPassiveEffects(AgisAbility ability,
                                       CombatInfo player)
Applies the effects from the given ability to the player. Called when a passive ability is learned.

Parameters:
ability -
player -

removePassiveEffect

public static void removePassiveEffect(AgisAbility ability,
                                       CombatInfo player)
Removed the effects from the given ability from the player. Called when a passive ability has been forgotten.

Parameters:
ability -
player -

applyStatModifications

public static void applyStatModifications(CombatInfo info,
                                          SkillTemplate tmpl,
                                          int skillValue)
Applies stat modifications to the players CombatInfo based on their skill level for the specified skill template. Removes all existing stat modifications first and recalculates all values.

Parameters:
info -
tmpl -

applyNewAbilities

public static void applyNewAbilities(CombatInfo info,
                                     SkillTemplate tmpl,
                                     int skillValue)

getStatSkillKey

public static java.lang.String getStatSkillKey(SkillTemplate tmpl,
                                               int statNum)


Copyright © 2018 Dragonsan Studios Sp. z o.o.