# Events for the travel portion of the Tour grand activity

namespace = tour_travel

############################
## Tour Travel Events
## 1000-2999
## by James Beaumont
############################
# tour_travel.1001 - Local peasants are talking about how much they hate the royals
# tour_travel.1002 - Pass by a particularly pretty commoner by the roadside
# tour_travel.1003 - A peasant does not show you proper ettiquette
# tour_travel.1004 - You decide to wash the feet of locals, royal touch
# tour_travel.1005 - Locals beg for your royal touch, royal touch
# tour_travel.1006 - Distribute alms in front of a local temple
#
#
############################
## Tour Travel Events
## 3000-3999
## by Veronica Pazos
############################
# tour_travel.3110-3111 - Danger! Local ruler invites you to a banquet to steal from you
# tour_travel.3120 - Visit a local inn!
# tour_travel.3130 - A peasant complains they've lost their job
# tour_travel.3140 - Visit a local brothel!
#
#


#####################################################################################

############################
## Tour Travel Events
## 1000-2999
## by James Beaumont
############################

# Local peasants are talking about how much they hate the royals
tour_travel.1001 = {
	type = character_event
	title = tour_travel.1001.title
	desc = {
		desc = tour_travel.1001.desc.intro
		random_valid = {
			triggered_desc = {
				trigger = {
					NOT = { knows_language_of_culture = scope:angry_county_scope.culture }
				}
				desc = tour_travel.1001.desc.mid.wrong_language
			}
			triggered_desc = {
				trigger = {
					culture != scope:angry_county_scope.culture
				}
				desc = tour_travel.1001.desc.mid.wrong_culture
			}
			triggered_desc = {
				trigger = {
					faith != scope:angry_county_scope.faith
				}
				desc = tour_travel.1001.desc.mid.wrong_faith
			}
			triggered_desc = {
				trigger = {
					root.primary_title = {
						any_claimant = {
							house != root.house
						}
					}
				}
				desc = tour_travel.1001.desc.mid.pretender
			}
			triggered_desc = {
				trigger = {
					has_active_diarchy = yes
					diarchy_swing >= 50
				}
				desc = tour_travel.1001.desc.mid.powerful_diarch
			}
			desc = tour_travel.1001.desc.mid.just_plain_dislike_em
		}
		first_valid = {
			triggered_desc = {
				trigger = {
					should_be_naked_trigger = yes
				}
				desc = tour_travel.1001.desc.outro.nudist
			}
			desc = tour_travel.1001.desc.outro
		}
	}

	theme = travel_tour
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:angry_peasant
		animation = rage
		outfit_tags = { beggar_rags }
	}
	cooldown = { years = 2 }
	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		faith_forbids_alcohol_trigger = no # It should make sense that there is a tavern in this county
		root.location.county = { county_opinion <= -5 }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			root.location.county = {
				county_opinion <= -5
				NOT = {
					root = {
						knows_language_of_culture = prev.culture
					}
				}
			}
		}
	}

	immediate = {
		root.location = {
			save_scope_as = angry_county_scope
			save_scope_as = background_wilderness_scope # For theme
		}
		create_character = {
			location = scope:angry_county_scope
			template = drunken_peasant_character
			culture = scope:angry_county_scope.culture
			faith = scope:angry_county_scope.faith
			save_scope_as = angry_peasant
		}
		if = {
			limit = {
				root.primary_title = {
					any_claimant = {
						house != root.house
					}
				}
			}
			root.primary_title = {
				random_claimant = {
					limit = {
						house != root.house
					}
					save_scope_as = claimant_character_scope
				}
			}
		}
	}

	option = { # Punch your way out!
		name = tour_travel.1001.a
		trigger = {
			is_adult = yes
		}
		duel = {
			skill = prowess
			target = scope:angry_peasant
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
				}
				add_prestige = minor_prestige_gain
				scope:angry_county_scope.county = {
					add_county_modifier = {
						modifier = liege_respected_fighter_modifier
						years = 10
					}
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				increase_wounds_effect = { REASON = fight }
			}
			1 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				death = {
					killer = scope:angry_peasant
					death_reason = death_fight
				}
			}
		}
		if = {
			limit = { is_alive = yes }
			stress_impact = {
				brave = minor_stress_impact_loss
				craven = major_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				has_trait = craven
			}
			modifier = {
				add = -50
				NOR = {
					has_trait = arrogant
					has_trait = brave
				}
				root.prowess < scope:angry_peasant.prowess
			}
		}
	}

	option = { # Bribe them with lower taxes
		name = tour_travel.1001.b
		scope:angry_county_scope.county = {
			add_county_modifier = {
				modifier = reduced_taxes_modifier
				years = 10
			}
		}
		stress_impact = {
			callous = minor_stress_impact_gain
			craven = minor_stress_impact_loss
			greedy = major_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				has_trait = greedy
			}
		}
	}

	option = { # Attempt to convince them you're not you
		name = tour_travel.1001.c
		duel = {
			skill = intrigue
			target = scope:angry_peasant
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = 1
				}
				add_prestige = minor_prestige_gain
				if = {
					limit = {
						OR = {
							has_any_nickname = no
							has_bad_nickname = yes
						}
					}
					hidden_effect = {
						random_list = {
							80 = {

							}
							20 = {
								give_nickname = nick_the_nameless
							}
						}
					}
				}
			}
			10 = {
				compare_modifier = {
					value = scope:duel_value
					multiplier = -0.5
				}
				increase_wounds_effect = { REASON = fight }
			}
		}
		stress_impact = {
			brave = major_stress_impact_gain
			honest = major_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = honest
					has_trait = brave
				}
			}
		}
	}
	after = {
		scope:angry_peasant = { silent_disappearance_effect = yes }
	}
}

