######################################## 
# Flavor events for Poland
# 
# written by Sara Wendel-�rtqvist
######################################## 

namespace = flavor_pol
normal_or_historical_nations = yes

# The Nieszawa Privileges-'Conventiones Particulares'
country_event = {
	id = flavor_pol.3467
	title = "flavor_pol.EVTNAME3467"
	desc = "flavor_pol.EVTDESC3467"
	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		#NOT = {	num_of_estate_privileges = { estate = estate_nobles	value = 4 } }
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1454
		NOT = { is_year = 1485 }
	}
	
	mean_time_to_happen = {
		months = 50
	}
	
	immediate = { 
		hidden_effect = { 
			set_country_flag = pol_had_nieszawa_privileges_country_flag 
			random_owned_province = {
				limit = {
					continent = europe
				}
				save_event_target_as = pol_reble_province
			}
		} 
	}
	option = {
		name = "flavor_pol.EVTOPTA3467" # Accept the Conventions
		if = {
			limit = {
				NOT = { has_estate_privilege = estate_nobles_nieszawa_privileges }
			}
			if = {
				limit = {
					num_of_estate_privileges = { estate = estate_nobles	value = 6 }
				}
				if = {
					limit = {
						has_estate_privilege = estate_nobles_nobility_primacy
					}
					remove_estate_privilege = estate_nobles_nobility_primacy
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_land_rights
					}
					remove_estate_privilege = estate_nobles_land_rights
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_officer_corp
					}
					remove_estate_privilege = estate_nobles_officer_corp
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_levies
					}
					remove_estate_privilege = estate_nobles_levies
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_advisors
					}
					remove_estate_privilege = estate_nobles_advisors
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_right_of_counsel
					}
					remove_estate_privilege = estate_nobles_right_of_counsel
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_supremacy_over_crown
					}
					remove_estate_privilege = estate_nobles_supremacy_over_crown
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_supremacy_over_crown
					}
					remove_estate_privilege = estate_nobles_supremacy_over_crown
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_strong_duchies
					}
					remove_estate_privilege = estate_nobles_strong_duchies
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_better_integration
					}
					remove_estate_privilege = estate_nobles_better_integration
				}
			}
			set_estate_privilege = estate_nobles_nieszawa_privileges
		}
		else = { set_estate_privilege = estate_nobles_nieszawa_privileges }
	}
	option = {
		name = "flavor_pol.EVTOPTB3467" # Refuse to sign it and defy the Magnates
		goto = pol_reble_province
		event_target:pol_reble_province = {
			polish_noble_rebels = 3
		}
	}
}

# The Statute of Piotrkow
country_event = {
	id = flavor_pol.3468
	title = "flavor_pol.EVTNAME3468"
	desc = "flavor_pol.EVTDESC3468"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1490
		NOT = { is_year = 1500 }
	}
	
	mean_time_to_happen = {
		months = 50
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3468" # Enact
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		add_country_modifier = {
			name = pol_statute_piotrkow
			duration = 10950
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3468" # Refuse to enact
		add_stability = -3
	}
}

# The Polish Inheritance of Masovia
country_event = {
	id = flavor_pol.3473
	title = "flavor_pol.EVTNAME3473"
	desc = "flavor_pol.EVTDESC3473"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	option = {
		name = "flavor_pol.EVTOPTA3473" # Make it a personal royal fiefdom
		257 = { # Warszawa
			if = {
				limit = {
					NOT = { has_dlc = "Common Sense" }
				}
				add_base_tax = 2
			}
			if = {
				limit = {
					has_dlc = "Common Sense"
				}
				add_province_modifier = {
					name = "economic_development_of_mazovia"
					duration = -1
				}
			}
		}
	}
}

# The Jesuit King
country_event = {
	id = flavor_pol.3477
	title = "flavor_pol.EVTNAME3477"
	desc = "flavor_pol.EVTDESC3477"
	picture = COURT_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		religion = catholic
		has_regency = no
		is_year = 1600 
		NOT = { is_year = 1650 }
		has_country_modifier = counter_reformation
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3477" # Religious Freedom won the day
		remove_country_modifier = counter_reformation
		add_ruler_modifier = { 
			name = pol_religious_freedom
		}
		every_country = {
			limit = {
				religion = catholic
				has_country_modifier = counter_reformation
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_pol_religious_freedom
			}
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3477" # The Catholic Faith are the First among Equals
		every_country = {
			limit = {
				religion = catholic
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_pol_true_faith
			}
		}		
	}
	option = {
		name = "flavor_pol.EVTOPTC3477" # Hail the Jesuit King!
		add_ruler_modifier = { 
			name = pol_jesuit_king 
		}
	}
}

# The Pacta Conventa and the Henrykian Articles
country_event = {
	id = flavor_pol.3480
	title = "flavor_pol.EVTNAME3480"
	desc = "flavor_pol.EVTDESC3480"
	picture = REFORM_eventPicture
	
	is_triggered_only = yes	
	trigger = {
		OR = {
			has_reform = polish_elective_monarchy
			has_reform = elective_monarchy
		}
		NOT = { has_country_flag = pol_pact_conventa_flag }
		has_country_flag = pol_had_nieszawa_privileges_country_flag
		OR = {
			NOT = { ADM = 2 }
			NOT = { DIP = 2 }
			NOT = { MIL = 2 }
		}
		NOT = { has_country_flag = pol_pact_conventa_flag_had_before }
		is_or_was_tag = {
			tag = POL
		}
	}
	
	mean_time_to_happen = {
		days = 1
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3480" # There is nothing we can do my King
		if = {
			limit = { num_of_estate_privileges = { estate = estate_nobles value = 6 } }
			trigger_switch = {
				on_trigger = has_estate_privilege
				estate_nobles_better_integration = { remove_estate_privilege = estate_nobles_better_integration }
				estate_nobles_nobility_primacy = { remove_estate_privilege = estate_nobles_nobility_primacy }
				estate_nobles_land_rights = { remove_estate_privilege = estate_nobles_land_rights }
				estate_nobles_officer_corp = { remove_estate_privilege = estate_nobles_officer_corp }
				estate_nobles_levies = { remove_estate_privilege = estate_nobles_levies }
				estate_nobles_advisors = { remove_estate_privilege = estate_nobles_advisors }
				estate_nobles_right_of_counsel = { remove_estate_privilege = estate_nobles_right_of_counsel }
				estate_nobles_supremacy_over_crown = { remove_estate_privilege = estate_nobles_supremacy_over_crown }
				estate_nobles_strong_duchies = { remove_estate_privilege = estate_nobles_strong_duchies }
			}
		}
		set_estate_privilege = estate_nobles_pacta_conventa
		set_country_flag = pol_pact_conventa_flag
		set_country_flag = pol_pact_conventa_flag_had_before
	}
}

