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

######################################
# A Sound Toll for Denmark primarily.
######################################
sound_toll = {
	trigger = {
		owns = 6  #skåne
		owns = 12 #sjaelland
		culture_group = scandinavian
		OR = {
			38 = { #Riga
				NOT = { owned_by = this }
				cot = yes
			}
			310 = { #novgorod
				NOT = { owned_by = this }
				cot = yes
			}
			43 = { #Danzig
				NOT = { owned_by = this }
				cot = yes
			}
		}
	}
	
	global_trade_income_modifier = 0.25	#25% more trade income.
	prestige = 0.01			#1% more yearly prestige
	icon = 5
}


###############################################
# Black Sea Trade.
###############################################
bosphorous_sound_toll = {
	trigger = {
		mercantilism_freetrade = -2
		owns = 149 # Edirne
		owns = 317 # Bursa
		151 = { # Thrace
			NOT = { owned_by = this }
			cot = yes
		}
	}

	global_trade_income_modifier = 0.15	#15% more trade income.
	prestige = 0.01			#1% more yearly prestige
	icon = 5
}


###########################################
# 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 = latin
		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.
	prestige = 0.02			#2% more yearly prestige
	icon = 5
}

######################################
# Foundation of an east indian trade company
######################################
trade_company_benefits = {
	trigger = {
		has_country_flag = trade_company
	}
	merchants = 1
	trade_tech_investment = 4
	merchant_placement_chance = 0.1	
	merchant_compete_chance = 0.1
	icon = 5
}


######################################
# Catholic control of Mecca.
######################################
catholic_mecca = {
	trigger = {
		owns = 385 # Mecca
		religion = catholic
	}

	prestige = 0.01			#1% more yearly prestige
	missionaries = 1
	icon = 20
}


######################################
# Catholic control of Jerusalem.
######################################
catholic_jerusalem = {
	trigger = {
		owns = 379 # Judea
		religion = catholic
	}

	prestige = 0.01			#1% more yearly prestige
	missionaries = 1
	icon = 18
}


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


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


######################################
# Time of Troubles.
######################################
time_of_troubles = {
	trigger = {
		has_country_flag = time_of_troubles
	}
	
	global_revolt_risk = 3
	global_tax_modifier = -0.05
	icon = 16
}


######################################
# Revolution
######################################
revolution = {
	trigger = {
		has_country_flag = revolution
	}
	
	global_revolt_risk = 3
	stability_cost_modifier = 0.03
	global_tax_modifier = -0.05
	icon = 16
}


######################################
# Peasants' War
######################################
peasant_war = {
	trigger = {
		has_country_flag = peasant_war
	}
	
	global_revolt_risk = 3
	stability_cost_modifier = 0.03
	icon = 16
}

######################################
# Mandate of Heaven
######################################
mandateofheaven = {
	trigger = {
		has_country_flag = mandate_of_heaven
	}
	diplomats = 1			
	spy_efficiency = 0.05
	badboy = 0.3	
	prestige = 0.01
	icon = 3
}

##############
#Period of Unrest
##############

periodunrest = {
	trigger = {
		has_country_flag = theunrestflag
		}
	global_revolt_risk = 3
	badboy = 0.6
	land_morale = -0.5
	stability_cost_modifier = 0.5
	icon = 16
}

##############
# Jewish Tolerance
##############

projewish = {
	trigger = {
		has_country_flag = toleratedjews
		NOT = { innovative_narrowminded = -1 }
		}
	stability_cost_modifier = 0.2
	global_revolt_risk = 0.5
	global_tax_modifier = 0.1
	trade_efficiency = 0.1
	production_tech_cost_modifier = -0.05
	trade_tech_cost_modifier = -0.05
	icon = 17
}

#
#
#

midjewish = {
	trigger = {
		has_country_flag = acceptedjews
		NOT = { has_country_flag = toleratedjews }
		}
	stability_cost_modifier = 0.1
	trade_efficiency = 0.05
	icon = 17
}

#
#
#