# Pass by a particularly pretty commoner by the roadside
tour_travel.1002 = {
	type = character_event
	title = tour_travel.1002.title
	desc = tour_travel.1002.desc

	theme = travel_tour
	left_portrait = {
		character = root
		animation = love
	}
	right_portrait = {
		character = scope:pretty_peasant
		animation = flirtation
		outfit_tags = { beggar_rags }
	}
	cooldown = { years = 2 }
	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		is_available_travelling_adult = yes 
		NOT = { has_trait = celibate }
		location = { is_sea_province = no }
		sexually_liberal_trigger = yes
		might_cheat_on_every_partner_trigger = yes
		NOT = { has_sexuality = asexual }
	}
	weight_multiplier = {
		base = 1
		modifier = { # Can still happen for others, but rarely
			factor = 0.1
			NOT = {
				has_activity_intent = lechery_intent
			}
		}
	}

	immediate = {
		add_character_flag = {
			flag = no_sex_stress_loss
			days = 30
		}
		root.location.county = {
			save_scope_as = pretty_peasant_county_scope
			save_scope_as = background_wilderness_scope
		}
		create_character = {
			location = scope:pretty_peasant_county_scope.title_province
			template = beautiful_peasant_character
			culture = scope:pretty_peasant_county_scope.culture
			faith = scope:pretty_peasant_county_scope.faith
			age = age_compared_to_root_minus_ten_always_adult
			gender_female_chance = root_attraction_based_female_chance
			save_scope_as = pretty_peasant
		}
		random_list = {
			10 = {
				trigger = {
					OR = {
						AND = {
							ROOT = { is_male = yes }
							scope:pretty_peasant = { is_female = yes }
						}
						AND = {
							ROOT = { is_female = yes }
							scope:pretty_peasant = { is_male = yes }
						}
					}
				}
				scope:pretty_peasant = { set_sexuality = heterosexual }
			}
			10 = {
				scope:pretty_peasant = { set_sexuality = bisexual }
			}
			10 = {
				trigger = {
					OR = {
						AND = {
							ROOT = { is_male = yes }
							scope:pretty_peasant = { is_male = yes }
						}
						AND = {
							ROOT = { is_female = yes }
							scope:pretty_peasant = { is_female = yes }
						}
					}
				}
				scope:pretty_peasant = { set_sexuality = homosexual }
			}
		}
	}

	option = { # She/he must be mine!
		name = tour_travel.1002.a
		set_relation_lover = scope:pretty_peasant
		had_sex_with_effect = {
			CHARACTER = scope:pretty_peasant
			PREGNANCY_CHANCE = 50
		}
		add_to_entourage_court_and_activity_effect = {
			CHAR_TO_ADD = scope:pretty_peasant 
			NEW_COURT_OWNER = root
		}
		scope:pretty_peasant = {
			add_character_flag = {
				flag = blocked_from_leaving
				years = 5
			}
		}
		if = {
			limit = {
				OR = {
					would_be_sinful_adulterer_trigger = yes
					relation_with_character_is_sodomy_in_faith_trigger = {
						CHARACTER = scope:pretty_peasant
						FAITH = root.faith
					}
				}
			}
			stress_impact = {
				craven = minor_stress_impact_gain
				honest = medium_stress_impact_gain
				chaste = major_stress_impact_gain
				lustful = major_stress_impact_loss
				zealous = major_stress_impact_gain
			}
		}
		else = {
			stress_impact = {
				craven = minor_stress_impact_gain
				honest = medium_stress_impact_gain
				chaste = major_stress_impact_gain
				lustful = major_stress_impact_loss
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				has_trait = chaste
			}
			modifier = {
				add = -50
				would_be_sinful_adulterer_trigger = yes
				relation_with_character_is_sodomy_in_faith_trigger = {
					CHARACTER = scope:pretty_peasant
					FAITH = root.faith
				}
				has_trait = zealous
			}
		}
	}

	option = { # Pass them by
		name = tour_travel.1002.b
		scope:pretty_peasant = { silent_disappearance_effect = yes }
		stress_impact = {
			callous = minor_stress_impact_gain
			craven = minor_stress_impact_loss
			honest = minor_stress_impact_loss
			disloyal = minor_stress_impact_gain
			lustful = major_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				has_trait = lustful
			}
		}
	}
}

# A peasant does not show you proper ettiquette
tour_travel.1003 = {
	type = character_event
	title = tour_travel.1003.title
	desc = tour_travel.1003.desc

	theme = travel_tour
	left_portrait = {
		character = root
		animation = schadenfreude
	}
	right_portrait = {
		character = scope:rude_peasant
		animation = fear
		outfit_tags = { beggar_rags }
	}
	cooldown = { years = 2 }
	trigger = {
		has_activity_intent = justice_intent
		is_location_valid_for_travel_event_on_land = yes
		root.location.county = {
			county_opinion <= -5
			county_control <= 90
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_trait = sadistic
		}
		modifier = {
			factor = 0.5
			has_trait = compassionate

		}
	}

	immediate = {
		root.location.county = {
			save_scope_as = angry_county_scope
			save_scope_as = background_wilderness_scope # For theme
		}
		create_character = {
			location = scope:angry_county_scope.title_province
			template = peasant_character
			culture = scope:angry_county_scope.culture
			faith = scope:angry_county_scope.faith
			gender_female_chance = root_faith_dominant_gender_adjusted_female_chance
			save_scope_as = rude_peasant
		}
	}

	option = { # She/he must be punished.
		name = tour_travel.1003.a
		add_tyranny = minor_tyranny_gain
		add_dread = medium_dread_gain
		scope:angry_county_scope = {
			change_county_control = 5
			add_county_modifier = {
				modifier = scared_of_liege_modifier
				years = 10
			}
		}
		stress_impact = {
			sadistic = medium_stress_impact_loss
			arrogant = minor_stress_impact_loss
			base = minor_stress_impact_gain
			just = minor_stress_impact_gain
			humble = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = just
					has_trait = humble
					has_trait = forgiving
					has_trait = compassionate
				}
			}
		}
	}

	option = { # Punish them *a lot*
		name = tour_travel.1003.b
		trigger = {
			has_trait = torturer
		}
		add_tyranny = medium_tyranny_gain
		add_dread = major_dread_gain
		scope:angry_county_scope = {
			change_county_control = 20
			add_county_modifier = {
				modifier = terrified_of_liege_modifier
				years = 10
			}
		}
		scope:rude_peasant = {
			death = {
				killer = root
				death_reason = death_torture
			}
		}
		stress_impact = {
			sadistic = major_stress_impact_loss
			arrogant = minor_stress_impact_loss
			base = minor_stress_impact_gain
			just = minor_stress_impact_gain
			humble = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			compassionate = massive_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = arrogant
					has_trait = arbitrary
				}
			}
		}
	}

	option = { # Let it slide
		name = tour_travel.1003.c
		add_prestige = minor_prestige_loss
		add_dread = medium_dread_loss
		stress_impact = {
			forgiving = minor_stress_impact_loss
			callous = minor_stress_impact_gain
			craven = minor_stress_impact_loss
			arbitrary = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
			sadistic = major_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = arrogant
					has_trait = arbitrary
				}
			}
		}
	}
	after = {
		if = {
			limit = {
				scope:rude_peasant = { is_alive = yes }
			}
			scope:rude_peasant = { silent_disappearance_effect = yes }
		}
	}
}

