Package lineage2.gameserver.model

Examples of lineage2.gameserver.model.Creature


  @Override
  protected void thinkAttack()
  {
    NpcInstance actor = getActor();
    Creature topDamager = actor.getAggroList().getTopDamager();
    Creature randomHated = actor.getAggroList().getRandomHated();
    Creature mostHated = actor.getAggroList().getMostHated();

    //Eternal Blizzard Cast
    if(!actor.isCastingNow() && _eternalblizzardReuseTimer < System.currentTimeMillis())
    {
      actor.doCast(SkillTable.getInstance().getInfo(Skill_EternalBlizzard, 1), actor, true);
View Full Code Here


    boolean ss = activeChar.getChargedSoulShot() && isSSPossible();
    if (ss)
    {
      activeChar.unChargeShots(false);
    }
    Creature realTarget;
    boolean reflected;
    for (Creature target : targets)
    {
      if (target != null)
      {
        if (target.isDead())
        {
          continue;
        }
        reflected = target.checkReflectSkill(activeChar, this);
        realTarget = reflected ? activeChar : target;
        if (getPower() > 0)
        {
          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);
          }
        }
        getEffects(activeChar, target, getActivateRate() > 0, false, reflected);
      }
    }
View Full Code Here

  @Override
  protected boolean thinkActive()
  {
    NpcInstance actor = getActor();
    Creature octavis = _octavisRef.get();
    if(octavis == null)
    {
      if(System.currentTimeMillis() > _wait_timeout)
      {
        _wait_timeout = System.currentTimeMillis() + 1000;
        for(NpcInstance npc : World.getAroundNpc(actor))
          if(npc.getNpcId() == Rider)
          {
            _octavisRef = npc.getRef();
            return true;
          }
      }
    }
    else if(!actor.isMoving)
    {
      int x = octavis.getX() + Rnd.get(2 * DRIFT_DISTANCE) - DRIFT_DISTANCE;
      int y = octavis.getY() + Rnd.get(2 * DRIFT_DISTANCE) - DRIFT_DISTANCE;
      int z = octavis.getZ();

      actor.setRunning();
      actor.moveToLocation(x, y, z, 0, true);

      startSkillAttackTask();
View Full Code Here

  @Override
  protected void thinkAttack()
  {
    NpcInstance actor = getActor();
    Creature topDamager = actor.getAggroList().getTopDamager();
    Creature randomHated = actor.getAggroList().getRandomHated();
    Creature mostHated = actor.getAggroList().getMostHated();

    //Eternal Blizzard Cast
    if(!actor.isCastingNow() && _eternalblizzardReuseTimer < System.currentTimeMillis())
    {
      actor.doCast(SkillTable.getInstance().getInfo(Skill_EternalBlizzard, 1), actor, true);
View Full Code Here

    }
    if (targetList.isEmpty())
    {
      return true;
    }
    Creature target = targetList.get(Rnd.get(targetList.size()));
    _effected.setRunning();
    _effected.getAI().Attack(target, true, false);
    return false;
  }
View Full Code Here

   * Method thinkFollow.
   */
  protected void thinkFollow()
  {
    FakePlayer actor = getActor();
    Creature target = (Creature) _intention_arg0;
    Integer offset = (Integer) _intention_arg1;
    if ((target == null) || target.isAlikeDead() || (actor.getDistance(target) > 4000.0D) || (offset == null))
    {
      clientActionFailed();
      return;
    }
    if (actor.isFollow && (actor.getFollowTarget() == target))
View Full Code Here

    }
    if (actor.isActionsDisabled() || actor.isAttackingDisabled())
    {
      return;
    }
    Creature attack_target = getAttackTarget();
    if ((attack_target == null) || (attack_target.isDead()))
    {
      setIntention(CtrlIntention.AI_INTENTION_FOLLOW);
      return;
    }
    if (!checkRange)
    {
      clientStopMoving();
      actor.doAttack(attack_target);
      return;
    }
    int range = actor.getPhysicalAttackRange();
    if (range < 10)
    {
      range = 10;
    }
    boolean canSee = GeoEngine.canSeeTarget(actor, attack_target, false);
    if ((!canSee && (range > 200)) || (Math.abs(actor.getZ() - attack_target.getZ()) > 200))
    {
      setIntention(CtrlIntention.AI_INTENTION_FOLLOW);
      return;
    }
    range = (int) (range + actor.getMinDistance(attack_target));
View Full Code Here

      FakePlayer actor = getActor();
      if (getIntention() != CtrlIntention.AI_INTENTION_FOLLOW)
      {
        return;
      }
      Creature target = (Creature) _intention_arg0;
      int offset = (_intention_arg1 instanceof Integer) ? ((Integer) _intention_arg1).intValue() : 0;
      if ((target == null) || target.isAlikeDead() || (actor.getDistance(target) > 4000.0D))
      {
        setIntention(CtrlIntention.AI_INTENTION_ACTIVE);
        return;
      }
      Player player = actor.getPlayer();
View Full Code Here

    super.onDeath(killer);
    if (killer == null)
    {
      return;
    }
    Creature topdam = getAggroList().getTopDamager();
    if (topdam == null)
    {
      topdam = killer;
    }
    Player pc = topdam.getPlayer();
    if (pc == null)
    {
      return;
    }
    Party party = pc.getParty();
View Full Code Here

  {
    if ((intention != CtrlIntention.AI_INTENTION_CAST) && (intention != CtrlIntention.AI_INTENTION_ATTACK))
    {
      setAttackTarget(null);
    }
    Creature actor = getActor();
    if (!actor.isVisible())
    {
      if (_intention == CtrlIntention.AI_INTENTION_IDLE)
      {
        return;
      }
      intention = CtrlIntention.AI_INTENTION_IDLE;
    }
    actor.getListeners().onAiIntention(intention, arg0, arg1);
    switch (intention)
    {
      case AI_INTENTION_IDLE:
        onIntentionIdle();
        break;
View Full Code Here

TOP

Related Classes of lineage2.gameserver.model.Creature

Copyright © 2018 www.massapicom. 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.