﻿should_be_hauteville = {
	OR = {
		has_game_rule = hautevilles_invade_sicily
		has_game_rule = hautevilles_adventurers_in_sicily
	}
}

should_be_invading_sicily = {
	OR = {
		has_game_rule = hautevilles_invade_sicily
		has_game_rule = any_normans_invade_sicily
	}
}

is_hauteville_sicily_ruler = {
	exists = global_var:is_hauteville_dynasty
	dynasty ?= global_var:is_hauteville_dynasty
	top_liege = this
	is_landed = yes
	exists = capital_province
	capital_province = { geographical_region = world_europe_south_italy }
	highest_held_title_tier < tier_kingdom
}

is_sicily_county_target = {
	kingdom = {
		title_province = { geographical_region = world_europe_south_italy }
	}
	is_neighbor_to_realm = root
	is_contested = no
	duchy = { is_contested = no }
}

is_better_sicily_county_target = {
	kingdom = title:k_sicily
	is_neighbor_to_realm = root
	is_contested = no
	duchy = { is_contested = no }
}

is_appropriate_sicily_war_target = {
	is_ai = yes
	any_realm_county = { is_sicily_county_target = yes }
	has_no_war_preventing_relation = yes
	save_temporary_scope_as = target
	root.strength_with_relevant_allies_vs_target_value > scope:target.one_and_a_half_times_current_strength_with_relevant_allies_vs_root
	NOR = {
		dynasty = root.dynasty
		any_ally = {
			is_ruler = yes
			dynasty = root.dynasty
		}
	}
}



