Exemple #1
0
  @Override
  protected void onEvtAttacked(Creature attacker, int damage) {
    if (attacker == null || attacker.isPlayable()) {
      return;
    }

    super.onEvtAttacked(attacker, damage);
  }
Exemple #2
0
 @Override
 protected void onEvtDead(Creature killer) {
   NpcInstance actor = getActor();
   if (killer != null) {
     Player player = killer.getPlayer();
     if (player != null && player.getEffectList().containEffectFromSkills(KISS_OF_EVA)) {
       actor.dropItem(player, Rnd.chance(50) ? Red_Coral : Crystal_Fragment, 1);
     }
   }
   super.onEvtDead(killer);
 }