namespace = Plus

#reserved: Plus.1500 to Plus.1549

#######################################
# SPYING EVENTS
# Written by Rylock
#######################################

### PLOT ASSISTED

# Spying assists the plot
character_event = {
	id = Plus.1500
	
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue
	
	desc = {
		trigger = {
			has_plot = yes
			plot_target_char = { character = FROMFROMFROM }
		}
		text = EVTDESC_Plus_1500_A
	}
	desc = {
		trigger = {
			OR = {
				has_plot = no
				NOT = { plot_target_char = { character = FROMFROMFROM } }
			}
			any_backed_character = { plot_target_char = { character = FROMFROMFROM } }
		}
		text = EVTDESC_Plus_1500_B
	}
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		if = {
			limit = {
				has_plot = yes
				plot_target_char = { character = FROMFROMFROM }
				NOR = {
					has_character_modifier = plot_assisted_spying
					has_character_modifier = plot_assisted_spying2
					has_character_modifier = plot_assisted_spying3
					has_character_modifier = plot_assisted_spying4
					has_character_modifier = plot_assisted_spying5
				}
			}
			add_character_modifier = {
				name = plot_assisted_spying
				duration = 365
			}
		}
		if = {
			limit = {
				any_backed_character = {
					plot_target_char = { character = FROMFROMFROM }
					NOR = {
						has_character_modifier = plot_assisted_spying
						has_character_modifier = plot_assisted_spying2
						has_character_modifier = plot_assisted_spying3
						has_character_modifier = plot_assisted_spying4
						has_character_modifier = plot_assisted_spying5
					}
				}
			}
			random_backed_character = {
				limit = { plot_target_char = { character = FROMFROMFROM } }
				letter_event = { id = Plus.1501 tooltip = "EVTTOOLTIP_INFORM_PLOTTER" }
			}
		}
	}
}

# Letter sent to plotter to inform of assistance
letter_event = {
	id = Plus.1501
	desc = EVTDESC_Plus_1501
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		opinion = {
			who = FROM
			modifier = opinion_grateful
			months = 60
		}
		add_character_modifier = {
			name = plot_assisted_spying
			duration = 365
		}
	}
}

### DISCOVERS REAL FATHER

# Initial discovery of true father's identity
character_event = {
	id = Plus.1505
	desc = EVTDESC_Plus_1505
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	immediate = {
		event_target:target_spy_on = {
			reverse_opinion = {
				who = ROOT
				modifier = opinion_spy_discovered_father
				months = 600
			}
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1505 # Blackmail the father
		trigger = {
			event_target:target_spy_on = {
				real_father = {
					is_alive = yes
					is_ruler = yes
					NOT = { trait = incapable }
				}
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = greedy
					trait = deceitful
					trait = cruel
				}
			}
			modifier = {
				factor = 0
				event_target:target_spy_on = { real_father = { reverse_opinion = { who = ROOT value = 25 } } }
			}
			modifier = {
				factor = 0
				event_target:target_spy_on = { real_father = { is_liege_of = ROOT } }
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = { real_father = { is_married = no } }
			}
			modifier = {
				factor = 0
				event_target:target_spy_on = { NOT = { wealth = 100 } }
			}
		}
		if = {
			limit = {
				NOT = { trait = honest }
				NOT = { trait = deceitful }
			}
			random = {
				chance = 50
				add_trait = deceitful
				
			}
		}
		if = {
			limit = { trait = honest }
			remove_trait = honest
			
		}
		event_target:target_spy_on = {
			real_father = {
				letter_event = { id = Plus.1506 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_FATHER" }
			}
		}
	}
	option = {
		name = EVTOPTB_Plus_1505 # Reveal the truth
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				OR = {
					trait = zealous
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = greedy
					trait = deceitful
					trait = cruel
					trait = kind
					trait = arbitrary
				}
			}
			modifier = {
				factor = 0
				event_target:target_spy_on = { real_father = { reverse_opinion = { who = ROOT value = 50 } } }
			}
		}
		custom_tooltip = {
			text = "EVTTOOLTIP_BLACKMAIL_REVEAL"
			hidden_tooltip = {
				event_target:target_spy_on = {
					character_event = { id = Plus.1509 days = 1 }
					mother_even_if_dead = { save_event_target_as = target_adulterer }
					real_father = {
						save_event_target_as = target_true_father
						prestige = -100
						character_event = { id = 20 }
						character_event = { id = Plus.1510 }
						top_liege = {
							any_realm_character = {
								limit = {
									NOT = { character = event_target:target_spy_on }
									is_close_relative = event_target:target_spy_on
								}
								character_event = { id = Plus.1510 }
							}
						}
						any_vassal = {
							limit = {
								NOT = { character = event_target:target_spy_on }
								NOT = { is_close_relative = event_target:target_spy_on }
							}
							character_event = { id = Plus.1510 }
						}
					}
				}
			}
		}
	}
	option = {
		name = EVTOPTC_Plus_1505 # I don't care about this
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = kind
			}
			modifier = {
				factor = 5
				OR = {
					trait = bastard
					trait = legit_bastard
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = { NOT = { reverse_opinion = { who = ROOT value = -25 } } }
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = { NOT = { reverse_opinion = { who = ROOT value = -50 } } }
			}
			modifier = {
				factor = 2
				event_target:target_spy_on = { real_father = { reverse_opinion = { who = ROOT value = 0 } } }
			}
			modifier = {
				factor = 2
				event_target:target_spy_on = { real_father = { reverse_opinion = { who = ROOT value = 25 } } }
			}
		}
	}
}

