decisions = {

    redraw_frankish_kingdoms = {

        is_high_prio = yes

        potential = {
            NOT = { year = 867 }

            NOT = { has_global_flag = frankish_kingdoms_redrawn }

            higher_tier_than = DUKE

            OR = {
                has_landed_title = k_aquitaine
                has_landed_title = k_france
                has_landed_title = k_frisia
                has_landed_title = k_burgundy
                has_landed_title = k_lotharingia
                has_landed_title = k_germany
            }
        }

        allow = {
            has_landed_title = k_aquitaine
            has_landed_title = k_france
            has_landed_title = k_frisia
            has_landed_title = k_burgundy
            has_landed_title = k_lotharingia
            has_landed_title = k_germany

            is_primary_war_defender = no

            NOT = { year = 867 }

            prestige = 500
        }

        effect = {
            set_global_flag = frankish_kingdoms_redrawn

            d_bourbon =           { show_scope_change = no  de_jure_liege = k_aquitaine }
            d_auvergne =          { show_scope_change = no  de_jure_liege = k_aquitaine }
            d_toulouse =          { show_scope_change = no  de_jure_liege = k_aquitaine }

            d_valois =            { show_scope_change = no  de_jure_liege = k_france }
            d_poitou =            { show_scope_change = no  de_jure_liege = k_france }
            d_orleans =           { show_scope_change = no  de_jure_liege = k_france }
            d_berry =             { show_scope_change = no  de_jure_liege = k_france }

            d_luxembourg =        { show_scope_change = no  de_jure_liege = k_lotharingia }
            d_brabant =           { show_scope_change = no  de_jure_liege = k_lotharingia }
            d_koln =              { show_scope_change = no  de_jure_liege = k_lotharingia }

            d_thuringia =         { show_scope_change = no  de_jure_liege = k_germany }
            d_franconia =         { show_scope_change = no  de_jure_liege = k_germany }
            d_hesse =             { show_scope_change = no  de_jure_liege = k_germany }
            d_rhine =             { show_scope_change = no  de_jure_liege = k_germany }
            d_alsace =            { show_scope_change = no  de_jure_liege = k_germany }

            d_trier =             { show_scope_change = no  de_jure_liege = k_lotharingia }
            d_lower_lorraine =    { show_scope_change = no  de_jure_liege = k_lotharingia }
            d_upper_lorraine =    { show_scope_change = no  de_jure_liege = k_lotharingia }
            d_champagne =         { show_scope_change = no  de_jure_liege = k_lotharingia }

            # Name and color suggests it should go with the kingdom of burgundy, but it seems that it doesn't?
            d_burgundy =          { show_scope_change = no  de_jure_liege = k_lotharingia }

            k_frisia =            { show_scope_change = no  de_jure_liege = e_france }
            #k_frisia =           { set_name = ""  adjective = "" }

            piety = 100

            # Increase opinion from Occitan vassals within the new Aquitaine, and Frisian/Dutch vassals within the new Frisia?
        }

        ai_will_do = {
            factor = 1
        }
    }

}
