###########################################
#                                         #
# CK Chronicles	events			          #
# ID GBC.1-GBC.199						  #
#                                         #
###########################################

# Written by Milla Isaksson & Mathilda Bjarnehed

namespace = GBC

###GRIEF BRINGS FAMILY TOGETHER###

#selecting target relative
letter_event = {
	id = GBC.1
	
	min_age = 16
	has_global_flag = black_death_happened

	trigger = {
		has_dlc = "Game Book"
		NOT = { has_character_flag = gbc_mourning }
		OR = {
			any_friend = {
				is_adult = yes
				ai = yes
				trait = has_bubonic_plague
			}			
	    	any_dynasty_member = {
	    		is_offmap_ruler = no
				is_adult = yes
				ai = yes
				trait = has_bubonic_plague
			}
		}
   }

	hide_window = yes
	is_triggered_only = yes

	immediate = {
		if = {
			limit = {
				any_friend = {
					is_adult = yes
					ai = yes
					trait = has_bubonic_plague
				}
			}
			random_friend = {
				limit = {
					is_adult = yes
					ai = yes
					trait = has_bubonic_plague        
				}
				save_event_target_as = GBC_dead_one               
			}
		}
		if = {
			limit = {
				NOT = {
					any_friend = {
						is_adult = yes
						ai = yes
						trait = has_bubonic_plague
					}
				}
			}
			random_dynasty_member = {
				limit = {
					is_offmap_ruler = no
					is_adult = yes
					ai = yes
					trait = has_bubonic_plague        
				}
				save_event_target_as = GBC_dead_one               
			}
		}
		event_target:GBC_dead_one = {
			add_trait = falconer
			death = { death_reason = death_trait }
		}
		set_character_flag = gbc_mourning
		narrative_event = { id = GBC.2 days = 10 }
	}
}

#Gazing at the stars
narrative_event = {
	title = EVTNAME_GBC_2
	id = GBC.2
	picture = GFX_evt_comet
	desc = EVTDESC_GBC_2
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	#I can't believe they're not with us
	option = {
		name = EVTOPTA_GBC_2
		hidden_tooltip = { character_event = { id = GBC.3 days = 10 } }
	}
}

#Contemplating 
character_event = {
	id = GBC.3
	picture = GFX_evt_pale_rider
	border = GFX_event_normal_frame_religion

	hide_from = yes
	is_triggered_only = yes

	desc = {
		text = EVTDESC_GBC_3_A
		trigger = { job_spiritual = { always = yes } }
	}
	desc = {
		text = EVTDESC_GBC_3_B
		trigger = { NOT = { job_spiritual = { always = yes } } }
	}

	#I should talk to someone about my grief
	option = {
		name = EVTOPTA_GBC_3

		if = {
			limit = { NOT = { trait = stressed } }
			random = {
				chance = 50
				add_trait = stressed
				hidden_tooltip = {
					character_event = {
						id = 38282 #Notify Stressed
					}
				}
			}
		}

		hidden_tooltip = {
			character_event = { id = GBC.4 days = 5 }
		}
	}

	#I wish my friend was here
	option = {
		name = EVTOPTB_GBC_3

		if = {
			limit = { NOT = { trait = depressed } }
			random = {
				chance = 10
				add_trait = depressed
				hidden_tooltip = {
					character_event = {
						id = 38288 #Notify Depressed
					}
				}
			}
		}

		hidden_tooltip = {
			character_event = { id = GBC.4 days = 8 }
		}
	}
}

#Selecting new friend - hidden event
character_event = {
	id = GBC.4

	is_triggered_only = yes
	hide_window = yes
	hide_from = yes

	trigger = {
		any_dynasty_member = {
			is_offmap_ruler = no
			is_adult = yes
			ai = yes
			NOT = { trait = incapable }
		}
	}

	immediate = {
		random_dynasty_member = {
			limit = {
				is_offmap_ruler = no
				is_adult = yes
				ai = yes
				NOT = { trait = incapable }
			}
			save_event_target_as = GBC_new_friend
			set_character_flag = GBC_new_friend
			
			add_character_modifier = {
				name = pet_owl
				duration = -1
			}
		} 
	}
	option = {
		event_target:GBC_new_friend = {
			character_event = { id = GBC.41 }					
		}
	}
}

#New friend - ping event
character_event = {
	id = GBC.41

	is_triggered_only = yes
	hide_window = yes
	hide_from = yes

	option = {
		hidden_tooltip = {
			FROM = {
				character_event = { id = GBC.5 }
			}
		}
	}
}

#Relative approaches you - they've seen you in mourning, but has been reluctant to talk to you
character_event = {
	id = GBC.5
	picture = GFX_evt_courtiers_talking
	desc = EVTDESC_GBC_5
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	#I'm more human than they know
	option = {
		name = EVTOPTA_GBC_5
		if = {
			limit = { NOT = { trait = honest } }
			add_trait = honest
			
		}

		if = {
			limit = { trait = shy }
			remove_trait = shy
		}

		hidden_tooltip = {
			character_event = { id = GBC.6 days = 10 }
		}
	}

	#I'm FINE, I SAID: I AM FINE!
	option = {
		name = EVTOPTB_GBC_5

		if = {
			limit = { trait = honest }
			remove_trait = honest
			
		}
		if = {
			limit = { NOT = { trait = stubborn } }
			add_trait = stubborn
		}

		hidden_tooltip = {
			character_event = { id = GBC.6 days = 10 }
		}
	}
}

#Relative hands you an owl - it used to belong to the dead character
character_event = {
	id = GBC.6
	picture = GFX_evt_falconing
	desc = EVTDESC_GBC_6
	border = GFX_event_normal_frame_religion

	trigger = {
		event_target:GBC_new_friend = { is_alive = yes }
	}

	is_triggered_only = yes

	#The owl is adorable!
	option = {
		name = EVTOPTA_GBC_6

		event_target:GBC_new_friend = {
			opinion = {
				who = ROOT
				modifier = opinion_budding_friendship
			}
		}
		add_character_modifier = {
			name = pet_owl
			duration = -1
		}
		hidden_tooltip = { character_event = { id = 77800 days = 3500 random = 2000 } } # Owl dies
		
		if = {
			limit = { trait = depressed }
			remove_trait = depressed
		}
		if = {
			limit = { trait = stressed }
			remove_trait = stressed
		}

		hidden_tooltip = {
			event_target:GBC_new_friend = {
				remove_character_modifier = pet_owl
			}
			character_event = { id = GBC.7 days = 25 }
		}
	}

	#I can barely take care of myself
	option = {
		name = EVTOPTB_GBC_6

		hidden_tooltip = {
			character_event = { id = GBC.7 days = 25 }
		}
	}
}

