
human_brain
{
    subBrain: conditionPropertyRatioRange(CURRENT_HEALTH, 0.0, 0.5), human_use_health_potions
    subBrain: conditionPropertyRatioRange(CURRENT_MANA, 0.0, 0.2), human_use_mana_potions
    subBrain: conditionAlways(), human_combat

    subBrain: conditionPropertyRange(CURRENT_NUTRITION, 0, 5000), human_eat

    executeSelfTasks
    executeCityTasks

    subBrain: conditionPropertyRange(CURRENT_NUTRITION, 0, 2000), human_desperate_wander
    goToRoom
    idle: 500

    # self task creators
    # packItems: human_diet, 3
    manageLoadout
}

human_combat
{
    setTargetWhenAttacked
    setTargetWhenFriendIsAttacked: human_friend_list
    subBrain: conditionHasTarget(), human_combat_abilities
    fleeOnLowHealth: 25
    moveOnTarget: 300
    followTarget
    fleeWhenAttacked
}

human_combat_abilities
{
    useRandomAbilities: 300
    faceTarget: 300
}

human_use_health_potions
{
    useItem: human_health_potions
}

human_use_mana_potions
{
    useItem: human_mana_potions
}

human_eat
{
    useItem: human_diet
    subBrain: conditionPropertyRatioRange(CURRENT_NUTRITION, 0.0, 0.05), human_eat_from_ground
}

human_eat_from_ground
{
    setItemGrabTarget: FOOD_TARGET, human_diet
    useItemTarget: FOOD_TARGET
    goToItemTarget: FOOD_TARGET
}

human_desperate_wander
{
    idleOnCity
}
