########################################
# Events for Catharism
########################################

namespace = cpbm_cathar

# Pelican spotted

province_event = {
	id = cpbm_cathar.4
	title = cpbm_cathar.EVTNAME4
	desc = cpbm_cathar.EVTDESC4
	picture = RELIGION_eventPicture

	trigger = {
		religion = cathar
		owner = { religion = cathar }
		NOT = { has_climate = arid }
		NOT = { has_province_modifier = pelican_spotted }
	}

	mean_time_to_happen = {
		months = 2500
	}

	option = {
		name = cpbm_cathar.EVTOPT4
		owner = { add_stability = 1 }
	}
}

# Consolamentum

country_event = {
	id = cpbm_cathar.5
	title = cpbm_cathar.EVTNAME5
	desc = cpbm_cathar.EVTDESC5
	picture = RELIGION_eventPicture

	fire_only_once = no

	trigger = {
		religion = cathar
		NOT = { has_ruler_modifier = cathar_leader }
	}

	mean_time_to_happen = {
		months = 600
	}

	option = {
		name = cpbm_cathar.EVTOPT5A
		add_ruler_modifier = {
			name = cathar_leader
			duration = -1
		}
		hidden_effect = {
			random_list = {
				50 = { add_church_power = 5 }
				16 = {
					country_event = {
						id = cpbm_cathar.6
						days = 5
					}
				}
				16 = {
					country_event = {
						id = cpbm_cathar.7
						days = 5
					}
				}
				16 = {
					country_event = {
						id = cpbm_cathar.8
						days = 5
					}
				}
				2 = {
					country_event = {
						id = cpbm_cathar.9
						days = 5
					}
				}
			}
		}
	}
	option = {
		name = cpbm_cathar.EVTOPT5B
		add_church_power = -50
	}
}

# Consolamentum: more ADM for the country

country_event = {
	id = cpbm_cathar.6
	title = cpbm_cathar.EVTNAME6
	desc = cpbm_cathar.EVTDESC6
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT6
		add_adm_power = 500
	}
}

# Consolamentum: more DIP for the country

country_event = {
	id = cpbm_cathar.7
	title = cpbm_cathar.EVTNAME7
	desc = cpbm_cathar.EVTDESC7
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT7
		add_dip_power = 500
	}
}

# Consolamentum: more MIL for the country

country_event = {
	id = cpbm_cathar.8
	title = cpbm_cathar.EVTNAME8
	desc = cpbm_cathar.EVTDESC8
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT8
		add_mil_power = 500
	}
}

# Consolamentum: a perfect Perfect leader... Yay!

country_event = {
	id = cpbm_cathar.9
	title = cpbm_cathar.EVTNAME9
	desc = cpbm_cathar.EVTDESC9
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT9
		change_adm = 6
		change_dip = 6
		change_mil = 6
	}
}

# Land given to the nation by a Good Man

province_event = {
	id = cpbm_cathar.10
	title = cpbm_cathar.EVTNAME10
	desc = cpbm_cathar.EVTDESC10
	picture = RELIGION_eventPicture

	trigger = {
		religion = cathar
		owner = { religion = cathar }
	}

	mean_time_to_happen = {
		months = 2000
	}

	option = {
		name = cpbm_cathar.EVTOPT10
		add_base_production = 1
	}
}

# House of Perfects

province_event = {
	id = cpbm_cathar.11
	title = cpbm_cathar.EVTNAME11
	desc = cpbm_cathar.EVTDESC11
	picture = RELIGION_eventPicture

	trigger = {
		religion = cathar
		owner = { religion = cathar }
		NOT = { has_province_modifier = perfecti_house }
	}

	mean_time_to_happen = {
		months = 2400
	}

	option = {
		name = cpbm_cathar.EVTOPT4
		add_province_modifier = {
			name = perfecti_house
			duration = 7200
		}
	}
}

# Dominique de Guzmn

country_event = {
	id = cpbm_cathar.12
	title = cpbm_cathar.EVTNAME12
	desc = cpbm_cathar.EVTDESC12
	picture = RELIGION_eventPicture

	fire_only_once = yes

	trigger = {
		religion = cathar
		exists = PAP
		any_neighbor_country = { religion = catholic }
	}

	mean_time_to_happen = {
		months = 580
	}

	option = {
		name = cpbm_cathar.EVTOPT12
		hidden_effect = {
			random_list = {
				30 = {
					country_event = {
						id = cpbm_cathar.13
						days = 3
					}
				}
				30 = {
					country_event = {
						id = cpbm_cathar.14
						days = 3
					}
				}
				40 = {
					country_event = {
						id = cpbm_cathar.15
						days = 3
					}
				}
			}
		}
	}
}

# Dominique de Guzmn: The Cathar Books burn

country_event = {
	id = cpbm_cathar.13
	title = cpbm_cathar.EVTNAME13
	desc = cpbm_cathar.EVTDESC13
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT13
		add_prestige = -5
		add_historical_rival = PAP
	}
}

# Dominique de Guzmn: The Bible burns

country_event = {
	id = cpbm_cathar.14
	title = cpbm_cathar.EVTNAME14
	desc = cpbm_cathar.EVTDESC14
	picture = RELIGION_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT14
		add_prestige = 10
		define_advisor = {
 			type = theologian
 			skill = 3
		}
	}
}

# Dominique de Guzmn: Everything burns

country_event = {
	id = cpbm_cathar.15
	title = cpbm_cathar.EVTNAME15
	desc = cpbm_cathar.EVTDESC15
	picture = CPBM_BURNING_BOOK_eventPicture

	is_triggered_only = yes

	option = {
		name = cpbm_cathar.EVTOPT15
	}
}

# The Troubadours

province_event = {
	id = cpbm_cathar.16
	title = cpbm_cathar.EVTNAME16
	desc = cpbm_cathar.EVTDESC16
	picture = CPBM_TROUBADOUR_eventPicture
	
	fire_only_once = yes

	trigger = {
		culture = occitain
		is_year = 1096
	}

	mean_time_to_happen = {
		months = 842

		modifier = {
			factor = 0.6
			owner = { religion = cathar }
		}

		modifier = {
			factor = 0.85
			region = france_region
		}
	}

	option = {
		name = cpbm_cathar.EVTOPT16
		add_province_modifier = {
			name = troubadours
			duration = -1
		}
	}
}
