religion_decisions = {

	join_the_counter_reformation = {
		major = yes
		potential = {
			NOT = { has_country_modifier = counter_reformation } 
			has_global_flag = counter_reformation
			NOT = { has_idea = ecumenism }
			NOT = { has_idea = liberty_egalite_fraternity }
			NOT = { religion_years = { protestant = 150 } }
			religion = catholic
		}
		allow = {
			OR = {
				tag = PAP
				is_emperor = yes
				has_opinion = { who = PAP value = -50 }
			}
			NOT = { has_country_modifier = edict_de_nantes }
		}
		effect = {
			if = {
				limit = {
					NOT = { tag = PAP }
				}
				reverse_add_opinion = { who = PAP modifier = opinion_embraced_counter_reformation }
			}
			if = {
				limit = {
					is_emperor = no
					emperor = { religion = catholic }
				}
				emperor = { add_opinion = { who = ROOT modifier = opinion_embraced_counter_reformation } }
			}
			add_country_modifier = {
				name = "counter_reformation"
				duration = -1
			}
		}
		ai_will_do = {
			factor = 1
			modifier = {
				factor = 0.0
				dominant_religion = reformed
				is_emperor = no
			}
			modifier = {
				factor = 0.0
				dominant_religion = protestant
				is_emperor = no
			}
			modifier = {
				factor = 0.0
				has_country_flag = protestant_reformation
				is_emperor = no
			}
			modifier = {
				factor = 0.0
				has_country_flag = calvinist_reformation
				is_emperor = no
			}
			modifier = {
				factor = 0.0
				NOT = { has_opinion = { who = PAP value = -10 } }
				NOT = { culture_group = latin }
				NOT = { culture_group = iberian }
				is_emperor = no
			}
			modifier = {
				factor = 0.0
				adm = 2
				NOT = { has_opinion = { who = PAP value = 100 } }
				NOT = { culture_group = latin }
				NOT = { culture_group = iberian }
				is_emperor = no
			}
		}
	}
	
	christian_daimyo = {
		potential = {
			government = daimyo
			religion = shinto
			any_owned_province = {
				religion = catholic
			}
		}
		
		allow = {
			dominant_religion = catholic
			stability = 3
		}
		
		effect = {
			change_religion = catholic
			add_stability = -4
		}
	}

}
