﻿namespace = orgy_main_offering

############################
# The Offering
# by Ban10
############################

# Your Domina/Paelex offers a young girl to you from her holdings
# If you accept you may lay with her, turning her into a mulsa and adding her to your court + the orgy activity.

####
# Weight and Setup Event
####
orgy_main_offering.0001 = {
	type = activity_event
	hidden = yes

	trigger = {
		# Make sure this wasn't triggered last time
		trigger_if = {
			limit = { scope:activity.activity_host = { has_variable = last_orgy_was } }
			NOT = { scope:activity.activity_host.var:last_orgy_was = flag:offering }
		}

		# Make sure we have at least one potential inviter
		scope:activity = {
			any_attending_character = {
				is_regula_leader_devoted_trigger = yes
			}
		}
	}

	immediate = {
		scope:activity = {
			# Make sure there is a Paelex or Domina in attendence
			random_attending_character = {
				limit = {
					is_regula_leader_devoted_trigger = yes
				}
				save_scope_as = inviter
			}
			activity_host = {
				# Set this as last main orgy activity
				set_variable = {
					name = last_orgy_was
					value = flag:offering
				}
				trigger_event = orgy_main_offering.0002
			}
		}
	}
}

###
# Event for Host (Magister)
###
orgy_main_offering.0002 = {
	type = activity_event
	title = orgy_main_offering.0002.t
	desc = orgy_main_offering.0002.desc
	theme = regula_orgy_theme
	override_background = {
		reference = corridor_night
	}

	left_portrait = {
		character = scope:inviter
		animation = flirtation
	}

	right_portrait = {
		character = scope:offering
		animation = admiration
	}

	immediate = {
		hidden_effect = {
			# We should already have our inviter from the starting event
			regula_create_orgy_guest_effect = { WHO = scope:inviter }
			scope:created_orgy_guest = { save_scope_as = offering }
		}
	}

	#You are very welcome!
	option = {
		name = orgy_main_offering.0002.a
		# Entrance the guest
		scope:offering = {
			fascinare_success_effect = { CHARACTER = root }
			create_memory_fascinare_scheme = { CHARACTER = root }
		}
		reverse_add_opinion = {
			target = scope:offering
			modifier = grateful_opinion
			opinion = 30
		}
		reverse_add_opinion = {
			target = scope:inviter
			modifier = grateful_opinion
			opinion = 20
		}

		# Move on to sexy times
		scope:activity = {
			activity_host = {
				trigger_event = orgy_main_offering.0003
			}
		}
	}

	#Invite only, sorry
	option = {
		name = orgy_main_offering.0002.b

		reverse_add_opinion = {
			target = scope:offering
			modifier = disappointed_opinion
			opinion = -15
		}
	}
}

orgy_main_offering.0003 = {
	type = activity_event
	title = orgy_main_offering.0003.t
	desc = orgy_main_offering.0003.desc
	theme = regula_orgy_theme
	override_background = {
		reference = regula_bedchamber
	}

	left_portrait = {
		character = scope:offering
		outfit_tags = { no_cloak no_hat no_pants no_clothes }
		animation = personality_content
	}

	after = {
		hidden_effect = {
 			scope:activity = {
				add_activity_log_entry = {
					key = regula_orgy_offering_log
					tags = { good }
					score = 25
					character = root
					target = scope:offering
				}
			}
		}
	}

	option = {
		name = orgy_main_offering.0003.a
		regula_sex_with_target_normal = { TARGET = scope:offering }
		scope:offering = {
			add_to_activity = scope:activity
		}
		# Take as concubine
		make_concubine = scope:offering
	}
}