# The Sobieskian Army Reforms
country_event = {
	id = flavor_pol.3485
	title = "flavor_pol.EVTNAME3485"
	desc = "flavor_pol.EVTDESC3485"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1672
		NOT = { is_year = 1681 }
	}
	
	mean_time_to_happen = {
		months = 40
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3485" # Make a strict Army Reform only
		add_yearly_manpower = 1
		add_mil_power = 150
		add_stability_or_adm_power = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB3485" # Reform Army and undermine the power of the Sejm
		trigger = {
			has_estate_privilege = estate_nobles_nieszawa_privileges
		}
		remove_estate_privilege = estate_nobles_nieszawa_privileges
		add_mil_power = 50
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 3
		}
	}
}

# The Great Northern Conflict
country_event = {
	id = flavor_pol.3491
	title = "flavor_pol.EVTNAME3491"
	desc = "flavor_pol.EVTDESC3491"
	picture = BATTLE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_year = 1650
		NOT = { is_year = 1750 }
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_rival = SWE
		SWE = {
			is_rival = ROOT
		}		
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3491" # Advance!
		SWE = {
			add_opinion = {
				who = POL
				modifier = opinion_polish_aggressions
			}
			every_rival_country = {
				add_opinion = {
					who = POL
					modifier = opinion_common_enemy
					years = 10
				}
			}
		}
	
	
		every_owned_province = {
			every_neighbor_province = {
				limit = {
					owned_by = SWE
					NOT = { is_core = ROOT }
				}
				add_claim = ROOT
			}
		}	
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3491" # Stay calm for a while
		add_prestige = -10
		SWE = {
			add_opinion = {
				who = POL
				modifier = opinion_ignored_claim
			}
		}
	}
}