#Selecting advisor
character_event = {
	id = GBC.7

	is_triggered_only = yes
	hide_window = yes

	immediate = {
		hidden_tooltip = { 
			if = {
				limit = {
					any_courtier = {
						AND = {
							OR = {
								has_job_title = job_chancellor
								has_job_title = job_marshal
								has_job_title = job_treasurer
								has_job_title = job_spymaster
								has_job_title = job_spiritual
							}
							opinion = {
								who = ROOT
								value = 25
							}						
						}
					}
				}
				random_courtier = {
					limit = {
						AND = {
							OR = {
								has_job_title = job_chancellor
								has_job_title = job_marshal
								has_job_title = job_treasurer
								has_job_title = job_spymaster
								has_job_title = job_spiritual
							}
							opinion = {
								who = ROOT
								value = 25
							}
						}						
					}
					save_event_target_as = GBC_nice_councillor
				}
			}
			if = {
				limit = {
					NOT = {
						any_courtier = {
							AND = {
								OR = {
									has_job_title = job_chancellor
									has_job_title = job_marshal
									has_job_title = job_treasurer
									has_job_title = job_spymaster
									has_job_title = job_spiritual
								}
								opinion = {
									who = ROOT
									value = 25
								}						
							}
						}
					}
				}
				random_courtier = {
					limit = {
						is_adult = yes
						opinion = {
								who = ROOT
								value = 25
							}
						}						
					save_event_target_as = GBC_nice_councillor
				}
			}
			if = {
				limit = {
					NOT = {
						any_courtier = {
							opinion = {
								who = ROOT
								value = 25
							}						
						}
					}
				}
				random_courtier = {
					save_event_target_as = GBC_nice_councillor
				}
			}

			if = {
				limit = { has_dlc = "Reapers" }
			
				event_target:GBC_new_friend = {
					add_trait = fever
					set_character_flag = developing_illness
				}
			}
		}
	}
	option = {
		hidden_tooltip = {
			event_target:GBC_nice_councillor = { character_event = { id = GBC.71 } }
		}
	}
}

#Councillor - ping event
character_event = {
	id = GBC.71

	is_triggered_only = yes
	hide_window = yes

	option = {
		hidden_tooltip = {
			FROM = {
				character_event = { id = GBC.73 }
			}
		}
	}
}

#Councillor asks about new friend
character_event = {
	id = GBC.73
	picture = GFX_evt_council
	desc = EVTDESC_GBC_73
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	#Our grief has brought us together
	option = {
		name = EVTOPTA_GBC_73

		add_friend = event_target:GBC_new_friend

		hidden_tooltip = {
			event_target:GBC_new_friend = { character_event = { id = GBC.81 days = 30 } }
		}
	}

	#I don't know what you're talking about
	option = {
		name = EVTOPTB_GBC_73

		#because you are callous
		if = {
			limit = { NOT = { trait = cynical } }
			add_trait = cynical
		}

		hidden_tooltip = {
			save_global_event_target_as = GBC_player_target
			event_target:GBC_new_friend = { character_event = { id = GBC.81 days = 30 } }
		}
	}
}

#New friend - ping event
character_event = {
	id = GBC.81

	is_triggered_only = yes
	hide_window = yes

	option = {
		hidden_tooltip = {
			FROM = {
				character_event = { id = GBC.8 }
			}
		}
	}
}

#Relative wants bird back
character_event = {
	id = GBC.8
	picture = GFX_evt_quarrel
	desc = EVTDESC_GBC_8
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	trigger = {
		event_target:GBC_new_friend = { is_alive = yes }
	}

	#What's wrong?
	option = {
		name = EVTOPTA_GBC_8

		if = {
			limit = { 
				NOT = {
					trait = patient
					trait = wroth
				}
			}
			add_trait = patient
		}
		if = {
			limit = { trait = wroth }
			remove_trait = wroth
		}
	
		hidden_tooltip = {
			character_event = { id = GBC.9 }
		}
	}

	#NO, YOU CAN'T TAKE HER FROM ME
	option = {
		name = EVTOPTB_GBC_8

		if = {
			limit = {
				NOT = {
					trait = patient
					trait = wroth
				}
			}
			add_trait = wroth
		}
		if = {
			limit = { trait = patient }
			remove_trait = patient
		}

		hidden_tooltip = {
			character_event = { id = GBC.10 }
		}
	}
	#You don't really care
	option = {
		name = EVTOPTC_GBC_8


		if = {
			limit = {
				NOT = {	trait = arbitrary	}
			}
			add_trait = arbitrary
		}
		
		hidden_tooltip = {
			# (skips GBC.17, they will not invite you hunting)
			character_event = { id = GBC.11 }
		}
	}
}

#They admit they think they are sick
character_event = {
	id = GBC.9
	picture = GFX_evt_shadowy_cabal
	desc = EVTDESC_GBC_9
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	immediate = {
		set_character_flag = GBC_knows_friend_is_ill
	}

	#I don't think this is the plague
	option = {
		name = EVTOPTA_GBC_9

		hidden_tooltip = {
			event_target:GBC_new_friend = {
				character_event = { id = GBC.99 days = 15 }
			}
		}
	}
}

#They start to cry, without explanation
character_event = {
	id = GBC.10
	picture = GFX_evt_shadowy_cabal
	desc = EVTDESC_GBC_10
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	#They'll talk when they're ready
	option = {
		name = EVTOPTA_GBC_10

		hidden_tooltip = {
			event_target:GBC_new_friend = {
				character_event = { id = GBC.99 days = 15 }
			}
		}
	}
}

#New friend - ping event
character_event = {
	id = GBC.99

	is_triggered_only = yes
	hide_window = yes

	option = {
		hidden_tooltip = {
			add_trait = falconer
			FROM = {
				character_event = { id = GBC.17 }
			}
		}
	}
}

#They curse you and your ignorance
character_event = {
	id = GBC.11
	picture = GFX_evt_shadowy_cabal
	desc = EVTDESC_GBC_11
	border = GFX_event_normal_frame_religion

	is_triggered_only = yes

	#You tell them to leave
	option = {
		name = EVTOPTA_GBC_11
		custom_tooltip = { text = EVTOPTA_GBC_11_TOOLTIP }

		hidden_tooltip = {
			character_event = { id = GBC.98 days = 20}
		}
	}
}

