﻿#EK NOTE: disabled events unused by us
# on_actions for the Coronation activity

#Prelude Phase
coronation_first_phase_host_events = {
	random_events = {
		50 = prelude_events.0001 # Regent likes you and tells everyone how great you are
		50 = prelude_events.0010 # Regent dislikes you and tells everyone how bad you are
		100 = prelude_events.0020 # There's a faction against you, try to get them to stop
		10 = prelude_events.0080 # Nice guest offers you skillful courtier
		75 = prelude_events.0090 # Nomadic Host: Your nomadic guest arrives with some herd
		50 = prelude_events.0110 # Different culture vassal asks you to say some words to them specifically
		25 = prelude_events.0120 # Cool guest gives you an artifact
		50 = prelude_events.0130 # officiator blesses your artifact
		#10 = prelude_events.0180 # You pray at the coronation chapel #EK DISABLED
		50 = prelude_events.0190 # Councillor that likes you encourages you
		50 = coronation_events_klank.1001 # Different clothing gfx vassals are talking suspiciously - Isolate Opponents intent
		75 = coronation_events_klank.1002 # Different clothing gfx vassals are talking - Empower Loyalist intent
		100 = coronation_events_klank.1003 # Your ancestor has executed your vassal's ancestor - Isolate Opponents intent
		30 = coronation_events_klank.1004 # You have 2+ kings at your coronation
		30 = coronation_events_klank.1005 # Independent duke+ guest wants revenge on a third party
		30 = coronation_events_klank.1008 # King from your dynasty attends your coronation
		10 = ach_coronation.0011 # You see some potential plotters whispering
		5 = ach_coronation.0012 # Vassals argue over coronation roles
		5 = ach_coronation.0013 # Eavesdrop on some peasants
		10 = ach_coronation.0020 # Close family member helps manage the coronation
		30 = ach_coronation.0023 # An exotic foreign warrior pledges themselves to you
		20 = feast_default_axel.1001 #Two adolescents are rummaging through your wine cellar.
		5 = coronation_events.1002 # Crown has disappeared!
		50 = coronation_events_klank.1009 # Coronation inside an Iberian or Persian struggle
		#EK EDIT: not used by us
		#50 = coronation_events_klank.1010 # Coronation inside Persian struggle
		15 = coronation_events_klank.1011 # Big Realm Reform

		5 = coronation_events.1007 # Two guests arguing to see who goes in first
		20 = coronation_events.1011 # Decide upon new bonuses for your crown
		30 = coronation_events.1020 #Clan vassals show their concerns during your coronation
		10 = coronation_events.1021 # Powerful taxman approaches host
		20 = coronation_events.1028 # Different faith blessing offer during the Coronation Ceremony
		20 = coronation_events.1029 # Discover some forgotten ancient rights
		10 = coronation_events.1030 # Scholar offers to include the coronation in their chronicle
		#20 = coronation_events.1031 # Host sets the tone for the choir #EK DISABLED
		10 = coronation_events.1032 # You prepare a grand gesture for the ceremony
		50 = coronation_events.1033 # Rival speaks up
		7 = coronation_events.1037 # some natural thing interpreted as an omen
		40 = coronation_events.6020 # Vassal asks for rights to attack a baddie
		30 = coronation_events.6150 # Chancellor offers to do big political maneuvers for you
		
		# Intent Events
		50 = prelude_events.0100 # Vassals ask you to build more in their realms
	}
}

