####################################################
# Price Change Events
#
# written by Johan Andersson & Henrik Lohmander
####################################################

namespace = prices

# Triangle Trade
country_event = {
	id = prices.1
	title = prices.1.t
	desc = prices.1.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		colony = 1
		NOT = { has_global_flag = triangle_happened }
		any_subject_country = {
			is_colonial_nation = yes
			OR = {
				capital_scope = { continent = north_america }
				capital_scope = { continent = south_america }
				capital_scope = { continent = new_world }
			}
			OR = {
				tobacco = 4
				sugar = 4
				cotton = 4
			}
		}
		
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.1.a
		change_price = {
			trade_goods = slaves
			key = TRIANGLE_TRADE
			value = 0.5
			duration = -1
		}
		add_years_of_income  = 0.25
		add_prestige = 20
		set_global_flag = triangle_happened
	}
}


# Europeans in China
country_event = {
	id = prices.2
	title = prices.2.t
	desc = prices.2.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		capital_scope = { continent = europe }
		OR = {
			1371 = {	# Canton
				trade_share = {
					country = ROOT
					share = 5
				}
			}
			684 = {  #Hangzhou
				trade_share = {
					country = ROOT
					share = 5
				}
			}
		}
		NOT = { has_global_flag = europeans_in_china_happened }
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			set_global_flag = europeans_in_china_happened
		}
	}	
	
	option = {
		name = prices.2.a
		change_price = {
			trade_goods = chinaware
			key = EUROPEANS_IN_CHINA
			value = 0.5
			duration = -1
		}
		add_years_of_income  = 0.25
		add_prestige = 20
	}
}

#Johann Friedrich Bttger
country_event = {
	id = prices.3
	title = prices.3.t
	desc = prices.3.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture
	goto = 61

	fire_only_once = yes
	
	major = yes

	trigger = {
		owns = 61
		OR = {
			mission_completed = emp_sax_meissen_porcelain
			AND = {
				adm_tech = 24
				has_global_flag = europeans_in_china_happened
			}
		}
		NOT = { has_global_flag = bottger_happened }
	}
	
	mean_time_to_happen = {
		months = 1
	}

	immediate = {
		hidden_effect = { 
			set_global_flag = bottger_happened 
			if = {
				limit = {
					61 = { has_manufactory_trigger = yes }
				}
				61 = { 
					owner = { set_country_flag = sax_has_manufactory_flag }
				}
			}
		}
	}
	
	option = {
		name = prices.3.a
		61 = {
			add_base_production = 4
			change_trade_goods = chinaware
			if = {
				limit = {
					owner = { has_country_flag = sax_has_manufactory_flag }
				}
				remove_building = weapons 
				if = {
					limit = { 
						owner = { adm_tech = 16 } 
					}
				add_building = mills
				}
				else = { add_or_upgrade_production_building = yes }
			}
		}
		change_price = {
			trade_goods = chinaware
			key = JOHAN_FRIEDRICH_BOTTGER
			value = -0.5
			duration = -1
		}
		add_prestige_or_monarch_power = { amount = 20 }
	}

	after = {
		61 = {
			owner = { clr_country_flag = sax_has_manufactory_flag }
		}
	}
}

#Lots of Protestants, less demand for fish
country_event = {
	id = prices.4
	title = prices.4.t
	desc = prices.4.d
	picture = TRADE_GOODS_FURS_FISH_AND_SALT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		religion = catholic
		is_religion_enabled = protestant
		is_papal_controller = yes
		
		calc_true_if = {
			all_country = {
				religion = protestant
			}
			amount = 5
		}
		NOT = { has_global_flag = protestant_fish_happened }
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.4.a
		change_price = {
			trade_goods = fish
			key = PROTESTANT_DONT_EAT_FISH
			value = -0.1
			duration = -1
		}
	}
}



# Coffee Boom
country_event = {
	id = prices.5
	title = prices.5.t
	desc = prices.5.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			capital_scope = { continent = europe }
			AND = {
				any_owned_province = {
					continent =  europe
				}
				dip_tech = 20
			}
		}
		NOT = { has_global_flag = coffee_boom_happened }
		OR = {
			any_owned_province = {
				region = malaya_region
				trade_goods = coffee
			}
			any_subject_country = {
				is_colonial_nation = yes
				coffee = 4
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}

	
	option = {
		name = prices.5.a
		change_price = {
			trade_goods = coffee
			key = COFFEE_BOOM
			value = 0.5
			duration = -1
		}
		add_years_of_income  = 0.25
		add_prestige = 20
	}
}


# Cotton Imports
country_event = {
	id = prices.6
	title = prices.6.t
	desc = prices.6.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	
	major = yes

	trigger = {
		is_great_power = yes
		capital_scope = { continent = europe }
		any_owned_province = {
			trade_goods = wool
			continent = europe
		} 
		OR = {
			504 = { #Indus
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			524 = { #Deccan
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1340 = { #Ceylon
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1343 = { #Bengal
				trade_share = {
					country = ROOT
					share = 10
				}
			}
		}
		NOT = { has_country_flag = cotton_imports }
		NOT = { has_global_flag = cotton_imports_global }
	}
	
	mean_time_to_happen = {
		months = 1
	}

	immediate = {
		set_global_flag = cotton_imports_global
	}
	
	option = {
		name = prices.6.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				wool = 6
			}
			modifier = {
				factor = 1.5
				cotton = 12
			}
			modifier = {
				factor = 1.5
				cotton = 18
			}
		}
		change_price = {
			trade_goods = wool
			key = COTTON_IMPORTS
			value = -0.10
			duration = -1
		}
		change_price = {
			trade_goods = cotton
			key = COTTON_IMPORTS
			value = 0.20
			duration = -1
		}
		add_mercantilism = -2
	}
	option = {
		name = prices.6.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				wool = 6
			}
			modifier = {
				factor = 1.5
				wool = 12
			}
			modifier = {
				factor = 1.5
				wool = 18
			}
		}
		set_country_flag = cotton_imports
		504 = { #Indus
			add_trade_modifier = {
				who = root
				duration = -1
				power = -10
				key = COTTON_IMPORTS_BANNED
			}
		}
		524 = { #Deccan
			add_trade_modifier = {
				who = root
				duration = -1
				power = -10
				key = COTTON_IMPORTS_BANNED
			}
		}
		1340 = { #Ceylon
			add_trade_modifier = {
				who = root
				duration = -1
				power = -10
				key = COTTON_IMPORTS_BANNED
			}
		}
		1343 = { #Bengal
			add_trade_modifier = {
				who = root
				duration = -1
				power = -10
				key = COTTON_IMPORTS_BANNED
			}
		}
	}
}



