gain_tradepost_in_china = {
	type = country
	allow = {
		war = no
		continent = europe
		num_of_ports = 6
		NOT = { chinaware = 1 }
	}
	abort = {
		not = { num_of_ports = 1 }
	}
	success = {
		chinaware = 1
	}
	chance = {
		factor = 1
		modifier = {
			factor = 1.5
			idea = vice_roys
		}
		modifier = {
			factor = 1.5
			idea = quest_for_the_new_world
		}
	}
	effect = {
		prestige = 0.1
	}
}


increase_spices_trade = {
	type = country
	allow = {
		war = no
		continent = europe
		num_of_ports = 3
		spices = 1
		NOT = { spices = 3}
	}
	abort = {
		not = { num_of_ports = 1 }
	}
	success = {
		spices = 3
	}
	chance = {
		factor = 1
		modifier = {
			factor = 1.5
			idea = vice_roys
		}
		modifier = {
			factor = 1.5
			idea = quest_for_the_new_world
		}
	}
	effect = {
		prestige = 0.1
	}
}


gain_monopoly = {

	type = all_cots 

	allow = {
		war = no
		has_discovered = THIS
		merchants = 1
		placed_merchants = 1
		NOT = { placed_merchants = 6 }
		this = {
			trade_tech = 15
			or = {
				trade_income_percentage = 0.30
				monthly_income = 100
			}
		}
		owner = { mercantilism_freetrade = 0 } # Not realistic if the CoT owner has a massive compete bonus.
		
	}
	abort = {
		cot = no
	}
	
	success = {
		placed_merchants = 6
	}
	
	chance = {
		factor = 1
		modifier = {
			factor = 1.5
			culture = THIS
		}
		modifier = {
			factor = 1.5
			religion = THIS
		}
		modifier = {
			factor = 1.5
			ADM = 6
		}
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.40
		}		
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.50
		}		
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}		
	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		treasury = 50
		merchants = 5
	}	
}

gain_multiple_monopolies_small = {
	type = country
	
	allow = {
		war = no
		num_of_monopolys = 1
		NOT = { num_of_monopolys = 2 }
		
	}
	
	success = {
		num_of_monopolys = 3
	}
	
	chance = {
		factor = 1

		modifier = {
			factor = 1.5
			trade_income_percentage = 0.40
		}		
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.50
		}		
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		treasury = 50
		merchants = 5
	}	
}

gain_multiple_monopolies_large = {
	type = country
	
	allow = {
		war = no
		num_of_monopolys = 3
		NOT = { num_of_monopolys = 4 }
		
	}
	
	success = {
		num_of_monopolys = 6
	}
	
	chance = {
		factor = 1

		modifier = {
			factor = 1.5
			trade_income_percentage = 0.40
		}		
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.50
		}		
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		prestige = 0.1
		merchants = 5
	}	
}

establish_trade_in_cot ={
	type = all_cots 

	allow = {
		war = no
		has_discovered = THIS
		owner = { open_market = THIS }
		owner = { NOT = { trade_embargoing = THIS } }
		NOT = { placed_merchants = 1 }
		merchants = 1
		trade_income_percentage = 0.01
		owner = { mercantilism_freetrade = -1 } # Not realistic if the CoT owner has a massive compete bonus.
		NOT = { last_mission = establish_trade_in_cot }
		cot = yes
	}
	abort = {
		cot = no
		owner = { trade_embargoing = THIS  }
	}
	
	success = {
		placed_merchants = 5
	}
	
	chance = {
		factor = 1
		modifier = {
			factor = 0.1
			ADM = 0
		}
		modifier = {
			factor = 1.5
			culture = THIS
		}
		modifier = {
			factor = 1.5
			religion = THIS
		}
		modifier = {
			factor = 1.5
			ADM = 6
		}
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.40
		}		
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.50
		}	
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}			
	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		treasury = 50
	}
}


earn_more_from_trade ={
	type = country
	
	allow = {
		war = no
		trade_income_percentage = 0.20
		NOT = {  trade_income_percentage = 0.25 }
		
	}
	
	success = {
		trade_income_percentage = 0.30
	}
	
	chance = {
		factor = 1
		modifier = {
			factor = 1.5
			ADM = 6
		}
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}	
	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		treasury = 50
		merchants = 5
	}
}


force_open_market = {
	type = all_cots 

	allow = {
		war = no
		has_discovered = THIS
		num_of_ports = 5
		big_ship = 5
		NOT = { owner = { open_market = THIS } }
		owner = { NOT = { trade_embargoing = THIS } }
		not = { owned_by = this }
		NOT = { placed_merchants = 1 }
		or = {
			trade_income_percentage = 0.30
			monthly_income = 100
		}
		owner = { mercantilism_freetrade = -1 } # Not realistic if the CoT owner has a massive compete bonus.
		
	}
	abort = {
		or = {
			cot = no
			owned_by = this
		}
	}
		
	success = {
		placed_merchants = 5
	}
	
	chance = {
		factor = 1
		modifier = {
			factor = 1.5
			culture = THIS
		}
		modifier = {
			factor = 1.5
			religion = THIS
		}
		modifier = {
			factor = 1.5
			ADM = 6
		}
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.40
		}		
		modifier = {
			factor = 1.5
			trade_income_percentage = 0.50
		}	
		modifier = {
			factor = 1.5
			idea = merchant_adventures
		}		
		modifier = {
			factor = 1.5
			idea = shrewd_commerce_practise
		}	
		modifier = {
			factor = 1.5
			idea = national_trade_policy
		}			
	}

	# The effect always has country scope (for the country that gets the mission)
	effect = {
		prestige = 0.2
	}
}