#######################################
# Order of the Sacred Magdalene
# Feast and Summer Fair Events
#
# Four visible screens per activity:
# opening -> random scene -> random scene -> finale
#######################################

namespace = ggsmfest

#######################################
# MAGDALENE FEAST
#######################################

long_character_event = {
	id = ggsmfest.1
	desc = ggsmfest.1.desc
	picture = GFX_evt_ggsm_houses_mercy
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	trigger = {
		ggsm_order_member_trigger = yes
		ggsm_adult_catholic_woman_trigger = yes
		has_character_flag = ggsm_magdalene_feast_in_progress
	}

	option = {
		name = ggsmfest.continue
		change_society_currency = {
			society = ggsm_order_sacred_magdalene
			value = ggsm_magdalene_feast_grace_cost
			scaled_by_influence = no
		}
		random_list = {
			40 = { long_character_event = { id = ggsmfest.2 } }
			35 = { long_character_event = { id = ggsmfest.3 } }
			25 = { long_character_event = { id = ggsmfest.4 } }
		}
	}
}

# Sacred courtesans lead the first revel.
long_character_event = {
	id = ggsmfest.2
	desc = ggsmfest.2.desc
	picture = GFX_evt_ggsm_sacred_prostitution
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		ggsm_progress_sacred_prostitution_effect = yes
		prestige = 10
		random_list = {
			40 = { long_character_event = { id = ggsmfest.5 } }
			35 = { long_character_event = { id = ggsmfest.6 } }
			25 = { long_character_event = { id = ggsmfest.7 } }
		}
	}
}

# Sisters turn the hall into an exhibitionist spectacle.
long_character_event = {
	id = ggsmfest.3
	desc = ggsmfest.3.desc
	picture = GFX_evt_ggsm_public_altar
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		prestige = 15
		if = {
			limit = { NOT = { trait = exhibitionist } }
			random = {
				chance = 20
				add_trait = exhibitionist
			}
		}
		random_list = {
			40 = { long_character_event = { id = ggsmfest.5 } }
			35 = { long_character_event = { id = ggsmfest.6 } }
			25 = { long_character_event = { id = ggsmfest.7 } }
		}
	}
}

# Carnal confession and absolution open the revel.
long_character_event = {
	id = ggsmfest.4
	desc = ggsmfest.4.desc
	picture = GFX_evt_ggsm_carnal_confession
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		piety = 15
		add_society_currency_minor_effect = yes
		random_list = {
			40 = { long_character_event = { id = ggsmfest.5 } }
			35 = { long_character_event = { id = ggsmfest.6 } }
			25 = { long_character_event = { id = ggsmfest.7 } }
		}
	}
}

# Erotic games and partner-lot drawing among adult revelers.
long_character_event = {
	id = ggsmfest.5
	desc = ggsmfest.5.desc
	picture = GFX_evt_ggsm_sacred_prostitution
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		prestige = 10
		add_society_currency_minor_effect = yes
		long_character_event = { id = ggsmfest.8 }
	}
}

# The tables give way to an uninhibited communal revel.
long_character_event = {
	id = ggsmfest.6
	desc = ggsmfest.6.desc
	picture = GFX_evt_ggsm_public_altar
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		ggsm_progress_sacred_prostitution_effect = yes
		prestige = 15
		long_character_event = { id = ggsmfest.8 }
	}
}

# Gifts, food, and intimate hospitality fill the hall.
long_character_event = {
	id = ggsmfest.7
	desc = ggsmfest.7.desc
	picture = GFX_evt_ggsm_houses_mercy
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		piety = 10
		prestige = 10
		add_society_currency_minor_effect = yes
		long_character_event = { id = ggsmfest.8 }
	}
}

# Final rite and closing revel.
long_character_event = {
	id = ggsmfest.8
	desc = ggsmfest.8.desc
	picture = GFX_evt_ggsm_public_altar
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.8.a
		add_society_currency_medium_effect = yes
		piety = 25
		prestige = 25
		clr_character_flag = ggsm_magdalene_feast_in_progress
		clr_character_flag = do_not_disturb
	}
}

#######################################
# MAGDALENE SUMMER FAIR
#######################################

long_character_event = {
	id = ggsmfest.20
	desc = ggsmfest.20.desc
	picture = GFX_evt_ggsm_houses_mercy
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	trigger = {
		ggsm_order_member_trigger = yes
		ggsm_adult_catholic_woman_trigger = yes
		has_character_flag = ggsm_magdalene_fair_in_progress
	}

	option = {
		name = ggsmfest.continue
		change_society_currency = {
			society = ggsm_order_sacred_magdalene
			value = ggsm_magdalene_fair_grace_cost
			scaled_by_influence = no
		}
		random_list = {
			40 = { long_character_event = { id = ggsmfest.21 } }
			35 = { long_character_event = { id = ggsmfest.22 } }
			25 = { long_character_event = { id = ggsmfest.23 } }
		}
	}
}

