namespace = rumours

################################################
# Scoiatael supporter
################################################
# Any courtier - Suspect a courtier being a Scoiatael supporter
character_event = {
	id = rumours.1
	desc = EVTDESCrumours.1
	picture = GFX_evt_whispers
	
	is_triggered_only = yes
	
	min_age = 15
	capable_only = yes
	prisoner = no
	
	trigger = {
		intrigue = 10
		is_ruler = no
		NOT = { has_character_flag = rumour_spreader }
		any_courtier = {
			prisoner = no
			NOT = { has_character_flag = suspected_squirrel }
			age = 15
			NOT = { reverse_opinion = { who = ROOT value = 50 } }
			OR = {
				trait = paranoid
				trait = deceitful
				trait = cynical
			}
			OR = {
				trait = elf_race
				trait = halfelf_race
				trait = dwarf_race
				trait = halfdwarf_race
				trait = halfling_race
				trait = halfhalfling_race
				trait = gnome_race
				trait = halfgnome_race
			}
			NOT = { trait = scoiatael_leader }
		}
	}
	
	weight_multiplier = {
		days = 1
		modifier = { factor = 2 trait = deceitful }
		modifier = { factor = 2 intrigue = 15 }
		modifier = { factor = 2 intrigue = 20 }
		modifier = { factor = 0.01 trait = elf_race }
		modifier = { factor = 0.01 trait = dwarf_race }
		modifier = { factor = 0.01 trait = halfling_race }
		modifier = { factor = 0.01 trait = gnome_race }

	}
	
	immediate = {
		set_character_flag = rumour_spreader
	}
	
	option = { # Confront
		name = EVTOPTArumours.1
		ai_chance = {
			factor = 10
		}
		random_courtier = {
			limit = {
				prisoner = no
				NOT = { has_character_flag = suspected_squirrel }
				age = 15
				NOT = { reverse_opinion = { who = ROOT value = 50 } }
				OR = {
					trait = paranoid
					trait = deceitful
					trait = cynical
				}
				OR = {
					trait = elf_race
					trait = halfelf_race
					trait = dwarf_race
					trait = halfdwarf_race
					trait = halfling_race
					trait = halfhalfling_race
					trait = gnome_race
					trait = halfgnome_race					
				}
				NOT = { trait = scoiatael_leader }
			}
			character_event = { id = rumours.2 days = 3 tooltip = EVTTOOLTIPrumours.2 }
		}
	}
	option = { # Spread rumors
		name = EVTOPTBrumours.1
		ai_chance = {
			factor = 50
		}
		random_courtier = {
			limit = {
				prisoner = no
				NOT = { has_character_flag = suspected_squirrel }
				age = 15
				NOT = { reverse_opinion = { who = ROOT value = 50 } }
				OR = {
					trait = paranoid
					trait = deceitful
					trait = cynical
				}
				OR = {
					trait = elf_race
					trait = halfelf_race
					trait = dwarf_race
					trait = halfdwarf_race
					trait = halfling_race
					trait = halfhalfling_race
					trait = gnome_race
					trait = halfgnome_race
				}
				NOT = { trait = scoiatael_leader }
			}
			set_character_flag = suspected_squirrel
			character_event = { id = rumours.3 days = 3 tooltip = EVTTOOLTIPrumours.3 }
		}
	}
	option = { # Blackmail
		name = EVTOPTCrumours.1
		ai_chance = {
			factor = 40
		}
		random_courtier = {
			limit = {
				prisoner = no
				NOT = { has_character_flag = suspected_squirrel }
				age = 15
				NOT = { reverse_opinion = { who = ROOT value = 50 } }
				OR = {
					trait = paranoid
					trait = deceitful
					trait = cynical
				}
				OR = {
					trait = elf_race
					trait = halfelf_race
					trait = dwarf_race
					trait = halfdwarf_race
					trait = halfling_race
					trait = halfhalfling_race
					trait = gnome_race
					trait = halfgnome_race
				}
				NOT = { trait = scoiatael_leader }
			}
			character_event = { id = rumours.4 days = 3 tooltip = EVTTOOLTIPrumours.4 }
		}
	}
}
# Suspected courtier - Confronted
character_event = {
	id = rumours.2
	desc = EVTDESCrumours.2
	picture = GFX_evt_whispers
	
	is_triggered_only = yes
	
	option = { #Deny
		name = EVTOPTArumours.2
		set_character_flag = suspected_squirrel
		FROM = {
			opinion = { modifier = denied_squirrel_rumour who = ROOT years = 3 }
		}
	}
	option = { #Embrace
		name = EVTOPTBrumours.2
		liege = {
			opinion = { modifier = embraced_squirrel_rumour who = ROOT years = 3 }
		}
	}
}
#Suspected courtier - Rumors spread
character_event = {
	id = rumours.3
	desc = EVTDESCrumours.3
	picture = GFX_evt_scandal
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTArumours.3
		any_courtier = {
			limit = { trait = human_race }
			opinion = { modifier = suspected_squirrel_rumour who = ROOT years = 3 }
		}
	}
}
# Suspected courtier - Blackmailed
character_event = {
	id = rumours.4
	desc = EVTDESCrumours.4
	picture = GFX_evt_whispers
	
	is_triggered_only = yes
	
	option = { # Pay
		name = EVTOPTArumours.4
		ai_chance = {
			factor = 50
			modifier = { factor = 2 treasury = 50 }
		}
		treasury = -50
		FROM = { treasury = 50 }
		opinion = { modifier = opinion_angry who = FROM years = 5 }
	}
	option = { # Don't pay
		name = EVTOPTBrumours.4
		ai_chance = {
			factor = 50
			modifier = { factor = 2 NOT = { treasury = 50 } }
		}
		opinion = {
			modifier = opinion_angry
			who = FROM
			years = 5
		}
		any_courtier = {
			limit = { trait = human_race }
			opinion = { modifier = suspected_squirrel_rumour who = ROOT years = 3 }
		}	
	}
}
# Ruler - Suspect a courtier being a Scoiatael supporter
character_event = {
	id = rumours.5
	desc = EVTDESCrumours.5
	picture = GFX_evt_whispers
	
	only_rulers = yes
	min_age = 15
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		intrigue = 10
		NOT = { has_character_flag = rumour_spreader }
		any_courtier = {
			prisoner = no
			NOT = { has_character_flag = suspected_squirrel }
			age = 15
			NOT = { reverse_opinion = { who = ROOT value = 50 } }
			OR = {
				trait = paranoid
				trait = deceitful
				trait = cynical
			}
			OR = {
				trait = elf_race
				trait = halfelf_race
				trait = dwarf_race
				trait = halfdwarf_race
				trait = halfling_race
				trait = halfhalfling_race
				trait = gnome_race
				trait = halfgnome_race
			}
			NOT = { trait = scoiatael_leader }
		}
	}
	
	weight_multiplier = {
		days = 1
		modifier = { factor = 2 trait = deceitful }
		modifier = { factor = 2 intrigue = 15 }
		modifier = { factor = 2 intrigue = 20 }
		modifier = { factor = 0.01 trait = elf_race }
		modifier = { factor = 0.01 trait = dwarf_race }
		modifier = { factor = 0.01 trait = halfling_race }
		modifier = { factor = 0.01 trait = gnome_race }
	}
	
	immediate = {
		set_character_flag = rumour_spreader
	}

	option = { # Confront
		name = EVTOPTArumours.5
		ai_chance = {
			factor = 10
		}
		random_courtier = {
			limit = {
				prisoner = no
				NOT = { has_character_flag = suspected_squirrel }
				age = 15
				NOT = { reverse_opinion = { who = ROOT value = 50 } }
				OR = {
					trait = paranoid
					trait = deceitful
					trait = cynical
				}
				OR = {
					trait = elf_race
					trait = dwarf_race
					trait = halfling_race
					trait = gnome_race
				}
				NOT = { trait = scoiatael_leader }
			}
			character_event = { id = rumours.6 days = 3 tooltip = EVTTOOLTIPrumours.6 }
		}
	}
	option = { # Spread rumors
		name = EVTOPTBrumours.5
		ai_chance = {
			factor = 50
		}
		random_courtier = {
			limit = {
				prisoner = no
				NOT = { has_character_flag = suspected_squirrel }
				age = 15
				NOT = { reverse_opinion = { who = ROOT value = 50 } }
				OR = {
					trait = paranoid
					trait = deceitful
					trait = cynical
				}
				OR = {
					trait = elf_race
					trait = dwarf_race
					trait = halfling_race
					trait = gnome_race
				}
				NOT = { trait = scoiatael_leader }
			}
			set_character_flag = suspected_squirrel
			character_event = { id = rumours.3 days = 3 tooltip = EVTTOOLTIPrumours.3 }
		}
	}
}
# Suspected courtier - Confronted
character_event = {
	id = rumours.6
	desc = EVTDESCrumours.6
	picture = GFX_evt_whispers
	
	is_triggered_only = yes
	
	option = { # Deny
		name = EVTOPTArumours.6
		set_character_flag = suspected_squirrel
		FROM = {
			opinion = { modifier = denied_squirrel_rumour who = ROOT years = 3 }
		}
	}
	option = { #Embrace
		name = EVTOPTBrumours.6
		FROM = {
			opinion = { modifier = embraced_squirrel_rumour who = ROOT years = 3 }
		}
	}
}
# Suspected courtier - Spend time with humans to stop suspicion
character_event = {
	id = rumours.7
	desc = EVTDESCrumours.7
	picture = GFX_evt_courtiers_talking
	
	capable_only = yes
	prisoner = no
	
	trigger = {
		has_character_flag = suspected_squirrel
		liege = {
			any_courtier = {
				trait = human_race
				ai = yes
			}
		}
	}
	
	mean_time_to_happen = {
		months = 60
	}
	
	option = {
		name = EVTOPTArumours.7
		prestige = -50
		random = {
			chance = 10
			liege = {
				random_courtier = {
					limit = {
						trait = human_race
						ai = yes
					}
					add_friend = ROOT
				}
			}
		}
		clr_character_flag = suspected_squirrel
	}
	option = {
		name = EVTOPTBrumours.7
	}
}
# Suspected courtier - Stop being deceitful
character_event = {
	id = rumours.8
	desc = EVTDESCrumours.8
	picture = GFX_evt_courtiers_talking
	
	capable_only = yes
	prisoner = no
	
	trigger = {
		has_character_flag = suspected_squirrel
		trait = deceitful
	}
	
	mean_time_to_happen = {
		months = 60
	}
	
	option = {
		name = EVTOPTArumours.8
		remove_trait = deceitful
		clr_character_flag = suspected_squirrel
		random_list = {
			50 = {
				add_trait = honest
			}
			25 = {
				add_trait = stressed
			}
			25 = {
				add_trait = arbitrary
			}
		}
	}
	option = {
		name = EVTOPTBrumours.8
	}
}
# Suspected courtier - Stop being paranoid
character_event = {
	id = rumours.9
	desc = EVTDESCrumours.9
	picture = GFX_evt_courtiers_talking
	
	capable_only = yes
	prisoner = no
	
	trigger = {
		has_character_flag = suspected_squirrel
		trait = paranoid
	}
	
	mean_time_to_happen = {
		months = 60
	}
	
	option = {
		name = EVTOPTArumours.9
		remove_trait = paranoid
		clr_character_flag = suspected_squirrel
		random_list = {
			50 = {
				add_trait = trusting
			}
			25 = {
				add_trait = stressed
			}
			25 = {
				add_trait = arbitrary
			}
		}
	}
	option = {
		name = EVTOPTBrumours.9
	}
}