# Of Tea and Sugar
country_event = {
	id = prices.7
	title = prices.7.t
	desc = prices.7.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			capital_scope = { continent = europe }
			AND = {
				any_owned_province = { continent = europe }
				dip_tech = 20
			}
		}
		OR = {
			any_subject_country = {
				is_colonial_nation = yes
				any_owned_province = {
					trade_goods = sugar
				}
			}
			any_owned_province = {
				trade_goods = sugar
				continent = new_world
			}
			any_owned_province = {
				trade_goods = sugar
				continent = north_america
			}
			any_owned_province = {
				trade_goods = sugar
				continent = south_america
			}
		}
		OR = {
			1371 = {	# Canton
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			684 = {  #Hangzhou
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			any_owned_province = {
				trade_goods = tea
			}
		}
		NOT = { has_global_flag = tea_and_sugar_happened }
	}
	
	mean_time_to_happen = {
		months = 1
	}

	
	option = {
		name = prices.7.a
		change_price = {
			trade_goods = tea
			key = TEA_AND_SUGAR
			value = 0.25
			duration = -1
		}
		change_price = {
			trade_goods = sugar
			key = TEA_AND_SUGAR
			value = 0.25
			duration = -1
		}
		add_years_of_income  = 0.25
		add_prestige = 20
	}
}



# Spice Trade
country_event = {
	id = prices.8
	title = prices.8.t
	desc = prices.8.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		if = {
			limit = { #So it's easier to see rather than a big OR
				has_country_flag = orm_spice_trade_trigger_flag
			}
			always = yes
		}
		else = {
		has_idea = quest_for_the_new_world
		num_of_ports = 4
		NOT = {
			capital_scope = {
				continent = asia
			}
		}
		NOT = {
			capital_scope = {
				continent = oceania
			}
		}
		has_discovered = 1460 # Cape of Good Hope
		technology_group = western
		any_active_trade_node = {
			has_merchant = PREV
			OR = {
				province_id = 1361 # Straits of Johor
				province_id = 1343 # Ganges Delta
				province_id = 504 # Thatta
				province_id = 1340 # Comorin Cape
			}
		}
		NOT = { has_global_flag = spice_trade_happened }
	}
	}
	
	mean_time_to_happen = {
		months = 1
	}

	immediate = {
		hidden_effect = {
			set_global_flag = spice_trade_happened
		}
	}

	
	option = {
		name = prices.8.a
		change_price = {
			trade_goods = spices
			key = SPICE_TRADE
			value = 0.3333333333
			duration = -1
		}
		
		change_price = {
			trade_goods = cinnamon
			key = SPICE_TRADE
			value = 0.285714
			duration = -1
		}
		
		change_price = {
			trade_goods = nutmeg
			key = SPICE_TRADE
			value = 0.3
			duration = -1
		}
		
		change_price = {
			trade_goods = cloves
			key = SPICE_TRADE
			value = 0.285714
			duration = -1
		}
		
		
		
		add_years_of_income  = 0.25
		add_prestige = 20
	}
}


# Abolitionism
country_event = {
	id = prices.9
	title = prices.9.t
	desc = prices.9.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		has_country_modifier = the_abolish_slavery_act
		NOT = { has_global_flag = abolitionism_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.9.a
		change_price = {
			trade_goods = slaves
			key = ABOLITIONISM
			value = -0.4
			duration = -1
		}
		add_prestige = 10
	}
}



# Eruption of Huaynaputina
country_event = {
	id = prices.10
	title = prices.10.t
	desc = prices.10.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			owns = 805 
			owns = 2828 
			owns = 804   #Provinces next to volcano location in Peru
		}
		is_year = 1600
		not = { is_year = 1610 }
	}
	mean_time_to_happen = {
		months = 3
	}
	
	
	option = {
		name = prices.10.a
		change_price = {
			trade_goods = grain
			key = HUAYNAPUTINA
			value = -0.75
			duration = 730
		}
		change_price = {
			trade_goods = wine
			key = HUAYNAPUTINA
			value = -0.75
			duration = 730
		}
		change_price = {
			trade_goods = olive_oil
			key = HUAYNAPUTINA
			value = -0.75
			duration = 730
		}
		change_price = {
			trade_goods = citrus
			key = HUAYNAPUTINA
			value = -0.75
			duration = 730
		}
		change_price = {
			trade_goods = beer
			key = HUAYNAPUTINA
			value = -0.25
			duration = 730
		}
		change_price = {
			trade_goods = cheese
			key = HUAYNAPUTINA
			value = -0.25
			duration = 730
		}
		change_price = {
			trade_goods = tomato
			key = HUAYNAPUTINA
			value = -0.25
			duration = 730
		}
		change_price = {
			trade_goods = millet
			key = HUAYNAPUTINA
			value = -0.25
			duration = 730
		}
	}
}

