# dejure_county_claim
# dejure_barony_claim
# dejure_duchy_claim
# other_dejure_barony_claim
# other_dejure_county_claim

dejure_county_claim = {
	name = CB_NAME_DEJURECLAIM
	war_name = WAR_NAME_DEJURECLAIM
	sprite = 16
	truce_days = 3650
	infamy_modifier = 0.5
	sort_priority = 700

	hostile_against_others = yes
	is_permanent = yes
	check_all_titles = yes # if permanent, setting this to true will check against all of someones titles, including vassal held titles
	press_claim = yes
	can_ask_to_join_war = yes
	allowed_to_target_tributaries = yes

	can_use_gui = {
		check_if_crusader_trigger = yes

		# CK2Plus
		can_use_cb_preamble = yes

		# Title
		FROMFROM = {
			OR = {
				dejure_liege_title = {
					holder = ROOT
				}

				kingdom = {
					holder = ROOT

					custom_tooltip = {
						text = DE_JURE_TOOLTIP1

						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}

				empire = {
					holder = ROOT

					custom_tooltip = {
						text = DE_JURE_TOOLTIP1

						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
			}
		}
	}

	can_use_title = {
		real_tier = COUNT

		any_de_jure_liege_title = {
			holder = ROOT
		}

		holder_scope = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}

			NOR = {
				character = ROOT
				is_vassal_or_below_of = ROOT
			}
		}

		# Check to ensure the target is not valid for a holy war
		dejure_liege_title = {
			ROOT = {
				NOT = {
					can_use_cb = {
						target = FROM
						casus_belli = holy_war
						thirdparty_title = PREV
						only_check_triggers = yes
					}
				}
			}
		}

		# Check to ensure the target is not valid for a holy de jure claim
		ROOT = {
			NOT = {
				can_use_cb = {
					target = FROM
					casus_belli = dejure_county_claim_holy
					thirdparty_title = PREV
					only_check_triggers = yes
				}
			}
		}
	}

	is_valid_title = {
		any_de_jure_liege_title = {
			holder = ROOT
		}

		holder_scope = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}
		}
	}

	on_add = {
		fire_haruspicy_event_effect = yes
		anger_china_effect = yes

		# CK2Plus
		if = {
			limit = {
				defender = {
					holy_order = yes
					religion = attacker
				}
			}

			defender = {
				show_scope_change = no

				piety = -500
			}
		}
	}

	on_success_title = {
		log = "[Root.GetBestName] (ID: [Root.GetID]) succeeded with [Root.GetHerHis] de jure county claim on the [This.GetFullName] against [From.GetBestName] (ID: [From.GetID])"

		if = { # Vassalise one county counts
			limit = {
				holder_scope = {
					real_tier = COUNT
					num_of_count_titles == 1
					lower_real_tier_than = ROOT
					is_patrician = no
				}
			}

			holder_scope = {
				show_scope_change = no

				set_defacto_liege = attacker
			}
		}

		else = { # Usurp title under all other circumstances
			usurp_title_plus_barony_if_unlanded = {
				target = attacker
				type = claim
			}

			# Take all baronies under the one we're fighting for
			any_de_jure_vassal_title = {
				show_scope_change = no

				limit = {
					NOT = { de_facto_liege = PREV }

					holder_scope = {
						OR = {
							character = defender
							is_vassal_or_below_of = defender
						}
					}
				}

				usurp_title_plus_barony_if_unlanded = {
					target = attacker
					type = claim
				}
			}
		}

		attacker = {
			show_scope_change = no

			participation_scaled_prestige = 200
		}

		any_attacker = {
			limit = { NOT = { character = attacker } }
			hidden_effect = { participation_scaled_prestige = 200 }
		}

		hidden_effect = {
			check_war_effect = yes

			defender = {
				landless_pope_effect = yes
			}
		}
	}

	on_fail_title = {
		attacker = {
			show_scope_change = no

			prestige = -100
		}

	#	defender = {
	#		show_scope_change = no
	#
	#		participation_scaled_prestige = 50
	#	}
	#
	#	any_defender = {
	#		limit = { NOT = { character = defender } }
	#		hidden_effect = { participation_scaled_prestige = 50 }
	#	}
	}

	on_reverse_demand = {
		attacker = {
			show_scope_change = no

			prestige = -200

			transfer_scaled_wealth = {
				to = defender
				value = 4.0
			}
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 200
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 200 }
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 100
	}

	ai_will_do = {
		factor = 1

		trigger = {
			# AIs will not take the last counties off their liege's direct vassals
			trigger_if = {
				limit = {
					ROOT = {
						same_liege = FROM
					}
				}

				FROM = {
					num_of_count_titles > 1
				}
			}

			trigger_if = {
				limit = {
					ROOT = {
						has_character_flag = is_temujin
						has_landed_title = e_mongol_empire
						is_landed = yes
					}
				}

				FROM = {
					NOT = { has_landed_title = e_china_west_governor }
				}
			}

			# CK2Plus
			ROOT = {
				sufficient_treasury_for_war_trigger = yes

				# Most Christian and Jewish AI will not attack their religion head
				can_attack_religion_head_trigger = yes

				# Only dishonorable ai will break the a tributary's trust
				can_attack_tributary_trigger = yes

				# Pagan mongols won't use this CB against fellow pagan mongols
				trigger_if = {
					limit = {
						culture = mongol
						religion_group = pagan_group
					}

					NAND = {
						culture = FROM
						religion_group = FROM
					}
				}

				# Most AI won't attack their religious head
				# TODO: Integrate into 'can_attack_religion_head_trigger' ?
				trigger_if = {
					limit = { rightful_religious_head = FROM }

					OR = {
						trait = cynical
						trait = ambitious
					}
				}
			}

			# AI will only attack a holy order if they are of a different religion or are a king/emperor
			# TODO: Maybe work some traits/ai_zeal etc. into this?
			FROM = {
				trigger_if = {
					limit = {
						holy_order = yes
						religion = ROOT
						has_dlc = "Sons of Abraham"
					}

					higher_real_tier_than = DUKE
				}
			}
		}

		coronation_factor = yes
	}
}

