namespace = FEE_Great_Britain_Events

# Francis Bacon
country_event = {
	id = FEE_Great_Britain_Events.1
	title = FEE_Great_Britain_Events.1.T
	desc = FEE_Great_Britain_Events.1.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		has_institution = renaissance
		stability = 1
		is_year = 1500
	}

	mean_time_to_happen = {
		months = 120
	}

	option = {
		name = FEE_Great_Britain_Events.1.OPT1

		define_advisor = {
			type = natural_scientist
			name = "Francis Bacon"
			skill = 3
			cost_multiplier = 0.25
		}

		add_country_modifier = {
			name = fee_gbr_scientific_method
			duration = 7300
		}
	}
}

# The Authorized Version
country_event = {
	id = FEE_Great_Britain_Events.2
	title = FEE_Great_Britain_Events.2.T
	desc = FEE_Great_Britain_Events.2.D
	picture = BIG_BOOK_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		OR = {
			religion = protestant
			religion = anglican
			religion = reformed
		}
		is_year = 1525
	}

	mean_time_to_happen = {
		months = 100
	}

	option = {
		name = FEE_Great_Britain_Events.2.OPT1
		ai_chance = {
			factor = 25
		}

		add_years_of_income = -0.25
		add_country_modifier = {
			name = fee_gbr_king_james_bible
			duration = -1
		}
		define_advisor = {
			type = theologian
			cost_multiplier = 0.25
			skill = 3
		}
	}

	option = {
		name = FEE_Great_Britain_Events.2.OPT2
		ai_chance = {
			factor = 25
		}

		add_years_of_income = -0.25
		add_country_modifier = {
			name = fee_gbr_authorized_version
			duration = -1
		}
		define_advisor = {
			type = philosopher
			cost_multiplier = 0.25
			skill = 3
		}
	}

	option = {
		name = FEE_Great_Britain_Events.2.OPT3
		ai_chance = {
			factor = 25
		}

		add_years_of_income = -0.25
		add_country_modifier = {
			name = fee_gbr_god_now_speaks_english
			duration = -1
		}
		define_advisor = {
			type = artist
			cost_multiplier = 0.25
			skill = 3
		}
	}

	option = {
		name = FEE_Great_Britain_Events.2.OPT4
		ai_chance = {
			factor = 25
		}

		add_prestige = -10
	}

	after = {
		hidden_effect = {
			set_country_flag = had_the_fee_gbr_authorized_version
		}
	}
}

# The Wicked Bible
country_event = {
	id = FEE_Great_Britain_Events.3
	title = FEE_Great_Britain_Events.3.T
	desc = FEE_Great_Britain_Events.3.D
	picture = BIG_BOOK_eventPicture

	fire_only_once = yes

	trigger = {
		has_country_flag = had_the_fee_gbr_authorized_version
	}

	mean_time_to_happen = {
		months = 6
	}

	option = {
		name = FEE_Great_Britain_Events.3.OPT1
		ai_chance = {
			factor = 50
		}

		add_years_of_income = 0.25
	}

	option = {
		name = FEE_Great_Britain_Events.3.OPT2
		ai_chance = {
			factor = 50
		}

		add_stability_or_adm_power = yes
	}

	after = {
		hidden_effect = {
			clr_country_flag = had_the_fee_gbr_authorized_version
		}
	}
}

