﻿turkish_migrations_accept_value = {
	value = 100

	### culture
	if = {
		limit = {
			culture = {
				OR = {
					has_cultural_pillar = heritage_turkic
					any_parent_culture_or_above = { has_cultural_pillar = heritage_turkic }
					has_cultural_pillar = language_turkic
					any_parent_culture_or_above = { has_cultural_pillar = language_turkic }
				}
			}
		}
		add = 400
	}

	### traits
	if = {
		limit = {
			OR = {
				has_trait = arrogant
				has_trait = brave
				has_trait = paranoid
				has_trait = greedy
				has_trait = sadistic
				has_trait = stubborn
			}
		}
		multiply = 0.2
	}

	if = {
		limit = {
			OR = {
				has_trait = generous
				has_trait = trusting
			}
		}
		multiply = 3
	}

	if = {
		limit = {
			OR = {
				has_trait = craven
				has_trait = content
			}
		}
		multiply = 8
	}

	### realm size - the larger it is, the less bothered it is about settling nomads
	if = {
		limit = { realm_size >= 200 }
		multiply = 8
	}
	else_if = {
		limit = { realm_size >= 180 }
		multiply = 6
	}
	else_if = {
		limit = { realm_size >= 140 }
		multiply = 4
	}
	else_if = {
		limit = { realm_size >= 100 }
		multiply = 2
	}
	else_if = {
		limit = { realm_size >= 60 }
		multiply = 1
	}
	else = {
		multiply = 0.5
	}

	### current army strength - nomads only spawn up to 9000 troops
	if = {
		limit = { current_military_strength > 9000 }
		multiply = 0.8
	}
	else_if = {
		limit = { current_military_strength > 50000 }
		multiply = 0.05
	}
}

turkish_migrations_refuse_value = {
	value = 200

	### culture
	if = {
		limit = {
			culture = {
				NOR = {
					has_cultural_pillar = heritage_turkic
					any_parent_culture_or_above = { has_cultural_pillar = heritage_turkic }
					has_cultural_pillar = language_turkic
					any_parent_culture_or_above = { has_cultural_pillar = language_turkic }
				}
			}
		}
		add = 400
	}

	### invaders
	if = {
		limit = { has_character_modifier = historicinvasions_plot_armor }
		multiply = 8
	}

	### byzantine empire

	### current army strength - nomads only spawn up to 9000 troops
	if = {
		limit = { current_military_strength < 9000 }
		multiply = 0.75
	}
	else_if = {
		limit = { current_military_strength > 50000 }
		multiply = 5
	}

	### eldiguz; AI always accepts
	if = {
		limit = { scope:turkish_nomad = { has_character_flag = is_eldiguz_flag } }
		multiply = 0
	}
}