antijewish = {
	trigger = {
		has_country_flag = refusedjews
		innovative_narrowminded = -1
		}
	stability_cost_modifier = -0.2
	global_revolt_risk = -0.5
	production_tech_cost_modifier = 0.05
	trade_tech_cost_modifier = 0.05
	icon = 17
}

#
#
#

antijewishrevolts = {
	trigger = {
		has_country_flag = refusedjews
		NOT = { innovative_narrowminded = -1 }	
		}
	production_tech_cost_modifier = 0.05
	trade_tech_cost_modifier = 0.05
	icon = 17
}

##############
#Sufi Tradition
##############

sufism = {
	trigger = {
		has_country_flag = sufitradition
		}
	naval_tech_cost_modifier = -0.05
	government_tech_cost_modifier = -0.05
	trade_tech_cost_modifier = -0.10
	prestige = 0.01
	trade_efficiency = 0.05
	icon = 19
}

##############
# Size Penalty
##############

enormoussize = {
	trigger = {
		num_of_cities = 50
		OR = {
			NOT = { centralization_decentralization = 3 }
			government = khanate
			government = eastern_empire
			government = imperial_despotism
			}
		NOT = { government = tsardom }
		NOT = { has_country_flag = colonialcountry }
		}
	global_revolt_risk = 5
	land_tech_cost_modifier = 0.25
	trade_tech_cost_modifier = 0.25
	naval_tech_cost_modifier = 0.25
	government_tech_cost_modifier = 0.25
	production_tech_cost_modifier = 0.25
	icon = 16
}

##############
#Exploration
##############

explorercountry = {
	trigger = {
		OR = {		
				AND = {
				idea = quest_for_the_new_world
				has_country_flag = new_world_quest
				}
				AND = {
				idea = colonial_ventures
				has_country_flag = new_world_quest
				}
				AND = {
				idea = quest_for_the_new_world
				idea = excellent_shipwrights
					}
				AND = {
				idea = colonial_ventures
				idea = quest_for_the_new_world	
					}
				AND = {
				idea = colonial_ventures
				total_ideas = 4
					}
			}
		}
	colonist_cost = -0.4
	colonists = 9
	icon = 7
}

##############
#Great Power
##############

greatpower = {
	trigger = {
		total_ideas = 5
		num_of_cities = 20
		stability = 0
		}
	prestige = 0.01				
	production_efficiency = 0.1
	icon = 3
}

##############
#Deportation
##############

deportation = {
	trigger = {
		has_country_flag = deports
		}
		colonists = 2
		colonist_cost = -0.3
		missionary_placement_chance = -0.2
		icon = 7
}

##############
#Missionary Fervor
##############

missionaryfervor = {
	trigger = {
		has_country_flag = missionariez
		}
		missionary_placement_chance = 0.20
		missionary_cost = -0.2
		missionaries = 2
		global_revolt_risk = 1
		icon = 9
}
##############
#Pious Country
##############

piouscountry = {
	trigger = {
		OR = {
			government = papacy
			government = theocracy
			government = sharifate
			government = knightly_order
			has_country_flag = papist_sentiment
			innovative_narrowminded = 3
			religion = wahhabi
			religion = ibadi
			religion = reformed
			religion = sikh
			}
		OR = {
			idea = deus_vult
			defender_of_faith = yes
			}
		}
		missionary_placement_chance = 0.2
		missionary_cost = -0.2
		icon = 9
}			

##############
#Colonial Empire
##############

colonial_empire = {
	trigger = {
		num_of_cities = 50
		has_country_flag = colonialcountry
		}
		colonists = 2
		overseas_income = 0.1
		colonist_cost = -0.1
		inflation_reduction = -0.1
		icon = 5
}

##############
#Legendary Warriors
##############

legendary_warriors = {
	trigger = {
		has_country_modifier = greatpower
		idea = grand_army
		idea = military_drill
		idea = glorious_arms
		NOT = { land_naval = -1 }
		NOT = { quality_quantity = -1 }
		OR = {
			religion = shinto
			religion = reformed
			religion = shiite
			religion = sikhism
			NOT = { land_naval = -3 }
			}
		}
		infantry_cost = 0.2
		cavalry_cost = 0.2
		land_morale = 1.5
		leader_shock = 1
		naval_morale = -2.0
		land_tech_cost_modifier = -0.25
		naval_tech_cost_modifier = 0.25
		prestige = 0.01
		icon = 7
}