#New friend - ping event
character_event = {
	id = GBC.98

	is_triggered_only = yes
	hide_window = yes
	hide_from = yes

	option = {
		hidden_tooltip = {
			FROM = {
				random_list = {
					#They live
					65 = {
						narrative_event = { id = GBC.12 }
					}
					#They die
					35 = {
						character_event = { id = GBC.19 }
					}
				}
			}
		}
	}
}

#Hanging out, awkward
character_event = {
	id = GBC.17
	picture = GFX_evt_suspicious_noble
	border = GFX_event_normal_frame_religion

	trigger = {
		event_target:GBC_new_friend = { is_alive = yes }
	}

	desc = {
		text = EVTDESC_GBC_17_A
		picture = GFX_evt_suspicious_noble
		trigger = { 
			has_dlc = "Reapers"
			has_character_flag = GBC_knows_friend_is_ill
		}
	}
	desc = {
		text = EVTDESC_GBC_17_B
		picture = GFX_evt_suspicious_noble
		trigger = { 
			has_dlc = "Reapers" 
			NOT = { has_character_flag = GBC_knows_friend_is_ill }
		}
	}
	desc = {
		text = EVTDESC_GBC_17_A
		picture = GFX_evt_suspicious_noble
		trigger = {
			NOT = { has_dlc = "Reapers" } 
			has_character_flag = GBC_knows_friend_is_ill
		}
	}
	desc = {
		text = EVTDESC_GBC_17_B
		picture = GFX_evt_hunt
		trigger = { 
			NOT = { 
				has_dlc = "Reapers"
				has_character_flag = GBC_knows_friend_is_ill
			}
		}
	}

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_17
		custom_tooltip = { text = EVTOPTA_GBC_17_TOOLTIP }

		hidden_tooltip = {
			character_event = { id = GBC.98 days = 30 random = 10 }
			event_target:GBC_new_friend = { add_trait = falconer }
		}
		trigger = { has_character_flag = GBC_knows_friend_is_ill }
	}

	option = {
		name = EVTOPTB_GBC_17
		custom_tooltip = { text = EVTOPTB_GBC_17_TOOLTIP }

		hidden_tooltip = {
			character_event = { id = GBC.98 days = 40 random = 10 }
			event_target:GBC_new_friend = { add_trait = falconer }
		}
		trigger = { NOT = { has_character_flag = GBC_knows_friend_is_ill } }
	}
}

#New_friend succumbs to disease - hidden event
character_event = {
	id = GBC.19

	hide_window = yes
	is_triggered_only = yes

	trigger = {
		event_target:GBC_new_friend = { is_alive = yes }
	}
	
	option = {
		if = {
			limit = { has_dlc = "Reapers" }
			
			event_target:GBC_new_friend = {
				add_trait = malaise
			}
		}
	
		event_target:GBC_new_friend = {
			death = { death_reason = death_trait }
		}
		narrative_event = { id = GBC.13 days = 5 random = 5 }
	}
}

#They live
narrative_event = {
	title = EVTNAME_GBC_12
	id = GBC.12
	picture = GFX_evt_garden
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	trigger = {
		event_target:GBC_new_friend = { is_alive = yes }
	}

	desc = {
		text = EVTDESC_GBC_12_A
		trigger = { has_character_flag = GBC_knows_friend_is_ill }
	}
	desc = {
		text = EVTDESC_GBC_12_B
		trigger = { NOT = { has_character_flag = GBC_knows_friend_is_ill } }
	}

	#You knew it was nothing to worry about
	option = {
		name = { 
			text = EVTOPTA_GBC_12
			trigger = { has_character_flag = GBC_knows_friend_is_ill }
		}
		name = { 
			text = EVTOPTB_GBC_12
			trigger = { NOT = { has_character_flag = GBC_knows_friend_is_ill } }
		}
		custom_tooltip = { text = EVTOPTA_GBC_12_TOOLTIP }

		hidden_tooltip = {
			clr_character_flag = GBC_knows_friend_is_ill
			if = {
				limit = { has_dlc = "Reapers" }
				
				event_target:GBC_new_friend = {
					remove_trait = fever
					clr_character_flag = developing_illness
					clr_character_flag = GBC_new_friend
				}
			}
		}
	}
}

#They die
narrative_event = {
	title = EVTNAME_GBC_13
	id = GBC.13
	picture = GFX_evt_death
	border = GFX_event_narrative_frame_religion

	is_triggered_only = yes

	desc = {
		text = EVTDESC_GBC_13_A
		trigger = { has_character_flag = GBC_knows_friend_is_ill }
	}
	desc = {
		text = EVTDESC_GBC_13_B
		trigger = { NOT = { has_character_flag = GBC_knows_friend_is_ill } }
	}


	#Life is so cruel
	option = {
		name = EVTOPTA_GBC_13
		custom_tooltip = { text = EVTOPTA_GBC_13_TOOLTIP }
		clr_character_flag = GBC_knows_friend_is_ill
		
		event_target:GBC_new_friend = {
			clr_character_flag = GBC_new_friend
		}
	}
}


###COURTLY LOVE###

#Sending it to the one who got married
character_event = {
	id = GBC.199

	trigger = {
		has_dlc = "Game Book"
		FROM = {
			block_general_event_trigger = no
			
			is_landed = yes

			NOR = {
				any_lover = { always = yes }
				trait = celibate
				has_character_flag = gbc_courtly_love
			}
		}
	}

	hide_window = yes
	is_triggered_only = yes

	immediate = {
		random_list = {
			10 = { # Trigger event
				new_character = { save_event_target_as = gbc_spouse }

				FROM = { character_event = { id = GBC.100 days = 3 } }
			}
			90 = { } # Nothing happen
		}
	}
}

