@Override public String getDescription(Hero hero) { int chance2x = (int) (SkillConfigManager.getUseSetting(hero, this, "chance-2x", 0.2, false) * 100 + SkillConfigManager.getUseSetting( hero, this, "added-chance-2x-per-level", 0.0, false) * hero.getSkillLevel(this)); int chance3x = (int) (SkillConfigManager.getUseSetting(hero, this, "chance-3x", 0.1, false) * 100 + SkillConfigManager.getUseSetting( hero, this, "added-chance-3x-per-level", 0.0, false) * hero.getSkillLevel(this)); String description = getDescription() .replace("$1", (100 - (chance2x + chance3x)) + "") .replace("$2", chance2x + "") .replace("$3", chance3x + ""); // COOLDOWN int cooldown = (SkillConfigManager.getUseSetting(hero, this, Setting.COOLDOWN.node(), 0, false) - SkillConfigManager.getUseSetting( hero, this, Setting.COOLDOWN_REDUCE.node(), 0, false) * hero.getSkillLevel(this)) / 1000; if (cooldown > 0) { description += " CD:" + cooldown + "s"; } // MANA int mana = SkillConfigManager.getUseSetting(hero, this, Setting.MANA.node(), 10, false) - (SkillConfigManager.getUseSetting(hero, this, Setting.MANA_REDUCE.node(), 0, false) * hero.getSkillLevel(this)); if (mana > 0) { description += " M:" + mana; } // HEALTH_COST int healthCost = SkillConfigManager.getUseSetting(hero, this, Setting.HEALTH_COST, 0, false) - (SkillConfigManager.getUseSetting(hero, this, Setting.HEALTH_COST_REDUCE, mana, true) * hero.getSkillLevel(this)); if (healthCost > 0) { description += " HP:" + healthCost; } // STAMINA int staminaCost = SkillConfigManager.getUseSetting(hero, this, Setting.STAMINA.node(), 0, false) - (SkillConfigManager.getUseSetting(hero, this, Setting.STAMINA_REDUCE.node(), 0, false) * hero.getSkillLevel(this)); if (staminaCost > 0) { description += " FP:" + staminaCost; } // DELAY int delay = SkillConfigManager.getUseSetting(hero, this, Setting.DELAY.node(), 0, false) / 1000; if (delay > 0) { description += " W:" + delay + "s"; } // EXP int exp = SkillConfigManager.getUseSetting(hero, this, Setting.EXP.node(), 0, false); if (exp > 0) { description += " XP:" + exp; } return description; }
@Override public String getDescription(Hero hero) { int bDmg = SkillConfigManager.getUseSetting(hero, this, "BaseTickDamage", 0, false); float bMulti = SkillConfigManager.getUseSetting(hero, this, "LevelMultiplier", 0, false); long duration = SkillConfigManager.getUseSetting(hero, this, Setting.DURATION, 12000, false); int damage = (int) (bMulti <= 0L ? bDmg : bDmg + bMulti * hero.getLevel()); String newDmg = damage > 0 ? "Deals " + damage + " over " + duration / 1000D + " seconds" : ""; String base = String.format("Encapsulate your target in ice for %s seconds. ", duration / 1000D); StringBuilder description = new StringBuilder(base + newDmg); // Additional descriptive-ness of skill settings int initCD = SkillConfigManager.getUseSetting(hero, this, Setting.COOLDOWN.node(), 0, false); int redCD = SkillConfigManager.getUseSetting(hero, this, Setting.COOLDOWN_REDUCE.node(), 0, false) * hero.getSkillLevel(this); int CD = (initCD - redCD) / 1000; if (CD > 0) { description.append(" CD:" + CD + "s"); } int initM = SkillConfigManager.getUseSetting(hero, this, Setting.MANA.node(), 0, false); int redM = SkillConfigManager.getUseSetting(hero, this, Setting.MANA_REDUCE.node(), 0, false) * hero.getSkillLevel(this); int manaUse = initM - redM; if (manaUse > 0) { description.append(" M:" + manaUse); } int initHP = SkillConfigManager.getUseSetting(hero, this, Setting.HEALTH_COST, 0, false); int redHP = SkillConfigManager.getUseSetting(hero, this, Setting.HEALTH_COST_REDUCE, 0, true) * hero.getSkillLevel(this); int HPCost = initHP - redHP; if (HPCost > 0) { description.append(" HP:" + HPCost); } int initF = SkillConfigManager.getUseSetting(hero, this, Setting.STAMINA.node(), 0, false); int redF = SkillConfigManager.getUseSetting(hero, this, Setting.STAMINA_REDUCE.node(), 0, false) * hero.getSkillLevel(this); int foodCost = initF - redF; if (foodCost > 0) { description.append(" FP:" + foodCost); } int delay = SkillConfigManager.getUseSetting(hero, this, Setting.DELAY.node(), 0, false) / 1000; if (delay > 0) { description.append(" W:" + delay); } int exp = SkillConfigManager.getUseSetting(hero, this, Setting.EXP.node(), 0, false); if (exp > 0) { description.append(" XP:" + exp); } return description.toString(); }