qyv_is_small_against_neighbor = {
    # attacker = scope:small_ruler, target = scope:neighbor_ruler
    custom_description = {
        text = qyv_desc_ratio
        trigger_if = {
            limit = { exists = small_ruler exists = neighbor_ruler }
            value >= 0 # placeholder to allow description
        }
    }
    OR = {
        NOT = { exists = small_ruler }
        NOT = { exists = neighbor_ruler }
        AND = {
            small_ruler = { military_strength < neighbor_ruler.military_strength * 0.5 }
            small_ruler = { realm_size < 20 }
        }
    }
}

qyv_should_seek_vassalization = {
    AND = {
        is_ai = yes
        NOT = { has_liege = yes }
        any_neighbor_independent_ruler = {
            limit = { is_at_war = no }
            military_strength > root.military_strength * 1.5
        }
        OR = {
            game_rule = { rule = qyv_ai_unification_willingness option = high }
            AND = {
                game_rule = { rule = qyv_ai_unification_willingness option = medium }
                root = { has_negative_gold = yes }
            }
        }
    }
}

qyv_is_west_latinate = {
    OR = {
        culture_group = latin
        culture_group = frankish
        culture_group = germanic
        culture = bohemian
        culture_group = west_slavic
    }
}

qyv_is_greece_region_small = {
    OR = {
        de_jure_duchy = d_athens
        de_jure_duchy = d_thessalonika
        de_jure_duchy = d_epirus
        de_jure_duchy = d_aegean_islands
    }
    realm_size < 15
}