namespace = ambition

################################################
# Cure infertility
################################################
# Shady merchant offers a potion to cure infertility - Start
character_event = {
	id = ambition.1
	desc = EVTDESCambition.1
	picture = GFX_evt_spymaster
	
	capable_only = yes
	
	trigger = {
		has_ambition = obj_cure_infertility
		NOT = { has_character_flag = shady_cure }
		NOT = { has_character_flag = shady_cure_failed }
		NOT = { has_character_flag = dangerous_ritual }
		NOT = { has_character_flag = experimental_potion }
		NOT = { has_character_flag = expensive_procedure }
		NOT = { has_character_flag = mecopteran_hand_bone }
	}
	
	mean_time_to_happen = {
		months = 280
	}
	
	option = {
		name = EVTOPTAambition.1
		set_character_flag = shady_cure
		scaled_wealth = -1
		character_event = { id = ambition.2 days = 3 tooltip = EVTTOOLTIPambition.2 }
	}
	option = {
		name = EVTOPTBambition.1
		set_character_flag = shady_cure_failed
	}
}
# Shady merchant offers a potion to cure infertility - Potion
character_event = {
	id = ambition.2
	desc = EVTDESCambition.2
	picture = GFX_evt_spymaster
	
	is_triggered_only = yes
	hide_from = yes
	
	capable_only = yes
	has_character_flag = shady_cure
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.2
		custom_tooltip = {
			text = wait_for_effects_of_potion
			hidden_tooltip = {
				random_list = {
					30 = { character_event = { id = ambition.3 days = 3 } }
					70 = { character_event = { id = ambition.4 days = 3 } }
				}
			}
		}
	}
}
# Shady merchant offers a potion to cure infertility - Cure
character_event = {
	id = ambition.3
	desc = EVTDESCambition.3
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	hide_from = yes
	
	capable_only = yes
	has_character_flag = shady_cure
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.3
		add_trait = fertile_sorcerer
		hidden_tooltip = { character_event = { id = ambition.44 } } # Clear flags
	}
}
# Shady merchant offers a potion to cure infertility - Water
character_event = {
	id = ambition.4
	desc = EVTDESCambition.4
	picture = GFX_evt_throne_room
	
	is_triggered_only = yes
	hide_from = yes
	
	capable_only = yes
	has_character_flag = shady_cure
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.4
		clr_character_flag = shady_cure
		set_character_flag = shady_cure_failed
	}
}
# Cast a dangerous ritual to cure infertility - Spellbook
character_event = {
	id = ambition.10
	desc = EVTDESCambition.10
	picture = GFX_evt_library
	
	capable_only = yes
	
	trigger = {
		has_ambition = obj_cure_infertility
		NOT = { has_character_flag = shady_cure }
		NOT = { has_character_flag = dangerous_ritual }
		NOT = { has_character_flag = dangerous_ritual_failed }
		NOT = { has_character_flag = experimental_potion }
		NOT = { has_character_flag = expensive_procedure }
		NOT = { has_character_flag = mecopteran_hand_bone }
	}
	
	mean_time_to_happen = {
		months = 280
	}
	
	option = {
		name = EVTOPTAambition.10
		set_character_flag = dangerous_ritual
		custom_tooltip = {
			text = prepare_ritual
			hidden_tooltip = {
				random_list = {
					60 = { character_event = { id = ambition.11 days = 3 } }
					30 = { character_event = { id = ambition.12 days = 3 } }
					10 = { character_event = { id = ambition.13 days = 3 } }
				}
			}
		}
	}
	option = {
		name = EVTOPTBambition.10
		set_character_flag = dangerous_ritual_failed
	}
}
# Cast a dangerous ritual to cure infertility - Cure
character_event = {
	id = ambition.11
	desc = EVTDESCambition.11
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	
	has_character_flag = dangerous_ritual
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.11
		add_trait = fertile_sorcerer
		hidden_tooltip = { character_event = { id = ambition.44 } } # Clear flags
	}
}
# Cast a dangerous ritual to cure infertility - Madness
character_event = {
	id = ambition.12
	desc = EVTDESCambition.12
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	has_character_flag = dangerous_ritual
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.12
		clr_character_flag = dangerous_ritual
		set_character_flag = dangerous_ritual_failed
		add_trait = lunatic
	}
}
# Cast a dangerous ritual to cure infertility - Possesed
character_event = {
	id = ambition.13
	desc = EVTDESCambition.13
	picture = GFX_evt_lunatic
	
	is_triggered_only = yes
	
	has_character_flag = dangerous_ritual
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.13
		clr_character_flag = dangerous_ritual
		set_character_flag = dangerous_ritual_failed
		add_trait = possessed
	}
}
# Alchemist have concocted an experimental potion that could cure infertility - Rumor
character_event = {
	id = ambition.20
	desc = EVTDESCambition.20
	picture = GFX_evt_throne_room
	
	capable_only = yes
	
	trigger = {
		has_ambition = obj_cure_infertility
		NOT = { has_character_flag = shady_cure }
		NOT = { has_character_flag = dangerous_ritual }
		NOT = { has_character_flag = experimental_potion }
		NOT = { has_character_flag = experimental_potion_failed }
		NOT = { has_character_flag = expensive_procedure }
		NOT = { has_character_flag = mecopteran_hand_bone }
	}
	
	mean_time_to_happen = {
		months = 280
	}
	
	option = {
		name = EVTOPTAambition.20
		set_character_flag = experimental_potion
		character_event = { id = ambition.21 tooltip = EVTTOOLTIPambition.21 days = 60 random = 10 }
	}
	option = {
		name = EVTOPTBambition.20
		set_character_flag = experimental_potion_failed
	}
}
# Alchemist have concocted an experimental potion that could cure infertility - Alchemist Found
character_event = {
	id = ambition.21
	desc = EVTDESCambition.21
	picture = GFX_evt_throne_room
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = experimental_potion
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.21
		custom_tooltip = {
			text = drink_potion
			hidden_tooltip = {
				random_list = {
					50 = { character_event = { id = ambition.22 days = 30 random = 5 } }
					50 = { character_event = { id = ambition.23 days = 3 } }
				}
			}
		}
	}
	option = {
		name = EVTOPTBambition.21
		custom_tooltip = { text =  dont_drink_potion }
		set_character_flag = experimental_potion_failed
		clr_character_flag = experimental_potion
	}
}
# Alchemist have concocted an experimental potion that could cure infertility - Potion worked
character_event = {
	id = ambition.22
	desc = EVTDESCambition.22
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = experimental_potion
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.22
		add_trait = fertile_sorcerer
		hidden_tooltip = { character_event = { id = ambition.44 } } # Clear flags
	}
}
# Alchemist have concocted an experimental potion that could cure infertility - Potion didn't work
character_event = {
	id = ambition.23
	desc = EVTDESCambition.23
	picture = GFX_evt_illness
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = experimental_potion
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.23
		if = {
			limit = { NOT = { has_dlc = "Reapers" } }
			add_trait = ill
		}
		if = { 
			limit = { has_dlc = "Reapers" }
			add_symptom_effect = yes
		}
		clr_character_flag = experimental_potion
		set_character_flag = experimental_potion_failed
	}
}
# An expensive but credible procedure - Start
character_event = {
	id = ambition.30
	desc = EVTDESCambition.30
	picture = GFX_evt_throne_room
	
	capable_only = yes
	
	trigger = {
		has_ambition = obj_cure_infertility
		NOT = { has_character_flag = shady_cure }
		NOT = { has_character_flag = dangerous_ritual }
		NOT = { has_character_flag = experimental_potion }
		NOT = { has_character_flag = expensive_procedure }
		NOT = { has_character_flag = expensive_procedure_failed }
		NOT = { has_character_flag = mecopteran_hand_bone }
	}
	
	mean_time_to_happen = {
		months = 280
	}
	
	option = {
		name = EVTOPTAambition.30
		set_character_flag = expensive_procedure
		scaled_wealth = -5.0
		character_event = { id = ambition.31 days = 60 random = 10 tooltip = EVTTOOLTIPambition.31 }
	}
	option = {
		name = EVTOPTBambition.30
		set_character_flag = expensive_procedure_failed
	}
}
# An expensive but credible procedure - Cure
character_event = {
	id = ambition.31
	desc = EVTDESCambition.31
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	hide_from = yes
	
	capable_only = yes
	has_character_flag = expensive_procedure
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.31
		add_trait = fertile_sorcerer
		hidden_tooltip = { character_event = { id = ambition.44 } } # Clear flags
	}
}
# Mecopteran hand bone - Start
character_event = {
	id = ambition.40
	desc = EVTDESCambition.40
	picture = GFX_evt_throne_room
	
	capable_only = yes
	
	trigger = {
		has_ambition = obj_cure_infertility
		NOT = { has_character_flag = shady_cure }
		NOT = { has_character_flag = dangerous_ritual }
		NOT = { has_character_flag = experimental_potion }
		NOT = { has_character_flag = expensive_procedure }
		NOT = { has_character_flag = mecopteran_hand_bone }
		NOT = { has_character_flag = mecopteran_hand_bone_failed }
	}
	
	mean_time_to_happen = {
		months = 280
	}
	
	option = { # Buy
		name = EVTOPTAambition.40
		set_character_flag = mecopteran_hand_bone
		scaled_wealth = -3.0
		character_event = { id = ambition.41 days = 60 random = 10 tooltip = EVTTOOLTIPambition.41 }
	}
	option = { # Gather yourself
		name = EVTOPTBambition.40
		set_character_flag = mecopteran_hand_bone
		random = { chance = 30 add_trait = wounded }
		character_event = { id = ambition.41 days = 60 random = 10 tooltip = EVTTOOLTIPambition.41 }
	}
	option = {
		name = EVTOPTCambition.40
		set_character_flag = mecopteran_hand_bone_failed
	}
}
# Mecopteran hand bone - Got bones 
character_event = {
	id = ambition.41
	desc = EVTDESCambition.41
	picture = GFX_evt_throne_room
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = mecopteran_hand_bone
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.41
		custom_tooltip = {
			text = use_bones
			hidden_tooltip = {
				random_list = {
					20 = { character_event = { id = ambition.42 days = 3} }
					80 = { character_event = { id = ambition.43 days = 3 } }
				}
			}
		}
	}
}
# Mecopteran hand bone - Cured
character_event = {
	id = ambition.42
	desc = EVTDESCambition.42
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = mecopteran_hand_bone
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.42
		add_trait = fertile_sorcerer
		hidden_tooltip = { character_event = { id = ambition.44 } } # Clear flags
	}
}
# Mecopteran hand bone - Failed
character_event = {
	id = ambition.43
	desc = EVTDESCambition.43
	picture = GFX_evt_recovery
	
	is_triggered_only = yes
	hide_from = yes
	
	has_character_flag = mecopteran_hand_bone
	
	trigger = {
		has_ambition = obj_cure_infertility
	}
	
	option = {
		name = EVTOPTAambition.43
		clr_character_flag = mecopteran_hand_bone
		set_character_flag = mecopteran_hand_bone_failed
	}
}
# Ambition succeded - Clear flags
character_event = {
	id = ambition.44
	
	is_triggered_only = yes
	hide_window = yes
	
	option = {
		name = OK
		clr_character_flag = shady_cure
		clr_character_flag = shady_cure_failed
		clr_character_flag = dangerous_ritual
		clr_character_flag = dangerous_ritual_failed
		clr_character_flag = experimental_potion
		clr_character_flag = experimental_potion_failed
		clr_character_flag = expensive_procedure
		clr_character_flag = expensive_procedure_failed
		clr_character_flag = mecopteran_hand_bone
		clr_character_flag = mecopteran_hand_bone_failed
	}
}