#Trying to find a lover
character_event = {
	id = GBC.100
	
	hide_window = yes
	is_triggered_only = yes

	trigger = {
		ai = no
	}

	immediate = {

		#Rival: liege
		if = {
			limit = { liege = { ai = yes is_married = yes block_general_event_trigger = no } }

			liege = {
				random_spouse = {
					limit = {
						block_general_event_trigger = no
						OR = {
							AND = {
								is_female = yes
								ROOT = { prefers_men_trigger = no }
							}
							AND = {
								is_female = no
								ROOT = { prefers_men_trigger = yes }
							}
						}
						NOT = { is_close_relative = ROOT }
					}
					save_event_target_as = gbc_lover
					break = yes
				}
			}
		}

		#Rival: someone else under the same liege
		if = {
			limit = { liege = { any_vassal = { NOR = { character = ROOT ai = no is_married = no block_general_event_trigger = no } } } }
				
			#Find a lover
			liege = { 
				random_vassal = { 
					limit = { 
						NOT = { character = ROOT }
						is_married = yes
						ai = yes
						block_general_event_trigger = no
					}

					random_spouse = {
						limit = {
							block_general_event_trigger = no
							OR = {
								AND = {
									is_female = yes
									ROOT = { prefers_men_trigger = no }
								}
								AND = {
									is_female = no
									ROOT = { prefers_men_trigger = yes }
								}
							}
							NOT = { is_close_relative = ROOT }
						}
						save_event_target_as = gbc_lover
						break = yes
					}
				}
			}
		}

		#Rival: one of your vassals
		if = {
			limit = { any_vassal = { ai = yes is_married = yes block_general_event_trigger = no } }

			random_vassal = { 
				limit = { 
					is_married = yes
					ai = yes
					block_general_event_trigger = no
				}

				random_spouse = {
					limit = {
						block_general_event_trigger = no
						OR = {
							AND = {
								is_female = yes
								ROOT = { prefers_men_trigger = no }
							}
							AND = {
								is_female = no
								ROOT = { prefers_men_trigger = yes }
							}
							NOT = { is_close_relative = ROOT }
						}
					}
					save_event_target_as = gbc_lover
					break = yes
				}
			}
		}
	}

	option = {
		if =  { 
			limit = {
				event_target:gbc_lover = { always = yes }
			}
			event_target:gbc_lover = { character_event = { id = GBC.101 } }
		}
	}
}

#Lover ping event
character_event = {
	id = GBC.101

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = {
		remove_trait = ugly
		remove_trait = lunatic
		remove_trait = clubfooted
		remove_trait = harelip
		remove_trait = hunchback
		remove_trait = slow
		remove_trait = imbecile
		remove_trait = cruel
		remove_trait = envious
		remove_trait = greedy
		remove_trait = gluttonous
		remove_trait = arbitrary
		remove_trait = craven
		add_trait = fair
		add_trait = kind
		add_trait = brave

		if = {
			limit = { FROM = { trait = homosexual } }
			add_trait = homosexual
		}

		spouse = { save_event_target_as = gbc_rival }

		FROM = { narrative_event = { id = GBC.102 } } 
	}
}

#You notice the person at a party
narrative_event = {
	title = EVTNAME_GBC_102
	id = GBC.102
	desc = EVTDSC_GBC_102
	border = GFX_event_narrative_frame_diplomacy
	picture = GFX_evt_marriage

	is_triggered_only = yes
	hide_new = yes

	#OK
	option = {
		set_character_flag = gbc_courtly_love
		name = EVTOPTA_GBC_102
		hidden_tooltip = { FROM = { character_event = { id = GBC.103 days = 3 } } }
	}
}

#Lover ping event
character_event = {
	id = GBC.103

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.104 } } }
}

#You engage with them or not
character_event = {
	id = GBC.104
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_feast

	desc = {	
		trigger = { has_dlc = "Way of Life" }
		picture = GFX_evt_dancing
		text = EVTDSC_GBC_104
	}
	desc = {	
		trigger = { NOT = { has_dlc = "Way of Life" } }
		picture = GFX_evt_feast
		text = EVTDSC_GBC_104
	}

	is_triggered_only = yes

	immediate = {
		hidden_tooltip = { FROM = { character_event = { id = GBC.105 days = 15 } } }
	}

	#Pay attention
	option = {
		name = EVTOPTA_GBC_104
		opinion = {
			modifier = opinion_charmed
			who = FROM
		}
		spouse = {
			opinion = {
				modifier = opinion_inattentive
				who = ROOT
			}
		}
	}

	#Ignore
	option = {
		name = EVTOPTB_GBC_104
		trigger = { NOT = { trait = lustful } }
	}
}

#Lover ping event
character_event = {
	id = GBC.105

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.106 } } }
}

#You dream about the person
character_event = {
	id = GBC.106
	desc = EVTDSC_GBC_106
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_lovers

	is_triggered_only = yes

	#Find him/her before they leave
	option = {
		name = EVTOPTA_GBC_105
		trigger = { NOT = { trait = craven } }

		hidden_tooltip = { FROM = { character_event = { id = GBC.107 days = 3 } } }

		if = { 
			limit = { NOT = { trait = brave } }
			random = {
				chance = 20
				add_trait = brave
				hidden_tooltip = { character_event = { id = 38270 } } #Notify brave
			}
		}

		ai_chance = {
			factor = 1
			modifier = {
				factor = 5
				trait = lustful
			}
		}
	}

	#This is wrong :(
	option = {
		name = EVTOPTB_GBC_105
		add_trait = stressed

		if = { 
			limit = { NOT = { trait = chaste } }
			random = {
				chance = 50
				add_trait = chaste
				hidden_tooltip = { character_event = { id = 38274 } } #Notify chaste
			}
		}

		ai_chance = {
			factor = 5
		}
	}
}

#Lover ping event
character_event = {
	id = GBC.107

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.108 } } }
}

#You find the person in the garden, she virtuously rejcets
character_event = {
	id = GBC.108
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_garden

	desc = {	
		trigger = { has_dlc = "Way of Life" }
		picture = GFX_evt_castle_garden
		text = EVTDSC_GBC_108
	}
	desc = {	
		trigger = { NOT = { has_dlc = "Way of Life" } }
		picture = GFX_evt_garden
		text = EVTDSC_GBC_108
	}

	is_triggered_only = yes

	#Ok
	option = {
		name = EVTOPTA_GBC_108
		hidden_tooltip = {
			character_event = { id = GBC.109 days = 150 } 
		}
	}
}

