﻿# On actions for the Orgy activity

# Picks out the event for a participant in an Orgy
# Unlike vanilla, We always start the Orgy with a bang (heh) and have a "main" event
# We then have intent events
# Then we run default events
# This way if the player changes intents it will trigger the intent activity again
# TIL A tombola is a game in which people pick tickets out of a revolving drum
orgy_event_selection_tombola = {
	first_valid_on_action = {
		orgy_main_event_selection			# Special Main events
		orgy_intent_event_selection			# Intent Events
		orgy_default_event_selection		# Regular Events
	}
}

# Main Orgy event, a set of special event chains
# We only run one of these, per Orgy
orgy_main_event_selection = {
	trigger = {
		exists = scope:activity
		scope:activity = {
			NOT = {
				exists = var:had_special_chain
			}
		}
	}
	random_events = {
		10 = orgy_main_offering.0001
		10 = orgy_main_servants.0001
		10 = orgy_main_group.0001
		10 = orgy_main_slacking_servants.0001
		10 = orgy_main_mysterious_energy.0001
	}
	effect = {
		scope:activity = {
			set_variable = had_special_chain
		}
	}
}

# Intent Orgy Event, events based on your intent
# We can run this multiple times, assuming our triggers are valid
# Eg if the player charms one person, they may change intents and want to charm someone else
# However these events shouldnt just run multiple times without intent/target changes.
orgy_intent_event_selection = {
	trigger = {
		exists = scope:activity
		scope:activity = {
			scope:host = {
				OR = {
					AND = {
						has_activity_intent = regula_heal_intent 
						NOT = { has_completed_activity_intent = regula_heal_intent  }
					}
					AND = {
						has_activity_intent = regula_ritual_intent
						NOT = { has_completed_activity_intent = regula_ritual_intent }
					}
					AND = {
						has_activity_intent = regula_charm_attendee_intent
						NOT = { has_completed_activity_intent = regula_charm_attendee_intent }
					}
					AND = {
						has_activity_intent = regula_impregnate_attendee_intent
						NOT = { has_completed_activity_intent = regula_impregnate_attendee_intent }
					}
					AND = {
						has_activity_intent = regula_beguile_attendee_intent
						NOT = { has_completed_activity_intent = regula_beguile_attendee_intent }
					}
					AND = {
						has_activity_intent = regula_recruit_intent
						trigger_if = {
							limit = {
								exists = var:orgy_recruit_number
							}
							NOT = { var:orgy_recruit_number >= 3 }
						}
					}
				}
			}
		}
	}
	random_events = {
		# Intent Events
		10 = regula_orgy_intent_events.1000 # A Relaxing Soak		(Heal)
		10 = regula_orgy_intent_events.2000 # Ritual Preparation	(Ritual)
		10 = regula_orgy_intent_events.3000 # Charming Affair		(Charm)
		10 = regula_orgy_intent_events.4000 # Planting the Seed		(Impregnate)
		10 = regula_orgy_intent_events.4100 # During Dinner			(Impregnate)
		10 = regula_orgy_intent_events.5000 # A Beguiling Offer		(Beguile)
		10 = regula_orgy_intent_events.6000 # New Devoted			(Recruit)
	}
}

# Regular Orgy Events
orgy_default_event_selection = {
	random_events = {
		## Self-triggered Events
		# Carnal Activities
		# Lay with Devoted
		1 = regula_orgy_default.1010
		# Receive blowjob from Devoted
		1 = regula_orgy_default.1020
		# Lay with Guest
		1 = regula_orgy_default.1050
		# Lay with multiple guests
		1 = regula_orgy_default.1051
		# Receive blowjob from Guest
		1 = regula_orgy_default.1060

		# Misc Events
		# Two Devoted come to you, which is next on your "todo" list?
		# Servants arguing about your "Prowess"
		# A guest is impressed by your Regula Magic (Chance to Charm)
		# Everyone is scared of your dreadful reputation
		# You practice Regula magic on a devoted

		# Secrets & Hooks
		# Devoted reveals her secrets to you
		# Servant reveals secret about someone

		# Relation Events
		# Have a good time with friend in garden
		# Get with non-devoted lover, Domina shows up as well (Easy Charm)
	}
}

# Guest Orgy Events
# These are events designed solely for our female guests
orgy_guest_event_selection = {
	random_events = {
	## 1000 - 1999: Basic events
		# 1010: Relax, lose some stress
		50 = regula_orgy_guest.1010
		# 1020: Gain some prestige
		20 = regula_orgy_guest.1020
		# 1030: Gain some piety
		20 = regula_orgy_guest.1030
		# 1040: Improve self
		10 = regula_orgy_guest.1040
	## 2000 - 2999: With Other Guest Events
		# 2010: Enjoy time with another female guest
		50 = regula_orgy_guest.2010
		# 2020: Work on improving self with another guest
		10 = regula_orgy_guest.2020
		# 2030: Become friends with another guest
		15 = regula_orgy_guest.2030
		# 2040: Become lovers with another guest
		15 = regula_orgy_guest.2040
		# 2050: Have a fight with another guest
		10 = regula_orgy_guest.2050
	## 3000 - 3999: Magister events (Should trigger events for the Magister)
		# 3010: Become charmed by spiral art
	}
}

# Recruit Orgy Events
# Use this for Recruit intent events so that we can have cooldowns and triggers in the event itself
orgy_recruit_event_selection = {
	random_events = {
		1 = regula_orgy_intent_events.6001							## 6001 - Recruit a Beautiful Priestess
		1 = regula_orgy_intent_events.6002							## 6002 - Recruit an Intelligent Servant
		1 = regula_orgy_intent_events.6003							## 6003 - Recruit a Stoic/Virgo Guard
		1 = regula_orgy_intent_events.6004							## 6004 - Recruit a Gossiping Girl
		1 = regula_orgy_intent_events.6005							## 6005 - Recruit an Enchanting Singer
		1 = regula_orgy_intent_events.6006							## 6006 - Recruit A Shy Smithy
		# 1 = regula_orgy_intent_events.6007						## 6007 - Recruit Patient Baker
		# 1 = regula_orgy_intent_events.6008						## 6008 - Recruit Foreign Squire
		1 = regula_orgy_intent_events.6009							## 6009 - Recruit Child of the Book
		# 1 = regula_orgy_intent_events.6010						## 6010 - Recruit Servant Girls
	}
}