# Turko-Polish Tension
country_event = {
	id = flavor_pol.3488
	title = "flavor_pol.EVTNAME3488"
	desc = "flavor_pol.EVTDESC3488"
	picture = DIPLOMACY_eventPicture
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		religion_group = christian
		exists = TUR
		NOT = { alliance_with = TUR }
		NOT = { is_subject_of = TUR }

		NOT = { has_country_modifier = pol_tur_tension_timer }
		OR = {
			AND = {
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owned_by = ROOT
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
			any_known_country = {
				vassal_of = ROOT
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owner = {
								vassal_of = ROOT
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
			any_known_country = {
				OR = {
					junior_union_with = ROOT
					senior_union_with = ROOT
				}
				is_neighbor_of = TUR
				TUR = {
					any_owned_province = {
						any_neighbor_province = {
							owner = {
								OR = {
									junior_union_with = ROOT
									senior_union_with = ROOT
								}
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3488" # We will defend Christendom
		add_country_modifier = {
			name = pol_tur_tension_timer
			duration = 3650
			hidden = yes
		}
		add_yearly_manpower = 1
		if = {
			limit = {
				is_neighbor_of = TUR
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owned_by = ROOT
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
		if = {
			limit = {
				NOT = { is_neighbor_of = TUR }
				any_known_country = {
					vassal_of = ROOT
					is_neighbor_of = TUR
				}
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owner = {
								vassal_of = ROOT
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
		if = {
			limit = {
				NOT = { is_neighbor_of = TUR }
				NOT = {
					any_known_country = {
						vassal_of = ROOT
						is_neighbor_of = TUR
					}
				}
				any_known_country = {
					OR = {
						junior_union_with = ROOT
						senior_union_with = ROOT
					}
					is_neighbor_of = TUR
				}
			}
			TUR = {
				random_owned_province = {
					limit = {
						any_neighbor_province = {
							owner = {
								OR = {
									junior_union_with = ROOT
									senior_union_with = ROOT
								}
							}
						}
						NOT = { is_core = ROOT }
						NOT = { is_claim = ROOT }
					}
					add_claim = ROOT
				}
			}
		}
	}
}

# The Horrible Plague in Lithuania
country_event = {
	id = flavor_pol.3493
	title = "flavor_pol.EVTNAME3493"
	desc = "flavor_pol.EVTDESC3493"
	picture = PLAGUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		NOT = { exists = LIT }
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1700 
		NOT = { is_year = 1750 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3493" # There is nothing we can do
		ai_chance = { 
			factor = 25 
		}
		add_country_modifier = { 
			name = severe_plague
			duration = 1825 
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3493" # Try to contain it
		ai_chance = { 
			factor = 75 
		}
		add_adm_power = -50
		add_country_modifier = { 
			name = contained_plague
			duration = 1825 
		}
	}
}

# Ending the Stagnation - Jan Sobieski
country_event = {
	id = flavor_pol.3497
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3497"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		OR = { 
			has_country_flag = librium_veto
			has_estate_privilege = estate_nobles_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1680 
		NOT = { is_year = 1695 }

	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"

	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_estate_privilege = estate_nobles_nieszawa_privileges
	}
}

# Ending the Stagnation - Friedrich Augustus II
country_event = {
	id = flavor_pol.3498
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3498"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		OR = { 
			has_country_flag = librium_veto
			has_estate_privilege = estate_nobles_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1697
		NOT = { is_year = 1712 }
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_estate_privilege = estate_nobles_nieszawa_privileges
	}
}

# Ending the Stagnation - Stanislaus Poniatowski
country_event = {
	id = flavor_pol.3499
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3499"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		OR = { 
			has_country_flag = librium_veto
			has_estate_privilege = estate_nobles_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1765
		NOT = { is_year = 1780 }
		
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability_or_adm_power = yes
		add_mercantilism = 3
		custom_tooltip = "pol_stag_maybe_more"
		
	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_estate_privilege = estate_nobles_nieszawa_privileges
	}
}

# Ending the Stagnation - King Stanislaus
country_event = {
	id = flavor_pol.3500
	title = "flavor_pol.EVTNAME3497"
	desc = "flavor_pol.EVTDESC3500"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		OR = { 
			has_country_flag = librium_veto
			has_estate_privilege = estate_nobles_nieszawa_privileges
		}
		any_neighbor_country = {
			tech_difference = 3
		}
		
	
		is_year = 1785
		NOT = { is_year = 1800 }

		
	}
	
	mean_time_to_happen = {
		months = 180
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3497" # No, it's too problematic to change the situation
		add_stability = 2
		add_mercantilism = 3
		custom_tooltip = "pol_stag_no_more"

	}
	option = {
		name = "flavor_pol.EVTOPTB3497" # Let us change this depressive situation
		add_stability = -3
		clr_country_flag = librium_veto
		remove_estate_privilege = estate_nobles_nieszawa_privileges
	}
}

# The Sejm refuse to allow the mobilization of more troops
country_event = {
	id = flavor_pol.3738
	title = "flavor_pol.EVTNAME3738"
	desc = "flavor_pol.EVTDESC3738"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
		NOT = { has_reform = polish_autocratic_monarchy }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		add_ruler_modifier = { name = pol_sejm_refuse_troops } 
		
	}
	option = {
		name = "flavor_pol.EVTOPTA3738"
		add_legitimacy = -20
		add_stability = -1
	}
}

# The Sejm comply to your policies
country_event = {
	id = flavor_pol.3743
	title = "flavor_pol.EVTNAME3743"
	desc = "flavor_pol.EVTDESC3743"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		is_or_was_tag = {
			tag = POL
		}
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
		NOT = { has_reform = polish_autocratic_monarchy }
	}
	
	mean_time_to_happen = {
		months = 3
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	

	option = {
		name = "flavor_pol.EVTOPTA3743"
		add_ruler_modifier = { name = pol_sejm_comply_policies } 
	}
}

# The Sejm veto all your policies
country_event = {
	id = flavor_pol.3744
	title = "flavor_pol.EVTNAME3744"
	desc = "flavor_pol.EVTDESC3744"
	picture = LIBERUM_VETO_eventPicture
	
	trigger = {
		has_regency = no
		has_country_flag = pol_pact_conventa_flag
		NOT = {
			has_ruler_modifier = pol_sejm_refuse_timer
		}
		government = monarchy
		NOT = { has_reform = polish_autocratic_monarchy }
	}
	
	mean_time_to_happen = {
		months = 6
	}
	immediate = {
		hidden_effect = {
			add_ruler_modifier = {
				name = pol_sejm_refuse_timer
				hidden = yes
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		add_ruler_modifier = { name = pol_sejm_veto } 
	}
	option = {
		name = "flavor_pol.EVTOPTA3738"
		add_legitimacy = -20
		add_stability = -1
	}

}

# Nicolaus Copernicus
country_event = {
	id = flavor_pol.5100
	title = "flavor_pol.EVTNAME5100"
	desc = "flavor_pol.EVTDESC5100"
	picture = ADVISOR_eventPicture	
	is_triggered_only = yes
	
	option = {
		name = "flavor_pol.EVTOPTOK"
		
		define_advisor = {
			type = natural_scientist
			name = "Nicolaus Copernicus"
			culture = polish
			skill = 3
			cost_multiplier = 0.25
		}
	}
}

# Polish-Lithuanian Commonwealth Navy
country_event = {
	id = flavor_pol.1
	title = "flavor_pol.EVTNAME1"
	desc = "flavor_pol.EVTDESC1"
	picture = NAVAL_MILITARY_eventPicture
	
	fire_only_once = yes
	
	is_triggered_only = yes
	
	trigger = {
		num_of_ports = 1
	}
	
	option = {
		name = "flavor_pol.EVTOPTA1" # Build a Great Navy
		add_navy_tradition = 20

		random_owned_province = {
			limit = {
				has_port = yes
			}
			add_unit_construction = {
				type = heavy_ship
				amount = 5
				speed = 0.1
				cost = 0
			}
		}
	}
}

# Sigismund's Column
country_event = {
	id = flavor_pol.2
	title = "flavor_pol.EVTNAME2"
	desc = "flavor_pol.EVTDESC2"
	picture = IMPORTANT_STATUE_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1640
		NOT = { is_year = 1665 }
		prestige = 50
		NOT = {
			has_ruler_modifier = pol_jesuit_king
		}
		owns = 257
	}
	
	mean_time_to_happen = {
		months = 100
	}
	
	option = {
		name = "flavor_pol.EVTOPTA2" # Construct Sigismund's Column
		add_years_of_income = -0.5
		add_country_modifier = {
			name = "pol_sigismunds_column"
			duration = 10950
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB2" # There is no need to commemorate King Sigismund!
		add_prestige = -1
		add_legitimacy = 10
	}
}

# Merkuriusz Polski Ordynaryjny
country_event = {
	id = flavor_pol.3
	title = "flavor_pol.EVTNAME3"
	desc = "flavor_pol.EVTDESC3"
	picture = REFORM_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1660
		NOT = { is_year = 1700 }
	}
	
	mean_time_to_happen = {
		months = 100
	}
	
	option = {
		name = "flavor_pol.EVTOPTA3" # Sponsor the newspaper
		add_years_of_income = -0.15
		add_ruler_modifier = {
			name = pol_merkuriusz_polski_ordynaryjny
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB3" # Allow it
		add_stability_or_adm_power = yes
	}
	option = {
		name = "flavor_pol.EVTOPTC3" # Ban it
		trigger = { is_lesser_in_union = no }
		add_legitimacy = 15
	}
}

# Vilnius University
country_event = {
	id = flavor_pol.4
	title = "flavor_pol.EVTNAME4"
	desc = "flavor_pol.EVTDESC4"
	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1570
		NOT = { is_year = 1610 }
		owns = 272 # Vilna
		NOT = { exists = LIT }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA4" # Sponsor the University
		add_years_of_income = -0.25
		add_prestige = 5
		add_adm_power = 100
		add_innovativeness_small_effect = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB4" # Do nothing
		add_prestige = -1
	}
}

# Jan Brozek
country_event = {
	id = flavor_pol.5
	title = "flavor_pol.EVTNAME5"
	desc = "flavor_pol.EVTDESC5"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1600
		NOT = { is_year = 1652 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA5" # Hire him as advisor
		add_years_of_income = -0.2
		add_dip_power = 100
		define_advisor = {
			type = natural_scientist
			name = "Jan Brozek"
			culture = polish
			discount = yes
			skill = 2
		}
		add_innovativeness_small_effect = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB5" # Ignore him
		add_prestige = -1
	}
}

# Michal Sedziw�j
country_event = {
	id = flavor_pol.6
	title = "flavor_pol.EVTNAME6"
	desc = "flavor_pol.EVTDESC6"
	picture = ADVISOR_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1600
		NOT = { is_year = 1636 }
	}
	
	mean_time_to_happen = {
		months = 150
	}
	
	option = {
		name = "flavor_pol.EVTOPTA5" # Hire him as advisor
		add_years_of_income = -0.2
		add_adm_power = 100
		define_advisor = {
			type = philosopher
			name = "Michal Sedziwj"
			culture = polish
			discount = yes
			skill = 3
		}
		add_innovativeness_small_effect = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB5" # Ignore him
		add_prestige = -1
	}
}

# Zamojski Academy
country_event = {
	id = flavor_pol.7
	title = "flavor_pol.EVTNAME7"
	desc = "flavor_pol.EVTDESC7"
	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1590
		NOT = { is_year = 1650 }
	}
	
	mean_time_to_happen = {
		months = 200
	}
	
	option = {
		name = "flavor_pol.EVTOPTA4" # Sponsor the university
		add_years_of_income = -0.25
		add_prestige = 5
		add_mil_power = 100
		add_innovativeness_small_effect = yes
	}
	option = {
		name = "flavor_pol.EVTOPTB4" # Do nothing
		add_prestige = -1
	}
}

### THE STRUGGLE FOR ROYAL POWER ### 
# Reworked into a disaster
country_event = {
	id = flavor_pol.3481
	title = "flavor_pol.EVTNAME3481"
	desc = "flavor_pol.EVTDESC3481"
	picture = SEJM_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	immediate = {
		set_country_flag = pol_zebrzydowski_rebellion_flag
	}
	option = {
		name = "flavor_pol.EVTOPTC3481" # Wage a war of extermination on the Nobility
		add_stability = -3		
		random_owned_province = {
			limit = {
				is_capital = yes
			}
			polish_noble_rebels = 6
		}
		random_owned_province = {
			limit = {
				is_capital = no
				continent = europe
			}
			polish_noble_rebels = 3
		}
	}
}

# Konfederacja
country_event = {
	id = flavor_pol.10
	title = "flavor_pol.EVTNAME10"
	desc = "flavor_pol.EVTDESC10"
	picture = SEJM_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		had_country_flag = {
			flag = pol_zebrzydowski_rebellion_flag
			days = 1095
		}
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = pol_konfederacja_flag
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTA10" # Accept their demands
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				any_country = {
					junior_union_with = ROOT
				}
			}
		}
		set_country_flag = pol_concedes_1
		custom_tooltip = pol_disaster_concede_tt
		give_estate_land_share_small = { estate = estate_nobles }
		add_ruler_modifier = {
			name = pol_konfederacja
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB10" # Reject their demands
		ai_chance = {
			factor = 75
		}
		add_prestige = -5
		take_estate_land_share_small = { estate = estate_nobles }
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 3
		}
		random_owned_province = {
			limit = {
				continent = europe
			}
			polish_noble_rebels = 2
		}
	}
}

# Rokosz Sandomierski
country_event = {
	id = flavor_pol.11
	title = "flavor_pol.EVTNAME11"
	desc = "flavor_pol.EVTDESC11"
	picture = ANGRY_MOB_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		had_country_flag = {
			flag = pol_konfederacja_flag
			days = 1095
		}
	}
	
	immediate = {
		hidden_effect = {
			set_country_flag = rokosz_flag
			random_owned_province = {
				limit = {
					is_core = ROOT
				}
				set_province_flag = POL_rokosz_sandomierski_flag1
			}
			random_owned_province = {
				limit = {
					is_core = ROOT
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag1
					}
				}
				set_province_flag = POL_rokosz_sandomierski_flag2
			}
			random_owned_province = {
				limit = {
					is_core = ROOT
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag1
					}
					NOT = {
						has_province_flag = POL_rokosz_sandomierski_flag2
					}
				}
				set_province_flag = POL_rokosz_sandomierski_flag3
			}
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTA11" # Confer with the rebel leaders
		ai_chance = { 
			factor = 25
			modifier = {
				factor = 0
				any_country = {
					junior_union_with = ROOT
				}
			}
		}
		set_country_flag = pol_concedes_2
		custom_tooltip = pol_disaster_concede_tt
		add_adm_power = -100
		add_dip_power = -100
		add_mil_power = -100
		add_legitimacy = -50
		give_estate_land_share_small = { estate = estate_nobles }
		every_neighbor_country = {
			limit = {
				NOT = { is_subject_of = ROOT }
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_negotiated_rebels
			}
		}
	}
	option = {
		name = "flavor_pol.EVTOPTB11" # Suppress the rebels
		ai_chance = { factor = 75 }
		take_estate_land_share_small = { estate = estate_nobles }
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag1
			}
			polish_noble_rebels = 3
			clr_province_flag = POL_rokosz_sandomierski_flag1
		}
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag2
			}
			polish_noble_rebels = 2
			clr_province_flag = POL_rokosz_sandomierski_flag2
		}
		random_owned_province = {
			limit = {
				has_province_flag = POL_rokosz_sandomierski_flag3
			}
			polish_noble_rebels = 1
			clr_province_flag = POL_rokosz_sandomierski_flag3
		}
		every_neighbor_country = {
			limit = {
				NOT = { is_subject_of = ROOT }
			}
			add_opinion = {
				who = ROOT
				modifier = opinion_suppressed_rebels
			}
		}
	}
}