#Write them poetry
character_event = {
	id = GBC.109
	desc = EVTDSC_GBC_109
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_recieve_letter

	is_triggered_only = yes

	#Give it all you got
	option = {
		trigger = { NOT = { trait = poet } }
		name = EVTOPTA_GBC_109
		
		random_list = {
			50 = { 
				modifier = { factor = 1.5 diplomacy = 12 }
				modifier = { factor = 1.5 diplomacy = 18 }
				modifier = { factor = 1.5 diplomacy = 24 }

				tooltip = { add_trait = poet }
				hidden_tooltip = { character_event = { id = GBC.110 days = 3 } } 
			}
			50 = {
				tooltip = { add_trait = stressed }
				hidden_tooltip = { character_event = { id = GBC.111 days = 3 } } 
			}
		}
	}

	#Masterful poem
	option = {
		trigger = { trait = poet }
		name = EVTOPTB_GBC_109
		
		hidden_tooltip = { character_event = { id = GBC.110 days = 3 } } 
	}

	#Nah, send a gift instead
	option = {
		name = EVTOPTC_GBC_109
		scaled_wealth = { value = -0.5 min = -25 }

		set_character_flag = gbc_gift
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.112 days = 40 random = 20 } } }
	}

	#Don't send anything
	option = {	
		name = EVTOPTD_GBC_109

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		event_target:gbc_lover = {
			opinion = {
				modifier = opinion_broken_promises
				who = ROOT
			}
		}
	}
}

#Poem is done, good
character_event = {
	id = GBC.110
	desc = EVTDSC_GBC_110
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_monk

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_110
		add_trait = poet
		set_character_flag = gbc_poem_good
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.112 days = 40 random = 20 } } }
	}
}

#Poem is done, bad
character_event = {
	id = GBC.111
	desc = EVTDSC_GBC_111
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_monk

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_111
		if = {
			limit = { NOR = { trait = stressed trait = depressed } }
			add_trait = stressed
			hidden_tooltip = {
				character_event = {
					id = 38282 #Notify Stressed
				}
			}
		}
		set_character_flag = gbc_poem_bad
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.112 days = 40 random = 20 } } }
	}

	option = {
		name = EVTOPTB_GBC_111
		if = {
			limit = { NOR = { trait = stressed trait = depressed } }
			add_trait = stressed
			hidden_tooltip = {
				character_event = {
					id = 38282 #Notify Stressed
				}
			}
		}
		set_character_flag = gbc_gift
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.112 days = 40 random = 20 } } }
		scaled_wealth = { value = -0.5 min = -25 }
		
	}
}

#Lover ping event
character_event = {
	id = GBC.112

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { letter_event = { id = GBC.113 } } }
}

#Lover replies after gift
letter_event = {
	id = GBC.113
	border = GFX_event_letter_frame_diplomacy

	is_triggered_only = yes

	desc = {
		trigger = { has_character_flag = gbc_poem_good }
		text = EVTDSC_GBC_113_A
	}
	desc = {
		trigger = { has_character_flag = gbc_poem_bad }
		text = EVTDSC_GBC_113_B
	}
	desc = {
		trigger = { has_character_flag = gbc_gift }
		text = EVTDSC_GBC_113_C
	}

	#Lover liked poem
	option = {
		name = EVTOPTA_GBC_113
		trigger = { has_character_flag = gbc_poem_good }

		hidden_tooltip = { character_event = { id = GBC.114 days = 150 random = 15 } } 

		reverse_opinion = {
			modifier = opinion_romantic_poem
			who = ROOT
		}

		clr_character_flag = gbc_poem_good
	}

	#Lover hated poem
	option = {	
		name = EVTOPTB_GBC_113
		trigger = { has_character_flag = gbc_poem_bad }

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		reverse_opinion = {
			modifier = opinion_terrible_poem
			who = ROOT
		}

		clr_character_flag = gbc_poem_bad
	}

	#Lover liked gift
	option = {
		name = EVTOPTC_GBC_113
		trigger = { has_character_flag = gbc_poem_gift }

		hidden_tooltip = { character_event = { id = GBC.114 days = 150 random = 15 } } 

		reverse_opinion = {
			modifier = opinion_romantic_gift
			who = ROOT
		}

		clr_character_flag = gbc_poem_gift
	}
}

#After having exchanged letters for a while, get invite
character_event = {
	id = GBC.114
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_recieve_letter

	desc = {	
		trigger = { has_dlc = "Way of Life" }
		picture = GFX_evt_hunting_scene
		text = EVTDSC_GBC_114
	}
	desc = {	
		trigger = { NOT = { has_dlc = "Way of Life" } }
		picture = GFX_evt_recieve_letter
		text = EVTDSC_GBC_114
	}

	is_triggered_only = yes
	hide_from = yes

	#Go there
	option = {
		name = EVTOPTA_GBC_114
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.115 days = 50 random = 10 } } }
	}

	#Don't go there
	option = {
		name = EVTOPTB_GBC_114
		
		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end
	}
}

#Lover ping event
character_event = {
	id = GBC.115

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.116 } } }
}


#You go there and see lover during dinner
character_event = {
	id = GBC.116
	desc = EVTDSC_GBC_116
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_feast

	is_triggered_only = yes

	#Try to talk to lover
	option = {
		name = EVTOPTA_GBC_116
		hidden_tooltip = { event_target:gbc_rival = { character_event = { id = GBC.117 days = 3 } } }
	}

	#Watch from afar
	option = {
		name = EVTOPTB_GBC_116
		hidden_tooltip = { character_event = { id = GBC.119 days = 20 } } 
	}
}

#Rival ping event
character_event = {
	id = GBC.117

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.118 } } }
}

#You don't get a chance to talk to lover, rival discovers
character_event = {
	id = GBC.118
	desc = EVTDSC_GBC_118
	border = GFX_event_normal_frame_intrigue
	picture = GFX_evt_courtiers_talking

	is_triggered_only = yes

	#OK
	option = {
		name = EVTOPTA_GBC_118
		
		event_target:gbc_rival = {
			opinion = {
				modifier = opinion_acting_suspicious
				who = ROOT
			}
		}

		hidden_tooltip = { character_event = { id = GBC.119 days = 17 } } 
	}		
}

#Hear a scream
character_event = {
	id = GBC.119
	desc = EVTDSC_GBC_119
	border = GFX_event_normal_frame_war
	picture = GFX_evt_hunt


	hide_from = yes
	is_triggered_only = yes

	#Find out what's going on!
	option = {
		name = EVTOPTA_GBC_119
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.120 days = 1 } } }
	}

	#Ignore
	option = {
		name = EVTOPTB_GBC_119
		hidden_tooltip = { character_event = { id = GBC.141 days = 7 } } 
	}
}

