@Override
    protected void process() {
        super.process();

        Actor actor = ai.getActor();

        currentTarget = newTarget;
        Monster monster = registry.getMonsterManager().getMonsterById(currentTarget);

        if (actor == null || monster == null) {
            terminate();
            return;
        }

        boolean shouldAttack = false;
        if (actor.getCurrentAttackType() == Actor.AttackType.MELEE) {
            Arc2D.Double attackArc = actor.getAttackArc(actor.getAttackRange());
            if (attackArc != null) {
                Rectangle sr = monster.getSpriteRect();
                if (sr != null) {
                    if (attackArc.intersects(sr)) {
                        shouldAttack = true;
                    }
                }
            }
        } else if (actor.isWithinAttackRange(monster.getCenterPoint())) {
            shouldAttack = true;
        }
        if (shouldAttack) {
            if (actor.getActionMode() == Actor.ActionMode.NONE) {
                actor.attack();
            }
        } else {
            actor.moveTowardsPoint(monster.getCenterPoint());
        }
    }