﻿can_orthodox_poland_rerechristianisation = {
	type = alert
	icon = action_missing_ghw_beneficiary
	check_create_action = {
		every_ruler = {
			limit = {
				root = {
					is_character_interaction_potentially_accepted = {
						recipient = prev
						interaction = orthodox_poland_rerechristianisation
					}
					has_faith = faith:orthodox 
					OR = { 
						has_title = title:k_poland 
						has_title = title:e_wendish_empire
						has_title = title:e_sclavinia
					}
				}
				OR = { 
					culture = { has_cultural_pillar = heritage_west_slavic }
					culture = { has_cultural_pillar = heritage_south_slavic }
					culture = { has_cultural_pillar = heritage_east_slavic }
				}
				OR = { 
					has_faith = faith:catholic
					has_faith = faith:bosnian_church
				}
				is_independent_ruler = yes       
				is_landed = yes    
				has_global_variable = orthodox_poland_sclavinia
			}
			try_create_important_action = {
				important_action_type = can_orthodox_poland_rerechristianisation
				actor = root
				recipient = this
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = orthodox_poland_rerechristianisation
			actor = scope:actor
			recipient = scope:recipient
		}
	}
}
can_orthodox_baptism_interaction_sclavinia = {
	type = alert
	icon = action_missing_ghw_beneficiary
	check_create_action = {
		every_ruler = {
			limit = {
				root = {
					is_character_interaction_potentially_accepted = {
						recipient = prev
						interaction = orthodox_baptism_interaction_sclavinia
					}
					has_faith = faith:orthodox 
					OR = { 
						has_title = title:k_poland 
						has_title = title:e_wendish_empire
						has_title = title:e_sclavinia
					}
				}
				OR = { 
					culture = { has_cultural_pillar = heritage_baltic }
					culture = { has_cultural_pillar = heritage_west_slavic }
					culture = { has_cultural_pillar = heritage_south_slavic }
					culture = { has_cultural_pillar = heritage_east_slavic }
				}
				faith = { has_doctrine_parameter = unreformed } 
				is_independent_ruler = yes         
				is_landed = yes   
				any_neighboring_and_across_water_top_liege_realm_owner = {
					has_faith = faith:orthodox
				}    
				OR = { 
					has_global_variable = empire_unlock_sclavinia
					has_global_variable = orthodox_unlock_sclavinia
				}
			}
			try_create_important_action = {
				important_action_type = can_orthodox_baptism_interaction_sclavinia
				actor = root
				recipient = this
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = orthodox_baptism_interaction_sclavinia
			actor = scope:actor
			recipient = scope:recipient
		}
	}
}
can_orthodox_vassalizing_eastern_slavs = {
	type = alert
	icon = action_missing_ghw_beneficiary
	check_create_action = {
		every_ruler = {
			limit = { 
				NOT = { this = prev }
				root = {
					is_character_interaction_potentially_accepted = {
						recipient = prev
						interaction = orthodox_vassalizing_eastern_slavs
					}
					has_faith = faith:orthodox 
					OR = { 
						has_title = title:k_poland 
						has_title = title:e_wendish_empire
						has_title = title:e_sclavinia
					}
				}
				OR = {
					culture = { has_cultural_pillar = heritage_west_slavic }
					culture = { has_cultural_pillar = heritage_east_slavic }
					culture = { has_cultural_pillar = heritage_south_slavic }
				}
				has_faith = faith:orthodox
				is_independent_ruler = yes              
				is_landed = yes
				has_global_variable = orthodox_unlock_sclavinia
			}
			try_create_important_action = {
				important_action_type = can_orthodox_vassalizing_eastern_slavs
				actor = root
				recipient = this
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = orthodox_vassalizing_eastern_slavs
			actor = scope:actor
			recipient = scope:recipient
		}
	}
}
can_orthodox_vassalizing_eastern_slavs_empire = {
	type = alert
	icon = action_missing_ghw_beneficiary
	check_create_action = {
		every_ruler = {
			limit = { 
				NOT = { this = prev }
				root = {
					is_character_interaction_potentially_accepted = {
						recipient = prev
						interaction = orthodox_vassalizing_eastern_slavs_empire
					}
					has_faith = faith:orthodox 
					OR = { 
						has_title = title:k_poland 
						has_title = title:e_wendish_empire
						has_title = title:e_sclavinia
					}
				}
				OR = {
					culture = { has_cultural_pillar = heritage_baltic }
					culture = { has_cultural_pillar = heritage_west_slavic }
					culture = { has_cultural_pillar = heritage_east_slavic }
				}
				has_faith = faith:orthodox
				is_independent_ruler = yes              
				is_landed = yes
				has_global_variable = empire_unlock_sclavinia
			}
			try_create_important_action = {
				important_action_type = can_orthodox_vassalizing_eastern_slavs_empire
				actor = root
				recipient = this
			}
		}
	}

	effect = {
		open_interaction_window = {
			interaction = orthodox_vassalizing_eastern_slavs_empire
			actor = scope:actor
			recipient = scope:recipient
		}
	}
}