dejure_barony_claim = {
	name = CB_NAME_DEJUREBARONYCLAIM
	war_name = WAR_NAME_DEJUREBARONYCLAIM
	sprite = 16
	truce_days = 1825
	infamy_modifier = 0.5
	sort_priority = 650

	hostile_against_others = yes
	is_permanent = yes
	check_de_jure_tier = COUNT
	can_ask_to_join_war = yes
	allowed_to_target_tributaries = yes

	can_use_gui = {
		check_if_crusader_trigger = yes

		# CK2Plus
		# Attacker
		ROOT = {
			can_use_cb_preamble = yes
		}
	}

	can_use = {
		# Defender
		FROM = {
			NOT = { is_liege_or_above_of = ROOT }
			can_attack_holy_order_trigger = yes
		}
	}

	can_use_title = {
		holder_scope = {
			OR = {
				character = ROOT
				is_vassal_or_below_of = ROOT
			}
		}

		any_direct_de_jure_vassal_title = {
			holder_scope = {
				OR = {
					character = FROM
					is_vassal_or_below_of = FROM
				}

				NOR = {
					character = ROOT
					is_vassal_or_below_of = ROOT
				}
			}
		}

		# Check to ensure the target is not valid for a holy war
		dejure_liege_title = {
			ROOT = {
				NOT = {
					can_use_cb = {
						target = FROM
						casus_belli = holy_war
						thirdparty_title = PREV
						only_check_triggers = yes
					}
				}
			}
		}

		# Check to ensure the target is not valid for a holy de jure claim
		ROOT = {
			NOT = {
				can_use_cb = {
					target = FROM
					casus_belli = dejure_barony_claim_holy
					thirdparty_title = PREV
					only_check_triggers = yes
				}
			}
		}
	}

	on_add = {
		fire_haruspicy_event_effect = yes
		anger_china_effect = yes

		# CK2Plus
		if = {
			limit = {
				defender = {
					holy_order = yes
					religion = attacker
				}
			}

			attacker = {
				show_scope_change = no

				piety = -500
			}
		}
	}

	on_success_title = {
		log = "[Root.GetBestName] (ID: [Root.GetID]) succeeded with [Root.GetHerHis] de jure barony claim on the [This.GetFullName] against [From.GetBestName] (ID: [From.GetID])"

		holder_scope = {
			save_event_target_as = target_taker
		}

		any_direct_de_jure_vassal_title = {
			show_scope_change = no

			limit = {
				holder_scope = {
					OR = {
						character = defender
						is_vassal_or_below_of = defender
					}

					NOR = {
						character = event_target:target_taker
						is_vassal_or_below_of = event_target:target_taker
						is_vassal_or_below_of = attacker
					}
				}
			}

			usurp_title_plus_barony_if_unlanded = {
				target = event_target:target_taker
				type = claim
			}
		}

		attacker = {
			show_scope_change = no

			participation_scaled_prestige = 100
		}

		any_attacker = {
			limit = { NOT = { character = attacker } }
			hidden_effect = { participation_scaled_prestige = 100 }
		}
	}

	on_fail_title = {
		attacker = {
			show_scope_change = no

			prestige = -50
		}

	#	defender = {
	#		show_scope_change = no
	#
	#		participation_scaled_prestige = 25
	#	}
	#
	#	any_defender = {
	#		limit = { NOT = { character = defender } }
	#		hidden_effect = { participation_scaled_prestige = 25 }
	#	}
	}

	on_reverse_demand = {
		attacker = {
			show_scope_change = no

			prestige = -100

			transfer_scaled_wealth = {
				to = defender
				value = 4.0
			}
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 100
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 100 }
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 100
	}

	# CK2Plus
	ai_will_do = {
		factor = 1

		trigger = {
			ROOT = {
				sufficient_treasury_for_war_trigger = yes

				# Most Christian and Jewish AI will not attack their religion head
				can_attack_religion_head_trigger = yes

				# AI will not fight for baronies held by a patriarch
				can_attack_patriarch_trigger = yes

				# Only dishonorable ai will break the a tributary's trust
				can_attack_tributary_trigger = yes

				# Most AI won't attack their religious head
				trigger_if = {
					limit = { rightful_religious_head = FROM }

					OR = {
						trait = cynical
						trait = ambitious
					}
				}
			}

			# AI will only attack a holy order if they are of a different religion or are a king/emperor
			# TODO: Maybe work some traits/ai_zeal etc. into this?
			FROM = {
				trigger_if = {
					limit = {
						holy_order = yes
						religion = ROOT
						has_dlc = "Sons of Abraham"
					}

					higher_real_tier_than = DUKE
				}
			}
		}
	}
}