################################################
# Improve abilitites ambition for AI courtiers
################################################
# Improve martial by 1 (on_decade_pulse)
character_event = {
	id = ambition.50
	
	hide_window = yes
	is_triggered_only = yes
	
	capable_only = yes
	ai = yes
	prisoner = no
	
	trigger = {
		is_landed = no
		has_ambition = obj_improve_martial
	}
	
	option = {
		name = OK
		change_martial = 1
	}
}
# Improve stewardship by 1 (on_decade_pulse)
character_event = {
	id = ambition.51
	
	hide_window = yes
	is_triggered_only = yes
	
	capable_only = yes
	ai = yes
	prisoner = no
	
	trigger = {
		is_landed = no
		has_ambition = obj_improve_stewardship
	}
	
	option = {
		name = OK
		change_stewardship = 1
	}
}
# Improve learning by 1 (on_decade_pulse)
character_event = {
	id = ambition.52
	
	hide_window = yes
	is_triggered_only = yes
	
	capable_only = yes
	ai = yes
	prisoner = no
	
	trigger = {
		is_landed = no
		has_ambition = obj_improve_learning
	}
	
	option = {
		name = OK
		change_learning = 1
	}
}
# Improve diplomacy by 1 (on_decade_pulse)
character_event = {
	id = ambition.53
	
	hide_window = yes
	is_triggered_only = yes
	
	capable_only = yes
	ai = yes
	prisoner = no
	
	trigger = {
		is_landed = no
		has_ambition = obj_improve_diplomacy
	}
	
	option = {
		name = OK
		change_diplomacy = 1
	}
}
# Improve intrigue by 1 (on_decade_pulse)
character_event = {
	id = ambition.54
	
	hide_window = yes
	is_triggered_only = yes
	
	capable_only = yes
	ai = yes
	prisoner = no
	
	trigger = {
		is_landed = no
		has_ambition = obj_improve_intrigue
	}
	
	option = {
		name = OK
		change_intrigue = 1
	}
}

