namespace = SLJ
character_event = {
	id = SLJ.2000
	hide_window = yes
	is_triggered_only = yes
	trigger = {
		primary_title = {has_title_flag = seljuk_adventure}
	}
	immediate = {
		if = {
			limit = {
				NOT = {
					current_heir = {
						has_character_flag = reckless_invasion
					}
				}
			}
			any_courtier = {
				limit = {NOT = {character = ROOT}}
				banish = yes
			}
			primary_title = {
				set_title_landless = { title = THIS status = no }
				activate_title = { title = THIS status = no }
				unsafe_destroy_landed_title = THIS
			}
			
			break = yes
		}
		capital_scope = {
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
			spawn_unit = {
				province = THIS
				owner = ROOT
				#leader = THIS
				troops = {
					light_infantry = { 2250 2250 }
					light_cavalry = { 2000 2000 }
					horse_archers = { 1500 1500 }
				}
				attrition = 0
				cannot_inherit = yes
			}
		}
	}

}

character_event = {
	id = SLJ.1000
	desc = EVTDESC60201
	
	picture = GFX_evt_mongols
	border = GFX_event_normal_frame_war
	
	hide_window = yes
	is_triggered_only = yes
	
	
	only_capable = yes
	
	trigger = {
		ai = yes
		is_alive = yes
		NOT = { trait = blinded }
		NOT = { trait = eunuch }
		NOT = { trait = infirm }
		lower_tier_than = king	
	}
	
	immediate = {
		
		set_character_flag = reckless_invasion
		
		if = {
			limit = {
				630 = { # Merv
					owner = {
						NOT = { same_realm = ROOT }
						OR = {
							independent = yes
							war = no
						}
						OR = {
							independent = no
							top_liege = {
								war = no
							}
						}
					}
				}
			}
			prisoner = no
			630 = {
				province_event = {
					id = 60202
					days = 2
				}
			}
			break = yes
		}
		
		if = {
			limit = {
				632 = { # Tus
					owner = {
						NOT = { same_realm = ROOT }
						OR = {
							independent = yes
							war = no
						}
						OR = {
							independent = no
							top_liege = {
								war = no
							}
						}
					}
				}
			}
			prisoner = no
			632 = {
				province_event = {
					id = 60202
					days = 2
				}
			}
			break = yes
		}
		
		
		if = {
			limit = {
				631 = { # Dihistan
					owner = {
						NOT = { same_realm = ROOT }
						OR = {
							independent = yes
							war = no
						}
						OR = {
							independent = no
							top_liege = {
								war = no
							}
						}
					}
				}
			}
			prisoner = no
			631 = {
				province_event = {
					id = 60202
					days = 2
				}
			}
			break = yes
		}
		
		character_event = {
			id = SLJ.1000
			days = 30
			random = 30
		}
	}

}