# Pacification Sejm
country_event = {
	id = flavor_pol.12
	title = "flavor_pol.EVTNAME12"
	desc = "flavor_pol.EVTDESC12"
	picture = SEJM_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		had_country_flag = { flag = rokosz_flag days = 1095 }
		NOT = { num_of_rebel_controlled_provinces = 1 }
		OR = {
			NOT = {	has_country_flag = pol_concedes_1 }
			NOT = {	has_country_flag = pol_concedes_2 }
		}
	}
	
	option = {
		name = "flavor_pol.EVTOPTA12" # The nobles has formally surrendered
		remove_estate_privilege = estate_nobles_pacta_conventa
		clr_country_flag = pol_pact_conventa_flag
		remove_country_modifier = pol_sejm_veto
		remove_country_modifier = pol_sejm_refuse_troops
		remove_country_modifier = pol_sejm_comply_policies
		add_prestige = 50
		add_stability = 3
		add_legitimacy = 50
		take_estate_land_share_large = { estate = estate_nobles }
		remove_estate_privilege = estate_nobles_golden_liberty
		if = {
			limit = {
				has_reform = elective_monarchy
			}
			remove_government_reform = elective_monarchy
			#set_legacy_government = administrative_monarchy
			remove_heir = {}
			add_absolutism = 10
		}
		if = { 
			limit = { has_reform = polish_elective_monarchy }
			remove_government_reform = polish_elective_monarchy 
		}
		else_if = {
			limit = { has_reform = polish_great_sejm }
			remove_government_reform = polish_great_sejm
		}
		hidden_effect = {
			if = {
				limit = { has_estate_privilege = estate_nobles_nieszawa_privileges }
				remove_estate_privilege = estate_nobles_nieszawa_privileges
			}
		}
		if = {
			limit = {
				has_estate_privilege = estate_nobles_pacta_conventa
			}
			remove_estate_privilege = estate_nobles_pacta_conventa
		}
	}
}

# cleanup event for hotfix
#country_event = {
#	id = flavor_pol.13
#	title = "flavor_pol.EVTNAME12"
#	desc = "flavor_pol.EVTDESC12"
#	picture = ANGRY_MOB_eventPicture
#	
#	fire_only_once = yes
#	
#	trigger = {
#		has_country_modifier = pol_zebrzydowski_rebellion_flag
#		NOT = { has_country_flag = pol_zebrzydowski_rebellion_flag }
#	}
#	
#	mean_time_to_happen = {
#		months = 1
#	}
#	
#	option = {
#		name = "flavor_pol.EVTOPTA12" # The nobles has formally surrendered
#		remove_estate_privilege = estate_nobles_pacta_conventa
#		remove_country_modifier = pol_zebrzydowski_rebellion_flag
#		remove_country_modifier = pol_sejm_veto
#		remove_country_modifier = pol_sejm_refuse_troops
#		remove_country_modifier = pol_sejm_comply_policies
#		clr_country_flag = pol_konfederacja_flag
#	}
#}

