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


###########################################
# Discovery of the East Indian trade route.
###########################################
east_indian_trade_route = {
	potential = {
		num_of_ports = 1
		NOT = {
			capital_scope = {
				continent = asia
			}
		}
		NOT = {
			capital_scope = {
				continent = oceania
			}
		}
		
	}

	trigger = {
		has_discovered = 1460 # Cape of Good Hope
		num_of_ports = 4
		has_idea = quest_for_the_new_world
		technology_group = western
		any_active_trade_node = {
			OR = {
				province_id = 1361 # Straits of Johor
				province_id = 1343 # Ganges Delta
				province_id = 504 # Sind
				province_id = 1340 # Comorin Cape
				province_id = 2030 # Goa
			}
		}
	}

	trade_efficiency = 0.05	
}

#########################################################
# Theravada control of the temple of the Sacred Tooth.
#########################################################
theravada_kotte = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 2099	# Kandy
		religion = buddhism #Theravada
	}

	trigger = {
		owns = 2099 # Kandy
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Vajrayana control of Lhasa.
######################################
vajrayana_lhasa = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 677	# Lhasa
		religion = vajrayana
	}

	trigger = {
		owns = 677 # Lhasa
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Mahayana control of Luoyang.
######################################
mahayana_louyang = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 1836	# Luoyang
		religion = mahayana
	}

	trigger = {
		owns = 1836 # Luoyang
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Buddhist control of Bodh Gaya.
######################################
buddhist_bodh_gaya = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 558	# Patna (Bodh Gaya)
		OR = {
			religion = buddhism
			religion = vajrayana
			religion = mahayana
		}
	}

	trigger = {
		owns = 558 # Patna (Bodh Gaya)
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Hindu control of Varanasi.
######################################
hindu_varanasi = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 2095	# Varanasi
		religion = hinduism
	}

	trigger = {
		owns = 2095 # Varanasi
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Inti control of Pachacamac.
######################################
inti_lima = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 809 # Lima
		religion = inti
	}

	trigger = {
		owns = 809 # Lima
		is_religion_reformed = yes
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Nahuatl control of Cholula.
######################################
nahuatl_cholula = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 2644	# Cholula
		religion = nahuatl
	}

	trigger = {
		owns = 2644 # Cholula
		is_religion_reformed = yes
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Mayan control of Chichen Itza.
######################################
mayan_chichen_itza = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 846	# Chicen Itza
		religion = mesoamerican_religion
	}

	trigger = {
		owns = 846  # Chicen Itza
		is_religion_reformed = yes
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Sikh control of Amritsar.
######################################
sikh_amritsar = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 2075	# Amritsar
		religion = sikhism
	}

	trigger = {
		owns = 2075 # Amritsar
		2075 = { religion = sikhism }
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Christian control of Mecca.
######################################
christian_mecca = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 385	# Mecca
		religion_group = christian
	}

	trigger = {
		owns = 385 # Mecca
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}

######################################
# Custodian of the Two Holy Mosques
######################################
custodian_of_the_two_holy_mosques = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 385	# Mecca
		has_discovered = 384	# Medina
		religion_group = muslim
	}

	trigger = {
		is_subject = no
		owns = 385
		owns = 384
	}

	prestige = 1
	missionaries = 1
}


###########################################
# Jerusalem held by Abrahamic Faiths
###########################################
jerusalem_held = {
	potential = {
		normal_or_historical_nations = yes
		OR = {
			religion_group = christian
			religion_group = muslim
			religion = jewish
		}
		has_discovered = 379	# Judea
	}

	trigger = {
		owns = 379 # Judea
	}

	prestige = 1			#1% more yearly prestige
	missionaries = 1
}


######################################
# Non-Catholic control of Rome.
######################################
non_catholic_rome = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 118	# Roma
		NOT = { religion = catholic }
		OR = {
			religion_group = christian
			religion_group = muslim
		}
	}

	trigger = {
		owns = 118 # Roma
	}

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



######################################
# Catholic control of Rome.
######################################
catholic_rome = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 118	# Roma
		religion = catholic
		NOT = { tag = PAP }
	}

	trigger = {	
		NOT = { overlord_of = PAP }
		owns_or_vassal_of = 118 # Roma		
		NOT = { tag = ITA }
	}

	papal_influence = -10
	diplomatic_reputation = -1
	#icon = 9
}

papal_subjugation = {
	potential = {
		normal_or_historical_nations = yes
		has_discovered = 118	# Roma
		religion = catholic
		NOT = { tag = PAP }
	}

	trigger = {	
		overlord_of = PAP
		NOT = { tag = ITA }
	}

	diplomatic_reputation = -2
	#icon = 9
}


######################################
# Western Influences.
######################################
western_arms_trade = {
	potential = {
		NOT = { technology_group = western }
	}

	trigger = {
		any_neighbor_country = {
			technology_group = western
			is_subject = no
			alliance_with = ROOT
			has_opinion = { who = ROOT value = 150 }
		}
	}

	technology_cost = -0.10
}


######################################
# Italian - Submission to Emperor
######################################
submission_to_emperor = {
	potential = {
		has_global_flag = italy_out_of_HRE
		culture_group = latin
	}

	trigger = {
		is_emperor = no
		NOT = { tag = ITA }
		capital_scope = {
			is_part_of_hre = yes
		}
	}

	global_unrest = 3
	stability_cost_modifier = 0.1
	prestige = -1
}


	