# You decide to wash the feet of locals, royal touch
tour_travel.1004 = {
	type = character_event
	title = tour_travel.1004.title
	desc = {
		desc = tour_travel.1004.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion }
				}
				desc = tour_travel.1004.desc.outro.christian
			}
			desc = tour_travel.1004.desc.outro
		}
	}

	theme = travel_tour
	cooldown = { years = 2 }
	left_portrait = {
		character = root
		animation = fear
	}
	right_portrait = {
		character = scope:diseased_peasant
		animation = flirtation
		outfit_tags = { beggar_rags }
	}
	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		has_activity_intent = altruism_intent
		faith = { religion_tag = christianity_religion }
		is_governor = no
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_trait = compassionate
		}
		modifier = {
			factor = 2
			has_trait = zealous
		}
		modifier = { # This is heavily based on Christian things so other faiths should not necessarily be excluded, but should be less likely to see it.
			factor = 0.1
			NOT = {
				religion = { is_in_family = rf_abrahamic }
			}
		}
		modifier = { # The faith should not be selfish
			factor = 0
			faith = {
				OR = {
					trait_is_virtue = callous
					trait_is_virtue = sadistic
					trait_is_virtue = arrogant
				}
			}
		}
	}

	immediate = {
		root.location = {
			select_root_vegetable_effect = yes
			county = {
				save_scope_as = diseased_county_scope
				save_scope_as = background_wilderness_scope # For theme
			}
		}
		create_character = {
			location = scope:diseased_county_scope.title_province
			template = diseased_peasant_character
			culture = scope:diseased_county_scope.culture
			faith = scope:diseased_county_scope.faith
			gender_female_chance = 50
			save_scope_as = diseased_peasant
		}
	}

	option = { # Wash the dirty dirty feet of the diseased peasant
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_deviant_trigger = yes }
						desc = tour_travel.1004.a.tarantino
					}
					desc = tour_travel.1004.a
				}
			}
		}
		add_prestige = minor_prestige_loss
		add_piety = medium_piety_gain
		random = {
			chance = 5
			show_as_tooltip = { add_trait = ill }
			hidden_effect = {
				trigger_event = {
					id = health.1001
					days = { 3 10 }
				}
			}
		}
		scope:diseased_county_scope = {
			change_county_control = 5
			add_county_modifier = {
				modifier = sacred_touch
				years = 10
			}
		}
		stress_impact = {
			base = minor_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
			deviant = major_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
		}
	}

	option = { # I could do this every day
		name = tour_travel.1004.b
		trigger = {
			is_deviant_trigger = yes
			matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:diseased_peasant CHARACTER_2 = root }
		}
		add_prestige = medium_prestige_loss
		add_piety = medium_piety_gain
		random = {
			chance = 5
			show_as_tooltip = { add_trait = ill }
			hidden_effect = {
				trigger_event = {
					id = health.1001
					days = { 3 10 }
				}
			}
		}
		scope:diseased_county_scope = {
			change_county_control = 5
			add_county_modifier = {
				modifier = sacred_touch
				years = 10
			}
		}
		set_relation_lover = scope:diseased_peasant
		add_courtier = scope:diseased_peasant
		stress_impact = {
			base = minor_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
			paranoid = medium_stress_impact_gain
			deviant = massive_stress_impact_loss
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
					has_trait = paranoid
				}
			}
		}
	}

	option = { # Just a light touch on the forehead
		name = tour_travel.1004.c
		add_piety = minor_piety_gain
		scope:diseased_county_scope = {
			change_county_control = 2
			add_county_modifier = {
				modifier = sacred_touch
				years = 2
			}
		}
		stress_impact = {
			compassionate = minor_stress_impact_loss
			callous = minor_stress_impact_gain
			arrogant = minor_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0.5
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
			modifier = {
				factor = 0.5
				OR = {
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}

	option = { # I will not be reduced to touching filthy peasants
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { is_vegetarian_trigger = yes }
						desc = tour_travel.1004.d.two_veg
					}
					desc = tour_travel.1004.d.meat
				}
			}
		}
		add_piety = minor_piety_loss
		stress_impact = {
			forgiving = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}
	after = {
		if = {
			limit = {
				scope:diseased_peasant = {
					is_alive = yes
					employer != root
				}
			}
			scope:diseased_peasant = { silent_disappearance_effect = yes }
		}
	}
}

# Locals beg for your royal touch, royal touch
tour_travel.1005 = {
	type = character_event
	title = tour_travel.1005.title
	desc = tour_travel.1005.desc

	theme = travel_tour
	left_portrait = {
		character = root
		animation = personality_compassionate
	}
	cooldown = { years = 2 }
	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		has_activity_intent = altruism_intent 
		faith = { religion_tag = christianity_religion }
		is_governor = no
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_trait = compassionate
		}
		modifier = {
			factor = 2
			has_trait = zealous
		}
	}

	immediate = {
		root.location.county = {
			save_scope_as = county_to_bless_scope
		}
	}

	option = { # Hand out blessed coins
		name = tour_travel.1005.a
		remove_short_term_gold = medium_gold_value
		add_piety = medium_piety_gain
		scope:county_to_bless_scope = {
			add_county_modifier = {
				modifier = sacred_touch
				years = 10
			}
		}
		stress_impact = {
			profligate = medium_stress_impact_loss
			greedy = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
			modifier = {
				add = -50
				short_term_gold < medium_gold_value
			}
		}
	}

	option = { # Sprinkle the locals with blessed water
		name = tour_travel.1005.b
		add_piety = minor_piety_gain
		scope:county_to_bless_scope = {
			change_county_control = 5
			add_county_modifier = {
				modifier = sacred_touch
				years = 5
			}
		}
		stress_impact = {
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
		}
	}

	option = { # Ride ahead!
		name = tour_travel.1005.c
		add_piety = minor_piety_loss
		stress_impact = {
			greedy = minor_stress_impact_loss
			humble = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}
}