# Coldest Period of the  Little Ice Age 
country_event = {
	id = prices.11
	title = prices.11.t
	desc = prices.11.d
	picture = TRADE_GOODS_FURS_FISH_AND_SALT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			owns = 371 #Iceland was hit badly by the Little Ice Age
			owns = 370 #Iceland was hit badly by the Little Ice Age
		}
		is_year = 1650
		not = { is_year = 1660 }
	}
	mean_time_to_happen = {
		months = 3
	}
	
	
	option = {
		name = prices.11.a
		change_price = {
			trade_goods = grain #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		
		change_price = {
			trade_goods = livestock #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = apiculture #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = seafood #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}	
		change_price = {
			trade_goods = citrus #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = tomato #Agriculture is having a hard time coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = wine #Spoiled by the cold
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = fish #Fishing fleets are having a hard time to coping.
			key = LITTLE_ICE_AGE
			value = -0.25
			duration = 3650
		}
		change_price = {
			trade_goods = salt	#Food Preservation.
			key = LITTLE_ICE_AGE
			value = 0.25
			duration = 3650
		}
		change_price = {
			trade_goods = fur_clothing #Increased demand due to colder climate.
			key = LITTLE_ICE_AGE
			value = 0.25
			duration = 3650
		}
	}
}

# Cork Bottle Stoppers
country_event = {
	id = prices.12
	title = prices.12.t
	desc = prices.12.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 20
		wine = 1
		glass = 1
		NOT = { has_global_flag = wine_corks_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.12.a
		change_price = {
			trade_goods = wine
			key = WINE_CORKS
			value = 0.25
			duration = -1
		}
		change_price = {
			trade_goods = olive_oil
			key = WINE_CORKS
			value = 0.142857
			duration = -1
		}
		change_price = {
			trade_goods = palm_oil
			key = WINE_CORKS
			value = 0.142857
			duration = -1
		}
		change_price = {
			trade_goods = glass
			key = WINE_CORKS
			value = 0.15
			duration = -1
		}
	}
}

# New Draperies
country_event = {
	id = prices.13
	title = prices.13.t
	desc = prices.13.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 11
		cloth = 1
		NOT = { has_global_flag = new_draperies_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.13.a
		change_price = {
			trade_goods = cloth
			key = NEW_DRAPERIES
			value = 0.10
			duration = -1
		}
		change_price = {
			trade_goods = wool
			key = NEW_DRAPERIES
			value = -0.20
			duration = -1
		}
	}
}

# Uniform Regulations
country_event = {
	id = prices.14
	title = prices.14.t
	desc = prices.14.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		mil_tech = 21
		uniforms = 1
		NOT = { has_global_flag = regulated_uniforms_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.14.a
		change_price = {
			trade_goods = cloth
			key = REGULATED_UNIFORMS
			value = 0.10
			duration = -1
		}
		change_price = {
			trade_goods = wool
			key = REGULATED_UNIFORMS
			value = 0.05
			duration = -1
		}
		change_price = {
			trade_goods = dyes
			key = REGULATED_UNIFORMS
			value = 0.15
			duration = -1
		}
	}
}

# Great Banks Fisheries
country_event = {
	id = prices.15
	title = prices.15.t
	desc = prices.15.d
	picture = TRADE_GOODS_FURS_FISH_AND_SALT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			owns_core_province = 980
			owns_core_province = 2573
			owns_core_province = 981
		}
		NOT = { has_global_flag = great_fisheries_happened }
		capital_scope = { NOT = { continent = north_america } }
		capital_scope = { NOT = { continent = new_world } }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.15.a
		change_price = {
			trade_goods = fish
			key = GREAT_FISHERIES
			value = -0.1
			duration = -1
		}
		change_price = {
			trade_goods = salt
			key = GREAT_FISHERIES
			value = 0.1
			duration = -1
		}
		newfoundland_area = {
			add_permanent_province_modifier = {
				name = "grand_bank_fisheries"
				duration = -1
			}
		}
	}
}

# Surging demand for Calicoes & Other Cotton Cloths
country_event = {
	id = prices.16
	title = prices.16.t
	desc = prices.16.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		capital_scope = { continent = europe }
		dip_tech = 22
		OR = {
			504 = { #Indus
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			524 = { #Deccan
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1340 = { #Ceylon
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1343 = { #Bengal
				trade_share = {
					country = ROOT
					share = 10
				}
			}
		}
		NOT = { has_country_flag = cotton_imports }	#Shouldn't trigger for someone that already disallowed Cotton imports
		NOT = { has_global_flag = calicoes_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.16.a
		change_price = {
			trade_goods = cotton
			key = CALICOES
			value = 0.45
			duration = -1
		}
	}
}


# Depletion of the European Beaver
country_event = {
	id = prices.17
	title = prices.17.t
	desc = prices.17.d
	picture = TRADE_GOODS_FURS_FISH_AND_SALT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		capital_scope = { continent = europe }
		owns = 61
		NOT = { has_global_flag = depleted_beaver_happened }
		is_year = 1570
	}
	mean_time_to_happen = {
		months = 3
	}
	
	
	option = {
		name = prices.17.a
		change_price = {
			trade_goods = fur
			key = DEPLETION_OF_EUROPEAN_BEAVER
			value = 0.4
			duration = -1
		}
	}
}

# Felt Hats
country_event = {
	id = prices.18
	title = prices.18.t
	desc = prices.18.d
	picture = TRADE_GOODS_FURS_FISH_AND_SALT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			capital_scope = { continent = europe }
			is_colonial_nation = yes
		}
		OR = {
			any_owned_province = {
				trade_goods = fur
				continent = north_america
			}
			any_owned_province = {
				trade_goods = fur
				continent = new_world
			}
		}
		NOT = { has_global_flag = felt_hats_happened }
	}
	mean_time_to_happen = {
		months = 3
	}
	
	
	option = {
		name = prices.18.a
		change_price = {
			trade_goods = fur
			key = FELT_HATS
			value = 0.25
			duration = -1
		}
	}
}

# Permanent Navies
country_event = {
	id = prices.19
	title = prices.19.t
	desc = prices.19.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 22
		num_of_ports = 3
		NOT = { has_global_flag = permanent_navies_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.19.a
		change_price = {
			trade_goods = naval_supplies
			key = PERMANENT_NAVIES
			value = 0.3
			duration = -1
		}
		change_price = {
			trade_goods = tar
			key = PERMANENT_NAVIES
			value = 0.3
			duration = -1
		}
		change_price = {
			trade_goods = glass
			key = PERMANENT_NAVIES
			value = 0.15
			duration = -1
		}
		change_price = {
			trade_goods = citrus
			key = PERMANENT_NAVIES
			value = 0.40
			duration = -1
		}
		change_price = {
			trade_goods = livestock
			key = PERMANENT_NAVIES
			value = 0.10
			duration = -1
		}
	}
}

