
beholder_brain
{
    subBrain: conditionAlways(), beholder_combat

    subBrain: conditionPropertyRatioRange(CURRENT_NUTRITION, 0.0, 0.5), beholder_eat

    executeSelfTasks

    # the parameter is the maximum distance from which tasks will be picked up
    # this is done for the beholder so that it stays mostly inside his room
    executeCityTasks: 10

    goToRoom
    idle: 500

    # self task creators
    manageLoadout
}

beholder_combat
{
    setTargetWhenAttackedNTimesWithException: 1, beholder_friend_list
    setTarget: undead_human_target_list
    subBrain: conditionHasPathToTarget(), beholder_combat_abilities
    fleeOnLowHealth: 50
    keepDistanceFromTarget: 2
    faceTarget: 500
    moveOnTarget: 500
    fleeWhenAttacked
}

beholder_combat_abilities
{
    useRandomAbilities: 300    
}

beholder_eat
{
    useItem: omnivore_diet
    subBrain: conditionPropertyRatioRange(CURRENT_NUTRITION, 0.0, 0.05), beholder_eat_from_ground
}

beholder_eat_from_ground
{
    setItemGrabTarget: FOOD_TARGET, omnivore_diet
    useItemTarget: FOOD_TARGET
    goToItemTarget: FOOD_TARGET
}