# Distribute alms in front of a local temple
tour_travel.1006 = {
	type = character_event
	title = tour_travel.1006.title
	desc = tour_travel.1006.desc

	theme = travel_tour
	override_background =  {
		reference = temple 
	}

	left_portrait = {
		character = root
		animation = personality_compassionate
	}
	cooldown = { years = 2 }

	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		root.location.barony = {
			title_province = { has_holding_type = church_holding }
		}
		has_activity_intent = altruism_intent
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_trait = compassionate
		}
		modifier = {
			factor = 2
			has_trait = zealous
		}
	}

	immediate = {
		root.location.barony = {
			county = { save_scope_as = county_to_bless_scope }
			holder = { save_scope_as = county_holder_to_bless_scope }
			save_scope_as = church_barony_scope # For loc
		}
	}

	option = { # Hand out blessed coins
		name = tour_travel.1006.a
		remove_short_term_gold = medium_gold_value
		add_piety = medium_piety_gain
		scope:county_to_bless_scope = {
			add_county_modifier = {
				modifier = alms_distributed
				years = 10
			}
		}
		stress_impact = {
			profligate = medium_stress_impact_loss
			greedy = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
			modifier = {
				add = -50
				short_term_gold < medium_gold_value
			}
		}
	}

	option = { # Give them nothing
		name = tour_travel.1006.b
		add_piety = minor_piety_loss
		stress_impact = {
			greedy = minor_stress_impact_loss
			humble = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}

	option = { # Have the peasants thrown off the steps
		name = tour_travel.1006.c
		trigger = {
			OR = {
				has_trait = sadistic
				has_trait = callous
			}
		}
		add_piety = medium_piety_loss
		stress_impact = {
			callous = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			greedy = minor_stress_impact_loss
			humble = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}
}

############################
## Wise Woman chain
## 1007-1009
############################
# An attendee in your procession suggests seeing the Wise Woman/Man of CountyName
tour_travel.1007 = {
	type = character_event
	title = tour_travel.1007.title
	desc = {
		desc = tour_travel.1007.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_illness = yes
				}
				desc = tour_travel.1007.desc.mid.ill
			}
			triggered_desc = {
				trigger = {
					has_trait = pregnant
				}
				desc = tour_travel.1007.desc.mid.pregnant
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = depressed
						has_trait = lunatic
						has_trait = possessed
					}
				}
				desc = tour_travel.1007.desc.mid.psychological
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = wounded
						has_trait = maimed
						has_trait = infirm
					}
				}
				desc = tour_travel.1007.desc.mid.weakened
			}
			triggered_desc = {
				trigger = {
					has_trait = beauty_bad
				}
				desc = tour_travel.1007.desc.mid.ugly
			}
		}
		desc = tour_travel.1007.desc.outro
	}

	theme = travel_tour
	left_portrait = {
		character = root

		triggered_animation = {
			trigger = {
				has_any_illness = yes
			}
			animation = pain
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:superstituous_courtier_scope
		animation = personality_compassionate
	}
	cooldown = { years = 2 }

	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		root.location.barony = {
			county = {
				development_level <= 5
			}
			title_province = {
				OR = { # The location is somewhat remote
					terrain = wetlands
					terrain = forest
					terrain = jungle
					terrain = taiga
					terrain = mountains
					terrain = desert
					terrain = desert_mountains
					terrain = steppe
				}
			}
		}
		OR = { # There is something "wrong" with you or you're gregnant
			has_any_illness = yes
			has_trait = pregnant
			has_trait = depressed
			has_trait = lunatic
			has_trait = possessed
			has_trait = wounded
			has_trait = maimed
			has_trait = infirm
			has_trait = beauty_bad
		}
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_any_illness = yes
		}
	}

	immediate = {
		random_courtier = {
			save_scope_as = superstituous_courtier_scope
		}
		root.location.barony = {
			save_scope_as = wise_woman_barony_scope # For loc
			save_scope_as = background_wilderness_scope # For theme
		}
		create_character = {
			location = scope:wise_woman_barony_scope.title_province
			template = wise_woman_character
			culture = scope:wise_woman_barony_scope.culture
			faith = scope:wise_woman_barony_scope.faith
			save_scope_as = wise_woman_scope
		}
	}

	option = { # Go see the wise woman
		name = tour_travel.1007.a
		remove_short_term_gold = minor_gold_value
		custom_tooltip = {
			text = go_see_wise_woman_tt
			random_list = {
				65 = { # The wise woman is good and helpful
					modifier = { # You're a cynic and less likely to believe her
						has_trait = cynical
						add = -25
					}
					trigger_event = tour_travel.1008
				}
				35 = { # The wise woman is a total crackpot
					trigger_event = tour_travel.1009
				}
			} 
		}
		stress_impact = {
			stubborn = minor_stress_impact_gain # I'm fine!
			craven = minor_stress_impact_gain # I'm afraid of doctors!
			shy = minor_stress_impact_gain # I'm afraid of everyone!
			paranoid = medium_stress_impact_gain
			cynical = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		if = {
			limit = {
				NOT = {
					faith = { has_doctrine_parameter = witchcraft_accepted }
				}
			}
			stress_impact = {
				zealous = medium_stress_impact_gain
			}
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = stubborn
					has_trait = craven
					has_trait = shy
					has_trait = paranoid
					has_trait = cynical
					has_trait = arrogant
					AND = {
						NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } }
						has_trait = zealous
					}
				}
			}
			modifier = {
				add = -50
				short_term_gold < minor_gold_value
			}
		}
	}

	option = { # F that
		name = tour_travel.1007.b
		stress_impact = {
			base = minor_stress_impact_gain
			humble = minor_stress_impact_gain
			brave = medium_stress_impact_gain
			trusting = medium_stress_impact_gain
			gregarious = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = humble
					has_trait = brave
					has_trait = trusting
					has_trait = gregarious
				}
			}
		}
	}
}
# You feel helped by the wise woman
scripted_effect positive_wise_woman_healing_effect = {
	if = {
		limit = {
			has_any_illness = yes
		}
		add_character_modifier = healed_by_wise_woman_modifier
	}
	else_if = {
		limit = {
			has_trait = pregnant
		}
		add_character_modifier = tended_by_wise_woman_modifier
	}
	else_if = {
		limit = {
			OR = {
				has_trait = depressed
				has_trait = lunatic
				has_trait = possessed
			}
		}
		add_character_modifier = balanced_by_wise_woman_modifier
	}
	else_if = {
		limit = {
			has_trait = beauty_bad
		}
		add_character_modifier = makeover_from_wise_woman_modifier
	}
}
tour_travel.1008 = {
	type = character_event
	title = tour_travel.1008.title
	desc = {
		desc = tour_travel.1008.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					has_any_illness = yes
				}
				desc = tour_travel.1008.desc.mid.ill
			}
			triggered_desc = {
				trigger = {
					has_trait = pregnant
				}
				desc = tour_travel.1008.desc.mid.pregnant
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = depressed
						has_trait = lunatic
						has_trait = possessed
					}
				}
				desc = tour_travel.1008.desc.mid.psychological
			}
			triggered_desc = {
				trigger = {
					OR = {
						has_trait = wounded
						has_trait = maimed
						has_trait = infirm
					}
				}
				desc = tour_travel.1008.desc.mid.weakened
			}
			triggered_desc = {
				trigger = {
					has_trait = beauty_bad
				}
				desc = tour_travel.1008.desc.mid.ugly
			}
		}
		desc = tour_travel.1008.desc.outro
	}

	theme = travel_tour
	left_portrait = {
		character = root
		animation = happiness
	}
	right_portrait = {
		character = scope:wise_woman_scope
		animation = personality_rational
	}

	immediate = {
		if = {
			limit = {
				employs_court_position = court_physician_court_position
			}
			random_court_position_holder = {
				type = court_physician_court_position
				save_scope_as = current_physician
			}
		}
	}

	option = { # Go see the wise woman
		name = tour_travel.1008.a
		positive_wise_woman_healing_effect = yes
		stress_impact = {
			base = medium_stress_impact_loss
			cynical = minor_stress_impact_gain # This breaks my idea of what medicine is
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				
			}
		}
	}

	option = { # Recruit her as your physician
		name = tour_travel.1008.b
		positive_wise_woman_healing_effect = yes
		remove_treasury_or_gold = minor_treasury_or_gold_value
		add_courtier = scope:wise_woman_scope
		court_position_grant_effect = {
			POS = court_physician
			CANDIDATE = scope:wise_woman_scope
			EMPLOYER = root
		}
		stress_impact = {
			base = medium_stress_impact_loss
			cynical = medium_stress_impact_gain
			greedy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = cynical
					has_trait = greedy
				}
			}
			modifier = {
				add = 50
				NOT = { employs_court_position = court_physician_court_position }
			}
			modifier = {
				add = -50
				short_term_treasury_or_gold < minor_treasury_or_gold_value
			}
		}
	}
}
# You feel that the Wise Woman did nothing
tour_travel.1009 = {
	type = character_event
	title = tour_travel.1009.title
	desc = {
		desc = tour_travel.1009.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = {
					has_character_modifier = hurt_by_wise_woman_modifier
				}
				desc = tour_travel.1009.desc.mid.ill
			}
			triggered_desc = {
				trigger = {
					has_character_modifier = bad_makeover_from_wise_woman_modifier
				}
				desc = tour_travel.1009.desc.mid.ugly
			}
			desc = tour_travel.1009.desc.mid.nothing
		}
		desc = tour_travel.1009.desc.outro
	}

	theme = travel_tour
	left_portrait = {
		character = root
		animation = rage
	}
	right_portrait = {
		character = scope:wise_woman_scope
		animation = personality_irrational
	}

	immediate = {
		random_list = {
			50 = {
				# Wise Woman actively hurts you
				if = {
					limit = {
						OR = {
							has_any_illness = yes
							has_trait = depressed
							has_trait = lunatic
							has_trait = possessed
							has_trait = pregnant
							has_trait = wounded
							has_trait = maimed
							has_trait = infirm
						}
					}
					add_character_modifier = hurt_by_wise_woman_modifier
				}
				else_if = {
					limit = {
						has_trait = beauty_bad
					}
					add_character_modifier = bad_makeover_from_wise_woman_modifier
				}
			}
			50 = {
				# Nothing happens
			}
		}
	}

	option = {
		name = tour_travel.1009.a
		stress_impact = {
			base = medium_stress_impact_loss
			cynical = major_stress_impact_loss
		}
		ai_chance = {
			base = 50
		}
	}

	option = { # Have her executed!
		name = tour_travel.1009.b
		scope:wise_woman_scope = {
			death = {
				killer = root
				death_reason = death_execution
			}
		}
		stress_impact = {
			callous = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			just = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
		}
		ai_chance = {
			base = 50
			modifier = {
				factor = 0
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = just
				}
			}
		}
	}
}

