﻿namespace = orgy_ritual

############################
# The Ritual
# by Ban10
############################

# The Regula Ritual
# This is the ending event of every Orgy event
# It is similar to the old event, giving you some bonuses depending on your choice

orgy_ritual.0001 = {
	type = activity_event
	title = orgy_ritual.0001.t
	desc = orgy_ritual.0001.desc
	theme = regula_orgy_theme
	override_background = {
		reference = regula_orgy
	}
	left_portrait = root

	immediate = {
		# Heals a mental / physical and disease
		regula_mutare_corpus_repair_mind_single_effect = yes
		regula_mutare_corpus_repair_physical_single_effect = yes
		regula_mutare_corpus_cure_disease_single_effect = yes

		# We also get small immunity to disease
		add_character_flag = {
			flag = immune_to_disease
			years = 1
		}
	}

	option = { #Increase health
		name = orgy_ritual.0001.a
		add_character_modifier = {
			modifier = regula_orgy_health
			months = 30
		}

		# Heal even more bad traits
		# Heals a mental / physical and disease
		regula_mutare_corpus_repair_mind_single_effect = yes
		regula_mutare_corpus_repair_physical_single_effect = yes
		regula_mutare_corpus_cure_disease_single_effect = yes

		# Get large immunity to disease
		add_character_flag = {
			flag = immune_to_disease
			years = 5
		}


		hidden_effect = {
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = root }
						has_trait = devoted_trait_group
					}
					add_character_modifier = {
						modifier = regula_orgy_health_vassal
						months = 30
					}
				}
			}
		}
	}

	option = { # Lifestyle boost for all
		name = orgy_ritual.0001.b
		add_character_modifier = {
			modifier = regula_orgy_lifestyle
			months = 30
		}
		if = {
			limit = { has_lifestyle = diplomacy_lifestyle }
			add_diplomacy_lifestyle_xp = 1000
		}
		else_if = {
			limit = { has_lifestyle = martial_lifestyle }
			add_martial_lifestyle_xp = 1000
		}
		else_if = {
			limit = { has_lifestyle = stewardship_lifestyle }
			add_stewardship_lifestyle_xp = 1000
		}
		else_if = {
			limit = { has_lifestyle = intrigue_lifestyle }
			add_intrigue_lifestyle_xp = 1000
		}
		else_if = {
			limit = { has_lifestyle = learning_lifestyle }
			add_learning_lifestyle_xp = 1000
		}
		hidden_effect = {
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = root }
						has_trait = devoted_trait_group
					}
					add_character_modifier = {
						modifier = regula_orgy_lifestyle_vassal
						months = 30
					}
					add_stewardship_lifestyle_perk_points = 1
					add_martial_lifestyle_perk_points = 1
				}
			}
		}
	}

	option = { #Passive piety gain (deepen the connection to the book)
		name = orgy_ritual.0001.c

		add_character_modifier = {
			modifier = regula_orgy_piety
			months = 30
		}
		hidden_effect = {
			scope:activity = {
				every_attending_character = {
					limit = {
						NOT = { this = root }
						has_trait = devoted_trait_group
					}
					add_character_modifier = {
						modifier = regula_orgy_piety_vassal
						months = 30
					}
				}
			}
		}
	}
}