dejure_duchy_claim = {
	name = CB_NAME_DEJURECLAIM
	war_name = WAR_NAME_DEJURECLAIM
	sprite = 31
	truce_days = 3650
	sort_priority = 790

	hostile_against_others = yes
	is_permanent = yes
	check_de_jure_tier = DUKE
	press_claim = yes
	can_ask_to_join_war = no
	allowed_to_target_tributaries = no

	can_use_gui = {
		check_if_crusader_trigger = yes

		# Attacker
		ROOT = {
			show_scope_change = no

			trigger_if = {
				trigger = { tier = DUKE }
				prestige >= 250
			}
			trigger_else_if = {
				limit = { tier = KING }
				prestige >= 500
			}
			trigger_else_if = {
				limit = { tier = EMPEROR }
				prestige >= 1000
			}
		}

		can_use_cb_preamble = yes
	}

	can_use = {
		has_dlc = "Jade Dragon"

		NOT = {
			has_game_rule = {
				name = jade_dragon_cbs
				value = off
			}
		}

		# Defender
		FROM = {
			NOT = { is_liege_of = ROOT }

			# Can only De Jure claim duchies from the same religion group
			religion_group = ROOT

			# Though different sects of Muslims must Holy War each other instead
			trigger_if = {
				limit = { religion_group = muslim }
				religion = ROOT
			}

			can_attack_holy_order_trigger = yes
		}
	}

	can_use_title = {
		OR = {
			holder = ROOT
			de_jure_liege_or_above = ROOT
		}

		# Use de jure county CB for single counties
		FROM = {
			num_of_realm_counties = {
				value >= 2
				title = PREV
			}
		}

		# Check to ensure the target is not valid for a holy war
		ROOT = {
			NOR = {
				can_use_cb = {
					target = FROM
					casus_belli = holy_war
					thirdparty_title = PREV
					only_check_triggers = yes
				}

				can_use_cb = {
					target = FROM
					casus_belli = dejure_duchy_claim_holy
					thirdparty_title = PREV
					only_check_triggers = yes
				}
			}
		}
	}

	on_add = {
		attacker = {
			show_scope_change = no

			trigger_switch = {
				on_trigger = tier

				DUKE = { prestige = -250 }
				KING = { prestige = -500 }
				EMPEROR = { prestige = -1000 }
			}
		}

		fire_haruspicy_event_effect = yes
		anger_china_effect = yes
	}

	on_success_title = {
		attacker = {
			show_scope_change = no

			vassalize_or_take_under_title = {
				title = PREV
				enemy = defender
				#anti_nomad = yes # Vassalize non-nomadic rulers
				type = claim
			}

			participation_scaled_prestige = 100
		}

		any_attacker = {
			limit = { NOT = { character = attacker } }
			hidden_effect = { participation_scaled_prestige = 100 }
		}

		hidden_effect = {
			check_war_effect = yes

			defender = {
				landless_pope_effect = yes
			}
		}
	}

	on_fail = {
		attacker = {
			show_scope_change = no

			prestige = -100
		}

		defender = {
			show_scope_change = no
			participation_scaled_prestige = 50
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 50 }
		}
	}

	on_reverse_demand = {
		attacker = {
			show_scope_change = no
			prestige = -200
			transfer_scaled_wealth = {
				to = defender
				value = 4.0
			}
		}

		defender = {
			show_scope_change = no
			participation_scaled_prestige = 100
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 100 }
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 100
	}

	ai_will_do = {
		factor = 0.7 # Prefer using CB's without on_add costs

		trigger = {
			ROOT = {
				sufficient_treasury_for_war_trigger = yes
			}

			FROM = {
				NAND = {
					religion = ROOT
					is_theocracy = yes
					higher_real_tier_than = COUNT
				}
			}

			trigger_if = {
				limit = {
					ROOT = {
						has_character_flag = is_temujin
						has_landed_title = e_mongol_empire
						is_landed = yes
					}
				}

				FROM = {
					NOT = { has_landed_title = e_china_west_governor }
				}
			}
		}

		coronation_factor = yes
	}
}