# Real father receives blackmail demand
letter_event = {
	id = Plus.1506
	desc = EVTDESC_Plus_1506
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA7260 #Give in
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0.25
				is_married = no
			}
			modifier = {
				factor = 0.1
				NOT = { wealth = 100 }
			}
			modifier = {
				factor = 2
				wealth = 250
			}
			modifier = {
				factor = 0.5
				trait = greedy
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = deceitful
			}
		}
		wealth = -100
		FROM = {
			letter_event = { id = Plus.1507 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_AGREED" }
		}
	}
	option = {
		name = EVTOPTB7260 #I won't tolerate blackmail!
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				has_any_opinion_modifier = opinion_blackmailed
			}
			modifier = {
				factor = 0.1
				trait = craven
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 1.5
				trait = brave
			}
			modifier = {
				factor = 1.5
				trait = wroth
			}
		}
		FROM = {
			letter_event = { id = Plus.1508 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_REFUSED" }
		}
	}
}

# Real father agrees to the blackmail
letter_event = {
	id = Plus.1507
	desc = EVTDESC_Plus_1507
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes

	option = {
		name = EXCELLENT
		wealth = 100
		reverse_opinion = {
			who = FROM
			modifier = opinion_blackmailed
			years = 10
		}
	}
}

# Real father refuses the blackmail demand
letter_event = {
	id = Plus.1508
	desc = EVTDESC_Plus_1508
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA_Plus_1508 # Tell everyone
		reverse_opinion = {
			who = FROM
			modifier = opinion_failed_blackmail
			multiplier = 2
			years = 20
		}
		custom_tooltip = {
			text = "EVTTOOLTIP_BLACKMAIL_REVEAL"
			hidden_tooltip = {
				event_target:target_spy_on = {
					character_event = { id = Plus.1509 days = 1 }
					mother_even_if_dead = { save_event_target_as = target_adulterer }
					FROM = {
						prestige = -100
						character_event = { id = 20 }
						top_liege = {
							any_realm_character = {
								limit = {
									NOT = { character = event_target:target_spy_on }
									is_close_relative = event_target:target_spy_on
								}
								character_event = { id = Plus.1510 }
							}
						}
						any_vassal = {
							limit = {
								NOT = { character = event_target:target_spy_on }
								NOT = { is_close_relative = event_target:target_spy_on }
							}
							character_event = { id = Plus.1510 }
						}
					}
				}
			}
		}
		ai_chance = {
			factor = 1
		}
	}
	option = {
		name = EVTOPTB_Plus_1508 # Let the matter drop
		ai_chance = {
			factor = 0
		}
		reverse_opinion = {
			who = FROM
			modifier = opinion_failed_blackmail
			years = 10
		}
	}
}

# Target is informed he is a bastard
character_event = {
	id = Plus.1509
	desc = EVTDESC_Plus_1509
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTOPTA_Plus_1509
		prestige = -100
		add_trait = bastard
		hidden_tooltip = {
			set_real_father = 0
			set_father = event_target:target_true_father
		}
	}
}

# Others are informed about the bastard
character_event = {
	id = Plus.1510
	desc = EVTDESC_Plus_1510
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTOPTA_Plus_1510
		if = {
			limit = {
				NOT = { character = event_target:target_true_father }
			}
			event_target:target_spy_on = {
				reverse_opinion = {
					who = ROOT
					modifier = opinion_scandal
					months = 60
				}
			}
		}
	}
}

### DISCOVERS LOVER

