# Triggered modifiers are here.
# these are checked for each countries once/month and then applied.
#
# Effects are fully scriptable here.

##################################################
# The Sound Toll - Controls the Baltic Sea Trade
##################################################
sound_toll = {
	trigger = {
		NOT = { mercantilism_freetrade = 3 }
		owns = 6  # Skåne
		owns = 12 # Sjaelland
		owns = 14 # Fyn
	}
	
	global_trade_income_modifier = 0.20	#20% more trade income.
}


###############################################
# Controls the Black Sea Trade
###############################################
bosphorous_sound_toll = {
	trigger = {
		NOT = { mercantilism_freetrade = 3 }
		owns = 149 # Edirne
		owns = 317 # Bursa
		owns = 151 # Thrace
		owns = 316 # Bithynia
	}

	global_trade_income_modifier = 0.15	#15% more trade income.
}


###########################################
# Discovery of the East Indian trade route.
###########################################
east_indian_trade_route = {
	trigger = {
		has_discovered = 1460 # Cape of Good Hope
		num_of_ports = 4
		NOT = { mercantilism_freetrade = -2 }
		idea = quest_for_the_new_world
		technology_group = western
		OR = {
			400 = { # Muscat
				owned_by = this
			}		
			529 = { # Dadra
				owned_by = this
			}
		}
		OR = {
			529 = { # Dadra
				NOT = { owned_by = this }
				cot = yes
			}
			559 = { # Bihar
				NOT = { owned_by = this }
				cot = yes
			}
			630 = { # Sunda
				NOT = { owned_by = this }
				cot = yes
			}
			667 = { # Guangzhou
				NOT = { owned_by = this }
				cot = yes
			}
		}
	}
	
	global_trade_income_modifier = 0.2	#20% more trade income.
}

######################################
# Christian control of Mecca.
######################################
christian_mecca = {
	trigger = {
		owns = 385 # Mecca
		religion_group = christian
	}

	prestige = 0.01			#1% more yearly prestige
	missionaries = 0.5
	icon = 9
}


###########################################
# Jerusalem held by Muslims or Christians
###########################################
jerusalem_held = {
	trigger = {
		owns = 379 # Judea
		OR = {
			religion_group = christian
			religion_group = muslim
		}
	}

	prestige = 0.01			#1% more yearly prestige
	missionaries = 0.5
	icon = 9
}


######################################
# Non-Catholic control of Rome.
######################################
non_catholic_rome = {
	trigger = {
		owns = 118 # Roma
		NOT = { religion = catholic }
	}
	prestige = 0.01			#1% more yearly prestige
	missionaries = 0.5
	icon = 9
}


######################################
# Western Influences.
######################################
western_arms_trade = {
	trigger = {
		NOT = { technology_group = western }
		any_neighbor_country = {
			technology_group = western
			relation = { who = THIS value = 150 }
		}
	}
	
	prestige = -0.01			#1% less yearly prestige
	land_tech_investment = 6
}


######################################
# Time of Troubles.
######################################
time_of_troubles = {
	trigger = {
		has_country_flag = time_of_troubles
	}
	
	global_revolt_risk = 10
	stability_cost_modifier = 0.20
}


######################################
# Revolution
######################################
revolution = {
	trigger = {
		has_country_flag = revolution
	}
	
	global_revolt_risk = 10
	stability_cost_modifier = 0.1
}


######################################
# Peasants' War
######################################
peasant_war = {
	trigger = {
		has_country_flag = peasant_war
	}
	
	global_revolt_risk = 10
	stability_cost_modifier = 0.1
}

######################################
# Counter Revolution
######################################
counter_revolution = {
	trigger = {
		capital_scope = { continent =  europe }
		revolution_target_exists = yes
		is_revolution_target = no
		NOT = {
			revolution_target = {
				war_with = THIS
			}
			revolution_target = {
				truce_with = THIS
			}
			revolution_target = {
				alliance_with = THIS
			}  
		}
		OR = {
			government = absolute_monarchy
			government = enlightened_despotism
			government = despotic_monarchy
			government = feudal_monarchy
			government = administrative_monarchy
			government = constitutional_monarchy
			government = bureaucratic_despotism
			government = imperial_government
		}
	}
	prestige = -0.05
	stability_cost_modifier = 0.3
}

