﻿# Success Events for the Fascinare (Charm) Scheme
# Currently has three categories
# - Generic: Generic and should always be applicable
# - Relationship: Based on the relationship between charmer and target
# - Traits: Based on either the charmer or target having specific traits
# - Location: Based on the location the target or charmer is at

# All events have a basic option which is the "Finish charm scheme" button
# But all should also have an extra option or two, to make these events a little more interesting

namespace = fascinare_success

#################################
# Fascinare Maint/Setup Events
# 0001 - 0999
#################################

# Charming Automatically
fascinare_success.0001 = {
	type = character_event
	hidden = yes

	trigger = {
		global_var:fascinare_events_enabled = no
	}

	immediate = {
		send_interface_message = {
			type = regula_fascinare_charm_success
			title = target_fascinare_success_effect.desc
			left_icon = scope:target
			scope:target = {
				fascinare_success_effect = { CHARACTER = root } #Adds trait, converts religion.
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
			add_piety_no_experience = regula_fascinare_rebate
			scope:scheme = {
				end_scheme = yes
			}
		}
	}
}


####################################
# Generic Fascinare Success Events
# 1000 - 1999
####################################
# Generic events
	# The Default/fallback event
	fascinare_success.1000 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1000.t
		desc = fascinare_success.1000.desc

		theme = regula_theme
		override_background = {
			reference = bedchamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { personality_rational schadenfreude page_flipping }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { throne_room_bow_1 throne_room_bow_2 }
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1000.charm
			flavor = fascinare_success.1000.charm.tt

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Standard Sex
		option = {
			name = fascinare_success.1000.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 100
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Beat in debate
	fascinare_success.1001 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1001.t
		desc = fascinare_success.1001.desc

		theme = regula_theme
		override_background = {
			reference = council_chamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { debating }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { shame }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = diplomacy_lifestyle
						has_trait = education_diplomacy
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1001.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.1001.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Legitimacy
		option = {
			name = fascinare_success.1001.legitimacy

			trigger = {
				is_valid_for_legitimacy_change = yes
			}

			add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain }

			ai_chance = {
				base = 0
			}
		}

		# Prestige
		option = {
			name = fascinare_success.1001.prestige

			add_prestige = minor_prestige_gain

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Conquer in Sparring session
	fascinare_success.1002 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1002.t
		desc = {
			desc = fascinare_success.1002.desc_intro
		
			first_valid = {
				triggered_desc = {
					trigger = { 
						scope:target.prowess > { value = prowess add = 5 }
					}
					desc = fascinare_success.1002.desc_strong
				}
				triggered_desc = {
					trigger = { 
						scope:target.prowess < { value = prowess subtract = 5 }
					}
					desc = fascinare_success.1002.desc_weak
				}
				desc = fascinare_success.1002.desc_similar
			}
		
			desc = fascinare_success.1002.desc_outro
		}

		theme = regula_theme
		override_background = {
			reference = courtyard
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { wooden_sword_coup_degrace celebrate_wooden_sword aggressive_wooden_sword }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { wooden_sword_yield_start wrestling_yield_start }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = martial_lifestyle
						has_trait = education_martial
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1002.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.1002.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Teach your Famuli a lesson on livestock
	fascinare_success.1003 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1003.t
		desc = fascinare_success.1003.desc

		theme = regula_theme
		override_background = {
			reference = sitting_room
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { flirtation }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { love }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = stewardship_lifestyle
						has_trait = education_stewardship
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1003.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.1003.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Provisions
		option = {
			name = fascinare_success.1003.provisions

			trigger = {
				# Adventurer check
				has_ep3_dlc_trigger = yes
				is_landless_adventurer = yes

				# Target can give provisions
				scope:target = {
					is_landed = yes
				}
			}

			domicile ?= {
				change_provisions = {
					value = 200
					multiply = scope:target.highest_held_title_tier
				}
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Discuss secrets and interrogation
	fascinare_success.1004 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1004.t
		desc = fascinare_success.1004.desc

		theme = regula_theme
		override_background = {
			reference = dungeon
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { scheme }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { worry stunned fear }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = intrigue_lifestyle
						has_trait = education_intrigue
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = diplomacy_lifestyle
						has_trait = education_diplomacy
					}
				}
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1004.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.1004.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Secrets
		option = {
			name = fascinare_success.1004.secrets

			scope:target = {
				every_known_secret = {
					limit = {
						NOT = { is_known_by = scope:owner }
						NOT = { secret_owner = scope:owner }
					}
					reveal_to = scope:owner
				}
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Show her the book during reading
	fascinare_success.1005 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.1005.t
		desc = fascinare_success.1005.desc

		theme = regula_theme
		override_background = {
			reference = study
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { scheme }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { reading }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = learning_lifestyle
						has_trait = education_learning
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 2
				scope:target = {
					OR = {
						has_lifestyle = diplomacy_lifestyle
						has_trait = education_diplomacy
					}
				}
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.1005.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.1005.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Knowledge
		option = {
			name = fascinare_success.1005.knowledge

			if = {
				limit = { has_lifestyle = diplomacy_lifestyle }
				add_diplomacy_skill = 1
				add_diplomacy_lifestyle_xp = 300
			}
			else_if = {
				limit = { has_lifestyle = martial_lifestyle }
				add_martial_skill = 1
				add_martial_lifestyle_xp = 300
			}
			else_if = {
				limit = { has_lifestyle = stewardship_lifestyle }
				add_stewardship_skill = 1
				add_stewardship_lifestyle_xp = 300
			}
			else_if = {
				limit = { has_lifestyle = intrigue_lifestyle }
				add_intrigue_skill = 1
				add_intrigue_lifestyle_xp = 300
			}
			else_if = {
				limit = { has_lifestyle = learning_lifestyle }
				add_learning_skill = 1
				add_learning_lifestyle_xp = 300
			}
			else_if = {
				limit = { has_lifestyle = wanderer_lifestyle }
				random_list = {
					20 = {
						add_diplomacy_skill = 1
					}
					20 = {
						add_martial_skill = 1
					}
					20 = {
						add_stewardship_skill = 1
					}
					40 = {
						add_prowess_skill = 1
					}
				}
				add_wanderer_lifestyle_xp = 300
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

########################################
# Relationship Fascinare Success Events
# 2000 - 2999
	# Consort/Lover/Friend relations	- 2000 - 2099
	# Family relations					- 2100 - 2199
	# Standard relations				- 2200 - 2299
	# Hostile relations					- 2300 - 2399
########################################
## Consort/Lover/Friend relations
	# Charm a non-lover/soulmate/friend wife, who isn't already Regula
	fascinare_success.2000 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.2000.t
		desc = fascinare_success.2000.desc

		theme = regula_theme
		override_background = {
			reference = regula_bedchamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { flirtation love }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { love flirtation }
			}
		}

		trigger = {
			scope:target = {
				NOT = { faith = scope:owner.faith }
				is_spouse_of = scope:owner
				NAND = {
					has_relation_soulmate = scope:owner
					has_relation_lover = scope:owner
					has_relation_best_friend = scope:owner
					has_relation_friend = scope:owner
				}
			}
		}

		weight_multiplier = {
			base = 5
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.2000.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.2000.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

	# Charm a consort, with a Paelex helping
	fascinare_success.2001 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.2001.t
		desc = fascinare_success.2001.desc

		theme = regula_theme
		override_background = {
			reference = regula_bedchamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { flirtation love }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { love flirtation }
			}
		}

		trigger = {
			any_consort = {
				is_regula_leader_devoted_trigger = yes
			}
			scope:target = {
				is_consort_of = root
			}
			NOT = {	root.primary_spouse = scope:target }
		}

		weight_multiplier = {
			base = 1
			modifier = {
				add = 4
				scope:target = {
					has_trait = shy
				}
			}
		}

		immediate = {
			random_spouse = {
				limit = {
					is_regula_leader_devoted_trigger = yes
				}
				save_scope_as = paelex
			}

			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.2001.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.2001.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Remove Shy
		option = {
			name = fascinare_success.2001.shy

			trigger = {
				scope:target = {
					has_trait = shy
				}
			}

			scope:target = {
				remove_trait = shy
				add_trait_force_tooltip = brave
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

## Family relations
	# Charm close family member
	fascinare_success.2100 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.2100.t
		desc = fascinare_success.2100.desc

		theme = regula_theme
		override_background = {
			reference = council_chamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { love flirtation }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { love throne_room_bow_1 throne_room_bow_2 }
			}
		}

		weight_multiplier = {
			base = 5
		}

		trigger = {
			is_close_family_of = scope:target
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.2100.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Standard Sex
		option = {
			name = fascinare_success.2100.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
				NOT = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:target } }
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Standard Sex, but its considered incest!
		option = {
			name = fascinare_success.2100.sex_incest

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
				relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:target }
			}

			add_internal_flag = dangerous

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			scope:target = {
				add_secret = {
					type = secret_incest
				}
			}
			add_secret = {
				type = secret_incest
				target = scope:target
			}

			ai_chance = {
				base = 0
			}
		}

		# Renown for having a Landed daughter
		# This option might be kinda OP, but whatever
		# Get 25% of primary title tier renown value, or 50% if you have magister Bloodline
		# Must be same Dynasty and landed
		option = {
			name = fascinare_success.2100.renown

			trigger = {
				scope:target = {
					is_landed = yes
					highest_held_title_tier >= tier_county
					has_dynasty = yes
					dynasty ?= {
						this = root.dynasty
					}
				}
			}

			show_as_unavailable = {
				always = yes
			}

			dynasty = {
				add_dynasty_prestige = {
					value = scope:target.regula_ward_highest_title_to_dynasty_prestige
					multiply = 0.25

					if = {
						limit = {
							scope:owner.culture = {
								has_cultural_tradition = tradition_magister_bloodline
							}
						}
						multiply = {
							value = 2
						}
					}
				}
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

## Standard relations
	# Charm a courtier with help of Paelex
	fascinare_success.2200 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.2200.t
		desc = fascinare_success.2200.desc

		theme = regula_theme
		override_background = {
			reference = regula_bedchamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:event_paelex
			triggered_animation = {
				trigger = { always = yes }
				animation = { flirtation }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { worry scheme paranoia }
			}
		}

		trigger = {
			any_consort = {
				is_regula_leader_devoted_trigger = yes
			}
			NOT = {	root.primary_spouse = scope:target }
			scope:target = {
				is_courtier_of = root
			}
		}

		immediate = {
			# Grab Paelex for event
			random_consort = {
				limit = {
					is_regula_leader_devoted_trigger = yes
				}
				add_character_flag = { flag = is_naked }
				save_scope_as = event_paelex
			}

			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.2200.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.2200.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Court Grandeur
		option = {
			name = fascinare_success.2200.court

			trigger = {
				has_royal_court = yes
				has_dlc_feature = royal_court
			}

			change_current_court_grandeur = minor_court_grandeur_gain

			ai_chance = {
				base = 0
			}
		}

		after = {
			scope:event_paelex = {
				remove_character_flag = is_naked
			}
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

## Hostile relations
	# Charm a rival/someone who hates you
	fascinare_success.2300 = {
		type = character_event
		window = scheme_successful_event
		title = fascinare_success.2300.t
		desc = fascinare_success.2300.desc

		theme = regula_theme
		override_background = {
			reference = regula_bedchamber
		}

		widget = {
			gui = "event_window_widget_scheme"
			container = "custom_widgets_container"
		}

		left_portrait = {
			character = scope:owner
			triggered_animation = {
				trigger = { always = yes }
				animation = { schadenfreude wrestling_victory }
			}
		}

		right_portrait = {
			character = scope:target
			triggered_animation = {
				trigger = { always = yes }
				animation = { pain wrestling_yield_start }
			}
		}

		trigger = {
			OR = {
				has_relation_rival = scope:target
				opinion = {
					target = scope:target
					value < high_negative_opinion
				}
				reverse_opinion = {
					target = scope:target
					value < high_negative_opinion
				}
			}
		}

		weight_multiplier = {
			base = 2
			modifier = {
				add = 4
				scope:target = {
					OR = {
						has_trait = callous
						has_trait = arrogant
						has_trait = sadistic
						has_trait = vengeful
						has_trait = wrathful
					}
				}
			}
		}

		immediate = {
			play_music_cue = "mx_cue_seduction"

			scope:target = { #Adds trait, converts religion.
				fascinare_success_effect = { CHARACTER = root }
				create_memory_fascinare_scheme = { CHARACTER = root }
			}
		}

		# Standard Charm
		option = {
			name = fascinare_success.2300.charm

			add_piety_no_experience = regula_fascinare_rebate

			ai_chance = {
				base = 100
			}
		}

		# Sex
		option = {
			name = fascinare_success.2300.sex

			trigger = {
				scope:target = {
					is_visibly_fertile = yes
				}
			}

			scope:owner = {
				regula_sex_with_target_normal = { TARGET = scope:target }
			}

			ai_chance = {
				base = 0
			}
		}

		# Break mind to be subservient
		option = {
			name = fascinare_success.2300.break

			trigger = {
				scope:owner.dynasty = {
					NOT = { has_dynasty_perk = regula_legacy_2 }
				}
				piety >= 250
			}

			add_piety = -250
			scope:target = {
				regula_remove_sinful_personality_traits_all_effect = yes
			}

			ai_chance = {
				base = 0
			}
		}

		after = {
			show_as_tooltip = {
				scope:scheme = {
					end_scheme = yes
				}
			}
		}
	}

##################################
# Trait Fascinare Success Events
# 3000 - 3999
	# Magister traits
		# Kind Magister personality 	- 3000 - 3099
		# Mean Magister personality 	- 3100 - 3199
		# Exarch (high level Magister) 	- 3200 - 3299
		# Other traits 					- 3300 - 3399
	# Target traits
		# Submissive traits				- 3400 - 3499
		# Rebellious/Dominant traits	- 3500 - 3599
		# Other traits					- 3600 - 3699
##################################
## Magister traits
	## Kind Magister personality
	## Mean Magister personality
	## Exarch (high level Magister)
	## Other traits
## Target traits
	## Submissive traits
		# Target is Regula faithful (either secret or open)
		fascinare_success.3400 = {
			type = character_event
			window = scheme_successful_event
			title = fascinare_success.3400.t
			desc = fascinare_success.3400.desc

			theme = regula_theme
			override_background = {
				reference = godless_shrine
			}

			widget = {
				gui = "event_window_widget_scheme"
				container = "custom_widgets_container"
			}

			left_portrait = {
				character = scope:owner
				triggered_animation = {
					trigger = { always = yes }
					animation = { love }
				}
			}

			right_portrait = {
				character = scope:target
				triggered_animation = {
					trigger = { always = yes }
					animation = { personality_zealous }
				}
			}

			trigger = { # Must be a compedita (secretly or openly).
				scope:target = {
					OR = {
						is_regula_trigger = yes
						is_crypto_regula_trigger = yes
					}
				}
			}
		
			weight_multiplier = {
				base = 0.5
				modifier = { #Much more likely if target is zealous
					add = 2
					scope:target = { has_trait = zealous }
				}
				modifier = {
					add = -0.5
					scope:target = { has_trait = cynical }
				}
			}

			immediate = {
				# Find a county of the same culture as target to convert if we can
				random_realm_county = {
					limit = {
						culture = scope:target.culture
						NOT = { faith = scope:owner.faith }
					}
					save_scope_as = county
				}


				play_music_cue = "mx_cue_seduction"

				scope:target = { #Adds trait, converts religion.
					fascinare_success_effect = { CHARACTER = root }
					create_memory_fascinare_scheme = { CHARACTER = root }
				}
			}

			# Standard Charm
			option = {
				name = fascinare_success.3400.charm

				add_piety_no_experience = regula_fascinare_rebate

				ai_chance = {
					base = 100
				}
			}

			# Standard Sex
			option = {
				name = fascinare_success.3400.sex

				trigger = {
					scope:target = {
						is_visibly_fertile = yes
					}
				}

				scope:owner = {
					regula_sex_with_target_normal = { TARGET = scope:target }
				}

				ai_chance = {
					base = 100
				}
			}

			# Have her convert a province of the same culture as her
			option = {
				name = fascinare_success.3400.convert
				flavor = fascinare_success.3400.convert_tt

				trigger = {
					exists = scope:county
				}

				scope:county = {
					set_county_faith = scope:owner.faith
				}

				ai_chance = {
					base = 100
				}
			}

			after = {
				show_as_tooltip = {
					scope:scheme = {
						end_scheme = yes
					}
				}
			}
		}
	## Rebellious/Dominant traits
	## Other traits
		# Target is insane
		fascinare_success.3600 = {
			type = character_event
			window = scheme_successful_event
			title = fascinare_success.3600.t
			desc = fascinare_success.3600.desc

			theme = regula_theme
			override_background = {
				reference = garden
			}

			widget = {
				gui = "event_window_widget_scheme"
				container = "custom_widgets_container"
			}

			left_portrait = {
				character = scope:owner
				triggered_animation = {
					trigger = { always = yes }
					animation = { worry stress }
				}
			}

			right_portrait = {
				character = scope:target
				triggered_animation = {
					trigger = { always = yes }
					animation = { dancing }
				}
			}

			trigger = {
				scope:target = {
					OR = {
						has_trait = lunatic_1
						has_trait = lunatic_genetic
						has_trait = possessed_1
						has_trait = possessed_genetic
					}
				}
			}

			# Should be very highly weighted
			weight_multiplier = {
				base = 5
			}

			immediate = {
				play_music_cue = "mx_cue_seduction"

				scope:target = { #Adds trait, converts religion.
					fascinare_success_effect = { CHARACTER = root }
					create_memory_fascinare_scheme = { CHARACTER = root }
				}
			}

			# Standard Charm
			option = {
				name = fascinare_success.3600.charm

				add_piety_no_experience = regula_fascinare_rebate

				ai_chance = {
					base = 100
				}
			}

			# Sex
			option = {
				name = fascinare_success.3600.sex

				trigger = {
					scope:target = {
						is_visibly_fertile = yes
					}
				}

				scope:owner = {
					regula_sex_with_target_normal = { TARGET = scope:target }
				}

				ai_chance = {
					base = 0
				}
			}

			# Fix mind
			option = {
				name = fascinare_success.3600.mind

				trait = magister_4
				trait = magister_5
				trait = magister_6

				# Sanity check
				trigger = {
					scope:owner = {
						custom_description = {
							text = magister_trait_4_required_trigger
							has_trait_rank = {
								trait = magister_trait_group
								rank >= 4
							}
						}
					}
					scope:target = {
						OR = {
							has_trait = lunatic_1
							has_trait = lunatic_genetic
							has_trait = possessed_1
							has_trait = possessed_genetic
						}
					}
					piety >= 250
				}

				show_as_unavailable = {
					always = yes
				}

				add_piety = -250

				scope:target = {
					if = { limit = { has_trait = lunatic_1 } remove_trait = lunatic_1 }
					if = { limit = { has_trait = lunatic_genetic } remove_trait = lunatic_genetic }
					if = { limit = { has_trait = possessed_1 } remove_trait = possessed_1 }
					if = { limit = { has_trait = possessed_genetic } remove_trait = possessed_genetic }
				}

				ai_chance = {
					base = 0
				}
			}

			after = {
				show_as_tooltip = {
					scope:scheme = {
						end_scheme = yes
					}
				}
			}
		}

####################################
# Location Fascinare Success Events
# 4000 - 4999
####################################