##############
#Rulers of the Sea
##############

rulers_sea = {
	trigger = {
		has_country_modifier = greatpower
		idea = superior_seamanship
		idea = grand_navy
		idea = excellent_shipwrights
		land_naval = 3
		NOT = { quality_quantity = -1 }
		}
		infantry_cost = 0.2
		cavalry_cost = 0.2
		bigship_cost = -0.25
		galley_cost = -0.25
		lightship_cost = -0.25
		overseas_income = 0.2
		naval_morale = 2
		leader_naval_manuever = 1
		land_tech_cost_modifier = 0.25
		naval_tech_cost_modifier = -0.25
		colonists = 0.5
		merchants = 0.5
		prestige_from_naval = 0.5
		prestige = 0.01
		icon = 7
}

##############
#Free Merchants
##############

freemerchants = {
	trigger = {
		has_country_modifier = greatpower
		idea = merchant_adventures
		idea = shrewd_commerce_practise
		idea = national_trade_policy
		aristocracy_plutocracy = 1
		mercantilism_freetrade = 1
		serfdom_freesubjects = 1
		NOT = { innovative_narrowminded = -1 }
		}
		merchants = 2
 		merchant_compete_chance = 0.1
		trade_tech_cost_modifier = -0.25
		production_tech_cost_modifier = 0.25
		trade_income_modifier = 0.1
		trade_efficiency = 0.1 
		production_efficiency = -0.1
		icon = 5
}

#############
#Autocratic State
#############

