Ejemplo n.º 1
0
  @Override
  public ConfigurationSection getDefaultConfig() {
    ConfigurationSection node = super.getDefaultConfig();
    node.set(SkillSetting.MAX_DISTANCE.node(), 30);
    node.set(SkillSetting.DAMAGE.node(), 5);
    node.set(SkillSetting.DURATION.node(), 1000);
    node.set(SkillSetting.MANA.node(), 5);
    node.set(SkillSetting.COOLDOWN.node(), 100);

    return node;
  }
Ejemplo n.º 2
0
  @Override
  public String getDescription(Hero hero) {

    int damage =
        (SkillConfigManager.getUseSetting(hero, this, SkillSetting.DAMAGE.node(), 30, false));

    String description = getDescription().replace("$1", damage + "");

    // COOLDOWN
    int cooldown =
        (SkillConfigManager.getUseSetting(hero, this, SkillSetting.COOLDOWN.node(), 0, false)
                - SkillConfigManager.getUseSetting(
                        hero, this, SkillSetting.COOLDOWN_REDUCE.node(), 0, false)
                    * hero.getSkillLevel(this))
            / 1000;
    if (cooldown > 0) {
      description += " CD:" + cooldown + "s";
    }

    // MANA
    int mana =
        SkillConfigManager.getUseSetting(hero, this, SkillSetting.MANA.node(), 10, false)
            - (SkillConfigManager.getUseSetting(
                    hero, this, SkillSetting.MANA_REDUCE.node(), 0, false)
                * hero.getSkillLevel(this));
    if (mana > 0) {
      description += " M:" + mana;
    }

    // HEALTH_COST
    int healthCost =
        SkillConfigManager.getUseSetting(hero, this, SkillSetting.HEALTH_COST, 0, false)
            - (SkillConfigManager.getUseSetting(
                    hero, this, SkillSetting.HEALTH_COST_REDUCE, mana, true)
                * hero.getSkillLevel(this));
    if (healthCost > 0) {
      description += " HP:" + healthCost;
    }

    // STAMINA
    int staminaCost =
        SkillConfigManager.getUseSetting(hero, this, SkillSetting.STAMINA.node(), 0, false)
            - (SkillConfigManager.getUseSetting(
                    hero, this, SkillSetting.STAMINA_REDUCE.node(), 0, false)
                * hero.getSkillLevel(this));
    if (staminaCost > 0) {
      description += " FP:" + staminaCost;
    }

    // DELAY
    int delay =
        SkillConfigManager.getUseSetting(hero, this, SkillSetting.DELAY.node(), 0, false) / 1000;
    if (delay > 0) {
      description += " W:" + delay + "s";
    }

    // EXP
    int exp = SkillConfigManager.getUseSetting(hero, this, SkillSetting.EXP.node(), 0, false);
    if (exp > 0) {
      description += " XP:" + exp;
    }
    return description;
  }