##################################################
# Visit an inn along the way 
# by Veronica Pazos
# 3120
##################################################

scripted_trigger tour_travel_3120_valid_vassal = {
	is_available_ai_adult = yes
	any_memory = { }
}

tour_travel.3120 = {
	type = character_event
	title = tour_travel.3120.t
	desc = {
		desc = tour_travel.3120.desc.intro
		first_valid = {
			triggered_desc = {
				trigger = { has_variable = inn_artifact_var }
				desc = tour_travel.3120.desc.artifact
			}
			desc = tour_travel.3120.desc.fallback
		}
	}

	theme = travel_tour
	override_background = {
		reference = bp1_crossroads_inn
	}
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = callous
					has_trait = sadistic
					has_trait = impatient
					has_trait = arrogant
				}
			}
			animation = boredom
		}
		animation = drink_goblet
	}
	cooldown = { years = 5 }

	right_portrait = {
		character = scope:vassal_inn
		animation = throne_room_conversation_1
	}
	artifact = {
		target = scope:vassal_artifact
		position = lower_center_portrait
		trigger = { has_variable = inn_artifact_var }
	}

	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		has_activity_intent = reduce_stress_intent
		is_adult = yes
		any_pool_character = {
			province = root.location
			tour_travel_3120_valid_vassal = yes
		}			
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			OR = {
				has_trait = drunkard
				has_trait = lifestyle_reveler
			}
		}
	}

	immediate = {
		random_pool_character = {
			province = root.location
			limit = { tour_travel_3120_valid_vassal = yes }
			weight = {
				base = 1
				modifier = {
					add = 2
					is_powerful_vassal = yes
				}
				modifier = {
					add = 2
					has_any_high_skill_rating = yes
				}
				modifier = {
					add = 1
					any_memory = { has_memory_category = major }
				}
			}
			save_scope_as = vassal_inn
			random_memory = {
				weight = {
					base = 1
					modifier = {
						add = 1
						has_memory_category = major
					}
				}
				save_scope_as = vassal_memory
			}
		}
		scope:vassal_inn = { get_quirk_character_effect = yes } #localization
		if = {
			limit = {
				scope:vassal_inn = { any_character_artifact = { exists = yes } }
			}
			random = {
				chance = 50
				set_variable = inn_artifact_var
				scope:vassal_inn = {
					random_character_artifact = { save_scope_as = vassal_artifact }
				}
			}
		}
	}

	option = { # I like you join me
		name = tour_travel.3120.a
		duel = {
			skill = diplomacy
			target = scope:vassal_inn
			50 = { #they join you!
				desc = tour_travel.3120.a.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				send_interface_toast = {
					title = tour_travel.3120.a.success
					left_icon = scope:vassal_inn
					add_courtier = scope:vassal_inn
				}
			}
			50 = { #they refuse
				desc = tour_travel.3120.a.failure
				send_interface_toast = {
					title = tour_travel.3120.a.failure
					left_icon = scope:vassal_inn
					scope:vassal_inn = {
						add_opinion = {
							target = root
							modifier = flattered_opinion
							opinion = 5
						}
					}
				}
			}
		}
			
		stress_impact = {
			profligate = medium_stress_impact_loss
			greedy = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			arrogant = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = sadistic
					has_trait = callous
					has_trait = arrogant
				}
			}
		}
	}

	option = { # I wanna learn from you
		name = tour_travel.3120.b 
		if = {
			limit = {
				scope:vassal_inn = { intrigue >= high_skill_rating }
			}
			add_intrigue_skill = 1
		}
		else_if = {
			limit = {
				scope:vassal_inn = { diplomacy >= high_skill_rating }
			}
			add_diplomacy_skill = 1
		}
		else_if = {
			limit = {
				scope:vassal_inn = { martial >= high_skill_rating }
			}
			add_martial_skill = 1
		}
		else_if = {
			limit = {
				scope:vassal_inn = { learning >= high_skill_rating }
			}
			add_learning_skill = 1
		}
		else_if = {
			limit = {
				scope:vassal_inn = { stewardship >= high_skill_rating }
			}
			add_stewardship_skill = 1
		}
		else = {
			add_random_skill_point_effect = yes
		}
		stress_impact = {
			greedy = minor_stress_impact_loss
			humble = minor_stress_impact_gain
			compassionate = medium_stress_impact_gain
			zealous = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}

	option = { # They give you something
		name = tour_travel.3120.c
		trigger = {
			has_variable = inn_artifact_var
		}
		scope:vassal_artifact = {
			set_owner = root
		}
		stress_impact = {
			callous = medium_stress_impact_loss
			sadistic = medium_stress_impact_loss
			greedy = minor_stress_impact_loss
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
		}
	}
	
	after = {
		remove_variable = inn_artifact_var
	}
}