# Collegium Hosianum
country_event = {
	id = flavor_pol.14
	title = flavor_pol.14.t
	desc = flavor_pol.14.d

	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		owns = 42
		is_year = 1560
		NOT = { is_year = 1575 }
		religion = catholic
	}
	
	mean_time_to_happen = {
		months = 45
	}
	
	option = {
		name = flavor_pol.14.a #Great!
		add_prestige = 5
		42 = {
			add_province_modifier = {
				name = "pol_collegium_hosianum"
				duration = -1
			}
			if = {
				limit = { NOT = { religion = catholic } }
				change_religion = catholic
			}
		}
	}
}

# The Radziwill Bible & the Reformation in Poland
country_event = {
	id = flavor_pol.15
	title = flavor_pol.15.t
	desc = flavor_pol.15.d

	picture = BIG_BOOK_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		is_year = 1560
		NOT = { is_year = 1570 }
		religion = catholic
		is_religion_enabled = reformed
		owns = 260
	}
	
	mean_time_to_happen = {
		months = 30
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					is_capital = no
					OR = {
						culture = polish
						culture = polish_new
					}
					religion = catholic
					NOT = { province_id = 260 }
				}
				set_province_flag = reading_brest_bible
			}
			random_owned_province = {
				limit = {
					is_capital = no
					OR = {
						culture = polish
						culture = polish_new
					}
					religion = catholic
					NOT = { province_id = 260 }
					NOT = { has_province_flag = reading_brest_bible }
				}
				set_province_flag = reading_brest_bible
			}
		}
	}
	
	option = { #We must burn this abomination
		name = flavor_pol.15.a
		add_papal_influence = 10
		260 = {
			change_religion = reformed
			add_province_modifier = {
				name = add_unrest_10_modifier
				duration = 1825
			}
		}
		every_owned_province = {
			limit = {
				has_province_flag = reading_brest_bible
			}
			add_province_modifier = {
				name = add_unrest_10_modifier
				duration = 1825
			}
		}
	}
	
	option = { #Interesting...
		name = flavor_pol.15.b
		260 = {
			change_religion = reformed
		}
		every_owned_province = {
			limit = {
				has_province_flag = reading_brest_bible
			}
			change_religion = reformed
		}
	}
}

#State religion resulting in the suspension of the College.
country_event = {
	id = flavor_pol.16
	title = flavor_pol.16.t
	desc = flavor_pol.16.d

	picture = UNIVERSITY_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		any_owned_province = {
			has_province_modifier = pol_collegium_hosianum
		}
		NOT = { religion = catholic }
	}
	
	mean_time_to_happen = {
		months = 45
	}
	
	option = {
		name = flavor_pol.16.a #Suspend the College
		42 = {
			remove_province_modifier = pol_collegium_hosianum
		}
	}
}

#Clearing of Teutonic Rivalry
country_event = {
	id = flavor_pol.17
	title = flavor_pol.17.t
	desc = flavor_pol.17.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	
	trigger = {
		OR = {
			AND = {
				tag = POL
				NOT = { exists = PLC }
			}
			tag = PLC
		}
		historical_rival_with = TEU
		TEU = {
			is_subject_of = ROOT
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = flavor_pol.17.a #
		add_prestige = 10
		remove_historical_rival = TEU
		TEU = {
			remove_historical_rival = ROOT
		}
	}
}

#Election of Kasimir
country_event = {
	id = flavor_pol.18
	title = flavor_pol.18.t
	desc = flavor_pol.18.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	major = yes
	
	trigger = {
		tag = POL
		is_subject = no
		has_regency = yes
		NOT = { has_reform = celestial_empire }
		LIT = {
			exists = yes
			is_subject = no
			NOT = { junior_union_with = POL }
			dynasty = "00000"
		}
		NOT = { is_year = 1450 }
	}
	
	immediate = {
		set_global_flag = plc_union_outcome_flag
	}
	
	mean_time_to_happen = {
		months = 12
		modifier = {
			factor = 0.1
			is_year = 1447
		}
		modifier = {
			factor = 0.01
			is_year = 1448
		}
		modifier = {
			factor = 0.001
			is_year = 1449
		}
	}
	
	option = {
		name = flavor_pol.18.a #We must retain the Jagiellon Dynasty
		ai_chance = { 
			factor = 75 
		}
		LIT = { 
			country_event = { id = flavor_lit.16 }
		}
		if = {
			limit = { has_dlc = "Lions of the North" }
			custom_tooltip = pol_impact_future_missions_tt 
			set_country_flag = pol_chose_pu_flag
			custom_tooltip = pol_potential_cb_on_hungary_tt
		}
	}
	
	option = {
		name = flavor_pol.18.b #Appoint a Local Noble.
		ai_chance = { 
			factor = 25
		}
		define_ruler = {
			change_dip = 3
			change_adm = 3
			change_mil = 3
			max_random_adm = 5
			max_random_dip = 5
			max_random_mil = 5
			claim = 100
			culture = polish
		}
		if = {
			limit = {
				has_states_general_mechanic = yes
			}
			change_statists_vs_orangists = 1
		}
		LIT = {
			add_opinion = {
				who = ROOT
				modifier = lit_denied_birthright
			}
			if = {
				limit = { has_dlc = "Lions of the North" }
				set_country_flag = lit_decline_pu_flag
			}
		}
		if = {
			limit = { has_dlc = "Lions of the North" }
			set_country_flag = pol_denied_pu_flag
			custom_tooltip = pol_impact_future_missions_tt 
			custom_tooltip = pol_potential_cb_on_bohemia_tt
		}
	}
}

# Become elective
country_event = {
	id = flavor_pol.20
	title = flavor_pol.20.t
	desc = flavor_pol.20.d

	picture = LIBERUM_VETO_eventPicture
	
	fire_only_once = yes
	is_triggered_only = yes

	trigger = {
		always = yes
	}
	
	option = {
		name = flavor_pol.20.a
		add_government_reform = polish_elective_monarchy
		if = {
			limit = {
				NOT = { has_estate_privilege = estate_nobles_golden_liberty }
			}
			if = {
				limit = {
					num_of_estate_privileges = { estate = estate_nobles	value = 6 }
				}
				if = {
					limit = {
						has_estate_privilege = estate_nobles_nobility_primacy
					}
					remove_estate_privilege = estate_nobles_nobility_primacy
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_land_rights
					}
					remove_estate_privilege = estate_nobles_land_rights
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_officer_corp
					}
					remove_estate_privilege = estate_nobles_officer_corp
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_levies
					}
					remove_estate_privilege = estate_nobles_levies
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_advisors
					}
					remove_estate_privilege = estate_nobles_advisors
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_right_of_counsel
					}
					remove_estate_privilege = estate_nobles_right_of_counsel
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_supremacy_over_crown
					}
					remove_estate_privilege = estate_nobles_supremacy_over_crown
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_supremacy_over_crown
					}
					remove_estate_privilege = estate_nobles_supremacy_over_crown
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_strong_duchies
					}
					remove_estate_privilege = estate_nobles_strong_duchies
				}
				else_if = {
					limit = {
						has_estate_privilege = estate_nobles_better_integration
					}
					remove_estate_privilege = estate_nobles_better_integration
				}
			}
			set_estate_privilege = estate_nobles_golden_liberty
		}
	}
}