#She died
character_event = {
	id = GBC.141
	desc = EVTDSC_GBC_141
	border = GFX_event_normal_frame_religion
	picture = GFX_evt_death

	hide_from = yes
	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_141
		event_target:gbc_lover = { death = { death_reason = death_accident } }

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end
		
		if = {
			limit = { NOT = { trait = depressed } }
			add_trait = depressed
		}
	}
}

#Lover ping event
character_event = {
	id = GBC.120
	
	trigger = { block_general_event_trigger = no }

	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.121 } } }
}

#Save lover, or not
character_event = {
	id = GBC.121
	desc = EVTDSC_GBC_121
	border = GFX_event_normal_frame_war
	picture = GFX_evt_hunt

	is_triggered_only = yes

	#Shoot
	option = {
		name = EVTOPTA_GBC_121
		random_list = {
			#Success
			40 = {	
				modifier = { factor = 1.2 combat_rating = 1 }
				modifier = { factor = 1.2 combat_rating = 2 }
				modifier = { factor = 1.2 combat_rating = 3 }
				modifier = { factor = 1.2 combat_rating = 4 }
				modifier = { factor = 1.2 combat_rating = 5 }
				modifier = { factor = 1.2 combat_rating = 6 }
				modifier = { factor = 1.2 combat_rating = 7 }
				modifier = { factor = 1.5 trait = hunter }

				custom_tooltip = { text = EVTOPTA_GBC_121_TOOLTIP_A }
				
				set_character_flag = gbc_successful_shot
			}

			#Failure
			60 = {
				modifier = { factor = 1.2 NOT = { combat_rating = 0 } }
				modifier = { factor = 1.2 NOT = { combat_rating = -1 } }
				modifier = { factor = 1.2 NOT = { combat_rating = -2 } }
				modifier = { factor = 1.2 NOT = { combat_rating = -3 } }
				modifier = { factor = 1.2 NOT = { combat_rating = -4 } }

				tooltip = { FROM = { add_maimed_trait_effect = yes } }
				set_character_flag = gbc_failed_shot
			}
		}
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.122 days = 1 } } }
	}

	#Attack
	option = {
		name = EVTOPTB_GBC_121

		trigger = { NOT = { trait = craven } }
		random_list = {
			#Success
			70 = {
				custom_tooltip = { text = EVTOPTB_GBC_121_TOOLTIP_A }
				set_character_flag = gbc_successful_attack
			}
			#Failure
			30 = {
				set_character_flag = gbc_failed_attack
				custom_tooltip = { text = maimed_effect_tooltip }
			}
		}
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.122 days = 1 } } }
	}

	#Do nothing
	option = {
		name = EVTOPTC_GBC_121
		#Maimed
		random_list = {
			80 = {
				tooltip = { FROM = { add_maimed_trait_effect = yes } }
				set_character_flag = gbc_do_nothing_maimed
			}
			#Death
			20 = {
				tooltip = { FROM = { death = { death_reason = death_accident } } }
				set_character_flag = gbc_do_nothing_death
			}
		}
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.122 days = 1 } } }
	}
}

#Lover ping 
character_event = {
	id = GBC.122

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.123 } } }
}

#Outcome after attempting to save (or doing nothing)
character_event = {
	id = GBC.123
	border = GFX_event_normal_frame_war
	picture = GFX_evt_hunt

	is_triggered_only = yes

	desc = {
		trigger = { has_character_flag = gbc_successful_shot }
		text = EVTDSC_GBC_123_A
	}
	desc = {
		trigger = { has_character_flag = gbc_failed_shot }
		text = EVTDSC_GBC_123_B
	}
	desc = {
		trigger = { has_character_flag = gbc_successful_attack }
		text = EVTDSC_GBC_123_C
	}
	desc = {
		trigger = { has_character_flag = gbc_failed_attack }
		text = EVTDSC_GBC_123_D
	}
	desc = {
		trigger = { 
			OR = { 
				has_character_flag = gbc_do_nothing_maimed 
				has_character_flag = gbc_do_nothing_death
			}
		}
		text = EVTDSC_GBC_123_E
	}

	

	#Save love interest, become lovers
	option = {
		name = EVTOPTA_GBC_123
		trigger = { 
			OR = {
				has_character_flag = gbc_successful_shot
				has_character_flag = gbc_successful_attack
				has_character_flag = gbc_failed_attack
			}
		}

		add_lover = FROM
		hidden_tooltip = {
			set_character_flag = gbc_courtly_lover
			event_target:gbc_lover = {
				remove_lover = event_target:gbc_rival
			}
		}

		if = { 
			limit = { has_character_flag = gbc_failed_attack }
			add_maimed_trait_effect = yes 
		}

		hidden_tooltip = { character_event = { id = GBC.124 days = 20 } }

		hidden_tooltip = { character_event = { id = GBC.140 days = 30 } }

		clr_character_flag = gbc_successful_shot
		clr_character_flag = gbc_successful_attack
		clr_character_flag = gbc_failed_attack
	}

	#Save love interest, deny love
	option = {
		trigger = { 
			OR = {
				has_character_flag = gbc_successful_shot
				has_character_flag = gbc_successful_attack
				has_character_flag = gbc_failed_attack
			}
		}
		name = EVTOPTB_GBC_123

		reverse_opinion = {
			modifier = opinion_advance_rejected
			who = event_target:gbc_lover
		}

		if = { 
			limit = { has_character_flag = gbc_failed_attack }
			add_maimed_trait_effect = yes 
		}

		hidden_tooltip = { character_event = { id = GBC.140 days = 30 } }
		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		clr_character_flag = gbc_successful_shot
		clr_character_flag = gbc_successful_attack
		clr_character_flag = gbc_failed_attack
	}

	#Lover is maimed
	option = {
		trigger = { 
			OR = {
				has_character_flag = gbc_failed_shot
				has_character_flag = gbc_do_nothing_maimed
			}
		}
		name = EVTOPTC_GBC_123

		FROM = { add_maimed_trait_effect = yes }

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		clr_character_flag = gbc_failed_shot
		clr_character_flag = gbc_do_nothing_maimed
	}

	#Lover dies
	option = {
		trigger = { 
			has_character_flag = gbc_do_nothing_death
		}
		name = EVTOPTC_GBC_123
		FROM = { death = { death_reason = death_accident } }
		
		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		clr_character_flag = gbc_do_nothing_death
	}
}