##################################################
# A peasant complains about not having a job
# by Veronica Pazos
# 3130
##################################################

scripted_trigger tour_travel_3130_valid_vassal = {
	is_available_ai_adult = yes
}

scripted_trigger tour_travel_3130_valid_location = {
	OR = {
		has_building_or_higher = hunting_grounds_01
		has_building_or_higher = royal_garden_01
		has_building_or_higher = regimental_grounds_01
		has_building_or_higher = caravanserai_01
		has_building_or_higher = watermills_01
		has_building_or_higher = windmills_01
	}
}

tour_travel.3130 = {
	type = character_event
	title = tour_travel.3130.t
	desc = {
		desc = tour_travel.3130.desc.intro
		random_valid = {
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							has_building_or_higher = hunting_grounds_01
							has_building_or_higher = royal_garden_01
							has_building_or_higher = regimental_grounds_01
						}
					}
				}
				desc = tour_travel.3130.desc.no_farms
			}
			triggered_desc = {
				trigger = {
					location = {
						OR = {
							has_building_or_higher = caravanserai_01
							has_building_or_higher = watermills_01
							has_building_or_higher = windmills_01
						}
					}
				}
				desc = tour_travel.3130.desc.no_jobs
			}
		}
		desc = tour_travel.3130.desc.outro
	}

	theme = travel_tour
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = callous
					has_trait = sadistic
					has_trait = impatient
					has_trait = arrogant
				}
			}
			animation = dismissal
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = humble
					has_trait = generous
				}
			}
			animation = personality_compassionate
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:complaining_peasant
		animation = beg
	}
	cooldown = { years = 2 }

	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		location = { tour_travel_3130_valid_location = yes }
		any_pool_character = {
			province = root.location
			tour_travel_3130_valid_vassal = yes
		}			
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			has_activity_intent = justice_intent
		}
	}

	immediate = {
		random_pool_character = {
			province = root.location
			limit = { tour_travel_3130_valid_vassal = yes }
			save_scope_as = complaining_peasant
		}
	}

	option = { # Im sorry have some money
		name = tour_travel.3130.a
		pay_short_term_gold = {
			target = scope:complaining_peasant
			gold = minor_gold_value
		}
		if = {
			limit = {
				has_activity_intent = altruism_intent
			}
			add_piety = medium_piety_gain
		}
		add_piety = minor_piety_gain
		stress_impact = {
			profligate = medium_stress_impact_loss
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
			greedy = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = greedy
					has_trait = sadistic
					has_trait = callous
				}
			}
			modifier = {
				factor = 2
				OR = {
					has_activity_intent = altruism_intent
					has_trait = profligate
				}
			}
		}
	}

	option = { # You can come work my lands
		name = tour_travel.3130.b 
		trigger = {
			has_activity_intent = justice_intent
		}
		custom_tooltip = available_because_intent_tt
		capital_province.county = {
			add_county_modifier = {
				modifier = peasant_influx_modifier
				years = 10
			}
		}
		add_hook = {
			type = loyalty_hook
			target = scope:complaining_peasant
		}
		stress_impact = {
			callous = medium_stress_impact_gain
			sadistic = medium_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_trait = zealous
				}
			}
			modifier = {
				factor = 2
				has_activity_intent = justice_intent
			}
		}
	}
	
	option = { # F you lol
		name = tour_travel.3130.c
		
		stress_impact = {
			generous = medium_stress_impact_gain
			humble = medium_stress_impact_gain
			compassionate = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = generous
					has_trait = humble
					has_trait = compassionate
					has_activity_intent = altruism_intent
				}
			}
		}
	}
}

##################################################
# Stop to visit a brothel
# by Veronica Pazos
# 3140
##################################################

scripted_trigger tour_travel_3140_valid_character = {
	is_available_ai_adult = yes
	is_attracted_to_gender_of = root
	root = { is_attracted_to_gender_of = prev }
	is_married = no
	NOT = { has_sexuality = asexual }
	NOR = {
		has_trait = chaste
		has_trait = celibate
	}
}

