#####################################
# Your sins have not gone unnoticed #
#####################################
character_event = {
	id = 5300
	
	picture = "event_religion"

	trigger = {
		condition = { type = religion value = catholic }
		condition = { type = ruler }
		condition = { type = not value = { type = trait value = excommunicated } }
		condition = {
			type = or
			condition = { type = trait value = kinslayer }
			condition = { type = trait value = heretic }
			condition = { type = not value = { type = piety value = -50 }
			}
		}
		condition = { type = not value = { type = title value = PAPA } }
	}

	mean_time_to_happen = {
		months = 120

		modifier = {
			condition = { type = trait value = zealous }
			factor = 1.2
		}

		modifier = {
			condition = { type = trait value = sceptical }
			factor = 0.8
		}
 
		modifier = { condition = { type = trait value = kinslayer }
			factor = 0.3
		}

		modifier = { condition = { type = trait value = heretic }
			factor = 0.3
		}
 
		modifier = { condition = { type = trait value = crusader }
			factor = 1.2
		}


		modifier = { condition = { type = has_law value = { regal_supremacy = yes } }
			factor = 0.8
		}

		modifier = { condition = { type = piety value = 300 }
			factor = 1.4
		}

		modifier = { condition = { type = piety value = 150 }
			factor = 1.4
		}

		modifier = { condition = { type = not value = { type = piety value = -150} }
			factor = 0.7
		}

		modifier = { condition = { type = not value = { type = piety value = -300} }
			factor = 0.7
		}

	}

	action_a = {
		ai_chance = 34
		modifier = {
			condition = { type = or
				condition = { type = title value = TEMP }
				condition = { type = title value = TEUT }
				condition = { type = title value = HOSP }
			}
			factor = 1000
		}
		effect = { type = piety value = 50 }
		effect = { type = gold scale = -0.35 }
		effect = { type = prestige scale = -1}
		effect = { type = health value = -1}
		effect = { 
			type = random 
			chance = 50
			effect = {
				type = add_trait
				value = zealous
			}
		}
		effect = { 
			type = random 
			chance = 10
			effect = {
				type = remove_trait
				value = kinslayer
			}
		}
		effect = { 
			type = random 
			chance = 10
			effect = {
				type = remove_trait
				value = heretic
			}
		}
	}
	action_b = {
		ai_chance = 33
		effect = { type = piety value = 15 }
		effect = { type = gold scale = -0.1 }
	}
	action_c = {
		ai_chance = 33
		effect = { type = add_trait value = excommunicated }
		effect = { type = piety value = -100 }
		effect = { 
			type = random 
			chance = 50
			effect = {
				type = add_trait
				value = sceptical
			}
		}
	}
}