namespace = russianloc

character_event = {
	id = russianloc.1 #Roslavl
	has_global_flag = pre_roslavl_flag
	
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		has_global_flag = pre_roslavl_flag
		FROM = { title = b_roslavl }
	}
	
	immediate = {
		clr_global_flag = pre_roslavl_flag
		933 = { set_name="" }
		c_roslavl = {
			set_name=""
			adjective=""
		}
	}
}

character_event = {
	id = russianloc.2 #Mstislavl
	has_global_flag = pre_mstislavl_flag
	
	hide_window = yes
	is_triggered_only = yes
	
	trigger = {
		has_global_flag = pre_mstislavl_flag
		FROM = { title = b_mstitslavl }
	}
	
	immediate = {
		clr_global_flag = pre_mstislavl_flag
		551 = { set_name="" }
		c_mstislavl = {
			set_name=""
			adjective=""
		}
	}
}

character_event = { # Religion god names reset
	id = russianloc.10
	
	hide_window = yes
	
	is_triggered_only = yes
	
	only_rulers = yes
	
	trigger = {
		NOT = {
			has_alternate_start_parameter = { key = religion_names value = random }
		}
		is_save_game = yes
		has_landed_title = c_roma
		OR = {
			has_global_flag = norse_reformation
			has_global_flag = tengri_reformation
			has_global_flag = baltic_reformation
			has_global_flag = finnish_reformation
			has_global_flag = aztec_reformation
			has_global_flag = slavic_reformation
			has_global_flag = west_african_reformation
			has_global_flag = zun_reformation
			has_global_flag = bon_reformation
			has_global_flag = hellenic_reformation
		}
	}
	immediate = {
		norse_pagan_reformed = { if = { limit = { has_global_flag=norse_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		tengri_pagan_reformed = { if = { limit = { has_global_flag=tengri_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		baltic_pagan_reformed = { if = { limit = { has_global_flag=baltic_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		finnish_pagan_reformed = { if = { limit = { has_global_flag=finnish_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		aztec_reformed = { if = { limit = { has_global_flag=aztec_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		slavic_pagan_reformed = { if = { limit = { has_global_flag=slavic_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		west_african_pagan_reformed = { if = { limit = { has_global_flag=west_african_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		zun_pagan_reformed = { if = { limit = { has_global_flag=zun_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		bon_reformed = { if = { limit = { has_global_flag=bon_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
		hellenic_pagan_reformed = { if = { limit = { has_global_flag=hellenic_reformation OR = { NOT = { has_flag=reformer_alive_flag } had_flag = { flag=reformer_alive_flag days=1 } } } reformation_god_names_post_effect=yes clr_flag=reformer_alive_flag } }
	}
}
character_event = { # title_patrician_heir grant fix
	id = russianloc.20

	hide_window = yes
	is_patrician = yes
	is_triggered_only = yes
	trigger = {
		player_heir = { NOT = { character = FROM } }
		FROM = { has_minor_title = title_patrician_heir }
	}
	immediate = {
		any_dynasty_member = {
			limit = {
				NOT = { character = FROM }
				NOT = { character = ROOT }
				is_older_than = FROM
			}
			set_character_flag = rev_dynasty_flag
			dynasty = none
		}
		recalc_succession = yes
		any_character = {
			limit = { has_character_flag = rev_dynasty_flag }
			dynasty = ROOT
			clr_character_flag = rev_dynasty_flag
		}
	}
}
character_event = { # title_patrician_heir revoke fix
	id = russianloc.21

	hide_window = yes
	is_patrician = yes
	is_triggered_only = yes
	trigger = {
		player_heir = { character = FROM }
		FROM = { NOT = { has_minor_title = title_patrician_heir } }
	}
	immediate = {
		recalc_succession = yes
	}
}
character_event = {
	id = russianloc.7941 #on_new_holder, on_new_holder_inheritance, on_new_holder_usurpation

	hide_window = yes

	is_triggered_only = yes

	trigger = {
		NOR = {
			is_tribal = yes
			government = tribal_government
			government = nomadic_government
		}
		FROM = {
			NOT = { has_title_flag = untribedtitle_flag }
			OR = {
				title = d_kryvians
				title = d_severians
				title = d_dregovichi
				title = d_drevlians
				title = d_lendians
				title = d_radimichi
			}
		}
	}
	immediate = {
		create_duchy_from_tribe_if_possible_oae = yes
	}
}
