* @return boolean
*/
@Override
protected boolean checkAggression(Creature target)
{
final CTBBossInstance actor = getActor();
if (getIntention() != CtrlIntention.AI_INTENTION_ACTIVE)
{
return false;
}
if (target.isAlikeDead() || target.isInvul())
{
return false;
}
if (!actor.isAttackable(target))
{
return false;
}
if (!GeoEngine.canSeeTarget(actor, target, false))
{
return false;
}
actor.getAggroList().addDamageHate(target, 0, 2);
if ((target.isServitor() || target.isPet()))
{
actor.getAggroList().addDamageHate(target.getPlayer(), 0, 1);
}
startRunningTask(AI_TASK_ATTACK_DELAY);
setIntention(CtrlIntention.AI_INTENTION_ATTACK, target);
return true;
}