#Few days later
character_event = {
	id = GBC.124
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_lovers
	desc = EVTDSC_GBC_124

	is_triggered_only = yes
	hide_from = yes


	#Be sneaky
	option = {
		name = EVTOPTA_GBC_124
		hidden_tooltip = { event_target:gbc_rival = { character_event = { id = GBC.125 days = 3 } } }
	}

	#Go hunting
	option = {
		name = EVTOPTB_GBC_124
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.127 days = 90 } } }
	}
}

#Rival ping
character_event = {
	id = GBC.125
	
	trigger = { block_general_event_trigger = no }

	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { character_event = { id = GBC.126 } } }
}

#Spouse discovers
character_event = {
	id = GBC.126
	border = GFX_event_normal_frame_intrigue
	picture = GFX_evt_quarrel
	desc = EVTDSC_GBC_126

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_126

		hidden_tooltip = { character_event = { id = GBC.138 days = 90 random = 15 } }

		add_rival = event_target:gbc_rival

		if = { 
			limit = { is_female = yes }
			add_character_modifier = {
				modifier = adulteress
				years = 10
			}
		}
		if = { 
			limit = { is_female = no }
			add_character_modifier = {
				modifier = adulterer
				years = 10
			}
		}

		event_target:gbc_lover = {
			if = { 
				limit = { is_female = yes }
				add_character_modifier = {
					modifier = adulteress
					years = 10
				}
			}
			if = { 
				limit = { is_female = no }
				add_character_modifier = {
					modifier = adulterer
					years = 10
				}
			}
		}
	}
}

#Hunt is over
character_event = {
	id = GBC.140
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_hunt

	desc = {	
		trigger = { has_dlc = "Way of Life" }
		picture = GFX_evt_hunting_scene
		text = EVTDSC_GBC_140
	}
	desc = {	
		trigger = { NOT = { has_dlc = "Way of Life" } }
		picture = GFX_evt_hunt
		text = EVTDSC_GBC_140
	}

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_140
	}
}

#Lover ping
character_event = {
	id = GBC.127

	trigger = { 
		block_general_event_trigger = no 
		is_lover = FROM
	}
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { letter_event = { id = GBC.128 } } }
}

#Lover requests for you to handle spouse
letter_event = {
	id = GBC.128
	border = GFX_event_letter_frame_intrigue
	desc = EVTDSC_GBC_128

	is_triggered_only = yes


	#Yes
	option = {
		name = EVTOPTA_GBC_128
		hidden_tooltip = { character_event = { id = GBC.138 days = 60 random = 15 } }
	}

	#No
	option = {
		name = EVTOPTB_GBC_128

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 20 } } #Bad end
		hidden_tooltip = { clr_character_flag = gbc_courtly_lover }
		
		event_target:gbc_lover = { 
			remove_lover = ROOT
			add_trait = depressed
		}
	}
}

#What do with the spouse?
character_event = {
	id = GBC.138
	border = GFX_event_normal_frame_intrigue
	picture = GFX_evt_spymaster
	desc = EVTDSC_GBC_138

	is_triggered_only = yes
	hide_from = yes

	#Duel to the death
	option = {	
		name = EVTOPTA_GBC_138
		set_character_flag = gbc_duel
		hidden_tooltip = { event_target:gbc_rival = { character_event = { id = GBC.129 } } }
		tooltip_info = martial

		ai_chance = {
			factor = 1
			modifier = {
				factor = 5
				OR = {
					trait = wroth
					trait = duelist
					trait = brave
				}
			}
		}
	}

	#Talk sense
	option = {
		name = EVTOPTB_GBC_138
		set_character_flag = gbc_talk
		hidden_tooltip = { event_target:gbc_rival = { character_event = { id = GBC.129 } } }
		tooltip_info = diplomacy

		ai_chance = {
			factor = 10
		}
	}

	#Assassinate
	option = {
		name = EVTOPTC_GBC_138
		set_character_flag = gbc_assassinate
		hidden_tooltip = { event_target:gbc_rival = { character_event = { id = GBC.129 } } }
		tooltip_info = intrigue

		ai_chance = {
			factor = 1
			modifier = {
				factor = 5
				OR = {
					trait = deceitful
					trait = schemer
					trait = ambitious
				}
			}
		}
	}
}


#Rival ping
character_event = {
	id = GBC.129

	trigger = { block_general_event_trigger = no }
	
	hide_window = yes
	is_triggered_only = yes

	option = { 
		FROM = {
			#Duel
			if = {
				limit = { has_character_flag = gbc_duel }

				FROM = { letter_event = { id = GBC.142 days = 30 } }

				random_list = {
					#Success
					60 = {
						modifier = { factor = 1.2 combat_rating = 1 }
						modifier = { factor = 1.2 combat_rating = 2 }
						modifier = { factor = 1.2 combat_rating = 3 }
						modifier = { factor = 1.2 combat_rating = 4 }
						modifier = { factor = 1.2 combat_rating = 5 }
						modifier = { factor = 1.2 combat_rating = 6 }
						modifier = { factor = 1.2 combat_rating = 7 }
						modifier = { factor = 1.2 event_target:gbc_rival = { NOT = { combat_rating = 0 } } }
						modifier = { factor = 1.2 event_target:gbc_rival = { NOT = { combat_rating = -1 } } }
						modifier = { factor = 1.2 event_target:gbc_rival = { NOT = { combat_rating = -2 } } }
						modifier = { factor = 1.2 event_target:gbc_rival = { NOT = { combat_rating = -3 } } }
						modifier = { factor = 1.2 event_target:gbc_rival = { NOT = { combat_rating = -4 } } }

						FROM = { character_event = { id = GBC.130 days = 80 random = 15 } }
					}
					#Fail
					40 = { 
						modifier = { factor = 1.2 NOT = { combat_rating = 0 } }
						modifier = { factor = 1.2 NOT = { combat_rating = -1 } }
						modifier = { factor = 1.2 NOT = { combat_rating = -2 } }
						modifier = { factor = 1.2 NOT = { combat_rating = -3 } }
						modifier = { factor = 1.2 NOT = { combat_rating = -4 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 1 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 2 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 3 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 4 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 5 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 6 } }
						modifier = { factor = 1.2 event_target:gbc_rival = { combat_rating = 7 } }

						FROM = { character_event = { id = GBC.131 days = 80 random = 15 } }
					}
				}

				clr_character_flag = gbc_duel
			}

			#Talk sense
			if = {
				limit = { has_character_flag = gbc_talk }

				random_list = {
					#Success
					60 = { 
						modifier = { factor = 1.2 diplomacy = 10 } 
						modifier = { factor = 1.2 diplomacy = 13 } 
						modifier = { factor = 1.2 diplomacy = 16 } 
						modifier = { factor = 1.2 diplomacy = 19 } 
						modifier = { factor = 1.2 diplomacy = 22 }
						modifier = { factor = 1.5 trait = socializer } 

						FROM = { character_event = { id = GBC.132 days = 60 } }
					}
					#Fail
					40 = {
						modifier = { factor = 1.5 FROM = { trait = wroth } }
						modifier = { factor = 1.5 FROM = { trait = proud } }
						modifier = { factor = 1.5 FROM = { trait = stubborn } }

						FROM = { character_event = { id = GBC.133 days = 60 } }
					}
				}

				clr_character_flag = gbc_talk
			}

			#Assassinate
			if = {
				limit = { has_character_flag = gbc_assassinate }

				random_list = {
					#Success
					60 = { 
						modifier = { factor = 1.2 intrigue = 10 } 
						modifier = { factor = 1.2 intrigue = 13 } 
						modifier = { factor = 1.2 intrigue = 16 } 
						modifier = { factor = 1.2 intrigue = 19 } 
						modifier = { factor = 1.2 intrigue = 22 }
						modifier = { factor = 1.5 trait = schemer } 

						FROM = { character_event = { id = GBC.134 days = 90 } }
					}
					#Fail
					40 = {
						modifier = { factor = 1.2 FROM = { intrigue = 10 } }
						modifier = { factor = 1.2 FROM = { intrigue = 13 } }
						modifier = { factor = 1.2 FROM = { intrigue = 16 } }
						modifier = { factor = 1.2 FROM = { intrigue = 19 } }
						modifier = { factor = 1.2 FROM = { intrigue = 22 } }
						modifier = { factor = 1.5 FROM = { trait = schemer } }

						FROM = { character_event = { id = GBC.135 days = 90 } }
					}
				}

				clr_character_flag = gbc_assassinate
			}
		}
	}
}

