﻿# Events for handling the Orgy Activity
# These are mainly the maintenance events, starting, stopping and moving things along
# No guest events (for now), as the player should always be the host

namespace = regula_orgy


# 0000-0999: Maintenance Events
# 2000-2499: Start events for host
# 5000-5999: Feast Interruption Notifications

#################
# Maintenance Events
# 0000 - 0999
#################

# Feast Invalidation for Host Death - Player Heir
regula_orgy.0800 = {
	type = character_event
	title = regula_orgy.0800.t
	desc = {
		desc = regula_orgy.0800.desc
		desc = regula_orgy.0800.desc.entourage
		desc = regula_orgy.0800.desc.ruler
	}
	theme = realm

	left_portrait = {
		character = root
		animation = worry
	}

	immediate = {}

	option = {
		name = regula_orgy.0800.a
		custom_tooltip = regula_orgy.0800.tt
	}
}

#################
# START EVENTS FOR HOST
# 2000 - 2499
#################

# HOST: Time to start the orgy!
# Generic start event.
######
regula_orgy.2001 = {
	type = activity_event
	title = regula_orgy.2001.t
	desc = regula_orgy.2001.desc
	theme = regula_orgy_theme
	left_portrait = {
		character = root
		animation = happiness
	}
	center_portrait = {
		trigger = { exists = scope:honorary_guest_regula_wife }
		character = scope:honorary_guest_regula_wife
		animation = personality_honorable
	}

	trigger = {
		this = scope:activity.activity_host
	}

	immediate = {
		play_music_cue = regula_orgy_cue
		if = {
			limit = { exists = scope:activity.special_guest:honorary_guest_regula_wife }
			scope:activity.special_guest:honorary_guest_regula_wife = { save_scope_as = honorary_guest_regula_wife }
		}
	}

	option = {
		name = regula_orgy.2001.a
	}
}

# HOST: No guests showed up
# You're so alone.
###
regula_orgy.2003 = {
	type = character_event
	title = regula_orgy.2003.t
	desc = regula_orgy.2003.desc
	theme = regula_orgy_theme
	left_portrait = {
		character = root
		animation = sadness
	}

	option = {
		name = regula_orgy.2003.a
		stress_impact = {
			base = minor_stress_impact_gain
			gregarious = minor_stress_impact_gain
			lustful = minor_stress_impact_gain
		}
	}
}

####################################
# FEAST INTERRUPTION NOTIFICATIONS
# 5000-5999
####################################

#The host has died during the feast - event for guests
# by Linnéa Thimrén
regula_orgy.5003 = {
	type = character_event
	title = regula_orgy.5003.t
	desc = regula_orgy.5003.desc

	theme = regula_orgy_theme
	override_icon = {
		reference = "gfx/interface/icons/event_types/type_illness.dds"
	}

	left_portrait = {
		character = scope:host
	}

	option = {
		name = regula_orgy.5003.a
		custom_tooltip = regula_orgy.5003.a.tt
	}
}

#The host has been imprisoned - for host
# by Linnéa Thimrén
regula_orgy.5004 = {
	type = character_event
	title = regula_orgy.5004.t
	desc = regula_orgy.5004.desc

	theme = regula_orgy_theme
	override_icon = {
		reference = "gfx/interface/icons/event_types/type_prison.dds"
	}

	left_portrait = {
		character = scope:host
		animation = prison_dungeon
	}

	immediate = {
		hosted_successful_feast_interrupted_effect = yes
	}

	option = {
		name = regula_orgy.5004.a
	}
}

##################################################
# Enter passive state - you arrived to the Orgy
# Not sure if this is used, this is when you goto someone elses Orgy? Or something I'm not sure

regula_orgy.7002 = {
	type = activity_event
	title = regula_orgy.7002.t

	desc = {
		desc = regula_orgy.7002.desc
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:host.intent_target.location ?= root.location
				}
				desc = regula_orgy.7002.intent_arrived
			}
			triggered_desc = {
				trigger = { exists = scope:host.intent_target }
				desc = regula_orgy.7002.intent
			}
		}
	}

	theme = regula_orgy_theme
	# Left is Magister (root)
	# Center is Domina
	# Right is Intent target
	left_portrait = {
		character = root
		animation = happiness
	}
	center_portrait = {
		trigger = { exists = scope:devoted_wife }
		character = scope:devoted_wife
		animation = personality_zealous
	}
	right_portrait = {
		character = scope:host.intent_target
		animation = happiness
	}
	cooldown = { years = 1 }

	immediate = {
		play_music_cue = mx_cue_sacredrite
		if = {
			limit = {
				exists = involved_activity.special_guest:honorary_guest_regula_wife
				NOT = { this = involved_activity.special_guest:honorary_guest_regula_wife }
			}
			involved_activity.special_guest:honorary_guest = { save_scope_as = devoted_wife }
		}
	}

	option = {
		name = {
			text = regula_orgy.7002.a
		}
		add_piety = minor_piety_gain
	}
}

# Host ending event
regula_orgy.7101 = {
	type = activity_event
	title = regula_orgy.7101.t
	desc = {
		desc = regula_orgy.7101.desc
	}
	theme = regula_orgy_theme

	left_portrait = {
		character = root
		animation = happiness
	}
	center_portrait = {
		trigger = { exists = scope:activity.special_guest:honorary_guest_regula_wife }
		character = scope:honorary_guest
		animation = personality_honorable
	}

	# Nice
	option = {
		name = regula_orgy.7101.a
		show_as_tooltip = { #we give these out in the on_complete of the activity
			disburse_orgy_activity_rewards = yes #includes magnificence and stress loss rewards
		}
	}
}