# Initial discovery of lover
character_event = {
	id = Plus.1515
	desc = EVTDESC_Plus_1515
	picture = GFX_evt_shadowy_cabal
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes
	
	immediate = {
		event_target:target_spy_on = {
			random_lover = {
				limit = {
					NOR = {
						any_spouse = { character = event_target:target_spy_on }
						any_consort = { character = event_target:target_spy_on }
					}
				}
				save_event_target_as = target_revealed_lover
			}
			reverse_opinion = {
				who = ROOT
				modifier = opinion_spy_discovered_lover
				months = 120
			}
		}
		if = {
			limit = {
				OR = {
					any_spouse = { character = event_target:target_spy_on }
					any_consort = { character = event_target:target_spy_on }
				}
			}
			if = {
				limit = { is_female = no }
				opinion = {
					who = event_target:target_spy_on
					modifier = opinion_unfaithful_wife
				}
				if = {
					limit = { event_target:target_revealed_lover = { is_female = no } }
					opinion = {
						who = event_target:target_revealed_lover
						modifier = opinion_cuckolded
					}
				}
			}
			if = {
				limit = { is_female = yes }
				opinion = {
					who = event_target:target_spy_on
					modifier = opinion_unfaithful_husband
				}
				if = {
					limit = { event_target:target_revealed_lover = { is_female = yes } }
					add_rival = event_target:target_revealed_lover
					opinion = {
						who = event_target:target_revealed_lover
						modifier = slut_seductress
					}
				}
			}
		}
		if = {
			limit = {
				OR = {
					any_spouse = { character = event_target:target_revealed_lover }
					any_consort = { character = event_target:target_revealed_lover }
				}
			}
			if = {
				limit = { is_female = no }
				opinion = {
					who = event_target:target_revealed_lover
					modifier = opinion_unfaithful_wife
				}
				if = {
					limit = { event_target:target_spy_on = { is_female = no } }
					opinion = {
						who = event_target:target_spy_on
						modifier = opinion_cuckolded
					}
				}
			}
			if = {
				limit = { is_female = yes }
				opinion = {
					who = event_target:target_revealed_lover
					modifier = opinion_unfaithful_husband
				}
				if = {
					limit = { event_target:target_spy_on = { is_female = yes } }
					add_rival = event_target:target_spy_on
					opinion = {
						who = event_target:target_spy_on
						modifier = slut_seductress
					}
				}
			}
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1515 # Blackmail him
		trigger = {
			event_target:target_spy_on = { wealth = 50 }
			NOT = { is_father = event_target:target_spy_on }
			NOT = { is_mother = event_target:target_spy_on }
			NOT = { is_consort = event_target:target_spy_on }
			NOT = { is_consort = event_target:target_revealed_lover }
			NOT = {
				any_spouse = {
					OR = {
						character = event_target:target_spy_on
						character = event_target:target_revealed_lover
					}
				}
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = greedy
					trait = deceitful
					trait = cruel
				}
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { wealth = 50 }
				event_target:target_spy_on = { wealth = 50 }
				likes_better_than = {
					who = event_target:target_spy_on
					than = event_target:target_revealed_lover
				}
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { reverse_opinion = { who = ROOT value = 25 } }
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { is_liege_of = ROOT }
			}
			modifier = {
				factor = 0
				event_target:target_spy_on = { NOT = { wealth = 100 } }
			}
		}
		if = {
			limit = { is_lover = event_target:target_spy_on }
			remove_lover = event_target:target_spy_on
		}
		if = {
			limit = { is_lover = event_target:target_revealed_lover }
			remove_lover = event_target:target_revealed_lover
		}
		event_target:target_spy_on = {
			letter_event = { id = Plus.1516 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_LOVER" }
		}
	}
	option = {
		name = EVTOPTB_Plus_1515 # Blackmail the lover
		trigger = {
			event_target:target_revealed_lover = { wealth = 50 }
			NOT = { is_father = event_target:target_spy_on }
			NOT = { is_mother = event_target:target_spy_on }
			NOT = { is_consort = event_target:target_spy_on }
			NOT = { is_consort = event_target:target_revealed_lover }
			NOT = {
				any_spouse = {
					OR = {
						character = event_target:target_spy_on
						character = event_target:target_revealed_lover
					}
				}
			}
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = greedy
					trait = deceitful
					trait = cruel
				}
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { wealth = 50 }
				event_target:target_spy_on = { wealth = 50 }
				likes_better_than = {
					who = event_target:target_revealed_lover
					than = event_target:target_spy_on
				}
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { reverse_opinion = { who = ROOT value = 25 } }
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { is_liege_of = ROOT }
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { NOT = { wealth = 100 } }
			}
		}
		if = {
			limit = { is_lover = event_target:target_spy_on }
			remove_lover = event_target:target_spy_on
		}
		if = {
			limit = { is_lover = event_target:target_revealed_lover }
			remove_lover = event_target:target_revealed_lover
		}
		event_target:target_revealed_lover = {
			letter_event = { id = Plus.1516 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_LOVER" }
		}
	}
	option = {
		name = EVTOPTC_Plus_1515 # Reveal it
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				OR = {
					trait = zealous
					trait = honest
					trait = just
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					trait = greedy
					trait = deceitful
					trait = cruel
					trait = kind
					trait = arbitrary
				}
			}
			modifier = {
				factor = 0
				event_target:target_revealed_lover = { reverse_opinion = { who = ROOT value = 50 } }
			}
		}
		if = {
			limit = { is_lover = event_target:target_spy_on }
			remove_lover = event_target:target_spy_on
		}
		if = {
			limit = { is_lover = event_target:target_revealed_lover }
			remove_lover = event_target:target_revealed_lover
		}
		event_target:target_spy_on = { custom_tooltip = { text = EVTTOOLTIP_WoL_60 } }
		hidden_tooltip = {
			event_target:target_revealed_lover = {
				set_character_flag = second_ping_needed
				character_event = { id = Plus.1518 }
			}
		}
	}
	option = {
		name = EVTOPTD_Plus_1515 # I am not interested in this
		if = {
			limit = { is_lover = event_target:target_spy_on }
			remove_lover = event_target:target_spy_on
		}
		if = {
			limit = { is_lover = event_target:target_revealed_lover }
			remove_lover = event_target:target_revealed_lover
		}
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				trait = kind
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = { NOT = { reverse_opinion = { who = ROOT value = -25 } } }
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = { NOT = { reverse_opinion = { who = ROOT value = -50 } } }
			}
			modifier = {
				factor = 2
				event_target:target_revealed_lover = { reverse_opinion = { who = ROOT value = 0 } }
			}
			modifier = {
				factor = 2
				event_target:target_revealed_lover = { reverse_opinion = { who = ROOT value = 25 } }
			}
		}
	}
}