################################################
# Incompetence at work 
################################################
# Incompetence at work - Court Mage
character_event = {
	id = rumours.10
	desc = EVTDESCrumours.10
	picture = GFX_evt_whispers
	
	min_age = 15
	only_rulers = yes
	capable_only = yes
	prisoner = no
	
	is_triggered_only = yes
	
	trigger = {
		intrigue = 10
		job_mage = {
			prisoner = no
			age = 15
			NOT = { learning = 12 }
			liege = {
				ROOT = {
					NOT = { has_opinion_modifier = { who = PREV modifier = opinion_unappreciated } }
				}
			}
		}
	}
	
	weight_multiplier = {
		days = 1
		modifier = { factor = 2 trait = deceitful }
		modifier = { factor = 2 intrigue = 15 }
		modifier = { factor = 2 intrigue = 20 }
	}
	
	option = {
		name = EVTOPTArumours.10
		ai_chance = {
			factor = 10
		}
		job_mage = {
			character_event = { id = rumours.11 tooltip = EVTTOOLTIPrumours.11 }
		}
	}
	
	option = {
		name = EVTOPTBrumours.10
		ai_chance = {
			factor = 50
		}
		job_mage = {
			character_event = { id = rumours.12 days = 3 tooltip = EVTTOOLTIPrumours.12 }
		}
	}
	
	option = {
		name = EVTOPTCrumours.10
		trigger = {
			job_mage = { treasury = 20 }
		}
		treasury = 20
		job_mage = {
			treasury = -20
			opinion = { modifier = opinion_money_stolen who = ROOT years = 5 }
		}
	}
}
# Court Mage
character_event = {
	id = rumours.11
	desc = EVTDESCrumours.11
	picture = GFX_evt_whispers
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTArumours.11
		opinion = { modifier = opinion_unappreciated who = FROM years = 5 }
		random = { chance = 25 change_learning = 1 }
	}
}
#Incompetence - Court Mage Notification
character_event = {
	id = rumours.12
	desc = EVTDESCrumours.12
	picture = GFX_evt_scandal
	
	is_triggered_only = yes
	
	option = {
		name = EVTOPTArumours.12
		any_courtier = {
			opinion = { modifier = opinion_ruler_do_not_trust_him who = ROOT years = 5 }
		}
	}
}