# The Acts of Union
country_event = {
	id = FEE_Great_Britain_Events.4
	title = FEE_Great_Britain_Events.4.T
	desc = FEE_Great_Britain_Events.4.D
	picture = GOOD_WITH_MONARCH_eventPicture

	fire_only_once = yes

	major = yes

	trigger = {
		tag = GBR
		owns_or_subject_of = 4121
		owns_or_subject_of = 4380
		owns_or_subject_of = 372
		owns_or_subject_of = 373
		owns_or_subject_of = 4119
		owns_or_subject_of = 376
		owns_or_subject_of = 4379
		owns_or_subject_of = 375
		owns_or_subject_of = 4377
		owns_or_subject_of = 374
		owns_or_subject_of = 4118
		owns_or_subject_of = 4378
	}

	option = {
		name = FEE_Great_Britain_Events.4.OPT1

		add_stability_or_adm_power = yes
		if = {
			limit = {
				accepted_culture = scottish
				accepted_culture = highland_scottish
				accepted_culture = irish
			}
			add_dip_power = 100
		}
		else = {
			add_accepted_culture = scottish
			add_accepted_culture = highland_scottish
			add_accepted_culture = irish
		}
		add_country_modifier = {
			name = fee_gbr_united_kingdom
			duration = -1
		}
	}

	option = {
		name = FEE_Great_Britain_Events.4.OPT2
		ai_chance = {
			factor = 100
		}

		add_stability_or_adm_power = yes
		if = {
			limit = {
				accepted_culture = scottish
				accepted_culture = highland_scottish
			}
			add_dip_power = 50
		}
		else = {
			add_accepted_culture = scottish
			add_accepted_culture = highland_scottish
		}

		add_country_modifier = {
			name = fee_gbr_union_of_britain
			duration = -1
		}
		if = {
			limit = {
				any_owned_province = {
					culture = irish
				}
			}
			custom_tooltip = fee_gbr_irish_tt
			tooltip = {
				random_owned_province = {
					limit = {
						culture = irish
					}
					add_province_modifier = {
						name = fee_gbr_unequal_status
						duration = -1
					}
				}
			}
			hidden_effect = {
				every_owned_province = {
					limit = {
						culture = irish
					}
					add_province_modifier = {
						name = fee_gbr_unequal_status
						duration = -1
					}
				}
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.4.OPT3

		add_stability = -1
		add_mil_power = 100
		add_mercantilism_or_monarch_power = { amount = 1 }
		add_country_modifier = {
			name = fee_gbr_english_empire
			duration = -1
		}
	}
}

# The Statutes of Icolmkill
country_event = {
	id = FEE_Great_Britain_Events.5
	title = FEE_Great_Britain_Events.5.T
	desc = FEE_Great_Britain_Events.5.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		tag = GBR
		num_of_owned_provinces_with = {
			value = 2
			culture = highland_scottish
		}
	}

	option = {
		name = FEE_Great_Britain_Events.5.OPT1

		custom_tooltip = fee_gbr_statute_tt
		set_country_flag = fee_gbr_statute_flag
	}

	option = {
		name = FEE_Great_Britain_Events.5.OPT2

		add_country_modifier = {
			name = fee_gbr_centralization_monarchy
			duration = -1
		}
	}
}

# Samuel Pepys
country_event = {
	id = FEE_Great_Britain_Events.6
	title = FEE_Great_Britain_Events.6.T
	desc = FEE_Great_Britain_Events.6.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		is_year = 1650
	}

	mean_time_to_happen = {
		months = 150
	}

	option = {
		name = FEE_Great_Britain_Events.6.OPT1

		define_advisor = {
			type = naval_reformer
			skill = 2
			name = "Samuel Pepys"
			culture = english
			religion = ROOT
			discount = yes
		}
	}
}