# Blackmailed character receives demand
letter_event = {
	id = Plus.1516
	border = GFX_event_letter_frame_intrigue

	desc = {
		trigger = { event_target:target_spy_on = { character = ROOT } }
		text = EVTDESC_Plus_1516
	}
	desc = {
		trigger = { event_target:target_revealed_lover = { character = ROOT } }
		text = EVTDESC_Plus_1516_B
	}
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTA_Plus_1516 # Give in
		ai_chance = {
			factor = 100
			modifier = {
				factor = 5
				religion_group = christian
				NOT = { has_character_modifier = adulterous_priest }
				OR = {
					trait = monk
					trait = nun
					AND = { is_ruler = yes is_theocracy = yes }
				}
			}
			modifier = {
				factor = 5
				event_target:target_revealed_lover = {
					same_sex = ROOT
					NOT = { character = ROOT }
				}
				NOR = {
					has_character_modifier = known_sodomite
					has_character_modifier = known_sodomite_pagan
				}
			}
			modifier = {
				factor = 5
				event_target:target_spy_on = {
					same_sex = ROOT
					NOT = { character = ROOT }
				}
				NOR = {
					has_character_modifier = known_sodomite
					has_character_modifier = known_sodomite_pagan
				}
			}
			modifier = {
				factor = 5
				event_target:target_revealed_lover = {
					is_close_relative = ROOT
					NOT = { is_married = ROOT }
					NOT = { character = ROOT }
				}
				NOR = {
					has_character_modifier = incestuous_adulteress
					has_character_modifier = incestuous_adulterer
				}
			}
			modifier = {
				factor = 5
				event_target:target_spy_on = {
					is_close_relative = ROOT
					NOT = { is_married = ROOT }
					NOT = { character = ROOT }
				}
				NOR = {
					has_character_modifier = incestuous_adulteress
					has_character_modifier = incestuous_adulterer
				}
			}
			modifier = {
				factor = 2
				is_married = yes
				NOR = {
					has_character_modifier = adulteress
					has_character_modifier = adulterer
				}
			}
			modifier = {
				factor = 0.1
				religion_group = christian
				has_character_modifier = adulterous_priest
				OR = {
					trait = monk
					trait = nun
					AND = { is_ruler = yes is_theocracy = yes }
				}
			}
			modifier = {
				factor = 0.1
				event_target:target_revealed_lover = {
					same_sex = ROOT
					NOT = { character = ROOT }
				}
				OR = {
					has_character_modifier = known_sodomite
					has_character_modifier = known_sodomite_pagan
				}
			}
			modifier = {
				factor = 0.1
				event_target:target_spy_on = {
					same_sex = ROOT
					NOT = { character = ROOT }
				}
				OR = {
					has_character_modifier = known_sodomite
					has_character_modifier = known_sodomite_pagan
				}
			}
			modifier = {
				factor = 0.1
				event_target:target_revealed_lover = {
					is_close_relative = ROOT
					NOT = { is_married = ROOT }
					NOT = { character = ROOT }
				}
				OR = {
					has_character_modifier = incestuous_adulteress
					has_character_modifier = incestuous_adulterer
				}
			}
			modifier = {
				factor = 0.1
				event_target:target_spy_on = {
					is_close_relative = ROOT
					NOT = { is_married = ROOT }
					NOT = { character = ROOT }
				}
				OR = {
					has_character_modifier = incestuous_adulteress
					has_character_modifier = incestuous_adulterer
				}
			}
			modifier = {
				factor = 0.1
				is_married = yes
				OR = {
					has_character_modifier = adulteress
					has_character_modifier = adulterer
				}
			}
			modifier = {
				factor = 0.25
				is_married = no
			}
			modifier = {
				factor = 0.1
				NOT = { wealth = 100 }
			}
			modifier = {
				factor = 2
				wealth = 250
			}
			modifier = {
				factor = 0.5
				trait = greedy
			}
			modifier = {
				factor = 1.5
				trait = proud
			}
			modifier = {
				factor = 1.5
				trait = deceitful
			}
		}
		wealth = -100
		if = {
			limit = {
				#one of these two _will_ be ROOT, so ANDing these checks has the same effect
				event_target:target_revealed_lover = { same_sex = ROOT }
				event_target:target_spy_on = { same_sex = ROOT }								
			}			
			event_target:target_revealed_lover = { set_character_flag = gay_blackmailed_by_@FROM }
			event_target:target_spy_on = { set_character_flag = gay_blackmailed_by_@FROM }							
		}
		FROM = {
			letter_event = { id = Plus.1517 days = 1 tooltip = "EVTTOOLTIP_BLACKMAIL_AGREED" }
		}
	}
	option = {
		name = EVTOPTB_Plus_1516 # Refuse
		ai_chance = {
			factor = 100
			modifier = {
				factor = 2
				has_any_opinion_modifier = opinion_blackmailed
			}
			modifier = {
				factor = 0.1
				trait = craven
			}
			modifier = {
				factor = 1.5
				trait = humble
			}
			modifier = {
				factor = 1.5
				trait = brave
			}
			modifier = {
				factor = 1.5
				trait = wroth
			}
		}
		FROM = {
			custom_tooltip = { text = "EVTTOOLTIP_BLACKMAIL_REFUSED" }
		}
		hidden_tooltip = {
			if = {
				limit = { event_target:target_spy_on = { character = ROOT } }
				event_target:target_revealed_lover = { character_event = { id = Plus.1518 } }
			}
			if = {
				limit = { event_target:target_revealed_lover = { character = ROOT } }
				event_target:target_spy_on = { character_event = { id = Plus.1518 } }
			}
		}
	}
}

