/** * 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); } }
/** Attempts to auto-level any skills that are able to do so */ public void autoLevel() { for (PlayerSkill skill : skills.values()) { autoLevel(skill.getData()); } }