# The Puritans
country_event = {
	id = FEE_Great_Britain_Events.7
	title = FEE_Great_Britain_Events.7.T
	desc = FEE_Great_Britain_Events.7.D
	picture = RELIGIOUS_TURMOIL_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = GBR
			tag = ENG
		}
		OR = {
			religion = protestant
			religion = anglican
		}
	}

	mean_time_to_happen = {
		months = 200
	}

	option = {
		name = FEE_Great_Britain_Events.7.OPT1

		change_religious_influence_equivalent_fee = { remove = 100 }
		add_country_modifier = {
			name = fee_gbr_puritan_dissent_tolerated
			duration = 18250
		}
		random_owned_province = {
			limit = {
				culture = english
			}
			change_religion = reformed
		}
		random_owned_province = {
			limit = {
				culture = english
			}
			change_religion = reformed
		}
		random_owned_province = {
			limit = {
				culture = english
			}
			change_religion = reformed
		}
		random_owned_province = {
			limit = {
				culture = english
			}
			change_religion = reformed
		}
		random_owned_province = {
			limit = {
				culture = english
			}
			change_religion = reformed
		}
	}

	option = {
		name = FEE_Great_Britain_Events.7.OPT2

		change_religious_influence_equivalent_fee = { add = 100 }
		add_country_modifier = {
			name = fee_gbr_puritans_crushed
			duration = 18250
		}
		random_owned_province = {
			limit = {
				region = british_isles_region
			}
			add_province_modifier = {
				name = fee_gbr_puritans_persecuted
				duration = 7300
			}
			spawn_rebels = {
				type = heretic_rebels
				size = 3
			}
		}
		random_owned_province = {
			limit = {
				region = british_isles_region
			}
			add_province_modifier = {
				name = fee_gbr_puritans_persecuted
				duration = 7300
			}
			spawn_rebels = {
				type = heretic_rebels
				size = 3
			}
		}
		random_owned_province = {
			limit = {
				region = british_isles_region
			}
			add_province_modifier = {
				name = fee_gbr_puritans_persecuted
				duration = 7300
			}
			spawn_rebels = {
				type = heretic_rebels
				size = 3
			}
		}
		random_owned_province = {
			limit = {
				region = british_isles_region
			}
			add_province_modifier = {
				name = fee_gbr_puritans_persecuted
				duration = 7300
			}
		}
		random_owned_province = {
			limit = {
				region = british_isles_region
			}
			add_province_modifier = {
				name = fee_gbr_puritans_persecuted
				duration = 7300
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.7.OPT3
		trigger = {
			exploration_ideas = 2
		}

		add_country_modifier = {
			name = fee_gbr_puritans_flee_to_the_new_world
			duration = 18250
		}
		random_province = {
			limit = {
				OR = {
					continent = north_america
					continent = south_america
					continent = oceania
				}
				culture_group = british
			}
			change_religion = reformed
			add_province_modifier = {
				name = fee_gbr_puritans_utopia
				duration = 7300
			}
		}
		random_province = {
			limit = {
				OR = {
					continent = north_america
					continent = south_america
					continent = oceania
				}
				culture_group = british
			}
			change_religion = reformed
			add_province_modifier = {
				name = fee_gbr_puritans_utopia
				duration = 7300
			}
		}
		random_province = {
			limit = {
				OR = {
					continent = north_america
					continent = south_america
					continent = oceania
				}
				culture_group = british
			}
			change_religion = reformed
			add_province_modifier = {
				name = fee_gbr_puritans_utopia
				duration = 7300
			}
		}
		random_province = {
			limit = {
				OR = {
					continent = north_america
					continent = south_america
					continent = oceania
				}
				culture_group = british
			}
			change_religion = reformed
			add_province_modifier = {
				name = fee_gbr_puritans_utopia
				duration = 7300
			}
		}
		random_province = {
			limit = {
				OR = {
					continent = north_america
					continent = south_america
					continent = oceania
				}
				culture_group = british
			}
			change_religion = reformed
			add_province_modifier = {
				name = fee_gbr_puritans_utopia
				duration = 7300
			}
		}
	}
}

# The South Sea Company
country_event = {
	id = FEE_Great_Britain_Events.8
	title = FEE_Great_Britain_Events.8.T
	desc = FEE_Great_Britain_Events.8.D
	picture = ECONOMY_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = GBR
			tag = ENG
		}
		is_year = 1600
		exploration_ideas = 1
		war_exhaustion = 3
		num_of_loans = 2
	}

	option = {
		name = FEE_Great_Britain_Events.8.OPT1

		add_inflation = -2
		add_years_of_income = 0.1
		add_war_exhaustion = -2

		hidden_effect = {
			random_list = {
				85 = {
					country_event = {
						id = FEE_Great_Britain_Events.9
					}
				}
				15 = {
					country_event = {
						id = FEE_Great_Britain_Events.10
					}
				}
			}
		}
	}
}

# South Sea Bubble Bursts
country_event = {
	id = FEE_Great_Britain_Events.9
	title = FEE_Great_Britain_Events.9.T
	desc = FEE_Great_Britain_Events.9.D
	picture = BANKRUPTCY_eventPicture

	is_triggered_only = yes

	major = yes

	option = {
		name = FEE_Great_Britain_Events.9.OPT1

		add_stability = -2
		add_inflation = 10
		add_years_of_income = -1
	}
}

# South Sea Company Pays Off
country_event = {
	id = FEE_Great_Britain_Events.10
	title = FEE_Great_Britain_Events.10.T
	desc = FEE_Great_Britain_Events.10.D
	picture = ECONOMY_eventPicture

	is_triggered_only = yes

	major = yes

	option = {
		name = FEE_Great_Britain_Events.10.OPT1

		add_stability_or_adm_power = yes
		add_years_of_income = 1
		add_inflation = -5
	}
}

# Jenkins' Ear
country_event = {
	id = FEE_Great_Britain_Events.11
	title = FEE_Great_Britain_Events.11.T
	desc = FEE_Great_Britain_Events.11.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		any_rival_country = {
			capital_scope = {
				region = iberia_region
			}
		}
		is_year = 1500
	}

	immediate = {
		hidden_effect = {
			#selects the iberian rival so it's name can be used in localization
			random_rival_country = {
				limit = {
					capital_scope = {
						region = iberia_region
					}
				}
				save_event_target_as = fee_gbr_iberian_rival_country
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.11.OPT1

		add_casus_belli = {
			target = event_target:fee_gbr_iberian_rival_country
			type = cb_insult
			months = 120
		}
		add_country_modifier = {
			name = fee_gbr_preparation_defend_honor
			duration = 3650
		}
	}

	option = {
		name = FEE_Great_Britain_Events.11.OPT2

		add_country_modifier = {
			name = fee_gbr_abuses_tolerated
			duration = 3650
		}
	}
}

# George Frederic Handel
country_event = {
	id = FEE_Great_Britain_Events.12
	title = FEE_Great_Britain_Events.12.T
	desc = FEE_Great_Britain_Events.12.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		is_year = 1700
	}

	mean_time_to_happen = {
		months = 150
	}

	option = {
		name = FEE_Great_Britain_Events.12.OPT1

		add_adm_power = 100
		add_prestige_or_monarch_power = { amount = 15 }
		add_innovativeness_or_monarch_power = {
			amount = 1
			adm = 10
			dip = 10
			mil = 10
		}
		define_advisor = {
			type = artist
			culture = saxon
			name = "George Frederic Handel"
			skill = 3
			discount = yes
		}
	}
}