# Blackmailed character agrees to the demand
letter_event = {
	id = Plus.1517
	desc = EVTDESC_Plus_1517
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes

	option = {
		name = EXCELLENT
		wealth = 100
		reverse_opinion = {
			who = FROM
			modifier = opinion_blackmailed
			years = 10
		}
	}
}

# Ping event for the lover
character_event = {
	id = Plus.1518
	
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = { NOT = { has_character_flag = second_ping_needed } }
			FROMFROM = { letter_event = { id = Plus.1519 days = 3 } }
		}
		if = {
			limit = { has_character_flag = second_ping_needed }
			clr_character_flag = second_ping_needed
			FROM = { character_event = { id = Plus.1520 } }
		}
	}
}

# Blackmailed character refuses the demand
letter_event = {
	id = Plus.1519
	desc = EVTDESC_Plus_1519
	border = GFX_event_letter_frame_intrigue
	
	is_triggered_only = yes

	option = {
		name = EVTOPTA_Plus_1519 # Reveal them
		ai_chance = { factor = 100 }
		reverse_opinion = {
			who = FROMFROM
			modifier = opinion_failed_blackmail
			multiplier = 2
			years = 20
		}
		FROMFROM = { character_event = { id = WoL.60 tooltip = EVTTOOLTIP_WoL_60 } }
	}
	option = {
		name = EVTOPTB_Plus_1519 # Then forget about it
		ai_chance = { factor = 0 }
		reverse_opinion = {
			who = FROMFROM
			modifier = opinion_failed_blackmail
			years = 10
		}
	}
}

