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

        Monster actor = (Monster) ai.getActor();

        currentTarget = newTarget;

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


        if (actor.isFeared() && actor.getFearedSource() != null) {
            actor.moveAwayFromPoint(actor.getFearedSource());
        } else {
            if (actor.isWithinAttackRange(currentTarget.getCenterPoint())) {
                actor.attack();
            } else {
                if (actor.isAttacking()) {
                    actor.stopAttack();
                }
                actor.moveTowardsPoint(currentTarget.getCenterPoint());
            }
        }
    }