religious_turmoil = {
	potential = {
		religion_group = christian
		is_free_or_tributary_trigger = yes
		NOT = { is_year = 1600 }
		NOT = { has_country_flag = had_religious_turmoil } 
		OR = {
			religion = catholic
			religion = protestant
			religion = reformed
			religion = hussite
		}
		is_religion_enabled = hussite
		NOT = { tag = FRA }
		NOT = { has_country_modifier = counter_reformation } 
		is_force_converted = no
	}

	
	
	can_start = {
		has_any_disaster = no
		NOT = { religious_unity = 0.75 }
		NOT = { full_idea_group = humanist_ideas }
		any_owned_province = {
			has_owner_religion = no
			OR = {
				religion = catholic
				religion = protestant
				religion = reformed
				religion = hussite
			}
		}
	}
	
	
	can_stop = {
		OR = {
			has_any_disaster = yes
			religious_unity = 0.75
			full_idea_group = humanist_ideas
		}
	}
	
	
	
	progress = {
		modifier = {
			factor = 1
			NOT = { religious_unity = 0.75 }
			religious_unity = 0.5
		} 		
		modifier = {
			factor = 2
			NOT = { religious_unity = 0.5 }
		} 
		modifier = {
			factor = 1
			has_idea_group = religious_ideas
		}
		modifier = {
			factor = 1
			NOT = { stability = 0 }
		}
		modifier = {
			factor = 2
			has_hostile_reformation_center = yes
		}
		modifier = {
			factor = -1
			has_friendly_reformation_center = yes
		}
		
		
		

	}
	
	
	can_end = {
		OR = {
			AND = {
				NOT = { num_of_rebel_controlled_provinces = 1 }
				OR = {
					is_force_converted = yes
					religious_unity = 0.9
					NOT = {
						any_owned_province = {
							has_owner_religion = no
							OR = {
								religion = catholic
								religion = protestant
								religion = reformed
								religion = hussite
							}
						}		
					}
					full_idea_group = humanist_ideas
				}
			}
			custom_trigger_tooltip = {
				tooltip = religious_turmoil_timelimit_tt
				had_country_flag = { flag = active_religious_turmoil days = 9125 }
			}
		}
	}
	

	
	on_start = religious_turmoil.1
	on_end = religious_turmoil.2
	
	on_monthly = {
		events = {
		}
		
		random_events = { 
			1200 = 0
			10 = religious_turmoil.3
			10 = religious_turmoil.4
			10 = religious_turmoil.5
			10 = religious_turmoil.6
		
		}
	}
}