######################################
# Counter Revolution
######################################
counter_revolution = {
	potential = {
		revolution_target_exists = yes
		is_revolution_target = no
	}

	trigger = {
		capital_scope = { continent = europe }
		revolution_target_exists = yes
		is_revolution_target = no
		is_subject = no
		NOT = {
			revolution_target = {
				war_with = ROOT
			}
			revolution_target = {
				truce_with = ROOT
			} 
		}
		OR = {
			government = absolute_monarchy
			government = enlightened_despotism
			government = despotic_monarchy
			government = feudal_monarchy
			government = administrative_monarchy
			government = constitutional_monarchy
			government = bureaucratic_despotism
			government = elective_monarchy
		}
	}

	prestige = -5
	stability_cost_modifier = 0.3
	global_unrest = 5
}



######################################
# Reaction
######################################
reaction = {
	potential = {
		revolution_target_exists = yes
		capital_scope = { continent = europe }
	}

	trigger = {
		capital_scope = { continent = europe }
		revolution_target_exists = yes
		is_revolution_target = no
		is_subject = no
		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 = ROOT
		}  

	}

	prestige = 10
	stability_cost_modifier = -0.1
	global_unrest = -10
}

######################################
# Crusader
######################################
crusader = {
	potential = {
		religion = catholic
		crusade_target = {
			exists = yes
		}
		
	}

	trigger = {
		
		crusade_target = {
			war_with = ROOT
			any_province = {
				controlled_by = root
			}
		}  
		land_maintenance = 1.0
	}

	global_manpower_modifier = 0.3
	global_tax_modifier = 0.1
	land_morale = 0.10
	prestige = 1
	papal_influence = 1
	devotion = 0.25
	#icon = 9
}

######################################
# Excommunication
######################################
excommunication = {
	potential = {
		religion = catholic	
	}

	trigger = {
		is_excommunicated = yes
		
	}

	prestige = -2
	tolerance_own = -3
	devotion = -5
	papal_influence = -10
	#icon = 10
}

##################################################
# The Pentarchy
##################################################
pentarchy_mod = {
	potential = {
		normal_or_historical_nations = yes
		religion = orthodox
		OR = {
			has_discovered = 118 	# Rome
			has_discovered = 151 	# Constantinople
			has_discovered = 2313 	# Antioch
			has_discovered = 379 	# Jerusalem
			has_discovered = 358 	# Alexandria
		}
	}

	trigger = {
		owns = 118 	# Rome
		owns = 151 	# Constantinople
		owns = 2313 # Antioch
		owns = 379 	# Jerusalem
		owns = 358 	# Alexandria
		118 = { religion = orthodox }
		151 = { religion = orthodox }
		2313 = { religion = orthodox }
		379 = { religion = orthodox }
		358 = { religion = orthodox }
	}
	
	prestige = 0.5
	missionaries = 1
}

##################################################
# China modifiers
##################################################
the_mandate_of_heaven = {
	potential = {
		government = celestial_empire
		is_westernising = no
		NOT = { technology_group = western }
	}
	
	trigger = {	
		is_westernising = no
		stability = 0
		legitimacy = 60
		num_of_cities = 20
	}

	stability_cost_modifier = -0.10
	global_unrest = -5
}

the_mandate_of_heaven_lost = {
	potential = {
		government = celestial_empire
		is_westernising = no
		NOT = { technology_group = western }
	}

	trigger = {
		is_westernising = no
		OR = {
			NOT = { stability = 0 }
			NOT = { legitimacy = 60 }
			NOT = { num_of_cities = 20 }	
		}
	}

	discipline = -0.1
	stability_cost_modifier = 0.5
	global_unrest = 10
}

##################################################
# HRE modifiers
##################################################
hre_dominant_catholic = {
	potential = {
		capital_scope = {
			continent = europe
		}
		OR = {
			religion = catholic
			religion = protestant
		}
	}

	trigger = {
		religion = catholic
		hre_religion = catholic
		hre_religion_locked = yes
	}
	
	legitimacy = 0.25
	tolerance_own = 1
	global_missionary_strength = 0.01
	imperial_authority = 0.25
}

hre_dominant_protestant = {
	potential = {
		capital_scope = {
			continent = europe
		}
		OR = {
			religion = catholic
			religion = protestant
		}
	}

	trigger = {
		religion = protestant
		hre_religion = protestant
		hre_religion_locked = yes
	}
	
	legitimacy = 0.25
	tolerance_own = 1
	global_missionary_strength = 0.01
	imperial_authority = 0.25
}

### Taistomod stuff

tech_free_merchant = {
	potential = {
		dip_tech = 1
	}

	trigger = {
		dip_tech = 15
	}
	
	merchants = 1
}

tech_free_merchant_2 = {
	potential = {
		dip_tech = 1
	}

	trigger = {
		dip_tech = 20
	}
	
	merchants = 1
}

tech_free_colonist = {
	potential = {
		dip_tech = 1
	}

	trigger = {
		dip_tech = 17
	}
	
	colonists = 1
}

tech_free_leader_pool = {
	potential = {
		dip_tech = 1
	}

	trigger = {
		dip_tech = 16
	}
	
	free_leader_pool = 1
}
