﻿namespace = sc_council_exclusive_events

sc_council_exclusive_events.0001 = {
	type = activity_event
	title = sc_council_exclusive_events.0001.t
	desc = sc_council_exclusive_events.0001.desc
	theme = diplomacy
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				is_vassal_of = involved_activity.activity_host
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					is_vassal_of = involved_activity.activity_host
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = scheme
	}

	right_portrait = {
		character = scope:guest_target
		animation = interested
	}

	option = {
		name = sc_council_exclusive_events.0001.a
		ai_chance = { base = 50 modifier = { factor = 2.0 has_trait = gregarious } }
		add_opinion = { target = scope:guest_target modifier = friendly_opinion }
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = friendly_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0001.b
		ai_chance = { base = 50 modifier = { factor = 2.0 has_trait = cynical } }
		add_prestige = minor_prestige_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = suspicious_opinion } 
		}
	}
}

sc_council_exclusive_events.0002 = {
	type = activity_event
	title = sc_council_exclusive_events.0002.t
	desc = sc_council_exclusive_events.0002.desc
	theme = intrigue
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = anger
	}

	right_portrait = {
		character = scope:guest_target
		animation = fear
	}

	option = {
		name = sc_council_exclusive_events.0002.a
		ai_chance = { base = 75 modifier = { factor = 2.0 has_trait = wrathful } }
		add_dread = minor_dread_gain
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = intimidated_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0002.b
		ai_chance = { base = 25 modifier = { factor = 2.0 has_trait = shy } }
		add_opinion = { target = scope:guest_target modifier = furious_opinion }
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = furious_opinion } 
		}
	}
}

sc_council_exclusive_events.0003 = {
	type = activity_event
	title = sc_council_exclusive_events.0003.t
	desc = sc_council_exclusive_events.0003.desc
	theme = stewardship
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		gold >= 50
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				is_vassal_of = involved_activity.activity_host
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					is_vassal_of = involved_activity.activity_host
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = happiness
	}

	right_portrait = {
		character = scope:guest_target
		animation = scheme
	}

	option = {
		name = sc_council_exclusive_events.0003.a
		ai_chance = { base = 60 modifier = { factor = 2.0 has_trait = greedy } }
		remove_short_term_gold = minor_gold_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_gold = minor_gold_value 
			add_opinion = { target = root modifier = grateful_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0003.b
		ai_chance = { base = 40 modifier = { factor = 2.0 has_trait = generous } }
		add_prestige = minor_prestige_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = insulted_opinion } 
		}
	}
}

sc_council_exclusive_events.0004 = {
	type = activity_event
	title = sc_council_exclusive_events.0004.t
	desc = sc_council_exclusive_events.0004.desc
	theme = learning
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				is_vassal_of = involved_activity.activity_host
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					is_vassal_of = involved_activity.activity_host
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = storyteller
	}

	right_portrait = {
		character = scope:guest_target
		animation = thinking
	}

	option = {
		name = sc_council_exclusive_events.0004.a
		ai_chance = { base = 70 modifier = { factor = 2.0 has_trait = content } }
		add_learning_lifestyle_xp = minor_lifestyle_xp
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = impressed_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0004.b
		ai_chance = { base = 30 modifier = { factor = 2.0 has_trait = impatient } }
		add_stress = minor_stress_loss
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = annoyed_opinion } 
		}
	}
}

sc_council_exclusive_events.0005 = {
	type = activity_event
	title = sc_council_exclusive_events.0005.t
	desc = sc_council_exclusive_events.0005.desc
	theme = diplomacy
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = toast_goblet
	}

	right_portrait = {
		character = scope:guest_target
		animation = toast_goblet
	}

	option = {
		name = sc_council_exclusive_events.0005.a
		ai_chance = { base = 50 modifier = { factor = 2.0 has_trait = calm } }
		add_stress = minor_stress_loss
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_stress = minor_stress_loss
			add_opinion = { target = root modifier = friendly_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0005.b
		ai_chance = { base = 50 modifier = { factor = 2.0 has_trait = arrogant } }
		add_prestige = minor_prestige_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = impressed_opinion } 
		}
	}
}

sc_council_exclusive_events.0006 = {
	type = activity_event
	title = sc_council_exclusive_events.0006.t
	desc = sc_council_exclusive_events.0006.desc
	theme = diplomacy
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				is_vassal_of = involved_activity.activity_host
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					is_vassal_of = involved_activity.activity_host
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = dismissal
	}

	right_portrait = {
		character = scope:guest_target
		animation = shock
	}

	option = {
		name = sc_council_exclusive_events.0006.a
		ai_chance = { base = 80 modifier = { factor = 2.0 has_trait = arrogant } }
		add_prestige = minor_prestige_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = humiliated_opinion }
			if = {
				limit = { is_in_guest_subset = { name = supporter } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = supporter target = scope:guest_target }
							add_to_guest_subset = { name = detractor target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0006.b
		ai_chance = { base = 20 modifier = { factor = 2.0 has_trait = compassionate } }
		add_stress = minor_stress_loss
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = scope:guest_target modifier = angry_opinion } 
		}
	}
}

sc_council_exclusive_events.0007 = {
	type = activity_event
	title = sc_council_exclusive_events.0007.t
	desc = sc_council_exclusive_events.0007.desc
	theme = diplomacy
	window = event_window
	override_background = ep3_relaxing_room

	trigger = {
		is_able_to_interact = yes
		NOT = { has_character_flag = interacted_with_vassal_recently }
		OR = {
			this = involved_activity.activity_host
			this = involved_activity.special_guest:the_pretender
		}
		involved_activity = {
			any_attending_character = {
				NOT = { this = involved_activity.activity_host }
				NOT = { this = involved_activity.special_guest:the_pretender }
				is_ai = yes
				NOT = { has_character_flag = interacted_recently }
			}
		}
	}

	immediate = {
		add_character_flag = { flag = interacted_with_vassal_recently days = 7 }
		involved_activity = {
			random_attending_character = {
				limit = {
					NOT = { this = involved_activity.activity_host }
					NOT = { this = involved_activity.special_guest:the_pretender }
					is_ai = yes
					NOT = { has_character_flag = interacted_recently }
				}
				save_scope_as = guest_target
			}
		}
	}

	left_portrait = {
		character = root
		animation = personality_honorable
	}

	right_portrait = {
		character = scope:guest_target
		animation = admiration
	}

	option = {
		name = sc_council_exclusive_events.0007.a
		ai_chance = { base = 60 modifier = { factor = 2.0 has_trait = just } }
		add_diplomacy_lifestyle_xp = minor_lifestyle_xp
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = loyal_opinion }
			if = {
				limit = { is_in_guest_subset = { name = detractor } }
				hidden_effect = {
					random = {
						chance = 30
						if = {
							limit = { diplomacy >= 20 }
							add_opinion = { target = root modifier = friendly_opinion }
						}
						scope:activity = {
							remove_from_guest_subset = { name = detractor target = scope:guest_target }
							add_to_guest_subset = { name = supporter target = scope:guest_target }
						}
					}
				}
			}
		}
	}

	option = {
		name = sc_council_exclusive_events.0007.b
		ai_chance = { base = 40 modifier = { factor = 2.0 has_trait = ambitious } }
		add_prestige = minor_prestige_value
		scope:guest_target = { 
			council_vassal_interaction_effect = yes
			add_opinion = { target = root modifier = impressed_opinion } 
		}
	}
}