# Bronze Cannons
country_event = {
	id = prices.20
	title = prices.20.t
	desc = prices.20.d
	picture = TRADE_GOODS_METALS_AND_MINING_EQUIPENT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		mil_tech = 7
		NOT = { has_global_flag = bronze_cannons_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.20.a
		change_price = {
			trade_goods = copper
			key = BRONZE_CANNONS
			value = 0.3
			duration = -1
		}
		set_global_flag = bronze_cannons_happened
		change_price = {
			trade_goods = tin
			key = BRONZE_CANNONS
			value = 0.3
			duration = -1
		}
	}
}

# Japanese Tea Culture
country_event = {
	id = prices.21
	title = prices.21.t
	desc = prices.21.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 8
		OR = {
			has_reform = shogunate
			tag = JAP
		}
		NOT = { has_global_flag = japanese_tea_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.21.a
		change_price = {
			trade_goods = tea
			key = JAPANESE_TEA_CULTURE
			value = 0.25
			duration = -1
		}
		change_price = {
			trade_goods = incense
			key = JAPANESE_TEA_CULTURE
			value = 0.10
			duration = -1
		}
	}
}

# Decline of the Spice Trade
country_event = {
	id = prices.22
	title = prices.22.t
	desc = prices.22.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		is_year = 1600
		capital_scope = { continent = europe }
		religion_group = christian
		spices = 3
		any_known_country = {
			capital_scope = { continent = europe }
			religion_group = christian
			spices = 3
		}
		NOT = { has_global_flag = decline_of_spices_happened }
	}
	mean_time_to_happen = {
		months = 60
	}
	
	immediate = { 
		hidden_effect = { set_global_flag = decline_of_spices_happened }
	}
	
	option = {
		name = prices.22.a
		change_price = {
			trade_goods = spices
			key = DECLINE_OF_SPICE_TRADE
			value = -0.333333333
			duration = -1
		}
		
		change_price = {
			trade_goods = cloves
			key = DECLINE_OF_SPICE_TRADE
			value = -0.285714
			duration = -1
		}
		
		change_price = {
			trade_goods = nutmeg
			key = DECLINE_OF_SPICE_TRADE
			value = -0.3
			duration = -1
		}
		
		
		change_price = {
			trade_goods = cinnamon
			key = DECLINE_OF_SPICE_TRADE
			value = -0.285714
			duration = -1
		}
	}
}

# Changing Patterns of Consumption
country_event = {
	id = prices.23
	title = prices.23.t
	desc = prices.23.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			capital_scope = { continent = europe }
			AND = {
				any_owned_province = { continent = europe }
				dip_tech = 25
			}
		}
		sugar = 5
		dip_tech = 20
		OR = {
			trading_part = {
				trade_goods = cocoa
				value = 0.05
			}
			trading_part = {
				trade_goods = tea
				value = 0.05
			}
			trading_part = {
				trade_goods = coffee
				value = 0.05
			}
		}
		NOT = { has_global_flag = popularization_of_sugar_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.23.a
		change_price = {
			trade_goods = sugar
			key = POPULARIZATION_OF_SUGAR
			value = 0.5
			duration = -1
		}
	}
}

# Popularization of Silk Fabrics
country_event = {
	id = prices.24
	title = prices.24.t
	desc = prices.24.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			AND = {
		capital_scope = { continent = europe }
		dip_tech = 18
		OR = {
			current_age = age_of_absolutism #Not before this
			current_age = age_of_revolutions
		}
		OR = {
			504 = { #Indus
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			524 = { #Deccan
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1340 = { #Ceylon
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1343 = { #Bengal
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			1371 = { #Guanghzou
				trade_share = {
					country = ROOT
					share = 10
				}
			}
			684 = { #Hangzhou
				trade_share = {
					country = ROOT
					share = 10
				}
			}
		}
		NOT = { has_global_flag = popular_silk_happened }
	}
			AND = {
				tag = MNG 
				mission_completed = mng_restore_royal_road
			}
		}
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.24.a
		change_price = {
			trade_goods = silk
			key = POPULAR_SILK_FABRICS
			value = 0.25
			duration = -1
		}
	}
}

# Expansion of the Bengali Dye Production
country_event = {
	id = prices.25
	title = prices.25.t
	desc = prices.25.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		capital_scope = { continent = europe }
		owns = 2047 #Tirhut
		owns = 2063 #Central Doabd
		bengal_region = { type = all owned_by = ROOT }
		bihar_area = { type = all owned_by = ROOT }
	}
	mean_time_to_happen = {
		months = 60
	}
	
	
	option = {
		name = prices.25.a
		random_owned_province = {
			limit = {
				region = bengal_region
				NOT = { trade_goods = silk }
				NOT = { trade_goods = dyes }
			}
			change_trade_goods = dyes
		}
		random_owned_province = {
			limit = {
				area = bihar_area
				NOT = { trade_goods = silk }
				NOT = { trade_goods = dyes }
			}
			change_trade_goods = dyes
		}
		every_owned_province = {
			limit = { trade_goods = dyes }
			add_unrest = 5
		}
		change_price = {
			trade_goods = dyes
			key = BENGALI_INDIGO_PRODUCTION
			value = -0.25
			duration = -1
		}
	}
	option = {
		name = prices.25.b
		add_stability = -1
	}
}

# Development of Veneering
country_event = {
	id = prices.26
	title = prices.26.t
	desc = prices.26.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		capital_scope = { continent = europe }
		dip_tech = 12
		OR = {
			current_age = age_of_reformation #Not before this
			current_age = age_of_absolutism
			current_age = age_of_revolutions
		}
		OR = {
			524 = { #Deccan
				trade_share = {
					country = ROOT
					share = 5
				}
			}
			1340 = { #Ceylon
				trade_share = {
					country = ROOT
					share = 5
				}
			}
			1343 = { #Bengal
				trade_share = {
					country = ROOT
					share = 5
				}
			}
			1361 = { #Malacca
				trade_share = {
					country = ROOT
					share = 5
				}
			}
			1365 = {
				trade_share = {
					country = ROOT
					share = 5
				}
			}
		}
		NOT = { has_global_flag = veneering_happened }
	}
	mean_time_to_happen = {
		months = 60
	}
	
	
	option = {
		name = prices.26.a
		change_price = {
			trade_goods = tropical_wood
			key = VENEERING
			value = 0.5
			duration = -1
		}
	}
}