tour_travel.3140 = {
	type = character_event
	title = tour_travel.3140.t
	desc = tour_travel.3140.desc

	theme = travel_tour
	left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = callous
					has_trait = sadistic
					has_trait = impatient
					has_trait = arrogant
				}
			}
			animation = flirtation_left
		}
		triggered_animation = {
			trigger = {
				OR = {
					has_trait = compassionate
					has_trait = forgiving
					has_trait = humble
					has_trait = generous
				}
			}
			animation = personality_compassionate
		}
		animation = personality_rational
	}
	right_portrait = {
		character = scope:brothel_worker
		animation = flirtation
	}
	override_background = { reference = bp1_crossroads_inn }
	cooldown = { months = 3 }

	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		has_activity_intent = lechery_intent
		is_adult = yes
		NOT = { has_sexuality = asexual }
	}

	weight_multiplier = {
		base = 1
		modifier = {
			factor = 2
			OR = {
				has_trait = lustful
				has_trait = rakish
			}
		}
	}

	immediate = {
		if = {
			limit = {
				any_pool_character = {
					province = root.location
					tour_travel_3140_valid_character = yes
				}
			}
			random_pool_character = {
				province = root.location
				limit = { tour_travel_3140_valid_character = yes }
				save_scope_as = brothel_worker
			}
		}
		else = {
			create_character = {
				template = generic_peasant_character
				gender_female_chance = root_sexuality_female_chance
				location = root.location
				culture = root.location.culture
				faith = root.location.faith
				dynasty = none
				save_scope_as = brothel_worker
			}
		}
		scope:brothel_worker = { get_quirk_character_effect = yes } #localization
	}

	option = { # Go
		name = tour_travel.3140.a
		add_piety = minor_piety_loss
		add_character_modifier = {
			modifier = brothel_stop_modifier
			months = 3
		}
		hidden_effect = {
			random_list = {
				50 = {
					trigger = {
						is_attracted_to_men = yes
					}
					had_sex_with_unknown_effect = {
						GENDER = male
					}
				}
				50 = {
					trigger = {
						is_attracted_to_women = yes
					}
					had_sex_with_unknown_effect = {
						GENDER = female
					}
				}
			}
		}
		stress_impact = {
			base = medium_stress_impact_loss
			lustful = medium_stress_impact_loss
			chaste = major_stress_impact_gain
			celibate = massive_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = chaste
					has_trait = celibate
				}
			}
			modifier = {
				factor = 0.5
				has_trait = zealous
			}
		}
	}

	option = { # Don't go
		name = tour_travel.3140.b 
		add_piety = minor_piety_gain
		stress_impact = {
			lustful = medium_stress_impact_gain
			rakish = major_stress_impact_gain
		}
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				OR = {
					has_trait = lustful
					has_trait = rakish
				}
			}
		}
	}
}

##################################################
# Danger! Ghino di Tacco-ish local ruler invites you to a banquet before stealing from you, then he confesses there are not that many options here to survive and needs money for his family and subjects. Changed the story so much that's almost unrecognisible, apologies.
# by Veronica Pazos
# 3110-3111
##################################################
tour_travel.3110 = { 
	type = character_event
	title = tour_travel.3110.t
	desc = tour_travel.3110.desc
	theme = travel_danger
    left_portrait = {
		character = root
		animation = personality_rational
	}
	right_portrait = {
		character = scope:ghino_di_tacco_scope
		animation = happiness
	}
    override_background = { reference = corridor_day }
    cooldown = { years = 2 }
	
	trigger = {
		is_location_valid_for_travel_event_on_land = yes
		location = {
			province_owner ?= { 
				is_available_ai_adult = yes
				NOR = {
					this = root
					is_liege_or_above_of = root
				}
			}
		}
		OR = {
			NOT = { exists = scope:activity }
			scope:activity = {
				NOT = { has_activity_type = activity_tour }
			}
		}
    }
	
	weight_multiplier = {
		base = 1
	}
	
	immediate = {
		mp_delay_travel_plan = { DAYS = 90 }
		location = { save_scope_as = ghino_di_tacco_location }
		location.province_owner = { save_scope_as = ghino_di_tacco_scope }
		traveler_danger_xp_effect = {
			MIN = 3
			MAX = 6
		}
	}
	
    #Accept invite
	option = { 
		name = tour_travel.3110.a
		custom_tooltip = tour_travel.3110.a.tt
		play_music_cue = mx_cue_banquet
		trigger_event = tour_travel.3111
		stress_impact = {
			comfort_eater = minor_stress_loss
			drunkard = minor_stress_loss
			lifestyle_reveler = medium_stress_loss
			shy = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				add = -50
				has_trait = shy
			}
			modifier = {
				factor = 0
				has_trait = paranoid
			}
		}
    }
	
	#Deny
	option = {
		name = tour_travel.3110.b
		reverse_add_opinion = {
			target = scope:ghino_di_tacco_scope
			modifier = insult_opinion
			opinion = -20
		}
		stress_impact = {
			trusting = medium_stress_impact_gain
			gregarious = major_stress_impact_gain
			gluttonous = major_stress_impact_gain
			lifestyle_reveler = major_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_trait = trusting
			}
			modifier = {
				factor = 0
				has_trait = gluttonous
			}
			modifier = {
				factor = 0
				has_trait = gregarious
			}
			modifier = {
				factor = 0
				has_trait = lifestyle_reveler
			}
		}
	}
	
	#Accept and I shall provide the entertainment
	option = {
		name = tour_travel.3110.c
		custom_tooltip = tour_travel.3110.a.tt
		play_music_cue = mx_cue_banquet
		trigger = {
			current_travel_plan = {
				any_entourage_character = {
					has_court_position = court_jester_court_position
				}
			}
		}
		add_prestige = minor_prestige_gain
		trigger_event = tour_travel.3111
		stress_impact = {
			comfort_eater = minor_stress_loss
			drunkard = minor_stress_loss
			humble = minor_stress_impact_gain
			shy = minor_stress_impact_gain
			temperate = minor_stress_impact_gain
			paranoid = medium_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				add = -25
				has_trait = humble
			}
			modifier = {
				add = -50
				has_trait = shy
			}
			modifier = {
				add = -50
				has_trait = temperate
			}
			modifier = {
				factor = 0
				has_trait = paranoid
			}
		}
	}
	after = {
		mp_resume_travel_plan = yes
	}
}

scripted_trigger has_breaking_down_trait_trigger = {
	OR = {
		has_trait = craven
		has_trait = contrite
		has_trait = honest
		has_trait = just
		has_trait = loyal
		has_trait = gallant
		has_any_good_relationship_with_root_trigger = yes
	}
}