# Sacred courtesans' pavilion.
long_character_event = {
	id = ggsmfest.21
	desc = ggsmfest.21.desc
	picture = GFX_evt_ggsm_sacred_prostitution
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		wealth = 5
		prestige = 10
		ggsm_progress_sacred_prostitution_effect = yes
		random_list = {
			40 = { long_character_event = { id = ggsmfest.24 } }
			35 = { long_character_event = { id = ggsmfest.25 } }
			25 = { long_character_event = { id = ggsmfest.26 } }
		}
	}
}

# Exhibitionist procession through the fair.
long_character_event = {
	id = ggsmfest.22
	desc = ggsmfest.22.desc
	picture = GFX_evt_ggsm_public_altar
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		prestige = 15
		if = {
			limit = { NOT = { trait = exhibitionist } }
			random = {
				chance = 25
				add_trait = exhibitionist
			}
		}
		random_list = {
			40 = { long_character_event = { id = ggsmfest.24 } }
			35 = { long_character_event = { id = ggsmfest.25 } }
			25 = { long_character_event = { id = ggsmfest.26 } }
		}
	}
}

# Baths, food, and intimate hospitality are opened to visitors.
long_character_event = {
	id = ggsmfest.23
	desc = ggsmfest.23.desc
	picture = GFX_evt_ggsm_houses_mercy
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		piety = 10
		add_society_currency_minor_effect = yes
		random_list = {
			40 = { long_character_event = { id = ggsmfest.24 } }
			35 = { long_character_event = { id = ggsmfest.25 } }
			25 = { long_character_event = { id = ggsmfest.26 } }
		}
	}
}

# Public carnal confession.
long_character_event = {
	id = ggsmfest.24
	desc = ggsmfest.24.desc
	picture = GFX_evt_ggsm_carnal_confession
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		piety = 15
		add_society_currency_minor_effect = yes
		long_character_event = { id = ggsmfest.27 }
	}
}

# Erotic dancing and beauty contests.
long_character_event = {
	id = ggsmfest.25
	desc = ggsmfest.25.desc
	picture = GFX_evt_ggsm_sacred_prostitution
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		prestige = 15
		wealth = 5
		long_character_event = { id = ggsmfest.27 }
	}
}

# A Kept Mercy becomes a strange and popular attraction.
long_character_event = {
	id = ggsmfest.26
	desc = ggsmfest.26.desc
	picture = GFX_evt_ggsm_houses_mercy
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.continue
		prestige = 10
		if = {
			limit = { trait = ggsm_tentacle_companion }
			prestige = 10
		}
		long_character_event = { id = ggsmfest.27 }
	}
}

# Closing public revel and blessing.
long_character_event = {
	id = ggsmfest.27
	desc = ggsmfest.27.desc
	picture = GFX_evt_ggsm_public_altar
	border = GFX_event_long_frame_religion
	is_triggered_only = yes

	option = {
		name = ggsmfest.27.a
		add_society_currency_medium_effect = yes
		piety = 20
		prestige = 25
		if = {
			limit = { has_dlc = "Reapers" }
			capital_scope = {
				change_variable = { which = prosperity_value value = 4 }
			}
		}
		clr_character_flag = ggsm_magdalene_fair_in_progress
		clr_character_flag = do_not_disturb
	}
}

#######################################
# COOLDOWN AND SAFETY EVENTS
#######################################

long_character_event = {
	id = ggsmfest.90
	hide_window = yes
	is_triggered_only = yes
	immediate = { clr_character_flag = ggsm_magdalene_feast_cooldown }
}

long_character_event = {
	id = ggsmfest.91
	hide_window = yes
	is_triggered_only = yes
	immediate = { clr_character_flag = ggsm_magdalene_fair_cooldown }
}

long_character_event = {
	id = ggsmfest.92
	hide_window = yes
	is_triggered_only = yes
	trigger = { has_character_flag = ggsm_magdalene_feast_in_progress }
	immediate = {
		clr_character_flag = ggsm_magdalene_feast_in_progress
		clr_character_flag = do_not_disturb
	}
}

long_character_event = {
	id = ggsmfest.93
	hide_window = yes
	is_triggered_only = yes
	trigger = { has_character_flag = ggsm_magdalene_fair_in_progress }
	immediate = {
		clr_character_flag = ggsm_magdalene_fair_in_progress
		clr_character_flag = do_not_disturb
	}
}
