decisions = {
	marry_close = { #Marry a close relative
		ai_check_interval = 3
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			is_bs_marriage_religion_trigger = yes
			NOT = { has_character_flag = checked_close_marriage }
			NOT = { dynasty = none }
			OR = {
				father_even_if_dead = { always = yes }
				mother_even_if_dead = { always = yes }
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			set_character_flag = checked_close_marriage
			#Try bs marriage first
			random_sibling = {
				limit = {
					ai = yes
					is_close_relative = ROOT
					is_opposite_sex = ROOT
					can_marry_trigger = yes
					is_consort = no
					is_bs_marriage_religion_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Close Marriage)"
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				marry_to_ROOT_effect = yes
				break = yes
			}
			#Then try pc marriage
			random_child = {
				limit = {
					ai = yes
					is_close_relative = ROOT
					is_opposite_sex = ROOT
					can_marry_trigger = yes
					is_consort = no
					is_pc_marriage_religion_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Close Marriage)"
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				marry_to_ROOT_effect = yes
				break = yes
			}
			#Then try any dynasty member
			random_dynasty_member = {
				limit = {
					ai = yes
					is_close_relative = ROOT
					is_opposite_sex = ROOT
					can_marry_trigger = yes
					is_consort = no
					is_bs_marriage_religion_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Close Marriage)"
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				marry_to_ROOT_effect = yes
			}
		}
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 0.5
				NOR = {
					real_tier = EMPEROR
					any_close_relative = { real_tier = EMPEROR }
				}
			}
			modifier = {
				factor = 0.5
				NOR = {
					higher_real_tier_than = DUKE
					any_close_relative = { higher_real_tier_than = DUKE }
				}
			}
			modifier = {
				factor = 0.5
				NOR = {
					higher_real_tier_than = COUNT
					any_close_relative = { higher_real_tier_than = COUNT }
				}
			}
			modifier = {
				factor = 1.25
				NOT = {
					any_child = {
						is_female = no
						NOT = { trait = bastard }
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = { age = 25 }
			}
			modifier = {
				factor = 0
				OR = {
					religion = egyptian_pagan
					religion_group = hellenic_pagan_group
				}
				NOR = {
					higher_real_tier_than = DUKE
					any_close_relative = { higher_real_tier_than = DUKE }
				}
			}
			modifier = {
				factor = 0
				is_ruler = no
				liege = {
					ai = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
			}
		}
	}

	marry_avuncular_1 = { #Marry niece or nephew
		ai_check_interval = 4
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			NOT = { religion_group = muslim }
			NOT = { has_character_flag = checked_avuncular1 }
			NOT = { dynasty = none }
			OR = {
				father_even_if_dead = { always = yes }
				mother_even_if_dead = { always = yes }
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			set_character_flag = checked_avuncular1
			#prefer the child of my brother
			random_sibling_even_if_dead = {
				limit = {
					is_female = no
				}
				random_child = {
					limit = {
						ai = yes
						NOT = { is_child_of = ROOT }
						is_opposite_sex = ROOT
						can_marry_trigger = yes
						is_consort = no
					}
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Niece/Nephew Marriage)"
					marry_to_ROOT_effect = yes
					break = yes
				}
			}
			#then marry them to any niece/nephew
			random_sibling_even_if_dead = {
				random_child = {
					limit = {
						ai = yes
						NOT = { is_child_of = ROOT }
						is_opposite_sex = ROOT
						can_marry_trigger = yes
						is_consort = no
					}
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Niece/Nephew Marriage)"
					marry_to_ROOT_effect = yes
					break = yes
				}
			}
		}
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 4
				has_ambition = obj_get_married
			}
			modifier = { #Avoid marrying aunts and nephews
				factor = 0.01
				religion_group = jewish_group
				is_female = yes
			}
			modifier = {
				factor = 0
				is_ruler = no
				liege = {
					ai = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
			}
			modifier = {
				factor = 5 #Helps keep realms dynastic
				is_female = yes
				OR = {
					is_ruler = yes
					is_primary_heir = yes
				}
			}
			modifier = {
				factor = 0.25 #Zoroastrians prefer closer relations
				religion = zoroastrian
			}
			modifier = {
				factor = 0.5
				religion = messalian
			}
			modifier = {
				factor = 1.25
				NOT = {
					any_child = {
						is_female = no
						NOT = { trait = bastard }
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = { age = 25 }
			}
		}
	}

	marry_avuncular_2 = { #Marry an uncle or aunt.
		is_high_prio = yes
		ai_check_interval = 6
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			NOT = { religion_group = muslim }
			NOT = { has_character_flag = checked_avuncular2 }
			NOT = { dynasty = none }
			OR = {
				father_even_if_dead = { always = yes }
				mother_even_if_dead = { always = yes }
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			set_character_flag = checked_avuncular2
			#prefer my father's brother/sister
			father_even_if_dead = {
				random_sibling = {
					limit = {
						ai = yes
						can_marry_trigger = yes
						is_opposite_sex = ROOT
						is_consort = no
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Uncle/Aunt Marriage)"
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					marry_to_ROOT_effect = yes
					break = yes
				}
			}
			#failing that, any aunt/uncle will do
			mother_even_if_dead = {
				random_sibling = {
					limit = {
						ai = yes
						can_marry_trigger = yes
						is_opposite_sex = ROOT
						is_consort = no
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Uncle/Aunt Marriage)"
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					marry_to_ROOT_effect = yes
					break = yes
				}
			}
		}
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 3
				has_ambition = obj_get_married
			}
			modifier = {
				factor = 0
				is_ruler = no
				liege = {
					ai = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
			}
			modifier = { #Avoid marrying aunts and nephews
				factor = 0.01
				religion_group = jewish_group
				is_female = no
			}
			modifier = {
				factor = 100
				is_female = yes
				OR = {
					is_ruler = yes
					is_primary_heir = yes
				}
			}
			modifier = {
				factor = 0.1 #Zoroastrians prefer closer relations...
				religion = zoroastrian
			}
			modifier = {
				factor = 0.2
				religion = messalian
			}
			modifier = {
				factor = 1.25
				NOT = {
					any_child = {
						is_female = no
						NOT = { trait = bastard }
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = { age = 25 }
			}
		}
	}

	marry_cousin = { #Make cousin marriage more common.
		ai_check_interval = 3
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			NOT = { has_character_flag = checked_cousin }
			NOT = { dynasty = none }
			OR = {
				father_even_if_dead = { always = yes }
				mother_even_if_dead = { always = yes }
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			set_character_flag = checked_cousin
			#prefer my father's side of the family
			if = {
				limit = {
					OR = {
						higher_tier_than = DUKE
						liege = { higher_tier_than = DUKE }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							higher_tier_than = COUNT
							father = { higher_tier_than = COUNT }
							mother = { higher_tier_than = COUNT }
						}
						OR = {
							father_even_if_dead = { always = yes }
							mother_even_if_dead = { always = yes }
						}
						NOR = {
							character = ROOT
							father_even_if_dead = { is_father = ROOT }
							mother_even_if_dead = { is_mother = ROOT }
						}
						OR = {
							father_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							father_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						}
						can_marry_trigger = yes
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
					add_spouse = ROOT
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					break = yes
				}
			}
			if = {
				limit = {
					OR = {
						higher_tier_than = COUNT
						liege = { higher_tier_than = COUNT }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							is_ruler = yes
							father = { is_ruler = yes }
							mother = { is_ruler = yes }
						}
						OR = {
							father_even_if_dead = { always = yes }
							mother_even_if_dead = { always = yes }
						}
						NOR = {
							character = ROOT
							father_even_if_dead = { is_father = ROOT }
							mother_even_if_dead = { is_mother = ROOT }
						}
						OR = {
							father_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							father_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						}
						can_marry_trigger = yes
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
					add_spouse = ROOT
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					break = yes
				}
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						father_even_if_dead = { always = yes }
						mother_even_if_dead = { always = yes }
					}
					NOR = {
						character = ROOT
						father_even_if_dead = { is_father = ROOT }
						mother_even_if_dead = { is_mother = ROOT }
					}
					OR = {
						father_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						father_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
					}
					can_marry_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
				add_spouse = ROOT
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				break = yes
			}
			#failing that, my mother's side will do
			if = {
				limit = {
					OR = {
						higher_tier_than = DUKE
						liege = { higher_tier_than = DUKE }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							higher_tier_than = COUNT
							father = { higher_tier_than = COUNT }
							mother = { higher_tier_than = COUNT }
						}
						OR = {
							father_even_if_dead = { always = yes }
							mother_even_if_dead = { always = yes }
						}
						NOR = {
							character = ROOT
							father_even_if_dead = { is_father = ROOT }
							mother_even_if_dead = { is_mother = ROOT }
						}
						OR = {
							father_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							father_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						}
						can_marry_trigger = yes
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
					add_spouse = ROOT
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					break = yes
				}
			}
			if = {
				limit = {
					OR = {
						higher_tier_than = COUNT
						liege = { higher_tier_than = COUNT }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							is_ruler = yes
							father = { is_ruler = yes }
							mother = { is_ruler = yes }
						}
						OR = {
							father_even_if_dead = { always = yes }
							mother_even_if_dead = { always = yes }
						}
						NOR = {
							character = ROOT
							father_even_if_dead = { is_father = ROOT }
							mother_even_if_dead = { is_mother = ROOT }
						}
						OR = {
							father_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							father_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
							mother_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						}
						can_marry_trigger = yes
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
					add_spouse = ROOT
					ROOT = {
						clr_character_flag = ai_spouse_finder
						clr_character_flag = checked_avuncular1
						clr_character_flag = checked_avuncular2
						clr_character_flag = checked_cousin
						clr_character_flag = checked_paternal_cousin
						clr_character_flag = checked_close_marriage
					}
					break = yes
				}
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						father_even_if_dead = { always = yes }
						mother_even_if_dead = { always = yes }
					}
					NOR = {
						character = ROOT
						father_even_if_dead = { is_father = ROOT }
						mother_even_if_dead = { is_mother = ROOT }
					}
					OR = {
						father_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						father_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { father_even_if_dead = { ROOT = { mother_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { mother_even_if_dead = { ROOT = { mother_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
					}
					can_marry_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Cousin Marriage)"
				add_spouse = ROOT
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				break = yes
			}
		}
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 3
				has_ambition = obj_get_married
			}
			modifier = {
				factor = 0.25 #Zoroastrians prefer closer relations...
				religion = zoroastrian
			}
			modifier = {
				factor = 0.2
				religion = messalian
			}
			modifier = {
				factor = 0.1
				religion_group = muslim #Muslims prefer FBD marriage
			}
			modifier = {
				factor = 0
				is_ruler = no
				liege = {
					ai = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = {
					any_child = {
						is_female = no
						NOT = { trait = bastard }
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = { age = 25 }
			}
		}
	}

	marry_paternal_cousin = { #Muslim cousin marriage
		ai_check_interval = 3
		is_high_prio = yes
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			religion_group = muslim
			NOT = { has_character_flag = checked_paternal_cousin }
			NOT = { dynasty = none }
			OR = {
				father_even_if_dead = { always = yes }
				mother_even_if_dead = { always = yes }
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			set_character_flag = checked_paternal_cousin
			random_character = {
				limit = {
					ai = yes
					OR = {
						father_even_if_dead = { always = yes }
						mother_even_if_dead = { always = yes }
					}
					NOR = {
						character = ROOT
						father_even_if_dead = { is_father = ROOT }
						mother_even_if_dead = { is_mother = ROOT }
					}
					OR = {
						father_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						father_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { father_even_if_dead = { ROOT = { father_even_if_dead = { father_even_if_dead = { character = PREVPREVPREV } } } } }
						mother_even_if_dead = { mother_even_if_dead = { ROOT = { father_even_if_dead = { mother_even_if_dead = { character = PREVPREVPREV } } } } }
					}
					can_marry_trigger = yes
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Muslim Cousin Marriage)"
				ROOT = {
					clr_character_flag = ai_spouse_finder
					clr_character_flag = checked_avuncular1
					clr_character_flag = checked_avuncular2
					clr_character_flag = checked_cousin
					clr_character_flag = checked_paternal_cousin
					clr_character_flag = checked_close_marriage
				}
				marry_to_ROOT_effect = yes
			}
		}
		ai_will_do = { 
			factor = 1
			modifier = {
				factor = 0.5
				NOR = {
					higher_real_tier_than = DUKE
					any_close_relative = { higher_real_tier_than = DUKE }
				}
			}
			modifier = {
				factor = 0.5
				NOR = {
					higher_real_tier_than = COUNT
					any_close_relative = { higher_real_tier_than = COUNT }
				}
			}
			modifier = {
				factor = 0
				is_ruler = no
				liege = {
					ai = no
					OR = {
						is_close_relative = ROOT
						dynasty = ROOT
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = {
					any_child = {
						is_female = no
						NOT = { trait = bastard }
					}
				}
			}
			modifier = {
				factor = 1.25
				NOT = { age = 25 }
			}
		}
	}

	marry_nobility = { #Marry any non-commoner
		ai_check_interval = 4
		potential = {
			ai = yes
			has_character_flag = ai_spouse_finder
			can_marry = yes
			is_consort = no
			OR = {
				had_character_flag = { flag = ai_spouse_finder days = 90 }
				has_character_flag = start_of_game_character
			}
		}
		allow = {
			OR = {
				is_married = no
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 2 }
					real_tier = COUNT
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 3 }
					OR = {
						real_tier = DUKE
						has_minor_title = title_prince
					}
				}
				AND = {
					has_polygamy = yes
					NOT = { num_of_spouses = 4 }
					higher_real_tier_than = DUKE
				}
			}
		}
		effect = {
			clr_character_flag = ai_spouse_finder
			clr_character_flag = checked_avuncular1
			clr_character_flag = checked_avuncular2
			clr_character_flag = checked_cousin
			clr_character_flag = checked_paternal_cousin
			clr_character_flag = checked_close_marriage
			
			# first find a noble, if I'm higher-tier
			if = {
				limit = {
					OR = {
						higher_tier_than = DUKE
						father = { higher_tier_than = DUKE }
						mother = { higher_tier_than = DUKE }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							same_realm = ROOT
							location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 200 } } } } }
						}
						OR = {
							higher_tier_than = COUNT
							father_even_if_dead = { higher_tier_than = COUNT }
							mother_even_if_dead = { higher_tier_than = COUNT }
						}
						is_opposite_sex = ROOT
						religion = ROOT
						culture_group = ROOT
						is_adult = yes
						prisoner = no
						is_married = no
						is_betrothed = no
						is_consort = no
						can_marry = ROOT
						OR = {
							ROOT = { is_female = no }
							ROOT = { wants_matrilineal_marriage_trigger = no }
							ROOT = { can_marry_matrilineally_trigger = no }
							can_marry_matrilineally_trigger = yes
						}
						fertility = 0.33
						NOR = {
							age = 25
							dynasty = none
							trait = eunuch
							trait = celibate
							trait = infirm
							trait = incapable
							is_close_relative = ROOT
							liege = { ai = no }
							any_liege = { is_close_relative = PREV }
							any_liege = { is_lover = PREV }
							any_heir_title = { always = yes }
							any_pretender_title = { always = yes }
						}
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - higher tier)"
					marry_to_ROOT_effect = yes
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							same_realm = ROOT
							location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 200 } } } } }
						}
						OR = {
							higher_tier_than = COUNT
							father_even_if_dead = { higher_tier_than = COUNT }
							mother_even_if_dead = { higher_tier_than = COUNT }
						}
						is_opposite_sex = ROOT
						religion = ROOT
						is_adult = yes
						prisoner = no
						is_married = no
						is_betrothed = no
						is_consort = no
						OR = {
							ROOT = { is_female = no }
							ROOT = { wants_matrilineal_marriage_trigger = no }
							ROOT = { can_marry_matrilineally_trigger = no }
							can_marry_matrilineally_trigger = yes
						}
						can_marry = ROOT
						fertility = 0.33
						NOR = {
							age = 25
							dynasty = none
							trait = eunuch
							trait = celibate
							trait = infirm
							trait = incapable
							is_close_relative = ROOT
							liege = { ai = no }
							any_liege = { is_close_relative = PREV }
							any_liege = { is_lover = PREV }
							any_heir_title = { always = yes }
							any_pretender_title = { always = yes }
						}
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - higher tier)"
					marry_to_ROOT_effect = yes
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							same_realm = ROOT
							location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 200 } } } } }
						}
						OR = {
							is_ruler = yes
							father_even_if_dead = { is_ruler = yes }
							mother_even_if_dead = { is_ruler = yes }
						}
						is_opposite_sex = ROOT
						religion = ROOT
						is_adult = yes
						prisoner = no
						is_married = no
						is_betrothed = no
						is_consort = no
						can_marry = ROOT
						OR = {
							ROOT = { is_female = no }
							ROOT = { wants_matrilineal_marriage_trigger = no }
							ROOT = { can_marry_matrilineally_trigger = no }
							can_marry_matrilineally_trigger = yes
						}
						fertility = 0.33
						NOR = {
							age = 25
							dynasty = none
							trait = eunuch
							trait = celibate
							trait = infirm
							trait = incapable
							is_close_relative = ROOT
							liege = { ai = no }
							any_liege = { is_close_relative = PREV }
							any_liege = { is_lover = PREV }
							any_heir_title = { always = yes }
							any_pretender_title = { always = yes }
						}
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - higher tier)"
					marry_to_ROOT_effect = yes
				}
			}
			if = {
				limit = {
					OR = {
						higher_tier_than = BARON
						father = { higher_tier_than = BARON }
						mother = { higher_tier_than = BARON }
					}
				}
				random_character = {
					limit = {
						ai = yes
						OR = {
							same_realm = ROOT
							location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 200 } } } } }
						}
						OR = {
							is_ruler = yes
							father_even_if_dead = { is_ruler = yes }
							mother_even_if_dead = { is_ruler = yes }
						}
						is_opposite_sex = ROOT
						religion = ROOT
						is_adult = yes
						prisoner = no
						is_married = no
						is_betrothed = no
						is_consort = no
						can_marry = ROOT
						OR = {
							ROOT = { is_female = no }
							ROOT = { wants_matrilineal_marriage_trigger = no }
							ROOT = { can_marry_matrilineally_trigger = no }
							can_marry_matrilineally_trigger = yes
						}
						fertility = 0.33
						NOR = {
							age = 25
							dynasty = none
							trait = eunuch
							trait = celibate
							trait = infirm
							trait = incapable
							is_close_relative = ROOT
							liege = { ai = no }
							any_liege = { is_close_relative = PREV }
							any_liege = { is_lover = PREV }
							any_heir_title = { always = yes }
							any_pretender_title = { always = yes }
						}
					}
					log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - higher tier)"
					marry_to_ROOT_effect = yes
				}
			}
			# first find someone with a claim I want
			random_character = {
				limit = {
					ai = yes
					ROOT = {
						is_ruler = yes
						NOT = { trait = content }
						NOT = { trait = humble }
					}
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.35
					any_claim = {
						NOT = { claimed_by = ROOT }
						OR = {
							AND = {
								NOT = { lower_tier_than = ROOT }
								holder_scope = { same_realm = ROOT }
							}
							holder_scope = { is_vassal_or_below = ROOT }
							location = { ROOT = { capital_scope = { NOT = { distance = { where = PREVPREV value = 100 } } } } }
							capital_scope = { ROOT = { capital_scope = { NOT = { distance = { where = PREVPREV value = 100 } } } } }
						}
					}				
					NOR = {
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - has claim)"
				marry_to_ROOT_effect = yes
			}
			# then find someone of good stats
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					culture_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 12
						stewardship = 12
					}
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - good stats)"
				marry_to_ROOT_effect = yes
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 12
						stewardship = 12
					}
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - good stats)"
				marry_to_ROOT_effect = yes
			}				
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					culture_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 12
						stewardship = 12
					}
					NOR = {
						age = 30
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						is_older_than = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - good stats)"
				marry_to_ROOT_effect = yes
			}				
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 12
						stewardship = 12
					}
					NOR = {
						age = 30
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						is_older_than = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - good stats)"
				marry_to_ROOT_effect = yes
			}				
			# then look for someone at least decent
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					culture_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 8
						stewardship = 8
						martial = 8
						trait = fair
						is_smart_trigger = yes
						is_strong_trigger = yes
					}
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - decent stats)"
				marry_to_ROOT_effect = yes
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 8
						stewardship = 8
						martial = 8
						trait = fair
						is_smart_trigger = yes
						is_strong_trigger = yes
					}
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - decent stats)"
				marry_to_ROOT_effect = yes
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					culture_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 8
						stewardship = 8
						martial = 8
						trait = fair
						is_smart_trigger = yes
						is_strong_trigger = yes
					}
					NOR = {
						age = 30
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						is_older_than = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - decent stats)"
				marry_to_ROOT_effect = yes
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						diplomacy = 8
						stewardship = 8
						martial = 8
						trait = fair
						is_smart_trigger = yes
						is_strong_trigger = yes
					}
					NOR = {
						age = 30
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						is_older_than = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - decent stats)"
				marry_to_ROOT_effect = yes
			}
			# then look for someone attractive
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					OR = {
						trait = fair
						trait = fertile
						trait = melodious_voice
						trait = beauty
					}
					NOR = {
						age = 25
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - attractive)"
				marry_to_ROOT_effect = yes
			}
			# then settle for someone available
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion_group = ROOT
					culture_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - available)"
				marry_to_ROOT_effect = yes
			}
			random_character = {
				limit = {
					ai = yes
					OR = {
						same_realm = ROOT
						location = { ROOT = { location = { NOT = { distance = { where = PREVPREV value = 150 } } } } }
					}
					is_opposite_sex = ROOT
					is_ruler = no
					religion_group = ROOT
					is_adult = yes
					prisoner = no
					is_married = no
					is_betrothed = no
					is_consort = no
					can_marry = ROOT
					OR = {
						ROOT = { is_female = no }
						ROOT = { wants_matrilineal_marriage_trigger = no }
						ROOT = { can_marry_matrilineally_trigger = no }
						can_marry_matrilineally_trigger = yes
					}
					fertility = 0.33
					NOR = {
						age = 20
						dynasty = none
						trait = eunuch
						trait = celibate
						trait = infirm
						trait = incapable
						is_close_relative = ROOT
						liege = { ai = no }
						any_liege = { is_close_relative = PREV }
						any_liege = { is_lover = PREV }
						any_heir_title = { always = yes }
						any_pretender_title = { always = yes }
					}
				}
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - available)"
				marry_to_ROOT_effect = yes
			}
			# failing that, a new character will do
			if = {
				limit = { is_female = no }
				create_character = {
					random_traits = yes
					dynasty = random
					female = yes
					age = 17
					culture = ROOT
					religion = ROOT
				}
			}
			if = {
				limit = { is_female = yes }
				create_character = {
					random_traits = yes
					dynasty = random
					female = no
					age = 20
					culture = ROOT
					religion = ROOT
				}
			}
			new_character = {
				log = "[This.GetTitledName] marries [Root.GetTitledName] (Spouse Finder - new character)"
				if = {
					limit = { religion_group = indian_group }
					add_trait = kshatriya
					character_event = { id = RoI.30121 }
				}
				marry_to_ROOT_effect = yes
			}
			break = yes
		}
		ai_will_do = {
			factor = 1
		}
	}
}