#Gentleman breaks down and confesses his plan
tour_travel.3111 = { 
	type = character_event
	title = tour_travel.3111.t
	desc = {
		desc = tour_travel.3111.desc_intro
		first_valid = {
			triggered_desc = {
				trigger = {
					scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes }
				}
				desc = tour_travel.3111.desc_breaking_down
			}
			triggered_desc = {
				trigger = {
					scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = no }
				}
				desc = tour_travel.3111.desc_committed
			}
		}
	}
		
	theme = travel
    left_portrait = {
		character = root
		triggered_animation = {
			trigger = {
				scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes }
				OR = {
					has_trait = wrathful
					has_trait = callous
					has_trait = vengeful
				}
			}
  			animation = anger
  		}
		triggered_animation = {
			trigger = {
				scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes }
			}
			animation = worry
		}
		animation = toast_goblet
	}
	right_portrait = {
		character = scope:ghino_di_tacco_scope
		triggered_animation = {
			trigger = { 
				has_breaking_down_trait_trigger = yes
			}
  			animation = grief
  		}
		animation = toast_goblet
	}
    override_background = { reference = feast }
    cooldown = { years = 10 }
	
	immediate = {
		play_music_cue = mx_cue_banquet
	}
	
    #Forgive and donate
	option = { 
		name = tour_travel.3111.a
		trigger = {
			scope:ghino_di_tacco_scope = {
				has_breaking_down_trait_trigger = yes
			}
		}
		pay_short_term_gold = {
			target = scope:ghino_di_tacco_scope
			gold = minor_gold_value
		}
		scope:ghino_di_tacco_location = {
			add_province_modifier = {
				modifier = generous_donations_modifier
				years = 10
			}
		}
		
		stress_impact = {
			greedy = medium_stress_impact_gain
			avaricious = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			callous = major_stress_impact_gain
			vengeful = major_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = greedy
			}
			modifier = {
				factor = 0
				has_trait = avaricious
			}
			modifier = {
				factor = 0
				has_trait = wrathful
			}
			modifier = {
				factor = 0
				has_trait = callous
			}
			modifier = {
				factor = 0
				has_trait = vengeful
			}
		}
    }
	
	#Forgive but leave
	option = {
		name = tour_travel.3111.b
		trigger = {
			scope:ghino_di_tacco_scope = {
				has_breaking_down_trait_trigger = yes
			}
		}
		reverse_add_opinion = {
			target = scope:ghino_di_tacco_scope
			modifier = grateful_opinion
			opinion = 20
		}
		stress_impact = {
			compassionate = medium_stress_impact_gain
			forgiving = medium_stress_impact_gain
			generous = medium_stress_impact_gain
			callous = medium_stress_impact_gain
			wrathful = medium_stress_impact_gain
			vengeful = major_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.25
				has_trait = compassionate
			}
			modifier = {
				factor = 0.25
				has_trait = generous
			}
			modifier = {
				factor = 0.5
				has_trait = forgiving
			}
			modifier = {
				factor = 0
				has_trait = avaricious
			}
			modifier = {
				factor = 0
				has_trait = wrathful
			}
			modifier = {
				factor = 0
				has_trait = callous
			}
			modifier = {
				factor = 0
				has_trait = vengeful
			}
		}
	}
	
	#Demand a compensation
	option = {
		name = tour_travel.3111.c
		trigger = {
			scope:ghino_di_tacco_scope = {
				has_breaking_down_trait_trigger = yes
			}
		}
		scope:ghino_di_tacco_scope = {
			pay_short_term_gold = {
				target = root
				gold = tiny_gold_value
			}
		}
		progress_towards_rival_effect = {
			REASON = rival_stole_from_me_banquet
			CHARACTER = scope:ghino_di_tacco_scope
			OPINION = default_rival_opinion
		}
		stress_impact = {
			humble = minor_stress_impact_gain
			calm = medium_stress_impact_gain
			compassionate = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			generous = major_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.25
				has_trait = humble
			}
			modifier = {
				factor = 0.25
				has_trait = calm
			}
			modifier = {
				factor = 0
				has_trait = compassionate
			}
			modifier = {
				factor = 0
				has_trait = forgiving
			}
			modifier = {
				factor = 0
				has_trait = generous
			}
		}
	}
	
	#You ask your guards to arrest him
	option = {
		name = tour_travel.3111.d
		trigger = {
			current_travel_plan = {
				has_travel_option = hire_experienced_mercenaries_option
			}
		}
		imprison_character_effect = {
			TARGET = scope:ghino_di_tacco_scope
			IMPRISONER = root
		}
		add_dread = minor_dread_gain
		stress_impact = {
			just = medium_stress_impact_gain
			calm = major_stress_impact_gain
			compassionate = major_stress_impact_gain
			forgiving = major_stress_impact_gain
			generous = major_stress_impact_gain
		}
		
		ai_chance = {
			base = 100
			modifier = {
				factor = 0
				has_trait = just
			}
			modifier = {
				factor = 0
				has_trait = calm
			}
			modifier = {
				factor = 0
				has_trait = compassionate
			}
			modifier = {
				factor = 0
				has_trait = forgiving
			}
			modifier = {
				factor = 0
				has_trait = generous
			}
		}
	}
	
	#He steals from you gottem
	option = {
		name = tour_travel.3111.e
		trigger = {
			scope:ghino_di_tacco_scope = {
				has_breaking_down_trait_trigger = no
			}
		}
		duel = {
			skill = intrigue
			target = scope:ghino_di_tacco_scope
			30 = { #you notice he's trying to steal
				desc = tour_travel.3111.e.success
				compare_modifier = {
					value = scope:duel_value
					multiplier = 3.5
				}
				send_interface_toast = {
					title = tour_travel.3111.e.success
					left_icon = scope:ghino_di_tacco_scope
					progress_towards_rival_effect = {
						REASON = rival_stole_from_me_banquet
						CHARACTER = scope:ghino_di_tacco_scope
						OPINION = default_rival_opinion
					}
				}
			}
			70 = { #he steals from you
				desc = tour_travel.3111.e.failure
				send_interface_toast = {
					title = tour_travel.3111.e.failure
					left_icon = scope:ghino_di_tacco_scope
					pay_short_term_gold = {
						target = scope:ghino_di_tacco_scope
						gold = minor_gold_value
					}
				}
			}
		}
		stress_impact = {
			base = medium_stress_impact_gain
			forgiving = minor_stress_impact_loss
		}
		
		ai_chance = {
			base = 100
			#default/fallback option
		}
	}
}
