예제 #1
0
 /**
  * Gives the player a skill using the class data as a parent. This skill will not show up in a
  * skill tree.
  *
  * @param skill skill to give the player
  * @param parent parent class data
  */
 public void giveSkill(Skill skill, PlayerClass parent) {
   String key = skill.getKey();
   if (!skills.containsKey(key)) {
     PlayerSkill data = new PlayerSkill(this, skill, parent);
     combos.addSkill(skill);
     skills.put(key, data);
     autoLevel(skill);
   }
 }
예제 #2
0
 /** Attempts to auto-level any skills that are able to do so */
 public void autoLevel() {
   for (PlayerSkill skill : skills.values()) {
     autoLevel(skill.getData());
   }
 }