# Ivory Shortage in East Asia
country_event = {
	id = prices.27
	title = prices.27.t
	desc = prices.27.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		is_year = 1750
		capital_scope = { region = indo_china_region }
		NOT = { has_global_flag = ivory_shortage_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.27.a
		change_price = {
			trade_goods = ivory
			key = IVORY_SHORTAGE
			value = 0.25
			duration = -1
		}
		
		change_price = {
			trade_goods = elephants
			key = IVORY_SHORTAGE
			value = 0.142857
			duration = -1
		}
	}
}

# Development of Ironworking
country_event = {
	id = prices.28
	title = prices.28.t
	desc = prices.28.d
	picture = TRADE_GOODS_METALS_AND_MINING_EQUIPENT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		mil_tech = 18
		NOT = { has_global_flag = iron_working_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.28.a
		change_price = {
			trade_goods = iron
			key = IRON_WORKING
			value = 0.3
			duration = -1
		}
		change_price = {
			trade_goods = copper
			key = IRON_WORKING
			value = -0.20
			duration = -1
		}
		change_price = {
			trade_goods = tin
			key = IRON_WORKING
			value = -0.20
			duration = -1
		}
	}
}

# Hot Chocolate
country_event = {
	id = prices.29
	title = prices.29.t
	desc = prices.29.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 16
		colony = 1
		any_subject_country = {
			is_colonial_nation = yes
			OR = {
				capital_scope = { continent = north_america }
				capital_scope = { continent = south_america }
				capital_scope = { continent = new_world }
			}
			cocoa = 7
			sugar = 1
		}
		NOT = { has_global_flag = hot_chocolate_happened }
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.29.a
		change_price = {
			trade_goods = cocoa
			key = HOT_CHOCOLATE
			value = 0.35
			duration = -1
		}
	}
}

# Popularization of Tobacco
country_event = {
	id = prices.30
	title = prices.30.t
	desc = prices.30.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		dip_tech = 16
		colony = 1
		NOT = { has_global_flag = popularization_of_tobacco_happened }
		any_subject_country = {
			is_colonial_nation = yes
			OR = {
				capital_scope = { continent = north_america }
				capital_scope = { continent = south_america }
				capital_scope = { continent = new_world }
			}
			tobacco = 4
		}
	}
	mean_time_to_happen = {
		months = 1
	}
	
	
	option = {
		name = prices.30.a
		change_price = {
			trade_goods = tobacco
			key = POPULARIZATION_OF_TOBACCO
			value = 0.5
			duration = -1
		}
	}
}

# Breaking the Arabian Monopoly on Coffee
country_event = {
	id = prices.31
	title = prices.31.t
	desc = prices.31.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture
	goto = java_coffee_here

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = mocha_killed }
		NOT = { owns = 387 } #Mocha
		coffee = 2
		has_discovered = 387
		any_owned_province = {
			has_building = plantations
			trade_goods = coffee
			NOT = { continent = africa }
			NOT = { region = arabia_region }
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			387 = {
				owner = {
					save_event_target_as = owner_of_mocha
				}
				save_event_target_as = mocha
			}
			random_owned_province = {
				limit = {
					has_building = plantations
					trade_goods = coffee
					NOT = { continent = africa }
					NOT = { region = arabia_region }
				}
				save_event_target_as = java_coffee_here #Used in localization
			}
		}
	}
	
	option = {
		name = prices.31.a
		add_years_of_income  = 1
		add_prestige = 20
		change_price = {
			trade_goods = coffee
			key = JAVA_COFFEE
			value = -0.4
			duration = -1
		}
		387 = {
			tooltip = { remove_province_modifier = coffea_arabica_modifier }
		}
		event_target:owner_of_mocha = {
			country_event = { id = prices.32 }
			add_opinion = {
				who = ROOT
				modifier = coffee_plant_spread
			}
		}
	}
}


# Decline of Mocha
country_event = {
	id = prices.32
	title = prices.32.t
	desc = prices.32.d
	picture = TRADE_GOODS_PLANTATION_GOODS_IN_WAREHOUSE_eventPicture
	goto = 387

	is_triggered_only = yes
	
	option = {
		name = prices.32.a
		387 = {
			remove_province_modifier = coffea_arabica_modifier
		}
		FROM = { 
			add_opinion = {
				who = ROOT
				modifier = coffee_plant_spread #We will both dislike eachother
			}
		}
	}
}


# Explosion of Early Modern Printing
country_event = {
	id = prices.33
	title = prices.33.t
	desc = prices.33.d
	picture = {
		trigger = { NOT = { has_dlc = "Rights of Man" } }
		picture = TRADEGOODS_eventPicture
	}
	picture = {
		trigger = { has_dlc = "Rights of Man" }
		picture = PRINTING_PRESS_eventPicture
	}
	goto = bookmarket_here

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = printing_paper_prices_rise }
		has_institution = printing_press
		any_owned_province = {
			has_province_modifier = birthplace_of_printing_press
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					has_province_modifier = birthplace_of_printing_press
				}
				save_event_target_as = bookmarket_here #Used in localization
			}
		}
	}
	
	#No further bonuses as this triggers for the same place that already got the institution birth bonuses.
	
	option = {
		name = prices.33.a
		ai_chance = {
			factor = 100
		}
		trigger = {
			event_target:bookmarket_here = {
				NOT = { trade_goods = paper }
				province_without_special_goods_produced_trigger = yes #Don't offer if true.
			}
		}
		add_innovativeness_small_effect = yes
		event_target:bookmarket_here = {
			if = {
				limit = { NOT = { trade_goods = paper } }
				change_trade_goods = paper
			}
		}
		change_price = {
			trade_goods = paper
			key = INCREASED_PRINTING
			value = 0.25
			duration = -1
		}
	}
	option = {
		name = prices.33.b
		ai_chance = {
			factor = 1 #Practically only picked if option A is unavailable
		}
		add_innovativeness_small_effect = yes
		event_target:bookmarket_here = {
			add_base_production = 2
		}
		change_price = {
			trade_goods = paper
			key = INCREASED_PRINTING
			value = 0.25
			duration = -1
		}
	}
}