#Duel letter
letter_event = {
	id = GBC.142
	border = GFX_event_letter_frame_war
	desc = EVTDSC_GBC_142

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_142
		if = {
			limit = { NOT = { any_rival = { character = FROM } } }
			add_rival = FROM
		}
	}
}

#Duel success
character_event = {
	id = GBC.130
	border = GFX_event_normal_frame_war
	picture = GFX_evt_melee
	desc = EVTDSC_GBC_130

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_130
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.136 days = 50 } } }
		event_target:gbc_rival = { death = { death_reason = death_duel killer = ROOT } }
	}
}

#Duel fail
character_event = {
	id = GBC.131
	border = GFX_event_normal_frame_war
	picture = GFX_evt_melee
	desc = EVTDSC_GBC_131

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_131
	
		event_target:gbc_lover = { remove_lover = ROOT }

		random_list = {
			50 = {
				death = { death_reason = death_duel killer = ROOT }
			}
			50 = {
				add_maimed_trait_effect = yes
				hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end
			}	
		}
	}
}

#Talk success
character_event = {
	id = GBC.132
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_courtiers_talking
	desc = EVTDSC_GBC_132

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_132
		hidden_tooltip = { event_target:gbc_lover = { character_event = {  id = GBC.136 days = 50 } } }
		event_target:gbc_rival = { remove_spouse = event_target:gbc_lover }
	}
}

#Talk fail
character_event = {
	id = GBC.133
	border = GFX_event_normal_frame_diplomacy
	picture = GFX_evt_courtiers_talking
	desc = EVTDSC_GBC_133

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_133

		event_target:gbc_lover = { remove_lover = ROOT }

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		imprison = FROM

		if = {
			limit = { NOT = { any_rival = { character = FROM } } }
			add_rival = FROM
		}
	}
}

#Assassination success
character_event = {
	id = GBC.134
	border = GFX_event_normal_frame_intrigue
	picture = GFX_evt_hunt
	desc = EVTDSC_GBC_134

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_134
		hidden_tooltip = { event_target:gbc_lover = { character_event = { id = GBC.136 days = 50 } } }
		event_target:gbc_rival = { death = { death_reason = death_murder_unknown_arrow killer = ROOT } }
	}
}

#Assassination fail 
character_event = {
	id = GBC.135
	border = GFX_event_normal_frame_intrigue
	picture = GFX_evt_hunt
	desc = EVTDSC_GBC_135

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_135

		event_target:gbc_lover = { remove_lover = ROOT }

		hidden_tooltip = { narrative_event = { id = GBC.143 days = 30 } } #Bad end

		if = {
			limit = { NOT = { has_character_modifier = known_murderer } }
			add_character_modifier = {
				name = known_murderer
				years = 50
			}
		}

		if = {
			limit = { NOT = { any_rival = { character = FROM } } }
			add_rival = FROM
		}
	}
}

#Lover ping
character_event = {
	id = GBC.136

	trigger = { 
		block_general_event_trigger = no 
		is_lover = FROM
	}
	
	hide_window = yes
	is_triggered_only = yes

	option = { FROM = { narrative_event = { id = GBC.137 } } }
}

#The end (good)
narrative_event = {
	title = EVTNAME_GBC_137
	id = GBC.137
	desc = EVTDSC_GBC_137
	border = GFX_event_narrative_frame_diplomacy
	picture = GFX_evt_lovers

	is_triggered_only = yes

	option = {
		name = EVTOPTA_GBC_137

		hidden_tooltip = {
			event_target:gbc_lover = { move_character = ROOT }
			clr_character_flag = gbc_courtly_lover
		}
	}
}

#The end (bad)
narrative_event = {
	title = EVTNAME_GBC_143
	id = GBC.143
	border = GFX_event_narrative_frame_religion
	picture = GFX_evt_garden

	trigger = { block_general_event_trigger = no }

	desc = {	
		trigger = { has_dlc = "Way of Life" }
		picture = GFX_evt_castle_garden
		text = EVTDSC_GBC_143
	}
	desc = {	
		trigger = { NOT = { has_dlc = "Way of Life" } }
		picture = GFX_evt_garden
		text = EVTDSC_GBC_143
	}

	is_triggered_only = yes
	hide_from = yes

	option = {
		name = EVTOPTA_GBC_143

		hidden_tooltip = {
			clr_character_flag = gbc_courtly_lover
		}

		if = {
			limit = { NOT = { trait = depressed } }
			add_trait = depressed
		}
	}
}