autocraticstate = {
	trigger = {
		has_country_modifier = greatpower
		idea = bureaucracy
		idea = national_bank
		NOT = { idea = bill_of_rights }
		NOT = { idea = humanist_tolerance }
		NOT = { aristocracy_plutocracy = -1 }
		NOT = { mercantilism_freetrade = -1 }
		NOT = { serfdom_freesubjects = -1 }
		NOT = { centralization_decentralization = -1 }
		}
		global_revolt_risk = -3
		stability_cost_modifier = -0.25
		trade_tech_cost_modifier = 0.25
		production_tech_cost_modifier = -0.25
		trade_efficiency = -0.1 
		production_efficiency = 0.1
		icon = 3
				

#############
#Far East Bonus
#############

fareastbonus = {
	trigger = {
		has_country_flag = fareastflag
		}
		missionary_placement_chance = 0.10
		icon = 18
}

#############
#Caliph
#############

the_caliphate = {
	trigger = {
		has_country_flag = is_caliph
		}
		missionary_placement_chance = 0.10
		prestige = 0.015
		badboy = 0.1 # makes enemies nervous
		land_morale = 1.0
		icon = 20
}

##############
#Lucky Nation
##############

luckynation = {
	trigger = {
		luck = yes
		NOT = { has_country_flag = unluckynation }
		}
	merchant_compete_chance = 0.1
	colonist_placement_chance = 0.1
	missionary_placement_chance = 0.1
	leader_fire = 1
	leader_shock = 1
	land_tech_cost_modifier = -0.02
	trade_tech_cost_modifier = -0.02
	naval_tech_cost_modifier = -0.02
	government_tech_cost_modifier = -0.02
	production_tech_cost_modifier = -0.02
	spy_efficiency = 0.05
	stability_cost_modifier = -0.50
	icon = 21
}

##############
#Society (Tech) Modifiers
##############

modernsociety = {
	trigger = {
		has_country_flag = soc_modern
	}
	land_tech_cost_modifier = -0.1
	trade_tech_cost_modifier = -0.1
	naval_tech_cost_modifier = -0.1
	government_tech_cost_modifier = -0.1
	production_tech_cost_modifier = -0.1
	trade_efficiency = 0.10
	icon = 15
}

#####
#####
#####

enlightensociety = {
	trigger = {
		has_country_flag = soc_enlighten
	}
	trade_efficiency = 0.05
	icon = 15
}

#####
#####
#####

openingsociety = {
	trigger = {
		has_country_flag = soc_opening
	}
	land_tech_cost_modifier = 0.11
	trade_tech_cost_modifier = 0.11
	naval_tech_cost_modifier = 0.11
	government_tech_cost_modifier = 0.11
	production_tech_cost_modifier = 0.11
	icon = 15
}

#####
#####
#####

resistantsociety = {
	trigger = {
		has_country_flag = soc_resistant
	}
	land_tech_cost_modifier = 0.25
	trade_tech_cost_modifier = 0.25
	naval_tech_cost_modifier = 0.25
	government_tech_cost_modifier = 0.25
	production_tech_cost_modifier = 0.25
	icon = 15
}

#####
#####
#####

transitionsociety = {
	trigger = {
		has_country_flag = soc_transition
	}
	land_tech_cost_modifier = 0.54
	trade_tech_cost_modifier = 0.54
	naval_tech_cost_modifier = 0.54
	government_tech_cost_modifier = 0.54
	production_tech_cost_modifier = 0.54
	icon = 15
}


#####
#####
#####

aspiringsociety = {
	trigger = {
		has_country_flag = soc_aspiring
	}
	land_tech_cost_modifier = 1.00
	trade_tech_cost_modifier = 1.00
	naval_tech_cost_modifier = 1.00
	government_tech_cost_modifier = 1.00
	production_tech_cost_modifier = 1.00
	icon = 15
}

#####
#####
#####

imperialsociety = {
	trigger = {
		has_country_flag = soc_imperial
	}
	land_tech_cost_modifier = 1.50
	trade_tech_cost_modifier = 1.50
	naval_tech_cost_modifier = 1.50
	government_tech_cost_modifier = 1.50
	production_tech_cost_modifier = 1.50
	icon = 15
}

#####
#####
#####

exploringsociety = {
	trigger = {
		has_country_flag = soc_exploring
	}
	land_tech_cost_modifier = 2.33
	trade_tech_cost_modifier = 2.33
	naval_tech_cost_modifier = 2.33
	government_tech_cost_modifier = 2.33
	production_tech_cost_modifier = 2.33
	icon = 15
}

#####
#####
#####

expandingsociety = {
	trigger = {
		has_country_flag = soc_expanding
	}
	land_tech_cost_modifier = -0.5
	trade_tech_cost_modifier = -0.5
	naval_tech_cost_modifier = -0.5
	government_tech_cost_modifier = -0.5
	production_tech_cost_modifier = -0.5
	icon = 15
}

#####
#####
#####

agriculturalsociety = {
	trigger = {
		has_country_flag = soc_agricult
	}
	attrition = -5
	icon = 15
}

#####
#Tiny Country Bonus
#####

tinycountry = {
	trigger = {
		NOT = { num_of_cities = 2 }
		}
	global_tax_modifier = 1.0
	icon = 5
}

#####
#Small Country Bonus
#####

smallcountry = {
	trigger = {
		num_of_cities = 2
		NOT = { num_of_cities = 6 }
		}
	global_tax_modifier = 0.5
	icon = 5
}



######################################
# 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
		}
	}
	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
		}
		revolution_target = {
			war_with = THIS
		}  

	}
	prestige = 0.1
	stability_cost_modifier = -0.1
}
# Below are special AI only traits.
###########
#Timurid Empire
###########

timurid_traits = {
	trigger = {
		tag = TIM
		has_country_flag = ai_controlled
	}

	global_tax_modifier = -0.5
	global_trade_income_modifier = -0.5

  icon = 3
}

##############
#Russian Ferocity - This helps early AI Russia.
##############

rus_ferocity = {
	trigger = {
		has_country_flag = rus_flag
		has_country_flag = ai_controlled
		NOT = { num_of_cities = 20 }
		}
		cavalry_cost = -0.2
		land_morale = 0.5
		leader_shock = 1
		prestige = 0.01
		icon = 7
}