﻿# Too many Metropolitan provinces


RegRew_liege_diarchy_imp_action = {
	priority = 1000
	icon = scroll_scales

	check_create_action = {
		if = {
			limit = {
				is_independent_ruler = no
				age >= 12
				is_imprisoned = no
				trigger_if = {
					limit = {
						exists = liege
						exists = liege.diarch
					}
					NOT = { liege.diarch = root }
				}
				liege ?= {
					has_active_diarchy = yes
					RegRew_mod_requirement_trigger = yes
					OR = {
						any_vassal = {
							OR = {
								has_variable =  RegRew_coup_liege_var
								has_variable =  RegRew_coup_neutral_var
								has_variable =  RegRew_coup_diarch_var
							}
						}
						any_courtier = {
							OR = {
								has_variable =  RegRew_coup_liege_var
								has_variable =  RegRew_coup_neutral_var
								has_variable =  RegRew_coup_diarch_var
							}
						}
					}
				}
			}

			try_create_important_action = {
				important_action_type = RegRew_liege_diarchy_imp_action
			}
		}
	}

	effect = {
		open_view_data = {
			view = diarchy
			player = root
		}
	}
}