# Sir Francis Drake
country_event = {
	id = FEE_Great_Britain_Events.15
	title = FEE_Great_Britain_Events.15.T
	desc = FEE_Great_Britain_Events.15.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		is_year = 1550
		NOT = {
			is_year = 1600
		}
		OR = {
			has_country_flag = circumnavigation_done
			has_country_flag = circumnavigation_first
		}
		any_province = {
			colonial_region = colonial_california
			has_discovered = ROOT
		}
	}

	mean_time_to_happen = {
		months = 60
	}

	option = {
		name = FEE_Great_Britain_Events.15.OPT1

		define_admiral = {
			shock = 3
			fire = 3
			manuever = 6
			siege = 2
			name = "Francis Drake"
			trait = El_Draque_modifier
		}
		if = {
			limit = {
				any_rival_country = {
					capital_scope = {
						region = iberia_region
					}
				}
			}
			random_rival_country = {
				limit = {
					capital_scope = {
						region = iberia_region
					}
				}
				add_opinion = {
					who = ROOT
					modifier = fee_gbr_el_draque
				}
			}
		}
		else = {
			add_prestige = -20
		}
	}

	option = {
		name = FEE_Great_Britain_Events.15.OPT2

		define_explorer = {
			shock = 1
			fire = 1
			manuever = 6
			siege = 1
			name = "Francis Drake"
			trait = Sea_Dog_modifier
		}
		add_country_modifier = {
			name = fee_gbr_legacy_drake
			duration = 7300
		}
	}

	option = {
		name = FEE_Great_Britain_Events.15.OPT3

		define_advisor = {
			type = navigator
			name = "Francis Drake"
			skill = 3
			cost_multiplier = 0.25
		}
	}
}

# The Great Plague of London
country_event = {
	id = FEE_Great_Britain_Events.16
	title = FEE_Great_Britain_Events.16.T
	desc = FEE_Great_Britain_Events.16.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	major = yes

	trigger = {
		owns = 236
		is_year = 1664
		NOT = { is_year = 1667 }
	}

	mean_time_to_happen = {
		months = 9
	}

	option = {
		name = FEE_Great_Britain_Events.16.OPT1

		236 = {
			set_province_flag = fee_allow_great_fire
			add_devastation = 30
			add_province_modifier = {
				name = fee_gbr_great_plague
				duration = 365
			}
		}
	}
}

# The Great Fire of London
country_event = {
	id = FEE_Great_Britain_Events.17
	title = FEE_Great_Britain_Events.17.T
	desc = FEE_Great_Britain_Events.17.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		is_year = 1664
		NOT = { is_year = 1667 }
		236 = {
			owned_by = ROOT
			has_province_flag = fee_allow_great_fire
		}
	}

	mean_time_to_happen = {
		months = 9
	}

	option = {
		name = FEE_Great_Britain_Events.17.OPT1

		236 = {
			add_devastation = 50
			add_base_tax = -3
			add_base_production = -3
			add_base_manpower = -3
			add_province_modifier = {
				name = fee_gbr_destruction_of_the_capital
				duration = -1
			}
		}
		hidden_effect = {
			country_event = { id = FEE_Great_Britain_Events.18 days = 558 }
		}
	}
}

