﻿
namespace = central_asia

### Become Greatest of Khans
# by Petter Vilberg
# central_asia.0001 # I become Genghis Khan
# central_asia.0002 # My liege became Genghis Khan
# central_asia.0003 # Someone became Genghis Khan :/
#
# central_asia.0011 #I formed the Bactrian Empire
# central_asia.0012 #My ruler formed the Bactrian Empire
# central_asia.0013 #The Bactrian Empire now claims my land
###


################
# Become Greatest of Khan events
# central_asia.0001 - 0003
#

#I became Genghis Khan
central_asia.0001 = {
	type = character_event
	title = central_asia.0001.t
	desc = central_asia.0001.desc
	theme = war
	left_portrait = {
		character = root
		animation = personality_vengeful
	}
	override_background = { reference = wilderness_steppe }
	
	immediate = {
		play_music_cue = "mx_cue_crusade_starts"
		form_the_mongol_empire_effect = yes	
	}

	option = {
		name = central_asia.0001.a
		custom_tooltip = central_asia.0001.mongol_invasion_cb
		add_trait = greatest_of_khans
		if = {
			limit = { has_any_nickname = yes }
			remove_nickname = yes
		}
		give_nickname = nick_genghis_khan
		if = {
			limit = {
				prestige_level < 5
			}
			add_prestige_level = 1
		}
		if = {
			limit = {
				has_government = tribal_government
			}
			change_government = nomadic_government
		}
	}
}


#My ruler became Genghis Khan
central_asia.0002 = {
	type = character_event
	title = central_asia.0002.t
	desc = central_asia.0002.desc
	theme = war
	left_portrait = {
		character = scope:genghis_khan
		animation = personality_vengeful
	}
	override_background = { reference = wilderness_steppe }
	
	immediate = {
		play_music_cue = "mx_cue_crusade_starts"
		show_as_tooltip = {
			scope:genghis_khan = {
				add_trait_force_tooltip = greatest_of_khans
				hidden_effect = { set_primary_title_to = title:e_mongol_empire }
				spawn_mongol_troops_effect = yes
			}
		}
	}

	option = {
		name = central_asia.0002.a
	}
}


#Someone became Genghis Khan
central_asia.0003 = {
	type = character_event
	title = central_asia.0002.t
	desc = central_asia.0003.desc
	theme = war
	left_portrait = {
		character = scope:genghis_khan
		animation = personality_vengeful
	}
	override_background = { reference = wilderness_steppe }

	immediate = {
		play_music_cue = "mx_cue_combat_2"
		show_as_tooltip = {
			scope:genghis_khan = {
				add_trait_force_tooltip = greatest_of_khans
				hidden_effect = { set_primary_title_to = title:e_mongol_empire }
			}
		}
	}

	option = {
		name = {
			text = central_asia.0003.a.neighbor
			trigger = {
				any_neighboring_top_liege_realm_owner = {
					this = scope:genghis_khan
				}
			}
		}
		name = {
			text = central_asia.0003.a.distant
		}
	}
}

#
# END Become Greatest of Khans events
#################

#################
# Establish Bactrian Dominance
# central_asia.0011-0013
# by Petter Vilberg
#

# I have restored Bactria
central_asia.0011 = {
	type = character_event
	title = central_asia.0011.t
	desc = central_asia.0011.desc
	theme = realm
	left_portrait = {
		character = scope:bactrian_emperor
		animation = personality_bold
	}
	override_background = { reference = wilderness_steppe }
	
	immediate = {
		play_music_cue = "mx_cue_epic_sacral_moment"
		establish_bactrian_supremacy_effect = yes	
	}

	option = {
		name = central_asia.0011.a
	}
}

# My liege has restored Bactria
central_asia.0012 = {
	type = character_event
	title = central_asia.0011.t
	desc = central_asia.0012.desc
	theme = realm
	left_portrait = {
		character = scope:bactrian_emperor
		animation = personality_bold
	}
	override_background = { reference = wilderness_steppe }
	
	immediate = {
		play_music_cue = "mx_cue_epic_sacral_moment"
		show_as_tooltip = {
			scope:bactrian_emperor = {
				establish_bactrian_supremacy_effect = yes	
			}
		}
	}

	option = {
		name = central_asia.0012.a
	}
}


# My lands have become de jure of Bactria
central_asia.0013 = {
	type = character_event
	title = central_asia.0011.t
	desc = central_asia.0013.desc
	theme = realm
	left_portrait = {
		character = scope:bactrian_emperor
		animation = personality_bold
	}
	override_background = { reference = wilderness_steppe }

	option = {
		name = central_asia.0013.a
		show_as_tooltip = {
			title:e_bactria = {
				every_in_de_jure_hierarchy = {
					limit = {
						tier = tier_kingdom
					}
					set_de_jure_liege_title = title:e_bactria
				}
			}
		}
	}
}
