Examples of reduceCurrentHp()


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

          AttackInfo info = Formulas.calcPhysDam(activeChar, realTarget, this, false, false, ss, false);
          if (info.lethal_dmg > 0)
          {
            realTarget.reduceCurrentHp(info.lethal_dmg, info.reflectableDamage, activeChar, this, true, true, false, false, false, false, false);
          }
          realTarget.reduceCurrentHp(info.damage, info.reflectableDamage, activeChar, this, true, true, false, true, false, false, true);
          if (!reflected)
          {
            realTarget.doCounterAttack(this, activeChar, false);
          }
        }
View Full Code Here

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

        double damage = _power * realTarget.getCurrentCp();
        if (damage < 1)
        {
          damage = 1;
        }
        realTarget.reduceCurrentHp(damage, 0, activeChar, this, true, true, false, true, false, false, true);
        getEffects(activeChar, target, getActivateRate() > 0, false, reflected);
      }
    }
  }
}
View Full Code Here

Examples of lineage2.gameserver.model.instances.NpcInstance.reduceCurrentHp()

          {
            Location loc = Location.findAroundPosition(177134, -18807, -2256, 50, 100, npc.getGeoIndex());
            npc.teleToLocation(loc);
            if (npc == GustavInstance.this)
            {
              npc.reduceCurrentHp(npc.getCurrentHp(), 0, npc, null, false, false, false, false, false, false, false);
            }
          }
        }, 10000L);
      }
    }
View Full Code Here

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

                  damage = (int)Formulas.getInstance().calcPhysDam(
                  activeChar, target, skill, shld, crit, dual, soul);

                if (damage > 0)
                {
                  target.reduceCurrentHp(damage, activeChar);
                  if (soul && weapon!= null)
                    weapon.setChargedSoulshot(L2ItemInstance.CHARGED_NONE);

                  activeChar.sendDamageMessage(target, damage, false, false, false);
View Full Code Here

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

                               player.reduceCurrentHp(damage, activeChar);
                    }
                   }
                    else if (target instanceof L2MonsterInstance) // If is a monster remove first damage and after 50% of current hp
                    {
                     target.reduceCurrentHp(damage, activeChar);
                     target.reduceCurrentHp(target.getCurrentHp()/2, activeChar);
                    }
                  }
                  else //2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
                  {
View Full Code Here

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

                    }
                   }
                    else if (target instanceof L2MonsterInstance) // If is a monster remove first damage and after 50% of current hp
                    {
                     target.reduceCurrentHp(damage, activeChar);
                     target.reduceCurrentHp(target.getCurrentHp()/2, activeChar);
                    }
                  }
                  else //2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
                  {
                         // If is a monster damage is (CurrentHp - 1) so HP = 1
View Full Code Here

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

                  }
                  else //2nd lethal effect activate (cp,hp to 1 or if target is npc then hp to 1)
                  {
                         // If is a monster damage is (CurrentHp - 1) so HP = 1
                        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())
                    {
View Full Code Here

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

                      smsg.addNumber(damage);
                      player.sendPacket(smsg);

                }
                else
                  target.reduceCurrentHp(damage, activeChar);
                  }
                  else
                  {
                    target.reduceCurrentHp(damage, activeChar);
                  }
View Full Code Here

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

                else
                  target.reduceCurrentHp(damage, activeChar);
                  }
                  else
                  {
                    target.reduceCurrentHp(damage, activeChar);
                  }
                }
            }
            else // No - damage
            {
View Full Code Here

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

              smsg.addString(activeChar.getName());
              smsg.addNumber((int)damage);
              player.sendPacket(smsg);
            }
            else
              target.reduceCurrentHp(damage, activeChar);
        if(activeChar instanceof L2PcInstance)
          activeChar.sendPacket(new SystemMessage(SystemMessageId.CRITICAL_HIT));
        SystemMessage sm = new SystemMessage(SystemMessageId.YOU_DID_S1_DMG);
              sm.addNumber((int)damage);
              activeChar.sendPacket(sm);
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.