# Hollender Beaters
country_event = {
	id = prices.34
	title = prices.34.t
	desc = prices.34.d
	picture = {
		trigger = { NOT = { has_dlc = "Rights of Man" } }
		picture = TRADEGOODS_eventPicture
	}
	picture = {
		trigger = { has_dlc = "Rights of Man" }
		picture = PRINTING_PRESS_eventPicture
	}
	goto = hollender_beater_province

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = hollender_beater_flag }
		has_institution = manufactories
		any_owned_province = {
			province_without_special_goods_produced_trigger = yes
			is_state = yes
			OR = { #Somewhere reasonable for windmills 
				has_building = workshop
				has_building = counting_house
				base_production = 6
				has_port = yes
			}
			OR = {
				trade_goods = cloth #Lump
				trade_goods = naval_supplies #Hemp
				trade_goods = wool #Lump
			}
			NOT = { has_building = textile }
			NOT = { has_building = wharf }
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					province_without_special_goods_produced_trigger = yes
					is_state = yes
					OR = { #Somewhere reasonable for windmills 
						has_building = workshop
						has_building = counting_house
						base_production = 6
						has_port = yes
					}
					OR = {
						trade_goods = cloth #Lump
						trade_goods = naval_supplies #Hemp
						trade_goods = wool #Lump
					}
					NOT = { has_building = textile }
					NOT = { has_building = wharf }
				}
				save_event_target_as = hollender_beater_province
			}
			random_owned_province = {
				limit = {
					province_without_special_goods_produced_trigger = yes
					is_state = yes
					num_free_building_slots = 1 #prefered but not required
					OR = { #Somewhere reasonable for windmills 
						has_building = workshop
						has_building = counting_house
						base_production = 6
						has_port = yes
					}
					OR = {
						trade_goods = cloth #Lump
						trade_goods = naval_supplies #Hemp
						trade_goods = wool #Lump
					}
					NOT = { has_building = textile }
					NOT = { has_building = wharf }
				}
				save_event_target_as = hollender_beater_province
			}
			random_owned_province = {
				limit = {
					province_without_special_goods_produced_trigger = yes
					is_state = yes
					num_free_building_slots = 1
					OR = { #Somewhere reasonable for windmills 
						has_building = workshop
						has_building = counting_house
						base_production = 6
						has_port = yes
					}
					OR = {
						trade_goods = cloth #Lump
						trade_goods = naval_supplies #Hemp
						trade_goods = wool #Lump
					}
					NOT = { has_building = textile }
					NOT = { has_building = wharf }
					base_production = 6
				}
				save_event_target_as = hollender_beater_province
			}
			random_owned_province = {
				limit = {
					province_without_special_goods_produced_trigger = yes
					is_state = yes
					num_free_building_slots = 1
					OR = { #Somewhere reasonable for windmills 
						has_building = workshop
						has_building = counting_house
						base_production = 6
						has_port = yes
					}
					OR = {
						trade_goods = cloth #Lump
						trade_goods = naval_supplies #Hemp
						trade_goods = wool #Lump
					}
					NOT = { has_building = textile }
					NOT = { has_building = wharf }
					base_production = 10
				}
				save_event_target_as = hollender_beater_province
			}
			random_owned_province = {
				limit = {
					province_without_special_goods_produced_trigger = yes
					is_state = yes
					num_free_building_slots = 1
					OR = { #Somewhere reasonable for windmills 
						has_building = workshop
						has_building = counting_house
						base_production = 6
						has_port = yes
					}
					OR = {
						trade_goods = cloth #Lump
						trade_goods = naval_supplies #Hemp
						trade_goods = wool #Lump
					}
					NOT = { has_building = textile }
					NOT = { has_building = wharf }
					base_production = 14
				}
				save_event_target_as = hollender_beater_province
			}
		}
	}
	
	option = {
		name = prices.34.a
		add_adm_power = 75
		event_target:hollender_beater_province = {
			change_trade_goods = paper
			if = {
				limit = { num_free_building_slots = 1 }
				add_building = mills
				else = {
					add_base_production = 4
				}
			}
		}
		change_price = {
			trade_goods = paper
			key = HOLLENDER_BEATER
			value = -0.5
			duration = -1
		}
	}
}

# Growing Bureaucracies
country_event = {
	id = prices.35
	title = prices.35.t
	desc = prices.35.d
	picture = BIG_BOOK_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = paper_in_bureaucracies }
		adm_tech = 6
		has_institution = feudalism
		OR = {
			num_of_cities = 50
			colony = 1 #1 Colonial Country
		}
		NOT = { government = tribal }
		OR = {
			colony = 1 #1 Colonial Country
			AND = {
				capital_scope = { continent = europe }
				any_owned_province = { NOT = { continent = europe } }
			}
			AND = {
				capital_scope = { continent = africa }
				any_owned_province = { NOT = { continent = africa } }
			}
			AND = {
				capital_scope = { continent = asia }
				any_owned_province = { NOT = { continent = asia } }
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.35.a
		change_price = {
			trade_goods = paper
			key = PAPER_IN_BUREAUCRACY
			value = 0.25
			duration = -1
		}
	}
}


