Examples of reduceCurrentHp()


Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

        int chance = Rnd.get(100);
        //2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
        if(skill.getLethalChance2() > 0 && chance < Formulas.getInstance().calcLethal(activeChar, target, skill.getLethalChance2()))
              {
                if (target instanceof L2NpcInstance)
                        target.reduceCurrentHp(target.getCurrentHp()-1, activeChar);
              else if (target instanceof L2PcInstance) // If is a active player set his HP and CP to 1
              {
                L2PcInstance player = (L2PcInstance)target;
                if (!player.isInvul()){
                  player.setCurrentHp(1);
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

                  L2PcInstance player = (L2PcInstance)target;
                if (!player.isInvul())
                  player.setCurrentCp(1); // Set CP to 1
                  }
                else if (target instanceof L2NpcInstance) // If is a monster remove first damage and after 50% of current hp
                  target.reduceCurrentHp(target.getCurrentHp()/2, activeChar);
                activeChar.sendPacket(new SystemMessage(SystemMessageId.LETHAL_STRIKE));
        }
      }
            L2Effect effect = activeChar.getFirstEffect(skill.getId());
            //Self Effect
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

    }
    if (target != null)
    {
      if (target instanceof L2PcInstance)
      {
        target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar);
        filename = "charmanage.htm";
      }
      else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
        target.reduceCurrentHp(target.getMaxHp()*Config.L2JMOD_CHAMPION_HP + 1, activeChar);
      else
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

      {
        target.reduceCurrentHp(target.getMaxHp() + target.getMaxCp() + 1, activeChar);
        filename = "charmanage.htm";
      }
      else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
        target.reduceCurrentHp(target.getMaxHp()*Config.L2JMOD_CHAMPION_HP + 1, activeChar);
      else
        target.reduceCurrentHp(target.getMaxHp() + 1, activeChar);
    }
    else
    {
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

        filename = "charmanage.htm";
      }
      else if (Config.L2JMOD_CHAMPION_ENABLE && target.isChampion())
        target.reduceCurrentHp(target.getMaxHp()*Config.L2JMOD_CHAMPION_HP + 1, activeChar);
      else
        target.reduceCurrentHp(target.getMaxHp() + 1, activeChar);
    }
    else
    {
      activeChar.sendPacket(new SystemMessage(SystemMessageId.INCORRECT_TARGET));
    }
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

                            activeChar.sendPacket(sm);
                        }
                  }
                }

                target.reduceCurrentHp(damage, activeChar);
            }
        }
        // self Effect :]
        L2Effect effect = activeChar.getFirstEffect(skill.getId());
        if (effect != null && effect.isSelfEffect())
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

                            activeChar.sendPacket(sm);
                        }
                  }
                }
               
                target.reduceCurrentHp(damage, activeChar);
            }

            // Check to see if we should do the decay right after the cast
            if (target.isDead() && getTargetType() == SkillTargetType.TARGET_CORPSE_MOB && target instanceof L2NpcInstance) {
                ((L2NpcInstance)target).endDecayTask();
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

      if (damage > 0)
            {
                double finalDamage = damage;
                finalDamage = finalDamage+(modifier*finalDamage);
        target.reduceCurrentHp(finalDamage, caster);

        caster.sendDamageMessage(target, (int)finalDamage, false, crit, false);

        if (soul && weapon!= null)
          weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Character.reduceCurrentHp()

      int damage = (int)Formulas.getInstance().calcMagicDam(
          activeChar, target, this, ss, bss, mcrit);

      if (damage > 0)
      {
        target.reduceCurrentHp(damage, activeChar);

              // Manage attack or cast break of the target (calculating rate, sending message...)
              if (!target.isRaid() && Formulas.getInstance().calcAtkBreak(target, damage))
              {
                  target.breakAttack();
View Full Code Here

Examples of net.sf.l2j.gameserver.model.L2Summon.reduceCurrentHp()

                // Only transfer dmg up to current HP, it should not be killed
                if (summon.getCurrentHp() < tDmg) tDmg = (int)summon.getCurrentHp() - 1;
                if (tDmg > 0)
                {
                    summon.reduceCurrentHp(tDmg, attacker);
                    value -= tDmg;
                    fullValue = (int) value; // reduce the annouced value here as player will get a message about summon dammage
                }
            }
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.