# The Great Fire of London
country_event = {
	id = FEE_Great_Britain_Events.18
	title = FEE_Great_Britain_Events.18.T
	desc = FEE_Great_Britain_Events.18.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	is_triggered_only = yes

	option = {
		name = FEE_Great_Britain_Events.18.OPT1

		236 = {
			remove_province_modifier = fee_gbr_destruction_of_the_capital
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 2
			add_province_modifier = {
				name = fee_gbr_wrens_london
				duration = -1
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.18.OPT2

		236 = {
			remove_province_modifier = fee_gbr_destruction_of_the_capital
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 2
			add_province_modifier = {
				name = fee_gbr_everlyns_london
				duration = -1
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.18.OPT3

		236 = {
			remove_province_modifier = fee_gbr_destruction_of_the_capital
			add_base_tax = 2
			add_base_production = 2
			add_base_manpower = 2
			add_province_modifier = {
				name = fee_gbr_hookes_london
				duration = -1
			}
		}
	}
}

# The Field of the Cloth of Gold
country_event = {
	id = FEE_Great_Britain_Events.19
	title = FEE_Great_Britain_Events.19.T
	desc = FEE_Great_Britain_Events.19.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			tag = GBR
		}
		OR = {
			AND = {
				any_country = {
					dynasty = "von Habsburg"
					is_rival = ROOT
				}
			}
			SPA = {
				is_rival = ROOT
			}
		}
		ROOT = {
			is_part_of_hre = no
			NOT = { dynasty = "von Habsburg" }
			NOT = { junior_union_with = SPA }
		}
		FRA = {
			is_part_of_hre = no
			NOT = { dynasty = "von Habsburg" }
			NOT = { junior_union_with = SPA }
		}
		SPA = {
			OR = {
				NOT = {	junior_union_with = ROOT }
				NOT = { junior_union_with = FRA }
			}
		}
		is_year = 1490
		NOT = { is_year = 1560 }
	}

	option = {
		name = FEE_Great_Britain_Events.19.OPT1

		add_years_of_income = 0.2
		if = {
			limit = {
				FRA = {
					historical_rival_with = ROOT
				}
			}
			FRA = {
				remove_historical_rival = ROOT
			}
			remove_historical_rival = FRA
		}
		else = {
			FRA = {
				add_opinion = {
					who = ROOT
					modifier = fee_gbr_field_of_the_cloth_of_gold
				}
			}
			add_opinion = {
				who = FRA
				modifier = fee_gbr_field_of_the_cloth_of_gold
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.19.OPT2

		FRA = {
			add_opinion = {
				who = ROOT
				modifier = fee_gbr_rejected_alliance
			}
		}
		add_prestige = -10
	}
}

# The Rough Wooing
country_event = {
	id = FEE_Great_Britain_Events.20
	title = FEE_Great_Britain_Events.20.T
	desc = FEE_Great_Britain_Events.20.D
	picture = BATTLE_eventPicture

	fire_only_once = yes

	trigger = {
		tag = ENG
		is_free_or_tributary_trigger = yes
		exists = SCO
		SCO = {
			is_free_or_tributary_trigger = yes
			OR = {
				is_female = yes
				has_heir = no
				AND = {
					has_regency = yes
					has_female_heir = yes
				}
			}
		}
		is_year = 1500
		NOT = { is_year = 1600 }
		NOT = { exists = GBR }
		is_at_war = no
	}

	mean_time_to_happen = {
		months = 60
		modifier = {
			factor = 0.5
			truce_with = SCO
		}
	}

	option = {
		name = FEE_Great_Britain_Events.20.OPT1

		add_casus_belli = {
			type = cb_fabricated_claims
			target = SCO
			months = 120
		}
	}
}

#Sake Dean Mahomed
country_event = {
	id = FEE_Great_Britain_Events.21
	title = FEE_Great_Britain_Events.21.T
	desc = FEE_Great_Britain_Events.21.D
	picture = ADVISOR_eventPicture

	fire_only_once = yes

	trigger = {
		OR = {
			tag = ENG
			AND = {
				tag = GBR
				NOT = { exists = ENG }
			}
		}
		is_year = 1770
	}

	mean_time_to_happen = {
		months = 480
		modifier = {
			factor = 0.5
			india_superregion = {
				owned_by = ROOT
			}
		}
	}

	option = {
		name = FEE_Great_Britain_Events.21.OPT1

		add_dip_power = 30
		add_prestige_or_monarch_power = { amount = 5 }
		if = {
			limit = {
				exists = MUG
			}
			MUG = {
				country_event = { id = FEE_Great_Britain_Events.22 }
			}
		}
	}
}

#Sake Dean Mahomed
country_event = {
	id = FEE_Great_Britain_Events.22
	title = FEE_Great_Britain_Events.22.T
	desc = FEE_Great_Britain_Events.22.D
	picture = ADVISOR_eventPicture

	is_triggered_only = yes

	option = {
		name = FEE_Great_Britain_Events.22.OPT1

		add_prestige_or_monarch_power = { amount = 20 }
		add_country_modifier = {
			name = fee_gbr_travels_of_mahomed
			duration = 3650
		}
	}
}