# Second ping for immediate reveal
character_event = {
	id = Plus.1520
	
	hide_window = yes
	is_triggered_only = yes
	
	immediate = {
		event_target:target_spy_on = { character_event = { id = WoL.60 } }
	}
}

### ENFLAME RIVALRY

# Discovers chance to enflame rivalry between two rulers
character_event = {
	id = Plus.1525
	desc = EVTDESC_Plus_1525
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	immediate = {
		event_target:target_spy_on = {
			top_liege = {
				random_realm_character = {
					limit = {
						is_ruler = yes
						has_regent = no
						OR = {
							tier = PREVPREV
							vassal_of = PREVPREV
						}
						NOR = {
							character = ROOT
							character = PREVPREV
							is_rival = PREVPREV
							reverse_opinion = { who = PREVPREV value = 0 }
							opinion = { who = PREVPREV value = 0 }
						}
					}
					save_event_target_as = target_new_rival
				}
			}
			reverse_opinion = {
				who = ROOT
				modifier = opinion_spy_enflamed_rivalry
				months = 120
			}
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1525 # Make the attempt
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = honest
					trait = humble
				}
			}
			modifier = {
				factor = 0.5
				trait = craven
			}
			modifier = {
				factor = 0.5
				event_target:target_spy_on = {
					always = yes
				}
				NOT = {
					attribute_diff = {
						character = event_target:target_spy_on
						attribute = intrigue
						value = 1
					}
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_new_rival = {
					always = yes
				}
				NOT = {
					attribute_diff = {
						character = event_target:target_new_rival
						attribute = intrigue
						value = 1
					}
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = deceitful
					trait = cruel
					trait = envious
				}
			}
			modifier = {
				factor = 0.5
				event_target:target_new_rival = { reverse_opinion = { who = ROOT value = 25 } }
			}
			modifier = {
				factor = 0.5
				event_target:target_new_rival = { reverse_opinion = { who = ROOT value = 50 } }
			}
		}
		random_list = {
			40 = { # Attempt Succeeds
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival  = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival  = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival  = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 0.9
				}
				custom_tooltip = { text = "EVTTOOLTIP_ENFLAME_SUCCEED" }
				hidden_tooltip = {
					character_event = { id = Plus.1526 days = 7 }
				}
			}
			30 = { # Attempt Fails
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.1
				}
				custom_tooltip = { text = "EVTTOOLTIP_ENFLAME_FAIL" }
				hidden_tooltip = {
					character_event = { id = Plus.1529 days = 7 }
				}
			}
			30 = { # Attempt Fails & Is Revealed
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 0.8
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 0.8
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 0.8
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 0.8
				}
				modifier = {
					event_target:target_new_rival = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 1.2
				}
				modifier = {
					event_target:target_spy_on = { always = yes }
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 1.2
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_spy_on = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_new_rival = {
						always = yes
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.2
				}
				custom_tooltip = { text = "EVTTOOLTIP_ENFLAME_REVEAL" }
				hidden_tooltip = {
					character_event = { id = Plus.1532 days = 7 }
				}
			}
		}
	}
	option = {
		name = EVTOPTB_Plus_1525 # It's not worth the effort
		ai_chance = {
			factor = 100
		}
	}
}

# Attempt to enflame rivary succeeds
character_event = {
	id = Plus.1526
	desc = EVTDESC_Plus_1526
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		event_target:target_spy_on = { add_rival = event_target:target_new_rival }
		hidden_tooltip = {
			event_target:target_spy_on = { character_event = { id = Plus.1527 } }
			event_target:target_new_rival = { character_event = { id = Plus.1528 } }
		}
	}
}

# Inform the spy target
character_event = {
	id = Plus.1527
	desc = EVTDESC_Plus_1527
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTDESC_Plus_1527
		tooltip = { add_rival = event_target:target_new_rival }
	}
}

# Inform the new rival
character_event = {
	id = Plus.1528
	desc = EVTDESC_Plus_1528
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTDESC_Plus_1528
		tooltip = { add_rival = event_target:target_spy_on }
	}
}
	