# Lending Libraries and Book Clubs
country_event = {
	id = prices.36
	title = prices.36.t
	desc = prices.36.d
	picture = BIG_BOOK_eventPicture
	goto = lending_libraries_here

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = popular_literacy }
		has_institution = enlightenment
		OR = {
			full_idea_group = innovativeness_ideas
			university = 5
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = { is_capital = yes }
				save_event_target_as = lending_libraries_here
			}
			random_owned_province = {
				limit = {
					is_state = yes
					has_building = university
				}
				save_event_target_as = lending_libraries_here
			}
			random_owned_province = {
				limit = {
					is_capital = no
					is_state = yes
					has_building = university
				}
				save_event_target_as = lending_libraries_here
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.36.a
		add_innovativeness_small_effect = yes
		event_target:lending_libraries_here = {
			if = {
				limit = {
					province_without_special_goods_produced_trigger = yes
				}
				if = {
					limit = { NOT = { trade_goods = paper } }
					change_trade_goods = paper
				}
				add_permanent_province_modifier = {
					name = "bookmarket_of_x"
					duration = -1
				}
			}
		}
		change_price = {
			trade_goods = paper
			key = LENDING_LIBRARIES
			value = 0.35
			duration = -1
		}
		if = {
			limit = {
				has_parliament = no
			}
			add_country_modifier = {
				name = "spread_of_enlightenment_ideals"
				duration = 3650
			}
		}
	}
}

# Columbian Exchange
country_event = {
	id = prices.37
	title = prices.37.t
	desc = prices.37.d
	picture = EXPLORERS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = columbian_exchange_happened }
		is_institution_enabled = new_world_i
		any_owned_province = {
			OR = {
				continent = europe
				continent = asia
				continent = africa
			}
			OR = {
				trade_goods = grain
				trade_goods = livestock
			}
		}
		OR = {
			any_owned_province = {
				OR = {
					continent = north_america
					continent = south_america
					continent = new_world
				}
				OR = {
					trade_goods = grain
					trade_goods = livestock
				}
			}
			any_subject_country = {
				any_owned_province = {
					OR = {
						continent = north_america
						continent = south_america
						continent = new_world
					}
					OR = {
						trade_goods = grain
						trade_goods = livestock
					}
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.37.a
		change_price = {
			trade_goods = grain
			key = COLUMBIAN_EXCHANGE
			value = -0.20
			duration = -1
		}
		change_price = {
			trade_goods = livestock
			key = COLUMBIAN_EXCHANGE
			value = 0.25
			duration = -1
		}
		change_price = {
			trade_goods = maize
			key = COLUMBIAN_EXCHANGE
			value = 0.20
			duration = -1
		}
	}
}

# Faceting
country_event = {
	id = prices.38
	title = prices.38.t
	desc = prices.38.d
	picture = TRADEGOODS_eventPicture
	goto = diamond_city

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = faceting_happened }
		has_institution = renaissance
		prestige = 50
		any_owned_province = {
			renaissance = 100
			OR = {
				trade_goods = glass
				trade_goods = gems
				trade_goods = amber
			}
			development = 15
			is_state = yes
			is_city = yes
			province_without_special_goods_produced_trigger = yes
			NOT = { province_id = 112 } #Slated to get the modifier above
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					renaissance = 100
					OR = {
						trade_goods = glass
						trade_goods = gems
						trade_goods = amber
					}
					development = 15
					is_state = yes
					is_city = yes
					province_without_special_goods_produced_trigger = yes
					NOT = { province_id = 112 }
				}
				save_event_target_as = diamond_city
				save_global_event_target_as = diamond_city_global
			}
		}
	}
	
	option = {
		name = prices.38.a
		event_target:diamond_city = {
			if = {
				limit = {
					NOT = { trade_goods = gems }
				}
				change_trade_goods = gems
			}
			add_permanent_province_modifier = {
				name = diamond_district
				duration = -1
			}
		}
		change_price = {
			trade_goods = gems
			key = FACETING
			value = 0.25
			duration = -1
		}
		
		change_price = {
			trade_goods = amber
			key = FACETING
			value = 0.142857
			duration = -1
		}
		
		change_price = {
			trade_goods = pearls
			key = FACETING
			value = 0.125
			duration = -1
		}	
	}
}

# Brazilian Diamonds
country_event = {
	id = prices.39
	title = prices.39.t
	desc = prices.39.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = brazilian_gems_happened }
		NOT = { current_age = age_of_discovery }
		primitives = no
		any_owned_province = {
			trade_goods = gems
			OR = {
				continent = new_world
				continent = north_america
				continent = south_america
			}
		}
		calc_true_if = {
			all_province = {
				trade_goods = gems
				OR = {
					continent = new_world
					continent = north_america
					continent = south_america
				}
			}
			amount = 8
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.39.a
		add_years_of_income = 1.5
		add_prestige = 20
		change_price = {
			trade_goods = gems
			key = BRAZILIAN_DIAMONDS
			value = -0.5
			duration = -1
		}
	}
}

# Protestant and Reformed Churches Reject Incense
country_event = {
	id = prices.40
	title = prices.40.t
	desc = prices.40.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = incense_rejected }
		is_religion_enabled = reformed
		religion = reformed
		any_owned_province = {
			is_reformation_center = yes
			religion = reformed
		}
		calc_true_if = {
			all_country = {
				OR = {
					religion = protestant
					religion = reformed
				}
			}
			amount = 10
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.40.a
		add_fervor = 15
		change_price = {
			trade_goods = incense
			key = REFORMED_REJECTION_OF_INCENSE
			value = -0.25
			duration = -1
		}
	}
}


# Growth of the Perfume Industry
country_event = {
	id = prices.41
	title = prices.41.t
	desc = prices.41.d
	picture = TRADEGOODS_eventPicture
	goto = perfume_city_grass

	fire_only_once = yes
	
	major = yes

	trigger = {
		has_institution = global_trade
		NOT = { has_global_flag = perfume_industry }
		any_owned_province = {
			has_terrain = farmlands #Flowers must grow here
			is_capital = no
			development = 15
			is_state = yes
			is_city = yes
			province_without_special_goods_produced_trigger = yes
		}
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					has_terrain = farmlands #Flowers must grow here
					is_capital = no
					development = 15
					is_state = yes
					is_city = yes
					province_without_special_goods_produced_trigger = yes
				}
				save_event_target_as = perfume_city_grass
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.41.a
		event_target:perfume_city_grass = {
			change_trade_goods = incense
			add_permanent_province_modifier = {
				name = "perfume_capital"
				duration = -1
			}
			if = {
				limit = {
					has_building = mills
				}
				remove_building = mills
				add_building = tradecompany
			}
			else_if = {
				limit = {
					has_building = farm_estate
				}
				remove_building = farm_estate
				add_building = tradecompany
			}
			else_if = {
				limit = {
					has_building = plantations
				}
				remove_building = plantations
				add_building = tradecompany
			}
			else_if = {
				limit = {
					has_building = textile
				}
				remove_building = textile
				add_building = tradecompany
			}
			else_if = {
				limit = {
					has_building = weapons
				}
				remove_building = weapons
				add_building = tradecompany
			}
			else = {
				remove_building = wharf
				add_building = tradecompany
			}
		}
		change_price = {
			trade_goods = incense
			key = GROWTH_OF_PERFUME_BUSINESS
			value = 0.35
			duration = -1
		}
	}
}