#Prelude Phase
coronation_first_phase_guest_events = {
	random_events = {
		# Guest Exclusive
		75 = prelude_events.0030 # Your friend/lover is here!
		75 = prelude_events.0040 # Your rival is here!
		50 = prelude_events.0050 # Your family member is here!
		75 = prelude_events.0070 # Host offers you a seat in the council
		10 = prelude_events.0140 # Say some words about the host
		20 = prelude_events.0150 # Host introduces you to a cool guest
		30 = prelude_events.0160 # Guest of your dynasty is here!
		50 = prelude_events.0170 # You talk to a guest of a different faith
		1 = ach_coronation.0014 # You see opportunity to spark a riot
		50 = ach_coronation.0016 # You present the host with a gift
		10 = ach_coronation.0017 # faith_warrior reacts to the coronation of a non-crusader_king
		20 = ach_coronation.0018 # Close family member of Host sees opportunity to stand out
		100 = ach_coronation.0022 # A zealous vassal's faith in the host is shaken by the ongoing plague
		5 = coronation_events.1007 # Two guests arguing to see who goes in first
		150 = coronation_events.6010 #Rare Confederation coronation fiesta of friendliness
		100 = coronation_events.6000 #Rare Confederation coronation martial boost	
		75 = coronation_events_klank.1016 # You have a memory of coronation host when they were a childe
		5 = coronation_events.1034 # robe choosing event
		
		# Shared with Host
		25 = prelude_events.0080 # Guest/Host: Nice guest offers you skillful courtier
		#10 = prelude_events.0180 # You pray at the coronation chapel #EK DISABLED
		75 = coronation_events_klank.1009 # Coronation inside an Iberian or Persian struggle
		#EK EDIT: not used by us
		#75 = coronation_events_klank.1010 # Coronation inside Persian struggle
		
		# Intent events
		50 = prelude_events.0060 # The Beautiful Capital
		50 = guest_intent_coronation_events.0001 # Bear Witness
		50 = guest_intent_coronation_events.0010 # Offer Support
		50 = guest_intent_coronation_events.0020 # Advocate Domain
		50 = guest_intent_coronation_events.0030 # Profess Rights
		50 = guest_intent_coronation_events.0040 # Seize Advantages
		50 = guest_intent_coronation_events.0050 # Disrupt Loyalists

		chance_of_no_event = {
			value = 400
			if = {
				limit = {
					OR = {
						is_ai = no
						involved_activity = {
							is_target_in_variable_list = {
								name = major_supporter
								target = prev
							}					
						}
						involved_activity = {
							is_target_in_variable_list = {
								name = major_detractor
								target = prev
							}
						}
					}
				}
				subtract = 400
			}
		}
	}
}
#Banquet Phase
coronation_third_phase_host_events = {
	random_events = {
		9000 = dragon_fire.0002 # DB dragonfires event
		50 = feast_events_flavor.0001 # Dynasty member of someone you have a relation with approaches you
		50 = feast_events_flavor.0002 # You and a former rival reminisce
		50 = feast_default_jason.100 # You are stressed and your realm is at war
		5 = coronation_events.1000 # Bard disses you
		10 = coronation_events.1004 # Guest overhears some pretty secret conversation (feast shared event)
		50 = feast_default_joe.1010 # Guest agent to join your scheme
		3 = coronation_events.1012 # Main dish in the banquet is undercooked (feast shared event)
		5 = coronation_events.1013 # A torch accident sets something on fire (feast shared event)
		1 = coronation_events.1014 # Guests stampede over a rumor of food scarcity (feast shared event)
		10 = coronation_events.1015 # Friendly religious figure raises a toast in your name
		10 = coronation_events.1016 # You have the opportunity of raising a toast
		3 = coronation_events.1017 # Participants bring their local booze for you to try on
		5 = coronation_events.1018 # While arranging seats at the table, you make a decision about where your detractors will sit
		5 = coronation_events.1019 # You distribute gifts to your supporters at the feast
		10 = coronation_events.1022 # A supporter offers you a gift during the feast in exchange for better court clothing
		10 = coronation_events.1023 # Detractor makes a backhanded compliment in a toast
		20 = coronation_events.1024 # Foreign guest brings a gift of friendship
		1 = coronation_events.1025 # Two guests argue during the feast
		5 = coronation_events.1026 # You serve a cake at your coronation and someone finds the token!
		10 = coronation_events.1027 # A guest is highlighted during a celebratory coreography
		30 = feast_default_alex.100 # Someone reminds you of a positive memory you share
		20 = feast_default_alex.200 # There's a terrible plague in a nearby realm
		10 = ach_coronation.0029 # Guests offer to help get a hunt going

		# sad events
		10 = feast_mkc.0001 # Alone With a Memory (cat)
		
		# Government Exclusive Events
		40 = ach_coronation.0026 # Tribal: Struggle to hide a cold so that your tribal vassals don't take it as an omen
		40 = ach_coronation.0028 # Tribal: Drinking contest with a detractor

		#Self-triggered events
		5 = feast_default.2003 #I or they are a befriend target and we share traits
		10 = legend_spread_events.8150 # How did you get those scars?
		5 = feast_default.2006 #I am targeted by someone elses befriend or seduce intent
		1 = feast_default.1001 #A guest is impressed with your high learning
		1 = feast_default.1002 #You get grumpy because the food is late
		1 = feast_default.1003 #Someone is "impressed" with your high learning
		1 = feast_default.1004 #You enjoy the magnificent food
		1 = feast_default.1005 #Shy: You're having a hard time socializing
		3 = feast_default.1006 #Reveler is in their element
		2 = feast_default.1007 #Two Gluttons admire each other
		1 = feast_default.1008 #You reveal a secret about yourself
		1 = feast_default.1009 #You reveal a secret about someone else
		1 = feast_default.1010 #Promise someone a favor
		1 = feast_default.1011 #You get drunk and kill someone
		1 = feast_default.1012 #Sneaky murder of character you dislike
		1 = feast_default.1013 #Murder someone for attacking friend/lover/sibling
		1 = feast_default.1014 #Murder someone, one witness!
		1 = feast_default.1016 #Steal a trinket, maybe get a witness
		1 = feast_default.1020 #Dislike host, deface a displayed Court Artifact
		1 = feast_default.1030 #Minstrel performs a song about your acclaimed knights
		2 = feast_default.6501 #Someone says something with a lewd double-meaning
		#Target-triggered events
		1 = feast_default.2001 #Glutton gets angry waiting for food
		4 = feast_default.2002 #Someone sends you a secret love letter
		1 = feast_default.2003 #Bond with someone you have traits in common with
		1 = feast_default.2005 #Someone throws up on you
		2 = feast_default.2006 #Someone has a befriend/seduce scheme against you
		2 = feast_default.2007 #Two lovers are exposed
		1 = feast_default.2008 #Lustful secret homosexual discovered with a servant
		1 = feast_default.2009 #Learn a secret about someone else
		1 = feast_default.2010 #Learn a secret about someone else from a third party
		5 = feast_default.2011 #Someone makes grand promises to you
		1 = feast_default.2012 #Someone is murdered, you're a witness!
		4 = feast_default.2013 #Guest tries butter up to shared liege
		2 = feast_default.6111 #A guest rambles on and on
		2 = feast_default.6101 #Guest is having a hard time socializing
		2 = feast_default.6251 #Chance to become friend or rival
		5 = feast_events_klank.1001 #Two torturers discuss how to torture best
		2 = feast_default_axel.1001 #Two adolescents are rummaging through your wine cellar.
		#Relation events
		2 = feast_default.3001 #Have a good time with a friend
		2 = feast_default.3002 #A chance to exchange "kisses" with a Lover
		2 = feast_default.3003 #Altercation with a Rival
		2 = feast_default.3004 #Insult your rival
		1 = feast_default.3005 #Rival duel!
		1 = feast_default.3096 #Soiree with another attendee
		1 = feast_default.3007 #Caught committing adultery with a Lover
		#Warfare lifestyle events
		2 = feast_lifestyle.1001 #Have a heated argument over the best strategies
		2 = feast_lifestyle.1002 #Paint strategies in your food and make plans
		2 = feast_lifestyle.1003 #Strategise for a theoretical attack on the feast
		2 = feast_lifestyle.1004 #Ask others about their preferred strategies
		#Intrigue lifestyle events
		2 = feast_lifestyle.2001 #A guest is taught a lesson
		2 = feast_lifestyle.2002 #Make a guest reveal their secret
		2 = feast_lifestyle.2003 #Practice getting information out of people
		2 = feast_lifestyle.2004 #Practice seeing details
		#Admin gov events
		5 = ep3_powerful_families.8080
		5 = ep3_powerful_families.8090
		5 = ep3_powerful_families.8100
		# MPO Events
		5 = mpo_events_ariana.0040 # You flirt with someone unknown
		5 = feast_tsagaan_sar_events.0100 # Your gift was unaccounted for
		5 = feast_tsagaan_sar_events.0101 # You spot a cool horse
		5 = feast_tsagaan_sar_events.0200 # You're invited to play Shagai (gamble)
		5 = feast_tsagaan_sar_events.0210 # Someone gives tips on how to herd
		5 = feast_tsagaan_sar_events.0220 # You decide to settle a rivalry
		#5 = feast_tsagaan_sar_events.0230 # You witness someone throatsinging #EK DISABLED
		5 = feast_tsagaan_sar_events.0240 # You perform some throatsinging 
		5 = feast_tsagaan_sar_events.0260 # Someone is dressed very well
		1 = feast_tsagaan_sar_events.0270 # Drinking contest
		1 = feast_tsagaan_sar_events.0280 # Wisdom moment
		1 = feast_default_jason.100 # You are stressed and your realm is at war
		1 = feast_default_joe.1010 # Guest agent to join your scheme
	}
}
#Banquet Phase
coronation_third_phase_guest_events = {
	random_events = {
		20 = feast_events_flavor.0001 # Dynasty member of someone you have a relation with approaches you
		50 = feast_default_jason.100 # You are stressed and your realm is at war
		50 = coronation_events.1004 # Guest overhears some pretty secret conversation (feast shared event)
		50 = coronation_events.1012 # Main dish in the banquet is undercooked (feast shared event)
		50 = coronation_events.1013 # A torch accident sets something on fire (feast shared event)
		50 = coronation_events.1014 # Guests stampede over a rumor of food scarcity (feast shared event)
		10 = coronation_events.6030 # Horny king invites you to private sex romp
		10 = coronation_events.1036 # People are reciting verses in honor of the coronation

		# Shared with Host
		20 = ach_coronation.0025 # Propose getting the locals drunk too
		#10 = ach_coronation.0027 # An attendee brings some hashish

		# Intent Events - If they haven't happened at this point
		500 = guest_intent_coronation_events.0001 # Bear Witness
		500 = guest_intent_coronation_events.0010 # Offer Support
		500 = guest_intent_coronation_events.0020 # Advocate Domain
		500 = guest_intent_coronation_events.0030 # Profess Rights
		500 = guest_intent_coronation_events.0040 # Seize Advantages
		500 = guest_intent_coronation_events.0050 # Disrupt Loyalists

		# feast events

		#Self-triggered events
		10 = feast_default.2003 #I or they are a befriend target and we share traits
		10 = legend_spread_events.8150 # How did you get those scars?
		5 = feast_default.2006 #I am targeted by someone elses befriend or seduce intent
		1 = feast_default.1001 #A guest is impressed with your high learning
		1 = feast_default.1002 #You get grumpy because the food is late
		1 = feast_default.1003 #Someone is "impressed" with your high learning
		1 = feast_default.1004 #You enjoy the magnificent food
		1 = feast_default.1005 #Shy: You're having a hard time socializing
		3 = feast_default.1006 #Reveler is in their element
		2 = feast_default.1007 #Two Gluttons admire each other
		1 = feast_default.1008 #You reveal a secret about yourself
		1 = feast_default.1009 #You reveal a secret about someone else
		1 = feast_default.1010 #Promise someone a favor
		1 = feast_default.1011 #You get drunk and kill someone
		1 = feast_default.1012 #Sneaky murder of character you dislike
		1 = feast_default.1013 #Murder someone for attacking friend/lover/sibling
		1 = feast_default.1014 #Murder someone, one witness!
		1 = feast_default.1016 #Steal a trinket, maybe get a witness
		1 = feast_default.1020 #Dislike host, deface a displayed Court Artifact
		1 = feast_default.1030 #Minstrel performs a song about your acclaimed knights
		2 = feast_default.6501 #Someone says something with a lewd double-meaning
		#Target-triggered events
		1 = feast_default.2001 #Glutton gets angry waiting for food
		4 = feast_default.2002 #Someone sends you a secret love letter
		1 = feast_default.2003 #Bond with someone you have traits in common with
		1 = feast_default.2005 #Someone throws up on you
		2 = feast_default.2006 #Someone has a befriend/seduce scheme against you
		2 = feast_default.2007 #Two lovers are exposed
		1 = feast_default.2008 #Lustful secret homosexual discovered with a servant
		1 = feast_default.2009 #Learn a secret about someone else
		1 = feast_default.2010 #Learn a secret about someone else from a third party
		5 = feast_default.2011 #Someone makes grand promises to you
		1 = feast_default.2012 #Someone is murdered, you're a witness!
		4 = feast_default.2013 #Guest tries butter up to shared liege
		2 = feast_default.6111 #A guest rambles on and on
		2 = feast_default.6101 #Guest is having a hard time socializing
		2 = feast_default.6251 #Chance to become friend or rival
		5 = feast_events_klank.1001 #Two torturers discuss how to torture best
		2 = feast_default_axel.1001 #Two adolescents are rummaging through your wine cellar.
		#Relation events
		2 = feast_default.3001 #Have a good time with a friend
		2 = feast_default.3002 #A chance to exchange "kisses" with a Lover
		2 = feast_default.3003 #Altercation with a Rival
		2 = feast_default.3004 #Insult your rival
		1 = feast_default.3005 #Rival duel!
		1 = feast_default.3096 #Soiree with another attendee
		1 = feast_default.3007 #Caught committing adultery with a Lover
		#Host-triggered events
		2 = feast_default.5001 #Host's high Dread causes you Stress
		2 = feast_default.5002 #Host is lunatic
		2 = feast_default.5003 #Host is sadistic
		2 = feast_default.5004 #Host is a reveler
		1 = feast_default.5005 # You love garum
		#Warfare lifestyle events
		2 = feast_lifestyle.1001 #Have a heated argument over the best strategies
		2 = feast_lifestyle.1002 #Paint strategies in your food and make plans
		2 = feast_lifestyle.1003 #Strategise for a theoretical attack on the feast
		2 = feast_lifestyle.1004 #Ask others about their preferred strategies
		#Intrigue lifestyle events
		2 = feast_lifestyle.2001 #A guest is taught a lesson
		2 = feast_lifestyle.2002 #Make a guest reveal their secret
		2 = feast_lifestyle.2003 #Practice getting information out of people
		2 = feast_lifestyle.2004 #Practice seeing details
		#Admin gov events
		5 = ep3_powerful_families.8080
		5 = ep3_powerful_families.8090
		5 = ep3_powerful_families.8100
		# MPO Events
		5 = mpo_events_ariana.0040 # You flirt with someone unknown
		5 = feast_tsagaan_sar_events.0100 # Your gift was unaccounted for
		5 = feast_tsagaan_sar_events.0101 # You spot a cool horse
		5 = feast_tsagaan_sar_events.0200 # You're invited to play Shagai (gamble)
		5 = feast_tsagaan_sar_events.0210 # Someone gives tips on how to herd
		5 = feast_tsagaan_sar_events.0220 # You decide to settle a rivalry
		#5 = feast_tsagaan_sar_events.0230 # You witness someone throatsinging #EK DISABLED
		5 = feast_tsagaan_sar_events.0240 # You perform some throatsinging 
		5 = feast_tsagaan_sar_events.0250 # Horse race
		5 = feast_tsagaan_sar_events.0260 # Someone is dressed very well
		1 = feast_tsagaan_sar_events.0270 # Drinking contest
		1 = feast_tsagaan_sar_events.0280 # Wisdom moment
		1 = feast_default_jason.100 # You are stressed and your realm is at war
		1 = feast_default_joe.1010 # Guest agent to join your scheme

		chance_of_no_event = {
			value = 400
			if = {
				limit = {
					OR = {
						is_ai = no
						involved_activity = {
							is_target_in_variable_list = {
								name = major_supporter
								target = prev
							}					
						}
						involved_activity = {
							is_target_in_variable_list = {
								name = major_detractor
								target = prev
							}
						}
					}
				}
				subtract = 400
			}
		}
	}
}
#Ceremony Phase
coronation_second_phase_events = {
	effect = {
		#Phase beginning event starts event chains
		#The event chains progress as shown below
		#Some events should always fire, others are situational but trigger next event if not triggered

		#Host:
		#coronation_events.0205 (ceremony begins)
		#coronation_events.6120 (clergy approval)
		#coronation_events.6121 (nobility approval)
		#coronation_events.6122 (popular approval)
		#coronation_events.6123 (guest summary of approvals)
		#coronation_events.6110 (blessing of regnal artifact)
		#coronation_events.6130 (anointment)
		#coronation_events.6000 (being crowned) / coronation_events.6001 (crowning yourself) / coronation_events.6002 (being enthroned, regalia)
		#coronation_events.0100 (oath event)
		#phase end

		#Guest:
		#coronation_events.0205 (ceremony begins)
		#coronation_events.6130 (anointment) - triggered from host's coronation_events.6110 (blessing of regnal artifact)
		#coronation_events.6000 (being crowned) / coronation_events.6001 (crowning yourself) / coronation_events.6002 (being enthroned, regalia)
		#coronation_events.0110 (attendee followup to host oath event)
		#phase end
	}
}
#After the Coronation Activity
coronation_failed_oath_on_action = {
	effect = {
		trigger_event = {
			id = coronation_events.0150
			days = 3
		}
	}
}