################################################
# Make a friend
################################################
# Councillor tries to befriend liege
character_event = {
	id = ambition.100
	desc = EVTDESCambition.100
	picture = GFX_evt_courtiers_talking
	
	prisoner = no
	min_age = 25
	capable_only = yes
	only_men = yes
	
	trigger = {
		has_ambition = obj_make_a_friend
		in_command = no
		is_councillor = yes
		liege = {
			age = 25
			prisoner = no
			in_command = no
			is_female = no
			NOT = { trait = incapable }
			NOT = { num_of_friends = 2 }
			NOT = { is_friend = ROOT }
			NOT = { is_rival = ROOT }
		}
		opinion = { who = liege value = 10 }
	}
	
	mean_time_to_happen = {
		months = 140
		modifier = { factor = 0.85 trait = gregarious } 
		modifier = { factor = 0.65 liege = { is_close_relative = ROOT } }
		modifier = { factor = 0.75 liege = { tier = count } }
		modifier = { factor = 0.85 liege = { tier = duke } }
		modifier = { factor = 0.85 liege = { has_ambition = obj_make_a_friend } }
		modifier = { factor = 0.75 opinion = { who = liege value = 75 } }
		modifier = { factor = 0.85 opinion = { who = liege value = 50 } }
		modifier = { factor = 0.95 opinion = { who = liege value = 25 } }
	}
	
	option = { # Let's talk to him
		name = EVTOPTAambition.100
		ai_chance = { factor = 95 }
		liege = {
			character_event = { id = ambition.101 days = 1 random = 3 tooltip = attempt_to_make_friend }
		}
	}
	option = { # Maybe later
		name = EVTOPTBambition.100
		ai_chance = { factor = 5 }
		random = {
			chance = 5
			add_trait = shy
			hidden_tooltip = { character_event = { id = 38263 } }
		}
	}
}
# Councillor tries to befriend liege - Liege responds
character_event = {
	id = ambition.101
	desc = EVTDESCambition.101
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = { # Make Friends
		name = EVTOPTAambition.101
		add_friend = FROM
		FROM = {
			character_event = { id = ambition.102 days = 1 random = 3 tooltip = made_a_friend }
		}
	}
	option = { # Rebuff him
		name = EVTOPTBambition.101
		FROM = {
			character_event = { id = ambition.103 days = 1 random = 3 tooltip = didnt_made_a_friend }
		}
	} 	
}
# Councillor tries to befriend liege - Friends
character_event = {
	id = ambition.102
	desc = EVTDESCambition.102
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		add_friend = FROM
	}
}
# Councillor tries to befriend liege - Sad
character_event = {
	id = ambition.103
	desc = EVTDESCambition.103
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = SO_BE_IT
		opinion = { modifier = opinion_sad who = FROM years = 2 }
	}
}
# Ruler tries to befriend a courtier
character_event = {
	id = ambition.110
	desc = EVTDESCambition.110
	picture = GFX_evt_courtiers_talking
	
	prisoner = no
	min_age = 25
	capable_only = yes
	only_rulers = yes
	
	trigger = {
		has_ambition = obj_make_a_friend
		in_command = no
		OR = {
			AND = {
				is_female = no
				any_courtier = {
					in_command = no
					is_female = no
					prisoner = no
					age = 15
					NOT = { trait = incapable }
					NOT = { num_of_friends = 2 }
					NOT = { is_friend = ROOT }
					NOT = { is_rival = ROOT }
				}
			}
			AND = {
				is_female = yes
				any_courtier = {
					is_female = yes
					prisoner = no
					age = 15
					NOT = { trait = incapable }
					NOT = { num_of_friends = 2 }
					NOT = { is_friend = ROOT }
					NOT = { is_rival = ROOT }
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 60
		modifier = { factor = 0.85 trait = gregarious }
		modifier = { factor = 0.75 liege = { tier = duke } }
	}
	
	option = { # Let's talk to him
		name = EVTOPTAambition.110
		ai_chance = { factor = 95 }
		if = { # If male ruler, make friends with man
			limit = { is_female = no }
			random_courtier = {
				limit = {
					in_command = no
					is_female = no
					prisoner = no
					age = 15
					NOT = { trait = incapable }
					NOT = { num_of_friends = 2 }
					NOT = { is_friend = ROOT }
					NOT = { is_rival = ROOT }
				}
				character_event = { id = ambition.111 days = 1 random = 3 tooltip = attempt_to_make_friend }
			}
		}
		if = { # If female ruler, make friends with woman
			limit = { is_female = yes }
			random_courtier = {
				limit = {
					is_female = yes
					prisoner = no
					age = 15
					NOT = { trait = incapable }
					NOT = { num_of_friends = 2 }
					NOT = { is_friend = ROOT }
					NOT = { is_rival = ROOT }
				}
				character_event = { id = ambition.111 days = 1 random = 3 tooltip = attempt_to_make_friend }
			}
		}
	}
	option = { # Maybe later
		name = EVTOPTBambition.110
		ai_chance = { factor = 5 }
		random = {
			chance = 5
			add_trait = shy
			hidden_tooltip = { character_event = { id = 38263 } }
		}
	}
}
# Ruler tries to befriend a courtier - Courtier responds
character_event = {
	id = ambition.111
	desc = EVTDESCambition.111
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = { # Make Friends
		name = EVTOPTAambition.111
		ai_chance = {
			factor = 75
			modifier = { factor = 0.1 NOT = { opinion = { who = LIEGE value = -25 } } }
		}
		add_friend = FROM
		FROM = {
			character_event = { id = ambition.112 days = 1 random = 3 tooltip = made_a_friend }
		}
	}
	option = { # Rebuff him
		name = EVTOPTBambition.111
		ai_chance = {
			factor = 25 
			modifier = { factor = 0.1 opinion = { who = LIEGE value = 25 } }
		}
		FROM = {
			character_event = { id = ambition.113 days = 1 random = 3 tooltip = didnt_made_a_friend }
		}
	}
}
# Ruler tries to befriend a courtier - Friends
character_event = {
	id = ambition.112
	desc = EVTDESCambition.112
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		add_friend = FROM
	}
}
# Ruler tries to befriend a courtier - Sad
character_event = {
	id = ambition.113
	desc = EVTDESCambition.113
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = SO_BE_IT
		opinion = { modifier = opinion_sad who = FROM years = 2 }
	}
}
# Duelist tries to befriend liege
character_event = {
	id = ambition.120
	desc = EVTDESCambition.120
	picture = GFX_evt_courtiers_talking
	
	prisoner = no
	min_age = 25
	capable_only = yes
	only_men = yes
	
	trigger = {
		OR = {
			has_ambition = obj_make_a_friend
			liege = { has_ambition = obj_make_a_friend }
		}
		in_command = no
		trait = duelist
		independent = no
		
		host = {
			is_liege_of = ROOT
		}
		
		liege = {
			age = 25
			prisoner = no
			in_command = no
			is_female = no
			NOT = { trait = incapable }
			NOT = {
				num_of_friends = 2
			}
			NOT = { is_friend = ROOT }
			NOT = { is_rival = ROOT }
			NOT = {
			lifestyle_traits = 1
			}
			NOT = {
				has_character_flag = LE_ST
			}
		}
		
		opinion = { who = LIEGE value = 10 }

	} 		

	mean_time_to_happen = {
		months = 260
		
		modifier = {
			factor = 0.85
			trait = gregarious
		}
		
		modifier = {
			factor = 0.65
			liege = { is_close_relative = ROOT }
		}
		
		modifier = {
			factor = 0.75
			liege = {
				tier = count
			}
		}
		
		modifier = {
			factor = 0.85
			liege = {
				tier = duke
			}
		}
		
		modifier = {
			factor = 0.55
			liege = {
				has_ambition = obj_make_a_friend
			}
		}
		
		modifier = {
			factor = 0.85
				opinion = { who = LIEGE value = 75 }
		}
	}
	
	option = { # Let's talk to him
		name = EVTOPTAambition.120
		ai_chance = { factor = 95 }
		liege = {
			character_event = {
				id = ambition.121
				days = 1
				random = 3
				tooltip = attempt_to_make_friend
			}
		}
	}
	option = { # Maybe later
		name = EVTOPTBambition.120
		ai_chance = { factor = 5 }
		random = {
			chance = 5
			add_trait = shy
			hidden_tooltip = { character_event = { id = 38263 } }
		}
	}
}
# Duelist tries to befriend liege - Liege responds
character_event = {
	id = ambition.121
	desc = EVTDESCambition.121
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = { # Make Friends
		name = EVTOPTAambition.121
		add_friend = FROM
		add_trait = duelist
		FROM = {
			character_event = { id = ambition.122 days = 1 random = 3 tooltip = made_a_friend }
		}
	}
	option = { # Rebuff him
		name = EVTOPTBambition.121
		FROM = {
			character_event = { id = ambition.123 days = 1 random = 3 tooltip = didnt_made_a_friend }
		}
	} 	
}
# Duelist tries to befriend liege - Friends
character_event = {
	id = ambition.122
	desc = EVTDESCambition.122
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		add_friend = FROM
	}
}
# Duelist tries to befriend liege - Sad
character_event = {
	id = ambition.123
	desc = EVTDESCambition.123
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = SO_BE_IT
		opinion = { modifier = opinion_sad who = FROM years = 2 }
	}
}
# Two courtier friendship
character_event = {
	id = ambition.130
	desc = EVTDESCambition.130
	picture = GFX_evt_courtiers_talking
	
	prisoner = no
	min_age = 25
	capable_only = yes
	
	trigger = {
		has_ambition = obj_make_a_friend
		in_command = no
		independent = no
		host = { is_liege_of = ROOT }
		
		liege = {
			OR = {
				AND = {
					is_female = no
					any_courtier = {
						in_command = no
						is_female = no
						prisoner = no
						age = 15
						NOT = { character = ROOT }
						NOT = { trait = incapable }
						NOT = { num_of_friends = 2 }
						NOT = { is_friend = ROOT }
						NOT = { is_rival = ROOT }
					}
				}
				AND = {
					is_female = yes
					any_courtier = {
						is_female = yes
						age = 15
						prisoner = no
						NOT = { character = ROOT }
						NOT = { character = ROOT }
						NOT = { trait = incapable }
						NOT = { num_of_friends = 2 }
						NOT = { is_friend = ROOT }
						NOT = { is_rival = ROOT }
					}
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 260
		modifier = { factor = 0.85 trait = gregarious }
		modifier = { factor = 0.75 liege = { tier = count } }
		modifier = { factor = 0.85 liege = { tier = duke } }
	}
	
	option = { # Let's talk to him
		name = EVTOPTAambition.130
		ai_chance = { factor = 95 }
		liege = {
			if = { # If male, make friends with man
				limit = { is_female = no }
				random_courtier = {
					limit = {
						in_command = no
						is_female = no
						prisoner = no
						age = 15
						NOT = { character = ROOT }
						NOT = { trait = incapable }
						NOT = { num_of_friends = 2 }
						NOT = { is_friend = ROOT }
						NOT = { is_rival = ROOT }
					}
					character_event = { id = ambition.131 days = 1 random = 3 tooltip = attempt_to_make_friend }
				}
			}
			if = { # If female, make friends with woman
				limit = { is_female = yes }
				random_courtier = {
					limit = {
						is_female = yes
						prisoner = no
						age = 15
						NOT = { character = ROOT }
						NOT = { trait = incapable }
						NOT = { num_of_friends = 2 }
						NOT = { is_friend = ROOT }
						NOT = { is_rival = ROOT }
					}
					character_event = { id = ambition.131 days = 1 random = 3 tooltip = attempt_to_make_friend }
				}
			}
		}
	}
	option = { # Maybe later
		name = EVTOPTAambition.130
		ai_chance = { factor = 5 }
		random = {
			chance = 5
			add_trait = shy
			hidden_tooltip = { character_event = { id = 38263 } }
		}
	}
}
# Two courtier friendship - Other courtier responds
character_event = {
	id = ambition.131
	desc = EVTDESCambition.131
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = { # Make Friends
		name = EVTOPTAambition.131
		ai_chance = { factor = 75 }
		add_friend = FROM
		FROM = {
			character_event = { id = ambition.132 days = 1 random = 3 tooltip = made_a_friend }
		}
	}
	option = { # Rebuff him
		name = EVTOPTBambition.131
		ai_chance = { factor = 25 }
		FROM = {
			character_event = { id = ambition.133 days = 1 random = 3 tooltip = didnt_made_a_friend }
		}
	} 	
}
# Two courtier friendship - Friends
character_event = {
	id = ambition.132
	desc = EVTDESCambition.132
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = EXCELLENT
		add_friend = FROM
	}
}
# Two courtier friendship - Sad
character_event = {
	id = ambition.133
	desc = EVTDESCambition.133
	picture = GFX_evt_courtiers_talking
	
	is_triggered_only = yes
	
	option = {
		name = SO_BE_IT
		opinion = { modifier = opinion_sad who = FROM years = 2 }
	}
} 
