}
@Override
protected void onEvtSeeSpell(L2Skill skill, L2Character caster)
{
L2NpcInstance actor = getActor();
if(actor == null || caster == null || skill.getId() != BALLISTA_BOMB_SKILL_ID)
{
return;
}
L2Player player = caster.getPlayer();
Siege siege = SiegeManager.getSiege(actor, true);
if(siege != null && player != null && siege.getSiegeUnit().getType() == ResidenceType.Fortress)
{
L2Clan clan = player.getClan();
if(clan != null && siege == clan.getSiege() && clan.isDefender())
{
return;
}
}
_bombsUseCounter++;
if(Rnd.chance(20) || _bombsUseCounter > 4)
{
actor.doDie(caster);
}
}