######################################
# vive la Revolution
######################################
vive_la_revolution = {
	trigger = {
		is_revolution_target = yes
		war = yes
	}
	global_manpower_modifier = 0.5
	land_morale = 0.25
	max_war_exhaustion = -4.0
}

######################################
# Reaction
######################################
reaction = {
	trigger = {
		capital_scope = { continent = europe }
		OR = {
			government = absolute_monarchy
			government = enlightened_despotism
			government = despotic_monarchy
			government = feudal_monarchy
			government = administrative_monarchy
			government = constitutional_monarchy
			government = bureaucratic_despotism
			government = imperial_government
		}
		revolution_target = {
			war_with = THIS
		}  

	}
	prestige = 0.1
	stability_cost_modifier = -0.1
}

######################################
# Crusader
######################################
crusader = {
	trigger = {
		religion = catholic
		crusade_target = {
			war_with = THIS
		}  
	}
	global_manpower_modifier = 0.3
	global_tax_modifier = 0.1
	land_morale = 0.1
	prestige = 0.01
	papal_influence = 0.05;
	icon = 9
}

######################################
# Excommunication
######################################
excommunication = {
	trigger = {
		excommunicated = yes
		religion = catholic
	}
	prestige = -0.02
	tolerance_own = -3
	papal_influence = -1
	icon = 10
}

######################################
# Large Tribes
######################################
large_tribe_bad_adm = {
	trigger = {
		OR = {
			government = tribal_despotism
			government = tribal_federation
			government = tribal_democracy
		}
		num_of_cities = 10
		NOT = { ADM = 7 }
	}
	global_tax_modifier = -0.33
}

large_tribe_bad_dip = {
	trigger = {
		OR = {
			government = tribal_despotism
			government = tribal_federation
			government = tribal_democracy
		}
		num_of_cities = 10
		NOT = { DIP = 7 }
	}
	global_revolt_risk = 3
}

large_tribe_bad_mil = {
	trigger = {
		OR = {
			government = tribal_despotism
			government = tribal_federation
			government = tribal_democracy
		}
		num_of_cities = 10
		NOT = { MIL = 7 }
	}
	badboy_limit = -20
}

######################################
# Barbary Pirates
######################################
barbary_pirates = {
	trigger = {
		or = {
			owns = 334  # Tangiers
			owns = 1751 # Ceuta
		}
		or = {
			owns = 335 # Mellila
			owns = 337 # Oran
		}
		culture_group = iberian
		religion_group = christian
	}
	prestige = 0.01
	galley_cost = -0.1
	lightship_cost = -0.1
}

########################################
# Overextension - Anti-Blobbing measure
########################################
overextension = {
	icon = 2
	
	trigger = {
		OR = {
			NOT = { core_percentage = 0.5 }
			AND = {
				NOT = { ADM = 6 }
				NOT = { core_percentage = 0.66 }
			}
			AND = {
				NOT = { ADM = 4 }
				NOT = { core_percentage = 0.75 }
			}
			AND = {
				NOT = { ADM = 2 }
				NOT = { core_percentage = 0.85 }
			}
		}
		
		OR = {
			num_of_cities = 120
			AND = {
				num_of_cities = 100
				NOT = { centralization_decentralization = 4 }
			}
			AND = {
				num_of_cities = 90
				NOT = { centralization_decentralization = 3 }
			}
			AND = {
				num_of_cities = 80
				NOT = { centralization_decentralization = 2 }
			}
			AND = {
				num_of_cities = 70
				NOT = { centralization_decentralization = 1 }
			}
			AND = {
				num_of_cities = 60
				NOT = { centralization_decentralization = 0 }
			}
			AND = {
				num_of_cities = 50
				NOT = { centralization_decentralization = -1 }
			}
			AND = {
				num_of_cities = 40
				NOT = { centralization_decentralization = -2 }
			}
			AND = {
				num_of_cities = 30
				NOT = { centralization_decentralization = -3 }
			}
			AND = {
				num_of_cities = 20
				NOT = { centralization_decentralization = -4 }
			}
		}
	}
	
	global_revolt_risk = 3
	minimum_revolt_risk = 3
	stability_cost_modifier = 0.5
	
}