# OBSOLETE AND TURNED OFF
other_dejure_barony_claim = {
	name = CB_NAME_DEJUREBARONYCLAIM
	war_name = WAR_NAME_OTHER_DEJUREBARONYCLAIM
	sprite = 16
	truce_days = 3650
	is_permanent = no # Set to yes if re-enabled

	can_use = {
		always = no # Obsolete, disabled
	}

	is_valid_title = {
		always = no
	}

	on_success = {
	}

	on_success_title = {
	}

	on_fail = {
	}

	on_reverse_demand = {
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 100
	}
}

other_dejure_county_claim = {
	name = CB_NAME_DEJURECLAIM
	war_name = WAR_NAME_OTHER_DEJURECLAIM
	sprite = 16
	truce_days = 3650
	infamy_modifier = 0.3
	sort_priority = 700

	hostile_against_others = yes
	is_permanent = yes
	other_de_jure_claim = yes # Optimization for de jure claims of vassals
	press_claim = yes
	can_ask_to_join_war = yes
	allowed_to_target_tributaries = yes

	can_use_gui = {
		check_if_crusader_trigger = yes

		# CK2Plus
		can_use_cb_preamble = yes

		# Title
		FROMFROM = {
			OR = {
				dejure_liege_title = {
					holder = ROOT
				}

				kingdom = {
					holder = ROOT

					custom_tooltip = {
						text = DE_JURE_TOOLTIP1

						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}

				empire = {
					holder = ROOT

					custom_tooltip = {
						text = DE_JURE_TOOLTIP1

						OR = {
							has_law = crown_authority_2
							has_law = crown_authority_3
							has_law = crown_authority_4
						}
					}
				}
			}
		}
	}

	# Starting scope is attacker
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	can_use = {
		# Attacker
		NOT = { character = ROOT } # Claimant
		mercenary = no

		# Defender
		FROM = {
			can_attack_holy_order_trigger = yes
		}
	}

	# Starting scope is target title
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	can_use_title = {
		real_tier = COUNT

		any_dejure_liege = {
			holder = ROOT
		}

		holder_scope = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}

			NOR = {
				character = ROOT
				character = FROMFROM
				is_vassal_or_below_of = ROOT
				is_vassal_or_below_of = FROMFROM
			}
		}

		# CK2Plus
		# Can't take the last county away from a fellow vassal
		FROM = {
			trigger_if = {
				limit = { same_liege = ROOT_FROMFROM }
				num_of_count_titles > 1
			}
		}

		# Check to ensure the target is not valid for a holy war
		dejure_liege_title = {
			FROMFROM = {
				NOR = {
					can_use_cb = {
						target = FROM
						casus_belli = holy_war
						thirdparty_title = PREV
						only_check_triggers = yes
					}

					can_use_cb = {
						target = FROM
						casus_belli = other_dejure_county_claim_holy
						thirdparty_title = PREV
						only_check_triggers = yes
					}
				}
			}
		}
	}

	# Starting scope is target tile
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	is_valid_title = {
		any_dejure_liege = {
			holder = ROOT
		}

		holder_scope = {
			OR = {
				character = FROM
				is_vassal_or_below_of = FROM
			}
		}
	}

	# Starting scope is attacker
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	on_add = {
		fire_haruspicy_event_effect = yes
		anger_china_effect = yes

		# CK2Plus
		if = {
			limit = {
				defender = {
					holy_order = yes
					religion = PREV
				}
			}

			piety = -500
		}

		ROOT = {
			set_character_flag = claim_being_pressed
		}
	}

	# Starting scope is attacker
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	on_success = {
		ROOT = {
			show_scope_change = no

			participation_scaled_prestige = 200

			opinion = {
				name = pressed_my_claim
				who = PREV
			}

			# CK2Plus
			add_character_modifier = {
				name = new_land_timer
				years = 1
				hidden = yes
			}

			clr_character_flag = claim_being_pressed
		}

		any_attacker = {
			limit = { NOT = { character = ROOT } }
			hidden_effect = { participation_scaled_prestige = 200 }
		}
	}

	# Starting scope is target tile
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	on_success_title = {
		log = "[FromFrom.GetBestName] (ID: [FromFrom.GetID]) succeeded with [Root.GetBestName]'s (ID: [Root.GetID]) de jure county claim for the [This.GetFullName] against [From.GetBestName] (ID: [From.GetID])"

	#	if = { # Vassalise one county counts
	#		limit = {
	#			holder_scope = {
	#				real_tier = COUNT
	#				num_of_count_titles == 1
	#				lower_real_tier_than = ROOT
	#				is_patrician = no
	#			}
	#		}
	#
	#		holder_scope = {
	#			show_scope_change = no
	#
	#			set_defacto_liege = ROOT
	#		}
	#	}

	#	else = { # Usurp title under all circumstances
			usurp_title_plus_barony_if_unlanded = {
				target = ROOT
				type = claim
			}

			# Take all baronies under the one we're fighting for
			any_de_jure_vassal_title = {
				show_scope_change = no

				limit = {
					NOT = { de_facto_liege = PREV }

					holder_scope = {
						OR = {
							character = defender
							is_vassal_or_below_of = defender
						}
					}
				}

				usurp_title_plus_barony_if_unlanded = {
					target = ROOT
					type = claim
				}
			}
	#	}

		hidden_effect = {
			check_if_reconquista_finished_effect = yes

			defender = {
				landless_pope_effect = yes
			}
		}
	}

	# Starting scope is attacker
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	on_fail = {
		# Attacker
		prestige = -100

		ROOT = {
			show_scope_change = no

			# prestige = -100
			clr_character_flag = claim_being_pressed
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 50
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 50 }
		}
	}

	# Starting scope is attacker
	# ROOT is third-party (de jure) claimant
	# FROM is defender
	# FROMFROM is attacker
	on_reverse_demand = {
		# Attacker
		prestige = -200

		transfer_scaled_wealth = {
			to = defender
			value = 4.0
		}

		# Claimant
		ROOT = {
			show_scope_change = no

			prestige = -200
		}

		defender = {
			show_scope_change = no

			participation_scaled_prestige = 200
		}

		any_defender = {
			limit = { NOT = { character = defender } }
			hidden_effect = { participation_scaled_prestige = 200 }
		}
	}

	on_invalidation = {
		# Claimant
		ROOT = {
			clr_character_flag = claim_being_pressed
		}
	}

	attacker_ai_victory_worth = {
		factor = -1 # always accept
	}

	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}

	defender_ai_defeat_worth = {
		factor = 100
	}

	# CK2Plus
	ai_will_do = {
		factor = 1

		trigger = {
			ROOT = {
				sufficient_treasury_for_war_trigger = yes

				# Most Christian and Jewish AI will not attack their religion head
				can_attack_religion_head_trigger = yes

				# Only dishonorable AI will break the a tributary's trust
				can_attack_tributary_trigger = yes

				# Pagan mongols won't use this CB against fellow pagan mongols
				trigger_if = {
					limit = {
						culture = mongol
						religion_group = pagan_group
					}

					NAND = {
						culture = FROM
						religion_group = FROM
					}
				}

				# AIs will not take the last counties off their liege's direct vassals
				trigger_if = {
					limit = { same_liege = FROM }

					FROM = {
						num_of_count_titles > 1
					}
				}
			}

			# AI will only attack a holy order if they are of a different religion or are a king/emperor
			# TODO: Maybe work some traits/ai_zeal etc. into this?
			FROM = {
				trigger_if = {
					limit = {
						holy_order = yes
						religion = ROOT
						has_dlc = "Sons of Abraham"
					}

					higher_real_tier_than = DUKE
				}
			}
		}
	}
}