# New events for Struggle for Royal Power Disaster
# by Daniel Tolman

# Alternate ending - Sejm Seizes control
country_event = {
	id = flavor_pol.21
	title = flavor_pol.21.t
	desc = flavor_pol.21.d
	picture = SEJM_eventPicture

	fire_only_once = yes
	is_triggered_only = yes
	
	trigger = {
		has_country_flag = pol_concedes_1
		has_country_flag = pol_concedes_2
		had_country_flag = { flag = pol_zebrzydowski_rebellion_flag days = 1000 }
		NOT = { num_of_rebel_controlled_provinces = 1 }
	}
	
	option = {
		name = "flavor_pol.EVTOPTB3481" # Resign completely and read theological books instead
		add_prestige = -100
		give_estate_land_share_large = { estate = estate_nobles }
		if = {
			limit = { NOT = { has_reform = celestial_empire } }
			change_government = republic
			add_government_reform = noble_elite_reform
		}
		hidden_effect = {
			kill_ruler = yes
		}
		remove_estate_privilege = estate_nobles_nieszawa_privileges
		remove_country_modifier = pol_statute_piotrkow
		remove_estate_privilege = estate_nobles_pacta_conventa
		clr_country_flag = librium_veto
		clr_country_flag = pol_pact_conventa_flag
		complete_mission = plc_golden_liberty
	}
}

# Disaster end event
country_event = {
	id = flavor_pol.22
	title = flavor_pol.22.t
	desc = flavor_pol.22.d
	picture = SEJM_eventPicture
	
	major = yes
	fire_only_once = yes
	is_triggered_only = yes
	immediate = {
		on_non_estate_disaster_end = yes
	}
	
	option = {
		trigger = {
			government = monarchy
		}
		if = {
			limit = {
				OR = {
					has_reform = polish_elective_monarchy
					has_reform = elective_monarchy
				}
			}
			remove_government_reform = elective_monarchy
			remove_government_reform = polish_elective_monarchy
			#set_legacy_government = administrative_monarchy
			remove_heir = {}
			add_absolutism = 10
		}
		if = {
			limit = { has_estate_privilege = estate_nobles_golden_liberty }
			remove_estate_privilege = estate_nobles_golden_liberty
		}
		set_country_flag = pol_royal_power_monarchy_won_flag
		name = flavor_pol.22.a
	}
	option = {
		trigger = {
			NOT = { government = monarchy }
		}
		if = {
			limit = {
				OR = {
					has_reform = polish_elective_monarchy
					has_reform = elective_monarchy
				}
			}
			remove_government_reform = elective_monarchy
			remove_government_reform = polish_elective_monarchy
			#set_legacy_government = administrative_monarchy
			remove_heir = {}
			add_absolutism = 10
			if = {
				limit = { has_estate_privilege = estate_nobles_golden_liberty }
				remove_estate_privilege = estate_nobles_golden_liberty
			}
		}
		set_country_flag = pol_royal_power_non_monarchy_won_flag
		name = flavor_pol.22.b
	}
}

####Lions of the North#### scripted by Big Boss

country_event = { #The Little Kings Uprising
	id = flavor_pol.23
	title = flavor_pol.23.t
	desc = flavor_pol.23.d
	picture = REVOLUTION_eventPicture
	is_triggered_only = yes
	
	option = {
		name = flavor_pol.23.a 
		
		add_country_modifier = { 
			name = pol_centralized_royal_court_authority_modifier
			duration = -1 
		}
		if = {
			limit = { ai = yes } 
			random_owned_province = {
				limit = { continent = europe } 
				spawn_rebels = {
					type = noble_rebels
					size = 3
				}
			}
		}
		else = { 
			random_owned_province = {
				limit = { continent = europe } 
				spawn_rebels = {
					type = noble_rebels
					size = 3
				}
			}
			random_owned_province = {
				limit = { continent = europe } 
				spawn_rebels = {
					type = noble_rebels
					size = 3
				}
			}
			random_owned_province = {
				limit = { continent = europe } 
				spawn_rebels = {
					type = noble_rebels
					size = 3
				}
			}
		}
	}
}

country_event = { #The Constitution of [GetYear]
	id = flavor_pol.24
	title = flavor_pol.24.t
	desc = flavor_pol.24.d
	picture = REFORM_eventPicture
	is_triggered_only = yes
	
	option = { 
		name = flavor_pol.24.a 
		
		change_government_reform_progress = -150
		add_stability = -1
		add_adm_tech = 1 
		add_country_modifier = { 
			name = pol_judicial_reforms_modifier
			duration = 7300 
		}
		if = { 
			limit = { has_estate = estate_nobles } 
			custom_tooltip = pol_disable_nobles_tt
			set_country_flag = pol_disable_nobles_flag 
		}
	}
	
	option = { 
		name = flavor_pol.24.b 
		
		custom_tooltip = pol_every_courthouse_1_random_dev_tt
		hidden_effect = { 
			every_owned_province = { 
				limit = { has_courthouse_building_trigger = yes } 
				random_list = {
					50 = { add_base_manpower = 1 } 
					50 = { add_base_production = 1 } 
				}
			}
		}
		change_government_reform_progress = -100
		if = { 
			limit = { adm = 6 } 
			add_adm_power = 100 
		}
		else = { change_adm = 1 } 
	}
	
	option = { 
		name = flavor_pol.24.c 
		highlight = yes 
		trigger = { has_country_modifier = pol_cardinal_laws_modifier } 
		if = { 
			limit = { 
				NOT = { government = republic } 
			}
			change_government = republic 
		}
		
		remove_country_modifier = pol_cardinal_laws_modifier 
		add_country_modifier = {
			name = pol_cardinal_laws2_modifier
			duration = -1 
		}
	}
}

