Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Creature.calcStat()


    double profMod = 0;
    double resMod = 1.;
    double debuffMod = 1.;
    if (!skill.isIgnoreResists())
    {
      debuffMod = 1. - (target.calcStat(Stats.DEBUFF_RESIST, caster, skill) / 120.);
      if (debuffMod != 1)
      {
        if (debuffMod == Double.NEGATIVE_INFINITY)
        {
          if (debugGlobal)
View Full Code Here


      Element attackElement = getAttackElement(caster, target);
      if (attackElement == element)
      {
        elementMod += caster.calcStat(element.getAttack(), 0);
      }
      elementMod -= target.calcStat(element.getDefence(), 0);
      elementMod = Math.round(elementMod / 10);
      env.value += elementMod;
    }
    env.value = Math.max(env.value, Math.min(base, Config.SKILLS_CHANCE_MIN));
    env.value = Math.max(Math.min(env.value, Config.SKILLS_CHANCE_CAP), 1);
View Full Code Here

            continue;
          }
        }
        reflected = target.checkReflectSkill(activeChar, this);
        realTarget = reflected ? activeChar : target;
        double mult = 0.01 * realTarget.calcStat(Stats.DEATH_VULNERABILITY, activeChar, this);
        double lethal1 = _lethal1 * mult;
        double lethal2 = _lethal2 * mult;
        if ((lethal1 > 0) && Rnd.chance(lethal1))
        {
          if (realTarget.isPlayer())
View Full Code Here

    Player targetPlayer = (Player) env.target;
    if (targetPlayer.getCubic(_id) != null)
    {
      return true;
    }
    int size = (int) targetPlayer.calcStat(Stats.CUBICS_LIMIT, 1);
    if (targetPlayer.getCubics().size() >= size)
    {
      if (env.character == targetPlayer)
      {
        targetPlayer.sendPacket(Msg.CUBIC_SUMMONING_FAILED);
View Full Code Here

      player.sendPacket(Msg.SOULSHOT_DOES_NOT_MATCH_WEAPON_GRADE);
      return false;
    }
    if ((weaponItem.getItemType() == WeaponType.BOW) || (weaponItem.getItemType() == WeaponType.CROSSBOW))
    {
      final int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
      if ((newSS < soulShotConsumption) && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
      {
        soulShotConsumption = newSS;
      }
    }
View Full Code Here

      return false;
    }
    if ((weaponItem.getItemType() == WeaponType.BOW) || (weaponItem.getItemType() == WeaponType.CROSSBOW))
    {
      final int newSS = (int) player.calcStat(Stats.SS_USE_BOW, soulShotConsumption, null, null);
      if ((newSS < soulShotConsumption) && Rnd.chance(player.calcStat(Stats.SS_USE_BOW_CHANCE, soulShotConsumption, null, null)))
      {
        soulShotConsumption = newSS;
      }
    }
    if (!player.getInventory().destroyItem(item, soulShotConsumption))
View Full Code Here

            return false;
          }
          Player pl = ob.getPlayer();
          List<String> _s = new ArrayList<>();
          _s.add("==========TARGET STATS:");
          _s.add("==Magic Resist: " + pl.calcStat(Stats.MAGIC_RESIST, null, null));
          _s.add("==Magic Power: " + pl.calcStat(Stats.MAGIC_POWER, 1, null, null));
          _s.add("==Skill Power: " + pl.calcStat(Stats.SKILL_POWER, 1, null, null));
          _s.add("==Cast Break Rate: " + pl.calcStat(Stats.CAST_INTERRUPT, 1, null, null));
          _s.add("==========Powers:");
          _s.add("==Bleed: " + pl.calcStat(Stats.BLEED_POWER, 1, null, null));
View Full Code Here

          }
          Player pl = ob.getPlayer();
          List<String> _s = new ArrayList<>();
          _s.add("==========TARGET STATS:");
          _s.add("==Magic Resist: " + pl.calcStat(Stats.MAGIC_RESIST, null, null));
          _s.add("==Magic Power: " + pl.calcStat(Stats.MAGIC_POWER, 1, null, null));
          _s.add("==Skill Power: " + pl.calcStat(Stats.SKILL_POWER, 1, null, null));
          _s.add("==Cast Break Rate: " + pl.calcStat(Stats.CAST_INTERRUPT, 1, null, null));
          _s.add("==========Powers:");
          _s.add("==Bleed: " + pl.calcStat(Stats.BLEED_POWER, 1, null, null));
          _s.add("==Poison: " + pl.calcStat(Stats.POISON_POWER, 1, null, null));
View Full Code Here

          Player pl = ob.getPlayer();
          List<String> _s = new ArrayList<>();
          _s.add("==========TARGET STATS:");
          _s.add("==Magic Resist: " + pl.calcStat(Stats.MAGIC_RESIST, null, null));
          _s.add("==Magic Power: " + pl.calcStat(Stats.MAGIC_POWER, 1, null, null));
          _s.add("==Skill Power: " + pl.calcStat(Stats.SKILL_POWER, 1, null, null));
          _s.add("==Cast Break Rate: " + pl.calcStat(Stats.CAST_INTERRUPT, 1, null, null));
          _s.add("==========Powers:");
          _s.add("==Bleed: " + pl.calcStat(Stats.BLEED_POWER, 1, null, null));
          _s.add("==Poison: " + pl.calcStat(Stats.POISON_POWER, 1, null, null));
          _s.add("==Stun: " + pl.calcStat(Stats.STUN_POWER, 1, null, null));
View Full Code Here

          List<String> _s = new ArrayList<>();
          _s.add("==========TARGET STATS:");
          _s.add("==Magic Resist: " + pl.calcStat(Stats.MAGIC_RESIST, null, null));
          _s.add("==Magic Power: " + pl.calcStat(Stats.MAGIC_POWER, 1, null, null));
          _s.add("==Skill Power: " + pl.calcStat(Stats.SKILL_POWER, 1, null, null));
          _s.add("==Cast Break Rate: " + pl.calcStat(Stats.CAST_INTERRUPT, 1, null, null));
          _s.add("==========Powers:");
          _s.add("==Bleed: " + pl.calcStat(Stats.BLEED_POWER, 1, null, null));
          _s.add("==Poison: " + pl.calcStat(Stats.POISON_POWER, 1, null, null));
          _s.add("==Stun: " + pl.calcStat(Stats.STUN_POWER, 1, null, null));
          _s.add("==Root: " + pl.calcStat(Stats.ROOT_POWER, 1, null, null));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.