Examples of calcStat()


Examples of com.l2jfrozen.gameserver.model.L2Character.calcStat()

          // these skills needs to be rechecked
          if(target instanceof L2Attackable)
          {
            skill.getEffects(activeChar, target, ss, sps, bss);

            double aggdiff = ((L2Attackable) target).getHating(activeChar) - target.calcStat(Stats.AGGRESSION, ((L2Attackable) target).getHating(activeChar), target, skill);

            if(skill.getPower() > 0)
              ((L2Attackable) target).reduceHate(null, (int) skill.getPower());
            else if(aggdiff > 0)
              ((L2Attackable) target).reduceHate(null, (int) aggdiff);
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.L2Character.calcStat()

      }
     
      if (skill.getSkillType() == SkillType.HEAL_STATIC)
        hp = skill.getPower();
      else if (skill.getSkillType() != SkillType.HEAL_PERCENT)
        hp *= target.calcStat(Stats.HEAL_EFFECTIVNESS, 100, null, null) / 100;
     
      target.setCurrentHp(hp + target.getCurrentHp());
      target.setLastHealAmount((int) hp);
      StatusUpdate su = new StatusUpdate(target.getObjectId());
      su.addAttribute(StatusUpdate.CUR_HP, (int) target.getCurrentHp());
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance.calcStat()

        public boolean testImpl(Env env)
        {
                final L2PcInstance player = env.getPlayer();
                if ((player != null) && (player.getMaxLoad() > 0))
                {
                        int weightproc = (int) (((player.getCurrentLoad() - player.calcStat(Stats.WEIGHT_PENALTY, 1, player, null)) * 100) / player.getMaxLoad());
                        return (weightproc < _weight) || player.getDietMode();
                }
                return true;
        }
}
View Full Code Here

Examples of com.l2jfrozen.gameserver.model.actor.instance.L2PcInstance.calcStat()

                if ((targetObj != null) && targetObj instanceof L2PcInstance)
                {
                        final L2PcInstance target = targetObj.getActingPlayer();
                        if (!target.getDietMode() && (target.getMaxLoad() > 0))
                        {
                                int weightproc = (int) (((target.getCurrentLoad() - target.calcStat(Stats.WEIGHT_PENALTY, 1, target, null)) * 100) / target.getMaxLoad());
                                return (weightproc < _weight);
                        }
                }
                return false;
        }
View Full Code Here

Examples of l2p.gameserver.model.L2Character.calcStat()

      {
        int damage = Math.min(reward._dmg, maxHp);
        if(damage > 0)
        {
          double[] xpsp = calculateExpAndSp(attacker, attacker.getLevel(), damage);
          double neededExp = attacker.calcStat(Stats.SOULS_CONSUME_EXP, 0, this, null); // Начисление душ камаэлянам
          if(neededExp > 0 && xpsp[0] > neededExp)
          {
            broadcastPacket(new SpawnEmitter(this, attacker));
            ThreadPoolManager.getInstance().scheduleGeneral(new SoulConsumeTask(attacker), 1000);
          }
View Full Code Here

Examples of l2p.gameserver.model.L2Player.calcStat()

      {
        int damage = Math.min(reward._dmg, maxHp);
        if(damage > 0)
        {
          double[] xpsp = calculateExpAndSp(attacker, attacker.getLevel(), damage);
          double neededExp = attacker.calcStat(Stats.SOULS_CONSUME_EXP, 0, this, null); // Начисление душ камаэлянам
          if(neededExp > 0 && xpsp[0] > neededExp)
          {
            broadcastPacket(new SpawnEmitter(this, attacker));
            ThreadPoolManager.getInstance().scheduleGeneral(new SoulConsumeTask(attacker), 1000);
          }
View Full Code Here

Examples of l2p.gameserver.model.instances.L2NpcInstance.calcStat()

        if (player == null || npc == null) {
            return;
        }
        StringBuilder dialog = new StringBuilder("<html><body><center><font color=\"LEVEL\">");
        dialog.append(npc.getName()).append("<br></font></center><table width=\"80%\">");
        int FIRE_RECEPTIVE = (int) npc.calcStat(Stats.FIRE_RECEPTIVE, 0, null, null);
        if (FIRE_RECEPTIVE != 0) {
            dialog.append("<tr><td>Fire</td><td>").append(-FIRE_RECEPTIVE).append("</td></tr>");
        }
        int WIND_RECEPTIVE = (int) npc.calcStat(Stats.WIND_RECEPTIVE, 0, null, null);
        if (WIND_RECEPTIVE != 0) {
View Full Code Here

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

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

      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

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

            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
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.