country_event = { #The Constitution of [GetYear]
	id = flavor_pol.25
	title = flavor_pol.25.t
	desc = flavor_pol.25.d
	picture = POLAND_BOHEMIA_eventPicture
	is_triggered_only = yes
	
	major = yes 
	major_trigger = { 
		capital_scope = { continent = europe } 
	}
	
	option = { 
		name = flavor_pol.25.a 
		
		ai_chance = { 
			factor = 1
			modifier = {
				POL = { diplomatic_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				POL = { influence_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				trust = { 
					who = POL 
					value = 100 
				}
				factor = 1.5 
			}
			modifier = {
				PLC = { diplomatic_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				PLC = { influence_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				trust = { 
					who = PLC 
					value = 100 
				}
				factor = 1.5 
			}
		}
		if = { 
			limit = {
				PLC = { exists = yes }
			}
			PLC = { create_union = ROOT }
		}
		else = {
			POL = { create_union = ROOT }
		}
	}
	
	option = { 
		name = flavor_pol.25.b

		ai_chance = { factor = 8 }
		BOH = {
			add_country_modifier = {
				name = pol_polish_bohemian_ties_modifier
				duration = -1 
				desc = pol_as_long_as_allies_or_subjects
			}
		}
		if = { 
			limit = { exists = POL }
			POL = { 
				add_country_modifier = {
					name = pol_polish_bohemian_ties_modifier
					duration = -1 
					desc = pol_as_long_as_allies_or_subjects
				}
			}
		}
		else = {
			PLC = {
				add_country_modifier = {
					name = pol_polish_bohemian_ties_modifier
					duration = -1 
					desc = pol_as_long_as_allies_or_subjects
				}
			}
		}
	}
	
	option = {
		name = flavor_pol.25.c 
		
		ai_chance = { factor = 0 } 
		if = { 
			limit = { exists = POL }
			remove_historical_friend = POL 
			POL = { 
				remove_historical_friend = ROOT 
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = BOH
				} 
			} 
		}
		else = {
			remove_historical_friend = PLC 
			PLC = { 
				remove_historical_friend = ROOT 
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = BOH
				} 
			} 
		}
	}
}		

country_event = { #Polish-Hungarian Ties 
	id = flavor_pol.26
	title = flavor_pol.26.t 
	desc = flavor_pol.26.d 
	picture = POLAND_HUNGARY_eventPicture
	is_triggered_only = yes 
	
	major = yes 
	major_trigger = { 
		capital_scope = { continent = europe } 
	}
	
	option = { 
		name = flavor_pol.26.a 
		
		ai_chance = { 
			factor = 1
			modifier = {
				POL = { diplomatic_ideas = 2 } 
				factor = 1.75
			}
			modifier = { 
				POL = { influence_ideas = 2 } 
				factor = 1.75
			}
			modifier = { 
				trust = { 
					who = POL 
					value = 100 
				}
				factor = 1.5 
			}
			modifier = {
				PLC = { diplomatic_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				PLC = { influence_ideas = 2 } 
				factor = 1.5
			}
			modifier = { 
				trust = { 
					who = PLC 
					value = 100 
				}
				factor = 1.5 
			}
		}
		if = { 
			limit = {
				PLC = { exists = yes }
			}
			PLC = { create_union = ROOT }
		}
		else = {
			POL = { create_union = ROOT }
		}
	}
	
	option = { 
		name = flavor_pol.26.b 
		
		ai_chance = { factor = 8 } 
		HUN = {
			add_country_modifier = {
				name = pol_polish_hungarian_ties_modifier
				duration = 9125
			}
		}
		if = {
			limit = { exists = POL }
			POL = { 
				add_country_modifier = {
					name = pol_polish_hungarian_ties_modifier
					duration = 9125
				}
			}
		}
		else = {
			PLC = {
				add_country_modifier = {
					name = pol_polish_hungarian_ties_modifier
					duration = 9125
				}
			}
		}
		
	}
	
	option = {
		name = flavor_pol.26.c 
		
		ai_chance = { factor = 0 } 
		remove_historical_friend = POL 
		if = {
			limit = { exists = POL }
			POL = { 
				remove_historical_friend = ROOT 
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = HUN
				} 
			} 
		}
		else = {
			PLC = { 
				remove_historical_friend = ROOT 
				add_casus_belli = {
					type = cb_restore_personal_union
					months = 300
					target = HUN
				} 
			}
		}
	}
}

country_event = { #Expanding the Quarter Army 
	id = flavor_pol.27
	title = flavor_pol.27.t 
	desc = flavor_pol.27.d 
	picture = HUSSARS_eventPicture
	is_triggered_only = yes 
	
	option = { 
		name = flavor_pol.27.a 
		
		if = { 
			limit = { has_dlc = "Cradle of Civilization" }
			add_country_modifier = { 
				name = pol_modernized_army_modifier
				duration = -1 
			}
		}
		else = { 
			add_country_modifier = {
				name = pol_modernized_army_2_modifier
				duration = -1 
			}
		}
	}
	
	option = { 
		name = flavor_pol.27.b 
		
		trigger = {
			OR = { 
				num_of_hussars = 8
				num_of_cavalry = 65 
			}
		}
		if = { 
			limit = { has_dlc = "Lions of the North" }
			add_country_modifier = { 
				name = pol_elite_hussar_cavalry_modifier
				duration = -1 
			}
		}
		if = { 
			limit = { 
				has_dlc = "Lions of the North"
				has_estate = estate_nobles 
			}
			set_estate_privilege = estate_nobles_sponsor_hussars 
		}
		else = { 
			add_country_modifier = { 
				name = pol_elite_hussar_cavalry_2_modifier
				duration = -1 
			}
		}
	}
	
	option = { 
		name = flavor_pol.27.c 
		
		trigger = { 
			OR = { 
				has_global_modifier_value = {
					which = infantry_power 
					value = 0.30 
				}
				has_global_modifier_value = {
					which = discipline  
					value = 0.25
				}
			}
		}
		add_country_modifier = { 
			name = modernized_fire_ranks_modifier
			duration = -1 
		}
	}
	
	option = { 
		name = flavor_pol.27.dee
		
		trigger = { 
			estate_loyalty = { 
				estate = estate_cossacks 
				loyalty = 60 
			}
			num_of_estate_privileges = {	
				estate = estate_cossacks 
				value = 5 
			}
		}
		add_country_modifier = { 
			name = pol_cavalry_with_state_modifier 
			duration = -1 
		}
	}
}

country_event = { #Collegium Maius & the Growth of Thought
	id = flavor_pol.28
	title = flavor_pol.28.t 
	desc = flavor_pol.28.d 
	picture = GREAT_BUILDING_eventPicture
	is_triggered_only = yes 
	
	option = {
		name = flavor_pol.28.a 
		
		if = {
			limit = { has_dlc = "Rule Britannia" } 
			change_innovativeness = 3 
		}
		else = { 
			add_adm_power = 25 
			add_dip_power = 25
		}
		if = { 
			limit = { 
				262 = { 
					NOT = { has_building = university } 
				}
			}
			262 = { add_building = university } 
		}
		else_if = {
			limit = { has_dlc = "Rights of Man" } 
			add_ruler_personality = scholar_personality
		}
		else = { 
			262 = { add_base_tax = 1 } 
		}
		custom_tooltip = pol_institutions_will_slowly_grow_in_262_tt
		hidden_effect = {
			262 = { 
				add_province_modifier = { 
					name = pol_krakow_university_modifier 
					duration = -1
					hidden = yes 
				}
			}
		}
	}
}

country_event = { #Stefan the Great Ascends on the Moldavian Throne
	id = flavor_pol.29
	title = flavor_pol.29.t 
	desc = flavor_pol.29.d 
	picture = ADVISOR_eventPicture
	is_triggered_only = yes 
	
	option = {
		name = flavor_pol.29.a 
		
		MOL = { 
			define_ruler = { 
				name = "Stefan the Great"
				dynasty = ROOT 
				adm = 3 
				dip = 3 
				mil = 5 
			}
			add_liberty_desire = -25 
		}
	}
	
	option = { 
		name = flavor_pol.29.b 
		
		add_dip_power = 50 
		MOL = { add_stability_or_adm_power = yes } 
	}
	
	option = { 
		name = flavor_pol.29.c 
		
		if = { 
			limit = {
				MOL = { is_march = yes } 
			}
			custom_tooltip = pol_relegate_mol_to_vassal_tt
			hidden_effect = { 
				vassalize = MOL 
			}
			MOL = { 
				add_liberty_desire = 10 
				if = { 
					limit = { has_estate = estate_nobles } 
					add_estate_loyalty = { 
						estate = estate_nobles 
						loyalty = -15 
					}
				}
			} 
		}
		add_country_modifier = { 
			name = pol_increased_crown_taxes_modifier
			duration = 3650 
		}	
	}
}

country_event = { #The Crown of Rome
	id = flavor_pol.30
	title = flavor_pol.30.t 
	desc = flavor_pol.30.d 
	picture = RELIGIOUS_WARS_eventPicture
	is_triggered_only = yes 
	
	option = { 
		name = flavor_pol.30.a 
		
		if = { 
			limit = { 
				BYZ = { 
					NOT = { is_subject_of = ROOT } 
				}
			}
			thrace_area = {
				add_core = BYZ 
			}
			release = BYZ 
			vassalize = BYZ 
		}
		BYZ = { 
			change_religion = orthodox 
			add_historical_friend = ROOT
		}
		add_historical_friend = BYZ 
		151 = { 
			if = { 
				limit = { 
					NOT = { religion = orthodox } 
				}
				change_religion = orthodox 
			}
		}
		add_country_modifier = {
			name = pol_defenders_of_rome_modifier
			duration = 10950
		}
	}
	
	option = { 
		name = flavor_pol.30.b 
		
		trigger = { 
			religion = catholic 
			thrace_area = {
				type = all 
				owned_by = ROOT
			}
		}
		if = { 
			limit = { 
				LAE = { 
					NOT = { is_subject_of = ROOT } 
				}
			}
			thrace_area = {
				add_core = LAE 
			}
			release = LAE 
			vassalize = LAE 
		}
		LAE = { 
			change_religion = catholic
			set_dynasty = ROOT
			hidden_effect = { 
				every_owned_province = { 
					limit = {
						region = balkan_region
						has_owner_religion = no 
					} 
					change_religion = catholic 
					change_culture = ROOT
				}
			}
			if = {
				limit = { has_updated_culture = { culture = slavic } }
				add_accepted_culture = polish_new
			}
			else = {
				add_accepted_culture = polish
			}
		}
		151 = { 
			if = { 
				limit = { 
					NOT = { religion = ROOT } 
				}
				change_religion = ROOT 
			}
		}
		add_country_modifier = {
			name = pol_renewed_crusader_fervor_modifier
			duration = 10950
		}
	}
	
	option = { 
		name = flavor_pol.30.c 
		
		151 = { 
			add_base_tax = 2 
			add_base_production = 2 
			add_base_manpower = 2 
		}
		add_ruler_modifier = {
			name = pol_heir_of_rome_modifer
			duration = -1 
		}
	}
}	

country_event = { #Baltic Gold & the Gates of Kings 
	id = flavor_pol.31
	title = flavor_pol.31.t 
	desc = flavor_pol.31.d 
	picture = CITY_DEVELOPMENT_eventPicture
	is_triggered_only = yes 
	
	option = {
		name = flavor_pol.31.a 
		
		43 = {
			add_province_modifier = {
				name = pol_thriving_center_of_gdansk_modifier
				duration = 9125 
			}
			add_base_production = 1 
			if = { 
				limit = { has_dlc = "Mandate of Heaven" }
				add_prosperity = 100 
			}
			else = { add_base_tax = 1 }
		}
	}
}

country_event = { #Negotiations of Lublin 
	id = flavor_pol.32
	title = flavor_pol.32.t 
	desc = flavor_pol.32.d 
	picture = NEGOTIATIONS_LUBLIN_eventPicture
	is_triggered_only = yes 
	
	option = {
		name = flavor_pol.32.a 
		
		west_dniepr_area = {
			limit = { country_or_non_sovereign_subject_holds = ROOT } 
			cede_province = ROOT 
			remove_core = LIT
		}
		east_dniepr_area = {
			limit = { country_or_non_sovereign_subject_holds = ROOT } 
			cede_province = ROOT 
			remove_core = LIT
		}
		podolia_volhynia_area = {
			limit = { country_or_non_sovereign_subject_holds = ROOT }  
			cede_province = ROOT 
			remove_core = LIT 
		}
		282 = {
			if = { 
				limit = {
					NOT = { owned_by = ROOT }
				}
				cede_province = ROOT 
				remove_core = LIT
			}
		}
		283 = {
			if = { 
				limit = {
					NOT = { owned_by = ROOT }
				}
				cede_province = ROOT 
				remove_core = LIT
			}
		}
		2406 = {
			if = { 
				limit = {
					NOT = { owned_by = ROOT }
				}
				cede_province = ROOT 
				remove_core = LIT
			}
		}
		LIT = {
			add_opinion = {
				who = ROOT 
				modifier = pol_annexed_ruthenia_opinion_modifier
			}
			remove_historical_friend = ROOT 
		}
		remove_historical_friend = LIT 
		custom_tooltip = pol_form_plc_earlier_tt
		set_country_flag = pol_tech_8_form_plc_flag
	}
	
	option = {
		name = flavor_pol.32.b 
		
		add_country_modifier = {
			name = pol_shared_prosperity_modifier 
			duration = 5475 
		}
		LIT = {
			add_country_modifier = {
				name = pol_shared_prosperity_modifier 
				duration = 5475 
			}
		}
	}
}	

country_event = { #The Sejm Diet of [GetYear]
	id = flavor_pol.33
	title = flavor_pol.33.t 
	desc = flavor_pol.33.d 
	picture = HRE_eventPicture
	is_triggered_only = yes

	major = yes 
	major_trigger = {
		capital_scope = {
			continent = europe 
		}
	}
	
	option = {
		name = flavor_pol.33.a 
		
		ai_chance = { factor = 10 } 
		POL = { 
			set_in_empire = yes 
		}
	}
	
	option = {
		name = flavor_pol.33.b 
		
		ai_chance = { factor = 0 } 
		
		custom_tooltip = pol_changes_tt
		hidden_effect = {
			POL = {
				clr_country_flag = pol_denied_pu_flag
				clr_country_flag = pol_chose_pu_flag
				set_country_flag = pol_chose_pu_flag
				swap_non_generic_missions = yes 
			}
		}
	}
}