# Selective Breeding
country_event = {
	id = prices.42
	title = prices.42.t
	desc = prices.42.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		has_institution = enlightenment
		NOT = { has_global_flag = selective_breeding_happened }
		livestock = 5
		any_owned_province = {
			enlightenment = 100
			trade_goods = livestock
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.42.a
		add_dip_power = 100
		add_innovativeness_small_effect = yes
		change_price = {
			trade_goods = livestock
			key = SELECTIVE_BREEDING
			value = 0.35
			duration = -1
		}
		change_price = {
			trade_goods = wool
			key = SELECTIVE_BREEDING
			value = 0.35
			duration = -1
		}
		change_price = {
			trade_goods = camel
			key = SELECTIVE_BREEDING
			value = 0.2
			duration = -1
		}
		random_owned_province = {
			limit = {
				enlightenment = 100
				trade_goods = livestock
			}
			add_base_production = 3
		}
	}
}

# Bohemian Glass
country_event = {
	id = prices.43
	title = prices.43.t
	desc = prices.43.d
	picture = TRADEGOODS_eventPicture
	goto = 1771

	fire_only_once = yes
	
	major = yes

	trigger = {
		OR = {
			has_country_flag = bohemian_crystal_flag
			AND = {
				OR = {
					NOT = { has_dlc = "Emperor" }
					NOT = { BOH = { owns = 1771 } }
				}
				NOT = { has_global_flag = bohemian_glass }
				owns = 1771
				dip_tech = 17
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	immediate = {
		hidden_effect = {
			set_global_flag = bohemian_glass_flag
		}
	}
	
	option = {
		name = prices.43.a
		add_prestige_or_monarch_power = {
			amount = 15
		}
		change_price = {
			trade_goods = glass
			key = BOHEMIAN_GLASS
			value = 0.25
			duration = -1
		}
		1771 = {
			add_base_production = 2
			add_base_tax = 2
		}
	}
}

# Improvements in Lensmaking
country_event = {
	id = prices.44
	title = prices.44.t
	desc = prices.44.d
	picture = TRADEGOODS_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = development_of_optics }
		dip_tech = 18
		has_institution = global_trade
		any_owned_province = {
			trade_goods = glass
			has_building = mills
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.44.a
		add_dip_power = 100
		add_innovativeness_small_effect = yes
		change_price = {
			trade_goods = glass
			key = MODERN_OPTICS
			value = 0.25
			duration = -1
		}
	}
}


# Flint Glass & Lead Crystal
country_event = {
	id = prices.45
	title = prices.45.t
	desc = prices.45.d
	picture = TRADEGOODS_eventPicture
	goto = glass_province

	fire_only_once = yes
	
	major = yes

	trigger = {
		NOT = { has_global_flag = lead_crystal_happened }
		dip_tech = 18
		has_institution = manufactories
		any_owned_province = {
			manufactories = 100
			is_state = yes
			is_capital = no
			OR = {
				has_building = workshop
				has_building = counting_house
			}
			province_without_special_goods_produced_trigger = yes
		}
	}
	
	immediate = {
		hidden_effect = {
			set_global_flag = lead_crystal_happened #Checked by industrialization events for RB
			random_owned_province = {
				limit = {
					manufactories = 100
					is_state = yes
					is_capital = no
					OR = {
						has_building = workshop
						has_building = counting_house
					}
					province_without_special_goods_produced_trigger = yes
				}
				save_event_target_as = glass_province
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.45.a
		add_years_of_income = 1
		event_target:glass_province = {
			change_trade_goods = glass
			add_building = mills
			add_base_production = 2
		}
		change_price = {
			trade_goods = glass
			key = LEAD_CRYSTAL
			value = -0.65
			duration = -1
		}
	}
}


# Greater Availability of Coal
country_event = {
	id = prices.46
	title = prices.46.t
	desc = prices.46.d
	picture = TRADE_GOODS_METALS_AND_MINING_EQUIPENT_eventPicture

	fire_only_once = yes
	
	major = yes

	trigger = {
		#has_dlc = "Rule Britannia"
		NOT = { has_global_flag = steam_engine_happened }
		has_country_flag = watt_steam_engine_flag #Set by Industrialization Events
		has_country_flag = coke_blast_furnaces_flag #Set by Industrialization Events.
		has_institution = enlightenment
		any_owned_province = {
			trade_goods = coal
			has_building = furnace
		}
		coal = 10
	}
	
	immediate = {
		hidden_effect = {
			random_owned_province = {
				limit = {
					trade_goods = coal
					has_building = furnace
				}
				save_event_target_as = coal_province
			}
			if = {
				limit = {
					any_owned_province = {
						trade_goods = coal
						NOT = { has_building = furnace }
					}
				}
				random_owned_province = {
					limit = {
						trade_goods = coal
						NOT = { has_building = furnace }
					}
					save_event_target_as = potential_furnace
				}
			}
		}
	}
	
	mean_time_to_happen = {
		months = 1
	}
	
	option = {
		name = prices.46.a
		add_years_of_income = 1
		add_dip_power = 50
		if = {
			limit = {
				has_saved_event_target = potential_furnace
			}
			event_target:coal_province = {
				add_base_production = 2
			}
			event_target:potential_furnace = {
				add_building = furnace
			}
		}
		else = {
			event_target:coal_province = {
				add_base_production = 6
			}
		}
		change_price = {
			trade_goods = coal
			key = IMPROVED_COAL_MINING
			value = -0.30
			duration = -1
		}
	}
}