# Attempt to enflame rivary fails
character_event = {
	id = Plus.1529
	desc = EVTDESC_Plus_1529
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = CURSES
		prestige = -25
		hidden_tooltip = {
			event_target:target_spy_on = { character_event = { id = Plus.1530 } }
			event_target:target_new_rival = { character_event = { id = Plus.1531 } }
		}
	}
}

# Inform the spy target
character_event = {
	id = Plus.1530
	desc = EVTDESC_Plus_1530
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTDESC_Plus_1530
		opinion = {
			who = event_target:target_new_rival
			modifier = opinion_irritated
			years = 5
		}
	}
}

# Inform the new rival
character_event = {
	id = Plus.1531
	desc = EVTDESC_Plus_1531
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	option = {
		name = EVTDESC_Plus_1530
		opinion = {
			who = event_target:target_spy_on
			modifier = opinion_irritated
			years = 5
		}
	}
}

# Attempt to enflame rivary fails & is perhaps revealed
character_event = {
	id = Plus.1532
	desc = EVTDESC_Plus_1532
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = CURSES
		prestige = -50
		random = {
			chance = 50
			modifier = {
				attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
				factor = 0.5
			}
			modifier = {
				event_target:target_spy_on = {
					attribute_diff = { character = ROOT attribute = intrigue value = 3 }
				}
				factor = 1.5
			}
			event_target:target_spy_on = { character_event = { id = Plus.1533 tooltip = EVTTOOLTIP_ENFLAME_DISCOVER } }
		}
		random = {
			chance = 50
			modifier = {
				attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
				factor = 0.5
			}
			modifier = {
				event_target:target_new_rival = {
					attribute_diff = { character = ROOT attribute = intrigue value = 3 }
				}
				factor = 1.5
			}
			event_target:target_new_rival = { character_event = { id = Plus.1534 tooltip = EVTTOOLTIP_ENFLAME_DISCOVER } }
		}
		custom_tooltip = { text = EVTTOOLTIP_STOP_SPYING }
		hidden_tooltip = {
			character_event = { id = WoL.2069 } # Clear out flags and end spying
		}
	}
}

# Inform the spy target
character_event = {
	id = Plus.1533
	desc = EVTDESC_Plus_1533
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = FROM value = -25 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTDESC_Plus_1533
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = FROM
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = FROM modifier = opinion_outraged years = 10 }
		}
	}
}

# Inform the new rival
character_event = {
	id = Plus.1534
	desc = EVTDESC_Plus_1534
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = FROM value = -25 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTDESC_Plus_1533
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = FROM
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = FROM modifier = opinion_outraged years = 10 }
		}
	}
}

### REDUCE RELATIONS WITH LIEGE

# Discovers chance to reduce relations with liege
character_event = {
	id = Plus.1540
	desc = EVTDESC_Plus_1540
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue

	is_triggered_only = yes

	immediate = {
		event_target:target_spy_on = {
			liege = { save_event_target_as = target_new_rival }
			reverse_opinion = {
				who = ROOT
				modifier = opinion_spy_enflamed_rivalry
				months = 120
			}
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1525 # Make the attempt
		ai_chance = {
			factor = 100
			modifier = {
				factor = 0
				OR = {
					trait = kind
					trait = honest
					trait = humble
				}
			}
			modifier = {
				factor = 0.5
				trait = craven
			}
			modifier = {
				factor = 0.5
				NOT = {
					attribute_diff = {
						character = event_target:target_spy_on
						attribute = intrigue
						value = 1
					}
				}
			}
			modifier = {
				factor = 0.5
				NOT = {
					attribute_diff = {
						character = event_target:target_new_rival
						attribute = intrigue
						value = 1
					}
				}
			}
			modifier = {
				factor = 2
				OR = {
					trait = deceitful
					trait = cruel
					trait = envious
				}
			}
			modifier = {
				factor = 0.5
				opinion = { who = event_target:target_new_rival value = 25 }
			}
			modifier = {
				factor = 0.5
				opinion = { who = event_target:target_new_rival value = 50 }
			}
		}
		random_list = {
			40 = { # Attempt Succeeds
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 1.1
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 1.1
				}
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 1.1
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 1.1
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 0.9
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 0.9
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 0.9
				}
				event_target:target_spy_on = { custom_tooltip = { text = "EVTTOOLTIP_REDUCE_SUCCEED" } }
				hidden_tooltip = {
					character_event = { id = Plus.1541 days = 7 }
				}
			}
			30 = { # Attempt Fails
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 0.9
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 0.9
				}
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 0.9
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 0.9
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 1.1
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.1
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.1
				}
				event_target:target_spy_on = { custom_tooltip = { text = "EVTTOOLTIP_REDUCE_FAIL" } }
				hidden_tooltip = {
					character_event = { id = Plus.1544 days = 7 }
				}
			}
			30 = { # Attempt Fails & Is Revealed
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
					factor = 0.8
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
					factor = 0.8
				}
				modifier = {
					attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 6 }
					factor = 0.8
				}
				modifier = {
					attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 6 }
					factor = 0.8
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 1 } }
					factor = 1.2
				}
				modifier = {
					NOT = { attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 1 } }
					factor = 1.2
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 3 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_spy_on = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.2
				}
				modifier = {
					event_target:target_new_rival = {
						attribute_diff = { character = ROOT attribute = intrigue value = 6 }
					}
					factor = 1.2
				}
				event_target:target_spy_on = { custom_tooltip = { text = "EVTTOOLTIP_REDUCE_REVEAL" } }
				hidden_tooltip = {
					character_event = { id = Plus.1545 days = 7 }
				}
			}
		}
	}
	option = {
		name = EVTOPTB_Plus_1525 # It's not worth the effort
		ai_chance = {
			factor = 100
		}
	}
}

