Пример #1
0
 /** Method onEvtSpawn. */
 @Override
 public void onEvtSpawn() {
   super.onEvtSpawn();
   ZONE_3.setActive(true);
   Functions.npcShout(
       getActor(),
       NpcString
           .HEH_HEH_I_SEE_THAT_THE_FEAST_HAS_BEGAN_BE_WARY_THE_CURSE_OF_THE_HELLMANN_FAMILY_HAS_POISONED_THIS_LAND);
 }
Пример #2
0
  @Override
  public void onEvtAttacked(Creature attacker, int damage) {
    NpcInstance actor = getActor();

    super.onEvtAttacked(attacker, damage);

    if (PositionUtils.calculateDistance(attacker, actor, false) > 300. && Rnd.chance(0.13)) {
      addTaskCast(attacker, DRAIN_SKILL);
    }

    Creature target = actor.getAggroList().getMostHated();
    if (target == attacker && Rnd.chance(0.3)) {
      addTaskCast(attacker, DAMAGE_SKILL);
    }
  }
Пример #3
0
  /**
   * Method onEvtDead.
   *
   * @param killer Creature
   */
  @Override
  public void onEvtDead(Creature killer) {
    final NpcInstance actor = getActor();
    super.onEvtDead(killer);
    ZONE_3.setActive(false);
    Functions.npcShout(actor, NpcString.AARGH_IF_I_DIE_THEN_THE_MAGIC_FORCE_FIELD_OF_BLOOD_WILL);
    final ClanHallSiegeEvent siegeEvent = actor.getEvent(ClanHallSiegeEvent.class);

    if (siegeEvent == null) {
      return;
    }

    final SpawnExObject spawnExObject = siegeEvent.getFirstObject(ClanHallSiegeEvent.BOSS);
    final NpcInstance lidiaNpc = spawnExObject.getFirstSpawned();

    if (lidiaNpc.getCurrentHpRatio() == 1.) {
      lidiaNpc.setCurrentHp(lidiaNpc.getMaxHp() >> 1, true);
    }
  }