# Attempt to reduce relations succeeds
character_event = {
	id = Plus.1541
	desc = EVTDESC_Plus_1541
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		prestige = 50
		hidden_tooltip = {
			event_target:target_spy_on = { character_event = { id = Plus.1542 } }
			event_target:target_new_rival = { character_event = { id = Plus.1543 } }
		}
	}
}

# Inform the spy target
character_event = {
	id = Plus.1542
	desc = EVTDESC_Plus_1542
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = event_target:target_new_rival value = -50 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1542
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = event_target:target_new_rival
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = event_target:target_new_rival modifier = opinion_outraged years = 10 }
		}
	}
}

# Inform the liege
character_event = {
	id = Plus.1543
	desc = EVTDESC_Plus_1543
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	hide_from = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = event_target:target_spy_on value = -50 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTOPTA_Plus_1542
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = event_target:target_spy_on
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = event_target:target_spy_on modifier = opinion_outraged years = 10 }
		}
	}
}

# Attempt to reduce relations fails
character_event = {
	id = Plus.1544
	desc = EVTDESC_Plus_1544
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = CURSES
		prestige = -25
	}
}

# Attempt to reduce relations fails & is perhaps revealed
character_event = {
	id = Plus.1545
	desc = EVTDESC_Plus_1545
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	option = {
		name = CURSES
		prestige = -50
		random = {
			chance = 50
			modifier = {
				attribute_diff = { character = event_target:target_spy_on attribute = intrigue value = 3 }
				factor = 0.5
			}
			modifier = {
				event_target:target_spy_on = {
					attribute_diff = { character = ROOT attribute = intrigue value = 3 }
				}
				factor = 1.5
			}
			event_target:target_spy_on = { character_event = { id = Plus.1546 tooltip = EVTTOOLTIP_ENFLAME_DISCOVER } }
		}
		random = {
			chance = 50
			modifier = {
				attribute_diff = { character = event_target:target_new_rival attribute = intrigue value = 3 }
				factor = 0.5
			}
			modifier = {
				event_target:target_new_rival = {
					attribute_diff = { character = ROOT attribute = intrigue value = 3 }
				}
				factor = 1.5
			}
			event_target:target_new_rival = { character_event = { id = Plus.1547 tooltip = EVTTOOLTIP_ENFLAME_DISCOVER } }
		}
		custom_tooltip = { text = EVTTOOLTIP_STOP_SPYING }
		hidden_tooltip = {
			character_event = { id = WoL.2069 } # Clear out flags and end spying
		}
	}
}

# Inform the spy target
character_event = {
	id = Plus.1546
	desc = EVTDESC_Plus_1546
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = FROM value = -25 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTDESC_Plus_1546
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = FROM
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = FROM modifier = opinion_outraged years = 10 }
		}
	}
}

# Inform the liege
character_event = {
	id = Plus.1547
	desc = EVTDESC_Plus_1547
	picture = GFX_evt_whispers
	border = GFX_event_normal_frame_intrigue
	
	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = {
				NOT = { opinion = { who = FROM value = -25 } }
			}
			set_character_flag = needs_rivalry
		}
	}
	
	option = {
		name = EVTDESC_Plus_1546
		if = {
			limit = { has_character_flag = needs_rivalry }
			clr_character_flag = needs_rivalry
			add_rival = FROM
		}
		if = {
			limit = { NOT = { has_character_flag = needs_rivalry } }
			opinion = { who = FROM modifier = opinion_outraged years = 10 }
		}
	}
}

