united_cantons_reform = {
	icon = "united_cantons_reform"
	allow_normal_conversion = yes
	modifiers = {
		governing_capacity = -50
		free_policy = 1
		mercenary_manpower = 0.5
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 40
	legacy_equivalent = united_cantons_legacy
	potential = {
		NOT = { map_setup = map_setup_random }
		OR = {
			primary_culture = swiss
			have_had_reform = united_cantons_reform
		}
	}
	ai = {
		factor = 10 #unique
		
		modifier = {
			factor = 2
			NOT = {
				num_of_cities = 11
			}
		}
		
		modifier = {
			factor = 0
			is_subject = yes
		}
	}

	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
}

parliamentary_reform = {
	icon = "judge"
	modifiers = {
		global_unrest = -1
	}
	potential = {
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		NOT = { has_government_attribute = english_parliament }
		NOT = { #has a special "senate" themed reform
			OR = {
				tag = BYZ
				was_tag = BYZ 
			}
		}
	}
	
	trigger = {		
		if = {
			limit = {
				OR = {
					has_dlc = "Common Sense"
					has_dlc = "Domination"
				}
			}
			OR = {
				NOT = { has_estate = estate_nobles }
				crown_stronger_than_estate = { estate = estate_nobles }
				has_reform = parliamentary_reform
			}
			is_not_blocked_by_estate_privilege = { estate = estate_nobles }
		}	
		NOT = { has_reform = elective_monarchy }
		NOT = { has_reform = polish_great_sejm }
		NOT = { has_reform = polish_elective_monarchy }
		if = {
			limit = { NOT = { has_dlc = "Mandate of Heaven" } }
			NOT = { has_reform = celestial_empire }
			NOT = { is_revolutionary_republic_trigger = yes }
		}
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
		custom_attributes = {
			disables_estate_nobles = yes
			blocked_call_diet = yes
		}
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.5
			NOT = { technology_group = western }
		}
		modifier = {
			factor = 0.5
			NOT = { technology_group = western }
			NOT = {
				any_neighbor_country = {
					technology_group = western
				}
			}
		}
		modifier = {
			factor = 0
			OR = {
				has_reform = mughal_government
				has_reform = celestial_empire
				religion = confucianism
			}
		}
	}
	post_removed_effect = {
		give_estate_land_share_init = { estate = estate_nobles }
	}
}

restoration_of_the_senate_reform = {
	icon = "restoration_of_the_senate_reform"
	modifiers = {
		global_unrest = -2
		max_possible_parliament_seats = 8
	}
	potential = {
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		NOT = { has_government_attribute = english_parliament }
		OR = {
			tag = BYZ
			was_tag = BYZ 
		}
	}
	
	trigger = {
		NOT = { has_reform = elective_monarchy }
		NOT = { has_reform = polish_great_sejm }
		NOT = { has_reform = polish_elective_monarchy }
		if = {
			limit = { NOT = { has_dlc = "Mandate of Heaven" } }
			NOT = { has_reform = celestial_empire }
			NOT = { is_revolutionary_republic_trigger = yes }
		}
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
		custom_attributes = {
			blocked_call_diet = yes
		}
	}
	ai = {
		factor = 1
		modifier = {
			factor = 0.5
			NOT = { technology_group = western }
		}
		modifier = {
			factor = 0.5
			NOT = { technology_group = western }
			NOT = {
				any_neighbor_country = {
					technology_group = western
				}
			}
		}
		modifier = {
			factor = 0
			OR = {
				has_reform = mughal_government
				has_reform = celestial_empire
				religion = confucianism
			}
		}
	}

}

# Upgraded Indian estate reforms

permanent_marathas_council_reform = {
	icon = "noble_indian"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Dharma"
		has_estate = estate_maratha
		technology_group = indian
	}
	modifiers = {
		leader_land_shock = 1
		maratha_influence_modifier = 0.1
		maratha_loyalty_modifier = 0.05
		nobles_influence_modifier = -0.1
		nobles_loyalty_modifier = -0.05
	}
	custom_attributes = {
		maratha_general_interaction = yes
	}
	ai = {
		factor = 3
		modifier = {
			factor = 0.1
			estate_influence = {
				estate = estate_maratha
				influence = 90
			}			
		}
	}
}

governmental_purbias_register_reform = {
	icon = "rajput_kingdom"
	potential = {
		has_dlc = "Dharma"
		has_estate = estate_rajput
		technology_group = indian
	}
	modifiers = {
		recover_army_morale_speed = 0.05
		rajput_influence_modifier = 0.1
		rajput_loyalty_modifier = 0.05
		nobles_influence_modifier = -0.1
		nobles_loyalty_modifier = -0.05
	}
	custom_attributes = {
		better_purbias_interaction = yes
	}
	effect = {
		if = {
			limit = {
				has_country_modifier = look_up_purbias
			}
			remove_country_modifier = look_up_purbias
			add_country_modifier = {
				name = look_up_purbias_upgraded
				duration = -1
			}
		}
	}
	removed_effect = {
		if = {
			limit = {
				has_country_modifier = look_up_purbias_upgraded
			}
			remove_country_modifier = look_up_purbias_upgraded
			add_country_modifier = {
				name = look_up_purbias
				duration = -1
			}
		}
	}
	ai = {
		factor = 3
		modifier = {
			factor = 0.1
			estate_influence = {
				estate = estate_rajput
				influence = 90
			}			
		}
	}
}

# for Spain

council_of_the_indies_reform = {
	icon = "paper_money_map"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Golden Century"
		culture_group = iberian
		capital_scope = {
			region = iberia_region
		}
	}
	trigger = {
		num_of_colonists = 1
		culture_group = iberian
		capital_scope = {
			region = iberia_region
		}
	}
	modifiers = {
		reduced_liberty_desire_on_other_continent = 5
		treasure_fleet_income = 0.25
		global_trade_power = 0.05
	}
	ai = {
		factor = 2
	}
}

penal_colonies_reform = {
	icon = "colonial_companies"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Golden Century"
		capital_scope = {
			NOT = {
				OR = {
					continent = north_america
					continent = south_america
					continent = new_world
					continent = oceania
				}
			}
		}
	}
	trigger = {
		has_idea_group = exploration_ideas
	}
	modifiers = {
		expel_minorities_cost = -1
		colonist_placement_chance = 0.05
	}
	ai = {
		factor = 0.1
	}
}

# for Russia (and for Ruthenia)
tysyatsky_reform = {
	icon = "soldiers_2"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			has_unlocked_government_reform = {
				government_reform = tysyatsky_reform
			}
			AND = {
				NOT = { tag = RUS }
				OR = {
					primary_culture = ruthenian
					primary_culture = ruthenian_new
				}
			}
			AND = {
				OR = {
					culture_group = east_slavic
					culture_group = slavic
				}
				government = republic
			}
		}
	}
	modifiers = {
		republican_tradition = 0.3
		leader_cost = -0.1
		nobles_influence_modifier = 0.05
		nobles_loyalty_modifier = 0.1
	}
	custom_attributes = {
		recruiting_generals_increases_nobles_loyalty = yes
	}
	ai = {
		factor = 1
	}
}

namestnik_reform = {
	icon = "provincial_government"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = namestnik_reform
		}
	}
	modifiers = {
		global_autonomy = -0.03
		autonomy_change_time = -0.25
		min_autonomy_in_territories = -0.05
		trade_company_investment_cost = -0.1
	}
	ai = {
		factor = 1
	}
}

oprichnina_reform = {
	icon = "spy"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = oprichnina_reform
		}
	}
	modifiers = {
		global_rebel_suppression_efficiency = 1
		years_of_nationalism = -5
		all_estate_influence_modifier = -0.1
		harsh_treatment_cost = -0.25
		monthly_russian_dip_power = 0.15
	}
	custom_attributes = {
		seizing_land_no_rebels = yes
	}
	ai = {
		factor = 1
	}
}

vodka_of_the_crown_reform = {
	icon = vodka_monopoly
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture_group = east_slavic
			culture_group = slavic
		}
	}
	modifiers = {
		global_unrest = -1
		idea_cost = 0.05
		global_trade_goods_size_modifier = 0.1
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				if = {
					limit = {
						trade_goods = grain
					}
					add_province_modifier = { 
						name = grain_vodka_bonus_prod
						duration = -1
						hidden = yes
					}
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = grain_vodka_bonus_prod
				}
				remove_province_modifier = grain_vodka_bonus_prod
			}
		}
	}
	custom_attributes = {
		extra_trade_goods_from_grain = yes
	}

	ai = {
		factor = 1
	}
}


governing_senate_reform = {
	icon = governing_senate
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = governing_senate_reform
			has_unlocked_government_reform = {
				government_reform = governing_senate_reform
			}
			has_reform = ruthenian_tsardom
		}
	}
	
	trigger = {	
		if = {
			limit = { has_dlc = "Res Publica" }
			NOT = { has_reform = elective_monarchy }
		}
		if = {
			limit = { has_dlc = "Lions of the North" }
			NOT = { has_reform = polish_elective_monarchy }
		}
		if = {
			limit = { NOT = { has_dlc = "Mandate of Heaven" } }
			NOT = { has_reform = celestial_empire }
			NOT = { is_revolutionary_republic_trigger = yes }
		}
	}
	modifiers = {
		all_estate_loyalty_equilibrium = 0.1
		all_estate_influence_modifier = -0.1
		all_estate_possible_privileges = 1
	}

	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}
	custom_attributes = {
		diet_increases_not_influence = yes
	}
	ai = {
		factor = 1
	}
}

enforced_autocracy_reform = {
	icon = russian_queen
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = enforced_autocracy_reform
			has_unlocked_government_reform = {
				government_reform = enforced_autocracy_reform
			}
			has_reform = ruthenian_tsardom
		}
	}
	modifiers = {
		culture_conversion_time = -0.2
		yearly_government_power = 0.5
	}
	custom_attributes = {
		can_sell_crownland_to_single_estates = yes
		can_seize_crownland_of_single_estates = yes
	}
	ai = {
		factor = 1
	}
}

# Holy State for Jerusalem
holy_state_reform = {
	allow_normal_conversion = no
	legacy_equivalent = holy_state_legacy
	icon = "holy_state_reform"
	valid_for_nation_designer = yes
	nation_designer_trigger = {
		religion = catholic
	}
	potential = {
		OR = {
			AND = {
				OR = {
					tag = KOJ
					tag = LAE
					has_country_modifier = sisters_takeover
				}
				NOT = { map_setup = map_setup_random }
			}
			AND = {
				is_playing_custom_nation = yes
				have_had_reform = holy_state_reform
			}
		}
	}
	trigger = {
		religion = catholic
	}
	nation_designer_cost = 50
	modifiers = {
		cb_on_religious_enemies = yes
		manpower_recovery_speed = 0.15
	}
	rulers_can_be_generals = yes
	heirs_can_be_generals = yes
	custom_attributes = {
		monastic_order = yes
	}
	ai = {
		factor = 10
	}
}

# State and Religion
papal_embassy_reform = {
	icon = "pope"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = catholic
		NOT = { tag = PAP }
	}
	trigger = {
		NOT = {
			has_country_modifier = the_statue_in_restraint_of_appeals
		}
	}
	modifiers = {
		papal_influence_from_cardinals = 0.33
		curia_treasury_contribution = 0.33
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.05
		curia_powers_cost = -0.1
	}
	effect = {
		hidden_effect = {
			add_opinion = {
				who = PAP
				modifier = papal_embassy
			}
			reverse_add_opinion = {
				who = PAP
				modifier = papal_embassy
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_opinion = {
				who = PAP
				modifier = papal_embassy
			}
			reverse_remove_opinion = {
				who = PAP
				modifier = papal_embassy
			}
		}
	}
	custom_attributes = {
		improved_opinion_of_pope = yes	#Popesman has +25 opinion of you
	}
	
	ai = {
		factor = 1
	}
}

i_am_the_church_reform = {
	icon = "pope"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = catholic
		tag = PAP
	}
	modifiers = {
		devotion = 0.5
		max_absolutism = 10
		appoint_cardinal_cost = -0.1
	}
	effect = {
		hidden_effect = {
			if = {
				limit = { is_defender_of_faith = yes }
				add_country_modifier = {
					name = gov_improved_defender_of_faith_mod
					duration = -1
				}
			}
		}
	}
	post_removed_effect = {
		remove_country_modifier = gov_improved_defender_of_faith_mod
	}
	custom_attributes = {
		improved_defender_of_faith = yes	#Being Defender of Faith increases Dip Rep, Tolerance and Morale
	}
	
	ai = {
		factor = 1
	}
}

focus_of_the_patriarchy_reform = {
	icon = "pope"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = coptic
	}
	modifiers = {
		institution_spread_from_true_faith = 0.25
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
	}
	custom_attributes = {
		active_holy_sites_improve_clergy_loyalty = yes
		clerical_ministers_tech_buff = yes
	}
	
	ai = {
		factor = 1
	}
}

lands_for_the_monasteries_reform = {
	icon = "pope"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = orthodox
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.15
		yearly_patriarch_authority = 0.002
	}
	custom_attributes = {
		free_religious_culture = yes
		on_church_built_clergy_loyalty = yes
	}
	conditional = {
		allow = { has_dlc = "Third Rome" }
		custom_attributes = {
			selling_titles_increases_pa = yes
		}
	}
	
	ai = {
		factor = 1
	}
}

#the_avestan_dogma_reform = {
#	icon = "articles_of_agreement"
#	allow_normal_conversion = yes
#	potential = {
#		religion = zoroastrian
#	}
#	modifiers = {
#		adm_advisor_cost = -0.1
#		church_influence_modifier = 0.1
#		church_loyalty_modifier = 0.1
#	}
#	conditional = {
#		allow = { has_dlc = "King of Kings" }
#		government_abilities = {
#			the_three_royal_fires_mechanic
#		}
#	}
#	#post_removed_effect = {
#	#	hidden_effect = {
#	#		if = {
#	#			limit = { NOT = { has_government_mechanic = the_three_royal_fires_mechanic } }
#	#			clr_country_flag = can_place_center_of_reformation
#	#			every_owned_province = {
#	#				limit = {
#	#					is_reformation_center = yes
#	#					religion = root
#	#				}
#	#				remove_reform_center = zoroastrian
#	#			}
#	#		}
#	#	}
#	#}
#	
#	ai = {
#		factor = 1
#	}
#}

zoroastrian_focus_reform = {
	icon = "articles_of_agreement"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = zoroastrian
	}
	modifiers = {
		no_religion_penalty = yes
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
	}
	conditional = {
		allow = { has_dlc = "King of Kings" }
		government_abilities = {
			the_three_royal_fires_mechanic
		}
	}
	#post_removed_effect = {
	#	hidden_effect = {
	#		if = {
	#			limit = { NOT = { has_government_mechanic = the_three_royal_fires_mechanic } }
	#			clr_country_flag = can_place_center_of_reformation
	#			every_owned_province = {
	#				limit = {
	#					is_reformation_center = yes
	#					religion = root
	#				}
	#				remove_reform_center = zoroastrian
	#			}
	#		}
	#	}
	#}
	
	ai = {
		factor = 1
	}
}

power_to_the_synagogoues_reform = {
	icon = "rabbi"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion_group = jewish_group
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		idea_cost = -0.05
		church_power_modifier = 0.1
	}
	conditional = {
		allow = { has_dlc = "Origins" }
		custom_attributes = {
			loyalty_from_celebration = yes	#Celebrating will now give +20 Loyalty
		}
	}
	
	ai = {
		factor = 1
	}
}

head_of_the_reformed_church_reform = {
	icon = "regionally_elected_commanders"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		NOT = { religion = catholic }
		NOT = { religion = coptic }
		NOT = { religion = orthodox }
		religion_group = christian
	}
	modifiers = {
		church_influence_modifier = -0.05
		global_tax_modifier = 0.15
		church_power_modifier = 0.1
		monthly_fervor_increase = 0.25
	}
	effect = {
		hidden_effect = {
			if = {
				limit = { is_defender_of_faith = yes }
				add_country_modifier = {
					name = gov_improved_defender_of_faith_mod
					duration = -1
				}
			}
		}
	}
	post_removed_effect = {
		remove_country_modifier = gov_improved_defender_of_faith_mod
	}
	custom_attributes = {
		improved_defender_of_faith = yes	#Being Defender of Faith increases Dip Rep, Tolerance and Morale
	}
	
	ai = {
		factor = 1
	}
}

confucian_governing_reform = {
	icon = "asian_scripture"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = confucianism
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		harmonization_speed = 0.1
		governing_capacity_modifier = 0.05
	}
	conditional = {
		allow = { has_dlc = "Mandate of Heaven" }
		custom_attributes = {
			full_loyalty_on_harmonization = yes	#Add +100 Loyalty when harmonizing something
		}
	}
	
	ai = {
		factor = 1
	}
}

empower_buddhist_temples_reform = {
	icon = "religious_harmony_reform"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		OR = {
			religion = buddhism
			religion = vajrayana
			religion = mahayana
		}
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		yearly_karma_decay = 0.05
		stability_cost_modifier = -0.1
	}
	conditional = {
		allow = { has_dlc = "Common Sense" }
		custom_attributes = {
			#clergy_estate_agendas_gives_karma = yes	#Adds Karma by 10
			#seizing_land_takes_karma = yes	#Reduces Karma by 10
			buffed_monastic_temples = yes
			enable_karma_decision = yes	#Allows decision every 20 years to add or remove 10 Karma
		}
	}
	
	ai = {
		factor = 1
	}
}

public_hindu_practices_reform = {
	icon = "indian_crown"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = hinduism
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		brahmins_hindu_influence_modifier = 0.1
		brahmins_hindu_loyalty_modifier = 0.1
		tolerance_own = 1
	}
	conditional = {
		allow = { has_dlc = "Wealth of Nations" }
		custom_attributes = {
			reduce_new_deity_decision_cd = yes	#Reduce it by 15 years
		}
	}
	
	ai = {
		factor = 1
	}
}

strengthen_shaman_privileges_reform = {
	icon = "tribal_martial_society"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = shamanism
	}
	modifiers = {
		church_loyalty_modifier = 0.1
		global_missionary_strength = 0.01
	}
	conditional = {
		allow = { has_dlc = "Rights of Man" }
		custom_attributes = {
			no_influence_from_fetishist_privileges = yes
		}
	}
	
	ai = {
		factor = 1
	}
}

abolished_caste_system_reform = {
	icon = "indian_sultanate"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = sikhism
	}
	modifiers = {
		all_estate_influence_modifier = -0.15
		stability_cost_modifier = -0.2
	}
	custom_attributes = {
		seizing_land_no_rebels = yes
	}
	
	ai = {
		factor = 1
	}
}

strengthen_the_ulema_reform = {
	icon = "mamluk_government"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion_group = muslim
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		dhimmi_influence_modifier = -0.1
		dhimmi_loyalty_modifier = -0.1
		global_missionary_strength = 0.015
	}
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		custom_attributes = {
			allow_piety_switch_decision = yes	#Enables a decision which gives 1 stabhit, but turns your piety 180
		}
	}
	
	ai = {
		factor = 1
	}
}

strengthen_the_dhimmi_reform = {
	icon = "noble_muslim"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion_group = muslim
		has_estate = estate_dhimmi
	}
	modifiers = {
		dhimmi_influence_modifier = 0.1
		dhimmi_loyalty_modifier = 0.1
		church_influence_modifier = -0.1
		church_loyalty_modifier = -0.1
		tolerance_of_heathens_capacity = 1
	}
	custom_attributes = {
		free_guarantee_dhimmi_autonomy = yes
		disables_estate_brahmins = yes
		enables_estate_dhimmi = yes
	}
	
	ai = {
		factor = 1
	}
}

legacy_of_the_steppes_reform = {
	icon = "horde_riding"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = tengri_pagan_reformed
	}
	modifiers = {
		monarch_military_power = 1
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
	}
	custom_attributes = {
		winning_battles_increases_legitimacy = yes	#Every single won battle adds +2 Legitimacy and +0.25 Absolutism
	}
	
	ai = {
		factor = 1
	}
}

state_and_shrines_intertwined_reform = {
	icon = "shogunate"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = shinto
	}
	modifiers = {
		church_loyalty_modifier = 0.15
		religious_unity = 0.25
	}
	custom_attributes = {
		enables_divine_idea_group = yes
	}
	
	ai = {
		factor = 1
	}
}

embedded_norse_government_reform = {
	icon = "all_under_tengri_reform"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		religion = norse_pagan_reformed
	}
	modifiers = {
		may_perform_slave_raid = yes
		church_influence_modifier = 0.1
		army_tradition_from_battle = 0.5
		naval_tradition_from_battle = 0.5
	}
	custom_attributes = {
		winning_war_increases_legitimacy = yes
	}
	
	ai = {
		factor = 1
	}
}

strengthen_clergy_reform = {
	icon = "church"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
		has_no_religion_specific_government_available = yes	#This way modders don't have to change this reform explicitly
	}
	modifiers = {
		church_influence_modifier = 0.1
		church_loyalty_modifier = 0.1
		war_exhaustion = -0.03
	}
	
	ai = {
		factor = 1
	}
}

curtail_clergy_power_reform = {
	icon = "monks"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		adm_tech_cost_modifier = -0.1
		religious_unity = 0.1
		church_influence_modifier = -0.1
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_church = yes
	}
	
	ai = {
		factor = 1
	}
}

secure_clergy_power_reform = {
	icon = "warrior_monks_reform"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		church_influence_modifier = 0.05
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_tax_building_trigger = yes
				}
				add_province_modifier = {
					name = gov_expanded_temple_rights_mod
					duration = -1
				}
			}
		}
	}
	post_removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = gov_expanded_temple_rights_mod
				}
				remove_province_modifier = gov_expanded_temple_rights_mod
			}
		}
	}
	custom_attributes = {
		temples_modifier = yes
	}
	
	ai = {
		factor = 1
	}
}

maintain_clergy_balance_of_power_reform = {
	icon = "consolidate_power_in_cities_reform"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		all_estate_loyalty_equilibrium = 0.05
		diplomats = 1
	}
	
	ai = {
		factor = 1
	}
}

separate_clergy_from_state_affairs_reform = {
	icon = "partial_secularisation_reform"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	trigger = {
		OR = {
			full_idea_group = innovativeness_ideas
			full_idea_group = humanist_ideas
		}
		NOT = { has_idea_group = religious_ideas }
		NOT = { has_idea_group = theocracy_ideas }
		is_not_blocked_by_estate_privilege = { estate = estate_church }
		is_not_blocked_by_estate_privilege = { estate = estate_brahmins }
	}
	modifiers = {
		tolerance_of_heathens_capacity = 1
		tolerance_of_heretics_capacity = 1
		innovativeness_gain = 0.25
	}
	custom_attributes = {
		disables_estate_church = yes
		disables_estate_brahmins = yes
	}
	
	ai = {
		factor = 1
	}
}

#Revolutionary
cult_of_reason_reform = {
	icon = "cult_of_reason"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
		has_dlc = "Emperor"
	}
	trigger = {
		has_country_modifier = cult_of_reason
		if = {
			limit = {
				has_government_attribute = enables_estate_church
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_church
			}
		}
	}
	modifiers = {
		rr_jacobins_influence = 0.1
		idea_cost = -0.2
		possible_policy = 1
		free_policy = 1
	}
	
	ai = {
		factor = 1
	}
}

conserve_the_religion_reform = {
	icon = "cult_of_supreme_being"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
		has_dlc = "Emperor"
	}
	modifiers = {
		rr_royalists_influence = 0.1
		papal_influence = 100
		tolerance_own = 2
		idea_cost = -0.05
	}
	effect = {
		if = {
			limit = { has_country_modifier = cult_of_reason }
			add_stability = -1
			remove_country_modifier = cult_of_reason
		}
	}
	
	ai = {
		factor = 1
	}
}

secularization_of_the_state_reform = {
	icon = "partial_secularisation_reform"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
		has_dlc = "Emperor"
	}
	trigger = {
		if = {
			limit = {
				has_government_attribute = enables_estate_church
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_church
			}
		}
	}
	modifiers = {
		rr_girondists_influence = 0.1
		no_religion_penalty = yes
	}
	
	ai = {
		factor = 1
	}
}

#Russia
holy_synod_reform = {
	icon = "patriarch"
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = holy_synod_reform
			has_unlocked_government_reform = {
				government_reform = holy_synod_reform
			}
			has_reform = ruthenian_tsardom
		}
	}
	trigger = {
		religion = orthodox
	}
	modifiers = {
		manpower_in_true_faith_provinces = 0.05
		missionaries = 1
		church_loyalty_modifier = 0.1
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_church = yes
		temples_modifier = yes
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_tax_building_trigger = yes
				}
				add_province_modifier = {
					name = gov_expanded_temple_rights_mod
					duration = -1
				}
			}
		}
	}
	post_removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = gov_expanded_temple_rights_mod
				}
				remove_province_modifier = gov_expanded_temple_rights_mod
			}
		}
	}
	ai = {
		factor = 1
	}
}

strengthened_the_patriarchy_reform = {
	icon = "patriarch"
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = strengthened_the_patriarchy_reform
			has_unlocked_government_reform = {
				government_reform = strengthened_the_patriarchy_reform
			}
			has_reform = ruthenian_tsardom
		}
	}
	trigger = {
		religion = orthodox
	}
	modifiers = {
		church_privilege_slots = 1
		church_influence_modifier = -0.15
		church_loyalty_modifier = 0.2
		tolerance_own = 1
		yearly_patriarch_authority = 0.005
	}
	custom_attributes = {
		free_religious_culture = yes
	}
	ai = {
		factor = 1
	}
}

head_of_the_patriarchy_reform = {
	icon = "patriarch"
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = head_of_the_patriarchy_reform
			has_unlocked_government_reform = {
				government_reform = head_of_the_patriarchy_reform
			}
		}
	}
	trigger = {
		religion = orthodox
	}
	modifiers = {
		max_absolutism = 10
		church_loyalty_modifier = 0.2
		tolerance_own = 1
		yearly_patriarch_authority = 0.005
	}
	custom_attributes = {
		free_religious_culture = yes
		improved_defender_of_faith = yes
		temples_modifier = yes
		seizing_land_no_rebels_from_estate_church = yes
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_tax_building_trigger = yes
				}
				add_province_modifier = {
					name = gov_expanded_temple_rights_mod
					duration = -1
				}
			}
		}
	}
	post_removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = gov_expanded_temple_rights_mod
				}
				remove_province_modifier = gov_expanded_temple_rights_mod
			}
		}
	}
	ai = {
		factor = 1
	}
}

peters_government_reform = {
	icon = "imperial_russia"
	potential = {
		has_dlc = "Domination"
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = peters_government_reform
			has_unlocked_government_reform = {
				government_reform = peters_government_reform
			}
		}
	}
	modifiers = {
		administrative_efficiency = 0.025
		free_policy = 1
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			table_of_ranks_mechanic
		}
	}
	ai = {
		factor = 10
	}
}

#Ottomans
fiqh_laws_reform = {
	icon = "fiqh_laws"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = fiqh_laws_reform
			has_unlocked_government_reform = {
				government_reform = fiqh_laws_reform
			}
			has_reform = sultanate_of_rum_reform
		}
	}
	trigger = {
		religion_group = muslim
	}
	modifiers = {
		global_missionary_strength = 0.02
		church_loyalty_modifier = 0.1
	}

	custom_attributes = {
		same_religion_subject_bonus = yes
		allow_piety_switch_decision = yes
	}
	
	ai = {
		factor = 1
	}
}

sufism_decree_reform = {
	icon = "sufism_decree"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		is_revolutionary = no
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			have_had_reform = sufism_decree_reform
			has_unlocked_government_reform = {
				government_reform = sufism_decree_reform
			}
			has_reform = sultanate_of_rum_reform
		}
	}
	trigger = {
		religion_group = muslim
	}
	modifiers = {
		diplomats = 1
		dhimmi_loyalty_modifier = 0.1
	}
	
	conditional = {
		allow = { has_dlc = "Golden Century" }
		custom_attributes = {
			free_guarantee_dhimmi_autonomy = yes
			unlock_ottoman_holy_orders = yes
		}
	}
	conditional = {
		allow = { NOT = { has_dlc = "Golden Century" } }
		custom_attributes = {
			free_guarantee_dhimmi_autonomy = yes
		}
	}
	
	ai = {
		factor = 1
	}
}

#England
anglican_state_church_reform = {
	icon = "anglican_state_church"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = anglican_state_church_reform
		}
	}
	trigger = {
		OR = {
			religion = protestant
			religion = reformed
			religion = anglican
			religion = hussite
		}
	}
	modifiers = {
		tolerance_own = 1
		church_power_modifier = 0.2
		monthly_fervor_increase = 0.1
		max_absolutism = 10
	}
	
	ai = {
		factor = 1
	}
}
english_conciliarism_reform = {
	icon = "english_conciliarism"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = english_conciliarism_reform
		}
	}
	trigger = {
		religion_group = christian
	}
	modifiers = {
		diplomats = 1
		tolerance_heretic = 3
		diplomatic_reputation = 1
	}
	
	ai = {
		factor = 1
	}
}

#Persia
legacy_of_the_safavid_reform = {
	icon = "legacy_of_the_safavid_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = legacy_of_the_safavid_reform
		}
	}
	trigger = {
		has_government_mechanic = feudal_theocracy_mechanic
	}
	modifiers = {
		church_loyalty_modifier = 0.1
		global_missionary_strength = 0.015
		church_privilege_slots = 1
		church_influence_modifier = -0.1
	}
	effect = {
	}
	removed_effect = {
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "King of Kings"
			}
		}
		custom_attributes = {
			upgrade_feudal_theocracy = yes
		}
	}
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		custom_attributes = {
			allow_piety_switch_decision = yes	#Enables a decision which gives 1 stabhit, but turns your piety 180
		}
	}
	ai = {
		factor = 10
	}
}

#Military Doctrines
organized_military_staff_reform = {
	icon = "organized_military_staff"
	allow_normal_conversion = yes
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = organized_military_staff_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		reinforce_cost_modifier = -0.2
		reinforce_speed = 0.25
		global_supply_limit_modifier = 0.2
	}
	
	ai = {
		factor = 1
	}
}

military_engineering_reform = {
	icon = "military_engineers"
	allow_normal_conversion = yes
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = military_engineering_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		artillery_barrage_cost = -0.25
		artillery_cost = -0.1
	}
	
	ai = {
		factor = 1
	}
}

defensive_stance_reform = {
	icon = "castle"
	allow_normal_conversion = yes
	potential = {
		OR = {
			NOT = { has_dlc = "Domination" }
			NOT = { culture_group = caucasian }
			NOT = { primary_culture = georgian_new }
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = defensive_stance_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
		NOT = { is_subject_of_type = march }
		NOT = { is_subject_of_type = client_march }
	}
	modifiers = {
		defensiveness = 0.15
		garrison_size = 0.2
		max_hostile_attrition = 1
	}
	
	ai = {
		factor = 1
	}
}

sustained_discipline_reform = {
	icon = "line_infantry"
	allow_normal_conversion = yes
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = sustained_discipline_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		land_attrition = -0.15
		drill_decay_modifier = -0.33
		drill_gain_modifier = 0.33
	}
	
	ai = {
		factor = 1
	}
}

cavalry_warfare_reform = {
	icon = "cavalry"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_unlocked_government_reform = { government_reform = legacy_of_the_seljuk_reform } }
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = cavalry_warfare_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		cav_to_inf_ratio = 0.1
		cavalry_cost = -0.1
	}
	
	ai = {
		factor = 1
	}
}

amphibious_specialization_reform = {
	icon = "marine"
	allow_normal_conversion = yes
	potential = {
		OR = {
			NOT = { has_dlc = "Domination" }
			AND = { 
				NOT = { primary_culture = english }
				NOT = { primary_culture = anglois }
			}
		}
	}
	trigger = {
		num_of_ports = 1
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = amphibious_specialization_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		regiment_disembark_speed = 0.25
		transport_attrition = -0.25
		allowed_marine_fraction = 0.1
	}
	effect = {
		hidden_effect = {
			add_country_modifier = {
				name = amphibious_specialization_reform_modifier
				duration = -1
				hidden = yes
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = amphibious_specialization_reform_modifier
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Domination"
				has_dlc = "Golden Century"
				has_dlc = "Rule Britannia"
				has_dlc = "Lions of the North"
			}
		}
		custom_attributes = {
			marine_buff = yes	#Marines -20% Manpower Usage
		}
	}
	
	ai = {
		factor = 1
		modifier = {
			factor = 0
			NOT = { max_sailors = 50000 }
		}
	}
}

mercenary_leadership_reform = {
	icon = "war_economy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			NOT = { has_dlc = "Domination" }
			NOT = { full_idea_group = mercenary_ideas }
			NOT = { primary_culture = swiss }
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = mercenary_leadership_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		mercenary_cost = -0.1
		possible_condottieri = 0.5
	}
	
	ai = {
		factor = 1
		modifier = {
			factor = 0
			NOT = {
				has_global_modifier_value = {
					which = mercenary_discipline
					value = 0.05
				}
			}
		}
	}
}

doppelsoldner_reform = {
	icon = "mercenaries"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		NOT = { primary_culture = swiss }
	}
	trigger = {
		full_idea_group = mercenary_ideas
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = doppelsoldner_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		mercenary_cost = -0.15
		possible_condottieri = 0.5
		merc_leader_army_tradition = 0.25
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			hessian_militarization_mechanic
		}
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	
	ai = {
		factor = 1
	}
}

maritime_military_reform = {
	icon = "war_ship"
	allow_normal_conversion = yes
	potential = {
		NOT = {
			has_unlocked_government_reform = {
				government_reform = professional_navy_reform
			}
		}
	}
	trigger = {
		num_of_ports = 1
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = maritime_military_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		navy_tradition_decay = -0.01
		naval_morale = 0.1
		global_ship_cost = -0.05
	}
	
	ai = {
		factor = 1
		modifier = {
			factor = 0
			capital_scope = {
				is_island = no
			}
		}
	}
}

#Ottomans
expanded_devshirme_system_reform = {
	icon = "devshirme_system"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_unlocked_government_reform = {
				government_reform = expanded_devshirme_system_reform
			}
			have_had_reform = expanded_devshirme_system_reform
		}
		NOT = { has_unlocked_government_reform = { government_reform = mansure_army_reform } }
		NOT = { has_unlocked_government_reform = { government_reform = janissary_military_reform } }
	}
	trigger = {
		religion_group = muslim
		custom_trigger_tooltip = {
			tooltip = tur_not_has_abolished_devshirme_system_tt
			NOT = { has_country_flag = tur_abolished_devshirme_for_good }
		}
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = expanded_devshirme_system_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		special_unit_forcelimit = 0.1
		vassal_forcelimit_bonus = 0.15
		vassal_manpower_bonus = 0.1
	}
	effect = {
		add_country_modifier = {
			name = tur_devshirme_recruitment
			duration = -1
		}
	}
	removed_effect = {
		remove_country_modifier = tur_devshirme_recruitment
	}
	
	ai = {
		factor = 1000
	}
}

reformed_ottoman_conscription_reform = {
	icon = "sekban"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_unlocked_government_reform = {
				government_reform = reformed_ottoman_conscription_reform
			}
			have_had_reform = reformed_ottoman_conscription_reform
		}
		NOT = { has_unlocked_government_reform = { government_reform = mansure_army_reform } }
		NOT = { has_unlocked_government_reform = { government_reform = janissary_military_reform } }
	}
	trigger = {
		religion_group = muslim
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = expanded_devshirme_system_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		regiment_recruit_speed = 0.25
		reinforce_speed = 0.25
	}
	
	ai = {
		factor = 1000
	}
}

mansure_army_reform = {
	icon = "mansure_army"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_unlocked_government_reform = {
				government_reform = mansure_army_reform
			}
			have_had_reform = mansure_army_reform
		}
	}
	trigger = {
		OR = {
			NOT = { has_estate = estate_janissaries }
			AND = {
				crown_stronger_than_estate = { estate = estate_janissaries }
				NOT = {
					num_of_estate_privileges = {
						estate = estate_janissaries
						value = 1
					}
				}
			}
			has_reform = mansure_army_reform
		}
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = mansure_army_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
		is_not_blocked_by_estate_privilege = { estate = estate_janissaries }
	}
	modifiers = {
		drill_decay_modifier = -0.5
		drill_gain_modifier = 0.5
		infantry_power = 0.1
		army_tradition_decay = -0.01
	}

	custom_attributes = {
		disables_estate_janissaries = yes
		has_janissaries = no
	}
	
	ai = {
		factor = 1000
	}
}

janissary_military_reform = {
	icon = "janissary_government"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_unlocked_government_reform = {
				government_reform = janissary_military_reform
			}
			have_had_reform = janissary_military_reform
		}
	}
	trigger = {
		OR = {
			num_of_estate_privileges = {
				estate = estate_janissaries
				value = 3
			}
			has_reform = janissary_military_reform
		}
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = janissary_military_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		janissaries_loyalty_modifier = 0.2
		janissaries_privilege_slots = 1
		special_unit_forcelimit = 0.1
		janissary_cost_modifier = -0.33
	}
	effect = {
		add_country_modifier = {
			name = tur_devshirme_recruitment
			duration = -1
		}
	}
	removed_effect = {
		remove_country_modifier = tur_devshirme_recruitment
	}

	custom_attributes = {
		enables_estate_janissaries = yes
		has_janissaries = yes
		can_revoke_janissary_privileges = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Chinese (not Manchu, Korean or Altaic)
wei_suo_system_reform = {
	icon = "chinese_soldier"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = east_asian
		NOT = { primary_culture = korean_new }
		NOT = { primary_culture = altaic_new }
		NOT = { primary_culture = manchu_new }
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = wei_suo_system_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		global_regiment_cost = -0.15
	}
	custom_attributes = {
		improved_military_buildings = yes	#Barracks, Regimental Camps and Soldier Househols are buffed 
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				if = {
					limit = { has_building = barracks }
					add_province_modifier = {
						name = wei_suo_system_reform_barracks_modifier
						duration = -1
					}
				}
				if = {
					limit = { has_building = training_fields }
					add_province_modifier = {
						name = wei_suo_system_reform_training_fields_modifier
						duration = -1
					}
				}
				if = {
					limit = { has_building = regimental_camp }
					add_province_modifier = {
						name = wei_suo_system_reform_regimental_camp_modifier
						duration = -1
					}
				}
				if = {
					limit = { has_building = conscription_center }
					add_province_modifier = {
						name = wei_suo_system_reform_conscription_center_modifier
						duration = -1
					}
				}
				if = {
					limit = { has_building = soldier_households }
					add_province_modifier = {
						name = wei_suo_system_reform_soldier_households_modifier
						duration = -1
					}
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					OR = {
						has_province_modifier = wei_suo_system_reform_barracks_modifier
						has_province_modifier = wei_suo_system_reform_training_fields_modifier
						has_province_modifier = wei_suo_system_reform_regimental_camp_modifier
						has_province_modifier = wei_suo_system_reform_conscription_center_modifier
						has_province_modifier = wei_suo_system_reform_soldier_households_modifier
					}
				}
				remove_province_modifier = wei_suo_system_reform_barracks_modifier
				remove_province_modifier = wei_suo_system_reform_training_fields_modifier
				remove_province_modifier = wei_suo_system_reform_regimental_camp_modifier
				remove_province_modifier = wei_suo_system_reform_conscription_center_modifier
				remove_province_modifier = wei_suo_system_reform_soldier_households_modifier
			}
		}
	}
	
	ai = {
		factor = 1000
	}
}

#Jurchen / Manchu
eight_banners_reform = {
	icon = "manchu_warrior"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = manchu_new
			primary_culture = manchu
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = eight_banners_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		amount_of_banners = 0.25
		army_tradition_decay = -0.005
		movement_speed = 0.1
	}
	custom_attributes = {
		eight_banners_buff = yes
	}
	effect = {
		hidden_effect = {
			add_country_modifier = {
				name = eight_banners_reform_modifier
				duration = -1
				hidden = yes
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = eight_banners_reform_modifier
		}
	}
	
	ai = {
		factor = 1000
	}
}

green_standard_army_reform = {
	icon = "chinese_soldier"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = manchu_new
			primary_culture = manchu
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = green_standard_army_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		manpower_recovery_speed = 0.2
	}
	custom_attributes = {
		manpower_from_defeating_armies = yes		#10% of the defeated troops join the Green Standard Army
	}
	
	ai = {
		factor = 1000
	}
}

#Japanese
ashigaru_reform = {
	icon = "ashigaru"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = japanese_g
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = ashigaru_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		army_tradition_from_battle = 0.5
		infantry_cost = -0.1
	}
	
	ai = {
		factor = 500
	}
}

early_bushido_code_reform = {
	icon = "samurai"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = japanese_g
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = early_bushido_code_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		allowed_samurai_fraction = 0.1
		army_tradition_decay = -0.01
	}
	
	ai = {
		factor = 1000
	}
}

#Korean
the_righteous_army_reform = {
	icon = "righteous_army"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture_group = korean_g
			culture = korean_new
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = the_righteous_army_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		recover_army_morale_speed = 0.15
		defensiveness = 0.25
	}
	custom_attributes = {
		has_righteous_army = yes	#Can enact the righteous army
	}
	
	ai = {
		factor = 1000
	}
}

#Venice / Genoa
merchant_arsenal_reform = {
	icon = "merchant_ship"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture = venetian
			culture = ligurian
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = merchant_arsenal_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		recover_navy_morale_speed = 0.2
		global_ship_recruit_speed = -0.25
		has_galleass = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Mughals
mansabdari_reform = {
	icon = "noble_muslim"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Dharma"
			has_dlc = "Domination"
		}
		OR = {
			tag = MUG
			culture_group = hindusthani
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = mansabdari_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		war_taxes_cost_modifier = -0.5
		nobles_loyalty_modifier = 0.1
		nobles_influence_modifier = -0.1
		nobles_privilege_slots = 1
	}
	custom_attributes = {
		enables_estate_nobles = yes	#This one is active because of the trait below
		enable_mansabdar_privileges = yes
	}
	ai = {
		factor = 1000
	}
}

#Rajputs
rajput_military_leadership_reform = {
	icon = "rajput_soldiers"
	allow_normal_conversion = yes
	potential = {
		has_estate = estate_rajput
		has_dlc = "Dharma"
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = rajput_military_leadership_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		can_recruit_rajputs = yes
		rajput_loyalty_modifier = 0.1
		rajput_influence_modifier = 0.1
		rajput_privilege_slots = 1
		allowed_rajput_fraction = 0.1
	}
	
	ai = {
		factor = 1000
	}
}

#Marathas
the_maratha_army_reform = {
	icon = "maratha_rider"
	allow_normal_conversion = yes
	potential = {
		has_estate = estate_maratha
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = the_maratha_army_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		maratha_loyalty_modifier = 0.1
		maratha_privilege_slots = 1
		reinforce_speed = 0.2
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_maratha = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Altaic
subutais_strategies_reform = {
	icon = "siege"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture_group = altaic
			culture_group = tartar
			primary_culture = altaic_new
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = subutais_strategies_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		leader_siege = 1
		artillery_cost = -0.1
	}
	
	ai = {
		factor = 1000
	}
}

#Persian
qollar_aghasi_regiments_reform = {
	icon = "feudal_theocracy"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = iranian
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = qollar_aghasi_regiments_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		reinforce_cost_modifier = -0.25
		leader_land_shock = 2
		mil_tech_cost_modifier = -0.1
		global_autonomy = -0.03
	}

	ai = {
		factor = 1000
	}
}

legacy_of_the_seljuk_reform = {
	icon = "legacy_of_the_seljuk_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = legacy_of_the_seljuk_reform
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = legacy_of_the_seljuk_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		cav_to_inf_ratio = 0.5
		cavalry_cost = -0.25
		nomadic_tribes_loyalty_modifier = 0.1
		nomadic_tribes_privilege_slots = 1
	}

	ai = {
		factor = 1000
	}
}

#Burmese
ahmudan_system_reform = {
	icon = "burmese_flag"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = burman
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = ahmudan_system_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		reinforce_cost_modifier = -0.2
	}
	custom_attributes = {
		ahmudan_system = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Arabian
ghazi_reform = {
	icon = "horde_riding"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = turko_semitic
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = ghazi_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		cavalry_cost = -0.1
		land_attrition = -0.1
		loot_amount = 0.5
		available_province_loot = 0.5
	}
	
	ai = {
		factor = 1000
	}
}

#Ethiopian
the_cawa_regiments_reform = {
	icon = "cawa"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Domination"
			has_dlc = "Origins"
		}
		OR = {
			has_unlocked_government_reform = {
				government_reform = the_cawa_regiments_reform
			}
			primary_culture = amhara
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = the_cawa_regiments_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		reserves_organisation = 0.25
		stability_cost_modifier = -0.05
		global_regiment_cost = -0.1
		war_exhaustion = -0.05
	}
	conditional = {
		allow = {
			has_dlc = "Origins"
		}
		allow_cawa = yes
		custom_attributes = {
			buff_cawa = yes
			#enables_estate_cawa = yes
		}
	}
	effect = {
		hidden_effect = {
			if = {
				limit = {
					has_dlc = "Origins"
				}
				add_country_modifier = {
					name = the_cawa_regiments_reform_modifier
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			if = {
				limit = { has_country_modifier = the_cawa_regiments_reform_modifier }
				remove_country_modifier = the_cawa_regiments_reform_modifier
			}
		}
	}
	
	ai = {
		factor = 1000
	}
}

#Iberian (not Portuguese / Brazillian)
tercio_reform = {
	icon = "tercios_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = iberian
		NOT = { religion_group = muslim }
		NOT = { primary_culture = portugese }
		NOT = { primary_culture = brazilian }
		NOT = { tag = CAS }
		NOT = { tag = SPA }
		NOT = { tag = ARA }
		is_colonial_nation = no
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = tercio_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		has_tercio = yes
		allowed_tercio_fraction = 0.1
		army_tradition = 0.5
		yearly_army_professionalism = 0.1
	}
	
	ai = {
		factor = 1000
	}
}

fuero_militar_reform = {
	icon = "tercios_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = iberian
		NOT = { primary_culture = portugese }
		NOT = { primary_culture = brazilian }
		is_colonial_nation = yes
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = fuero_militar_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		manpower_recovery_speed = 0.15
		global_unrest = -1
	}

	ai = {
		factor = 1000
	}
}

#Portuguese/Brazillian
ordennancas_reform = {
	icon = "ordenancas"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		NOT = { religion_group = muslim }
		OR = {
			primary_culture = portugese
			primary_culture = brazilian
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = ordennancas_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		leader_land_shock = 1 
		army_tradition_decay = -0.005
	}
	custom_attributes = {
		can_raise_manpower_from_home_region = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Aragonese
revive_the_almogavars_reform = {
	icon = "soldiers_6"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		NOT = { religion_group = muslim }
		OR = {
			primary_culture = catalan
			primary_culture = aragonese
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = revive_the_almogavars_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		manpower_in_true_faith_provinces = 0.05
		movement_speed = 0.1
		infantry_cost = -0.1
	}
	custom_attributes = {
		has_improved_almogavars = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Muslim Iberian
volunteers_of_the_faith_reform = {
	icon = "feudal_theocracy"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = iberian
		religion_group = muslim
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = volunteers_of_the_faith_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		tolerance_own = 2
		defensiveness = 0.2
	}
	custom_attributes = {
		can_rally_volunteers_from_allies = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Italian
condottieri_contracts_reform = {
	icon = "soldiers_7"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = latin
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = condottieri_contracts_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		mercenary_cost = -0.33
		possible_condottieri = 1
		mercenary_discipline = 0.05
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	
	ai = {
		factor = 1000
	}
}

#French
compagnie_dordonnance_reform = {
	icon = "soldiers_2"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		culture_group = french
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = compagnie_dordonnance_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		drill_decay_modifier = -0.33
		army_tradition_decay = -0.005
		cav_to_inf_ratio = 0.1
		global_regiment_cost = -0.05
	}
	
	ai = {
		factor = 500
		modifier = {
			factor = -1000
			mission_completed = fra_musketeers
		}
	}
}

musketeers_reform = {
	icon = "musketeers_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		tag = FRA 
	}
	trigger = {
		NOT = { current_age = age_of_discovery }
		NOT = { current_age = age_of_reformation }
		mission_completed = fra_musketeers
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = musketeers_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		has_musketeer = yes
		allowed_musketeer_fraction = 0.2
		nobles_influence_modifier = -0.1
	}
	
	ai = {
		factor = 1000
	}
}

gendarmes_reform = {
	icon = "gendarmes_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination" 
		culture_group = french 
	}
	trigger = {
		OR = {
			has_reform = gendarmes_reform 
			custom_trigger_tooltip = {
				tooltip = has_unlocked_this_reform_tt
				has_country_flag = fra_unlock_gendarmes
			}
		}
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = gendarmes_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		cavalry_power = 0.1 
		nobles_loyalty_modifier = 0.05
		morale_damage = 0.05
	}
	ai = {
		factor = 1
	}
}

#Saxon/Prussian
general_war_commissariat_reform = {
	icon = war_map
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = saxon
			primary_culture = prussian
			primary_culture = pommeranian
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = general_war_commissariat_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		mil_tech_cost_modifier = -0.1
		army_tradition = 0.5
		monthly_militarized_society = 0.05
		monthly_prussian_militarized_society_1 = 0.05
		monthly_prussian_militarized_society_2 = 0.1
		monthly_prussian_militarized_society_3 = 0.125
	}
	
	ai = {
		factor = 1000
	}
}

#Swiss
swiss_mercenary_reform = {
	icon = "infantry"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		primary_culture = swiss
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = swiss_mercenary_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		mercenary_cost = -0.25
		possible_condottieri = 0.5
		merc_leader_army_tradition = 0.33
		mercenary_discipline = 0.05
	}
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			hessian_militarization_mechanic
		}
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	
	ai = {
		factor = 1000
	}
}

# Hungarian
expanded_black_army_reform = {
	icon = "black_army_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Domination"
			has_dlc = "Winds of Change"
		}
		primary_culture = hungarian
	}
	modifiers = {
		mercenary_manpower = 1
		war_taxes_cost_modifier = -0.5
		army_tradition_from_battle = 1
		allow_mercenary_drill = yes
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = expanded_black_army_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	conditional = {
        allow = {
            has_dlc = "Cradle of Civilization"
        }
        custom_attributes = {
            mercs_do_not_cost_army_professionalism = yes
        }
    }
	ai = {
		factor = 1000
	}
}

theme_system_reform = {
	icon = "theme_system_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		has_unlocked_government_reform = {
			government_reform = theme_system_reform
		}
	}
	modifiers = {
		manpower_in_own_culture_provinces = 0.25
		manpower_in_accepted_culture_provinces = 0.25
		state_maintenance_modifier = -0.1
	}
	custom_attributes = {
		BYZ_buff_dynatoi_land_grants = yes
	}
	ai = {
		factor = 1000
	}
}

#English
royal_marines_reform = {
	icon = "infantry"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = english
			primary_culture = anglois
			tag = GBR
			tag = AVE
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = royal_marines_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		regiment_disembark_speed = 0.25
		transport_attrition = -0.25
		allowed_marine_fraction = 0.1
		sailor_maintenance_modifer = -0.1
		global_sailors_modifier = 0.25
	}
	effect = {
		hidden_effect = {
			add_country_modifier = {
				name = amphibious_specialization_reform_modifier
				duration = -1
				hidden = yes
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			remove_country_modifier = amphibious_specialization_reform_modifier
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Domination"
				has_dlc = "Golden Century"
				has_dlc = "Rule Britannia"
				has_dlc = "Lions of the North"
			}
		}
		custom_attributes = {
			marine_buff = yes	#Marines -20% Manpower Usage
		}
	}
	
	ai = {
		factor = 1000
	}
}

professional_navy_reform = {
	icon = "war_ship"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = professional_navy_reform
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = professional_navy_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		navy_tradition_decay = -0.01
		max_flagships = 2
		siege_blockade_progress = 2
		naval_morale = 0.1
		sailor_maintenance_modifer = -0.1
		global_sailors_modifier = 0.25
	}
	
	ai = {
		factor = 1
	}
}

#Scotish
manrent_reform = {
	icon = "feudal_levies"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		primary_culture = scottish
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = manrent_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		nobles_loyalty_modifier = 0.05
		nobles_influence_modifier = 0.1
		global_manpower_modifier = 0.1
		vassal_forcelimit_bonus = 0.33
	}
	
	ai = {
		factor = 1000
	}
}

#Dutch/Flemish
staatse_leger_reform = {
	icon = "infantry"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = dutch
			primary_culture = flemish
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = staatse_leger_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		movement_speed = 0.1
		drill_gain_modifier = 0.5
		reinforce_speed = 0.25
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	
	effect = {
		if = {
			limit = {
				has_country_flag = ned_staatse_leger_buff_flag
			}
			add_country_modifier = {
				name = ned_empowered_staatse_leger
				duration = -1
			}
		}
	}
	
	removed_effect = {
		if = {
			limit = {
				has_country_modifier = ned_empowered_staatse_leger
			}
			remove_country_modifier = ned_empowered_staatse_leger
		}
	}
	
	ai = {
		factor = 1000
	}
}

#Dutch/Flemish
watergeuzen_reform = {
	icon = "landing_marines"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = dutch
			primary_culture = flemish
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = watergeuzen_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		capture_ship_chance = 0.2
		allowed_marine_fraction = 0.1
		sea_repair = yes
	}
	
	ai = {
		factor = 1000
	}
}

#Swedish
allotment_system = {
	icon = "allotment_system"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_unlocked_government_reform = { government_reform = allotment_system }
			has_reform = allotment_system
			have_had_reform = allotment_system
		}
		OR = {
			primary_culture = swedish
			primary_culture = finnish
			primary_culture = norse
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = allotment_system
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	conditional = {
		allow = {
			has_dlc = "Lions of the North"
		}
		allow_carolean = yes
	}
	modifiers = {
		#has_carolean = yes
		manpower_in_own_culture_provinces = 0.15
		manpower_in_accepted_culture_provinces = 0.1
		#amount_of_carolean = 0.25
	}

	ai = {
		factor = 1000
	}
}

##Caucasian
sygnakhs_system_reform = {
	icon = "mountain_fort"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture_group = caucasian
			primary_culture = georgian_new
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = sygnakhs_system_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		defensiveness = 0.15
		garrison_size = 0.2
		max_hostile_attrition = 1
		fort_maintenance_modifier = -0.25
		hostile_attrition = 1 
		global_regiment_recruit_speed = -0.2
	}
	
	ai = {
		factor = 1000
	}
}

##Polish
cossacks_registry_reform = {
	icon = "cossacks"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = polish
			primary_culture = lithuanian
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = cossacks_registry_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		special_unit_forcelimit = 0.1
		cossacks_loyalty_modifier = 0.15
		cossacks_influence_modifier = 0.1
		cossacks_privilege_slots = 1
	}
	
	ai = {
		factor = 1000
	}
}

##Czech / Sorbian / Silesian
lessons_of_the_hussite_wars_reform = {
	icon = "war_map"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			primary_culture = czech
			primary_culture = sorbian
			primary_culture = schlesian
			primary_culture = czech_new
			primary_culture = sorbian_new
			primary_culture = schlesian_new
		}
		religion = hussite
		NOT = { tag = PRU }
		NOT = { tag = POL }
		NOT = { tag = PLC }
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = lessons_of_the_hussite_wars_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		global_defender_dice_roll_bonus = 1 
	}
	
	ai = {
		factor = 1000
	}
}

#Russian
boyars_army_reform = {
	icon = "boyar"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		OR = {
			culture_group = east_slavic
			culture_group = slavic
		}
	}
	trigger = {
		has_estate = estate_nobles
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = lessons_of_the_hussite_wars_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		land_maintenance_modifier = -0.05
		nobles_influence_modifier = 0.1
		nobles_privilege_slots = 1
	}
	custom_attributes = {
		unlock_boyars_military_privileges = yes
	}
	
	ai = {
		factor = 1
	}
}

streltsy_reform = {
	icon = "streltsy"
	allow_normal_conversion = yes
	potential = {
		OR = {
			has_dlc = "Domination"
			has_dlc = "Third Rome"
		}
		OR = {
			has_reform = principality
			has_reform = veche_republic
			has_reform = tsardom
			has_reform = ruthenian_tsardom
			has_reform = great_veche_republic
			has_reform = russian_empire_reform
			has_reform = great_russian_republic_reform
		}
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = streltsy_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		infantry_cost = -0.05
		has_streltsy = yes
		allowed_streltsy_fraction = 0.2
	}
	conditional = {
		allow = {
			NOT = { has_dlc = "Domination" }
		}
		custom_attributes = {
			buffed_streltsy_button = yes
		}
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		custom_attributes = {
			cheaper_streltsy = yes
			buffed_streltsy_button = yes
		}
	}
	
	ai = {
		factor = 1000
	}
}

new_order_regiments_reform = {
	icon = "new_order_regiments"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_government_mechanic = russian_rule_mechanic
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = new_order_regiments_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	modifiers = {
		yearly_army_professionalism = 0.1
		drill_gain_modifier = 0.5
		army_tradition = 0.5
	}

	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		custom_attributes = {
			new_order_regiment_buff = yes
		}
	}
	
	ai = {
		factor = 1000
	}
}

#Economical Matters

empower_the_burghers_reform = {
	icon = "prussian_monarchy_2"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		global_trade_power = 0.05
		trade_efficiency = 0.05
		burghers_loyalty_modifier = 0.05
		burghers_influence_modifier = 0.1
		vaisyas_loyalty_modifier = 0.05
		vaisyas_influence_modifier = 0.1
		jains_loyalty_modifier = 0.05
		jains_influence_modifier = 0.1
	}
	ai = {
		factor = 1
	}
}

curtail_the_burghers_reform = {
	icon = "assembly_hall"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		OR = {
			is_revolutionary = no
			NOT = { has_dlc = "Emperor" }
		}
	}
	modifiers = {
		trade_company_governing_cost = -0.1
		trade_steering = 0.15
		burghers_influence_modifier = -0.1
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_burghers = yes
	}
	ai = {
		factor = 1
	}
}

reestablish_the_burgeoisie_reform = {
	icon = "dutch_republic"
	allow_normal_conversion = yes
	potential = {
		is_revolutionary = yes
		has_dlc = "Emperor"
	}
	modifiers = {
		global_trade_goods_size_modifier = 0.1
		max_revolutionary_zeal = -10
	}
	custom_attributes = {
		enables_estate_burghers = yes
	}
	ai = {
		factor = 1
	}
}

new_world_exploitation_reform = {
	icon = "compass"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
		capital_scope = {
			NOT = { continent = north_america }
			NOT = { continent = south_america }
			NOT = { continent = new_world }
			NOT = { colonial_region = colonial_australia }
		}
	}
	trigger = {
		OR = {
			full_idea_group = expansion_ideas
			full_idea_group = exploration_ideas
		}
		if = {
			limit = {
				is_revolutionary = yes
				has_dlc = "Emperor"
				has_government_attribute = enables_estate_burghers
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_burghers
			}
		}
	}
	modifiers = {
		colonists = 1 
	}
	custom_attributes = {
		extra_trade_goods_for_colonial_subjects = yes
	}
	ai = {
		factor = 1
	}
}

mercantilistic_approach_reform = {
	icon = "paper_with_seal"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
	}
	trigger = {
		if = {
			limit = {
				is_revolutionary = yes
				has_dlc = "Emperor"
				has_government_attribute = enables_estate_burghers
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_burghers
			}
		}
	}
	modifiers = {
		mercantilism_cost = -0.1
		global_own_trade_power = 0.15
		placed_merchant_power = 5
	}
	custom_attributes = {
		no_mercantilism_loss_from_privilege = yes
	}
	ai = {
		factor = 1
	}
}

free_trade_reform = {
	icon = "merchant"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
	}
	trigger = {
		if = {
			limit = {
				is_revolutionary = yes
				has_dlc = "Emperor"
				has_government_attribute = enables_estate_burghers
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_burghers
			}
		}
	}
	modifiers = {
		global_institution_spread = 0.25
		global_foreign_trade_power = 0.2
	}
	custom_attributes = {
		monarch_power_on_institutions = yes
	}
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		custom_attributes = {
			free_improve_inland_routes = yes
		}
	}
	ai = {
		factor = 1
	}
}

lockean_proviso_reform = {
	icon = "paper_money_map"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
	}
	trigger = {
		OR = { 
			full_idea_group = economic_ideas
			full_idea_group = infrastructure_ideas 
		}
		if = {
			limit = {
				is_revolutionary = yes
				has_dlc = "Emperor"
				has_government_attribute = enables_estate_burghers
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_burghers
			}
		}
	}
	modifiers = {
		development_cost = -0.05
		global_trade_goods_size_modifier = 0.05
	}
	ai = {
		factor = 1
	}
}

embrace_the_economic_theory_reform = {
	icon = "dutch_flag"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
	}
	trigger = {
		if = {
			limit = {
				is_revolutionary = yes
				has_dlc = "Emperor"
				has_government_attribute = enables_estate_burghers
			}
			can_swap_out_of_estate_granting_reform = {
				estate = estate_burghers
			}
		}
	}
	modifiers = {
		interest = -0.5
		inflation_reduction = 0.2
	}
	ai = {
		factor = 1
	}
}

war_economy_reform = {
	icon = "war_economy"
	allow_normal_conversion = yes
	potential = {
		NOT = { has_government_attribute = is_pirate_republic_reform }
	}
	trigger = {
	}
	modifiers = {
		war_taxes_cost_modifier = -0.5
		global_regiment_cost = -0.1
		global_ship_cost = -0.1
	}
	ai = {
		factor = 1
	}
}

thalassocracy_reform = {
	icon = "admiralty_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = thalassocracy_reform
		}
	}
	trigger = {
	}
	modifiers = {
		center_of_trade_upgrade_cost = -0.1
		trade_company_investment_cost = -0.1
		naval_forcelimit_modifier = 0.25
		global_trade_power = 0.15
	}
	custom_attributes = {
		can_establish_trade_protectorates = yes
	}
	ai = {
		factor = 1
	}
}

royal_charters_reform = {
	icon = "paper_with_seal_3"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = royal_charters_reform
		}
	}
	trigger = {
	}
	modifiers = {
		yearly_corruption = -0.1
		global_unrest = -1 
		stability_cost_modifier = -0.15
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		custom_attributes = {
			can_establish_trade_protectorates = yes
		}
	}
	ai = {
		factor = 1
	}
}

commercial_trade_empire_reform = {
	icon = "trading_city"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination"
		has_unlocked_government_reform = {
			government_reform = commercial_trade_empire_reform
		}
	}
	trigger = {
	}
	modifiers = {
		trade_company_investment_cost = -0.1
		global_ship_trade_power = 0.25
		mercantilism_cost = -0.33
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		custom_attributes = {
			can_establish_trade_protectorates = yes
		}
	}
	ai = {
		factor = 1
	}
}

laesio_enormis_reform = {
	icon = "laesio_enormis_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		is_or_was_tag = { tag = BYZ }
	}
	modifiers = {
		global_prosperity_growth = 0.5
		nobles_loyalty_modifier = -0.05
		nobles_influence_modifier = -0.1
		production_efficiency = 0.15
		global_autonomy = -0.05
	}
	ai = {
		factor = 1
	}
}

jap_gokaido_reform = {
	icon = "jap_gokaido_reform"
	allow_normal_conversion = no
	potential = {
		culture_group = japanese_g
	}
	trigger = {
		OR = {
			have_had_reform = jap_gokaido_reform
			has_reform = jap_gokaido_reform
			mission_completed = jap_expand_gokaido
		}
	}
	modifiers = {
		merchants = 1 
	}
	effect = {
		every_owned_province = {
			limit = { 
				region = japan_region 
				NOT = { has_province_modifier = jap_gokaido_modifier }
			}
			add_province_modifier = {
				name = jap_gokaido_modifier
				duration = -1 
				hidden = yes
			}
		}
	}
	removed_effect = {
		every_owned_province = {
			limit = { 
				region = japan_region 
				has_province_modifier = jap_gokaido_modifier
			}	
			remove_province_modifier = jap_gokaido_modifier
		}
	}
	custom_attributes = { benefits_for_japan = yes } 
	ai = {
		factor = 100
	}
}

reform_the_samurai_reform = {
	icon = "reform_the_samurai_reform"
	allow_normal_conversion = yes
	potential = {
		culture_group = japanese_g 
		tag = JAP 
		OR = {
			have_had_reform = reform_the_samurai_reform
			has_reform = reform_the_samurai_reform
		}
		NOT = { has_country_modifier = jap_domineering_naval_focus_modifier }
		NOT = { has_country_modifier = jap_naval_academy_of_japan_modifier }
	}
	modifiers = {
		drill_gain_modifier = 0.5
		army_tradition = 0.5
		allowed_samurai_fraction = 0.05
	}
	effect = {
		custom_tooltip = jap_samurai_get_fire_damage_tt
		hidden_effect = {
			add_country_modifier = {
				name = jap_reformed_samurai_modifier
				duration = -1 
				hidden = yes 
			}
		}
	}
	removed_effect = {
		remove_country_modifier = jap_reformed_samurai_modifier
	}
	ai = {
		factor = 1.5
	}
}

tercios_reform = {
	icon = "tercios_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination" 
		OR = {
			AND = {
				is_or_was_tag = { tag = ARA }
				OR = {
					total_development = 500 
					is_great_power = yes 
				}
			}
			mission_completed = spa_tercios_system
			custom_trigger_tooltip = {
				tooltip = has_unlocked_this_reform_tt
				has_country_flag = enable_tercios_reform_flag
			}
			has_reform = tercios_reform
		}
		NOT = { religion_group = muslim } 
	}
	modifiers = {
		has_tercio = yes
		allowed_tercio_fraction = 0.15
		army_tradition = 0.5
		yearly_army_professionalism = 0.1
	}
	
	ai = {
		factor = 1
	}
}

consulate_of_the_sea = {
	icon = "consulate_of_the_sea"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "Domination" 
		OR = {
			tag = ARA
			was_tag = ARA 
			has_reform = consulate_of_the_sea 
		}
	}
	trigger = {
		OR = {
			mission_completed = gc_ara_consultate_of_the_sea2
			has_reform = consulate_of_the_sea 
		}
	}
	modifiers = {
		trade_efficiency = 0.1
		global_trade_power = 0.1
		burghers_loyalty_modifier = 0.05
		
	}
	
	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
	}
	
	ai = {
		factor = 10
	}
}

restore_the_master_of_offices_reform = {
	icon = "restore_the_master_of_offices_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings" 
		OR = {
			tag = BYZ
			was_tag = BYZ
		}
	}
	trigger = {
	}
	modifiers = {
		same_religion_advisor_cost = -0.15
		advisor_pool = 1
	}
	
	custom_attributes = {
		enables_statesman_autonomy_reduction = yes
		#perhaps adm or dip advisor recruitment here
	}
	
	ai = {
		factor = 10
	}
}

chinampa_farms_reform = {
	icon = "land_christian_sun_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			primary_culture = aztek
			has_country_flag = unlock_aztec_missions_flag
		}
	}
	trigger = {
		custom_trigger_tooltip = {
			tooltip = AZT_COMPLETED_FARMS_MISSION
			has_country_flag = azt_chinampa_reform_flag
		}
	}
	valid_for_nation_designer = yes
	nation_designer_cost = 60
	modifiers = {
		global_trade_goods_size_modifier = 0.05
	}
	
	custom_attributes = {
		chinampa_farms_mechanic = yes
	}
	
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					trade_goods = grain
				}
				add_province_modifier = {
					name = chinampa_farms_modifier
					duration = -1
					hidden = yes
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = chinampa_farms_modifier
				}
				remove_province_modifier = chinampa_farms_modifier
			}
		}
	}
}

#1.36 Armenia

nakharar_title = {
	icon = "nakharar_title"
	allow_normal_conversion = yes
	lock_level_when_selected = yes
	valid_for_nation_designer = no
	potential = {
		OR = {
			tag = MLK
			tag = ARM
			was_tag = ARM
		}
		has_country_flag = arm_unlocked_nakharar
	}
	modifiers = {
		nobles_privilege_slots = 1
		nobles_influence_modifier = 0.05
		nobles_loyalty_modifier = 0.1
	}
	
	custom_attributes = {
		seizing_land_no_rebels_from_estate_nobles = yes
	}
}

sparapet_office = {
	icon = "sparapet_office"
	allow_normal_conversion = yes
	lock_level_when_selected = yes
	valid_for_nation_designer = no
	potential = {
		OR = {
			tag = MLK
			tag = ARM
			was_tag = ARM
		}
		has_country_flag = arm_unlocked_sparapet
	}
	modifiers = {
		leader_siege = 1 
		army_tradition = 0.5
	}
	
	custom_attributes = {
		recruiting_general_gives_army_tradition = yes
	}
}

#Turkomen

turkoman_ottoman_institutions = {
	icon = "turkoman_ottoman_institutions"
	allow_normal_conversion = yes
	potential = {
		has_country_flag = turkoman_unlock_ottoman_reform
		religion_group = muslim
	}
	modifiers = {
		years_of_nationalism = -10
		governing_capacity = 100
	}
	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
		}
		has_pashas = yes
		has_janissaries = yes
	}
	conditional = {
		allow = { has_dlc = "Cradle of Civilization" }
		government_abilities = {
			tribal_federation_mechanic
		}
	}
	ai = {
		factor = 3
	}
}

#Court Ideas
superiority_of_the_state_reform = {
	icon = russian_queen
	potential = {
		NOT = { has_unlocked_government_reform = { government_reform = divided_aristocracy_reform } }
	}
	trigger = {
		full_idea_group = court_ideas
	}
	modifiers = {
		all_estate_influence_modifier = -0.1
		max_absolutism = 5
	}
	custom_attributes = {
		can_sell_crownland_to_single_estates = yes
		can_seize_crownland_of_single_estates = yes
		seizing_land_no_rebels = yes
	}
	ai = {
		factor = 1
	}
}

#Persia
divided_aristocracy_reform = {
	icon = "feudal_theocracy"
	potential = {
		has_unlocked_government_reform = { government_reform = divided_aristocracy_reform }
	}
	modifiers = {
		nobles_influence_modifier = -0.15
		qizilbash_influence_modifier = -0.15
		ghulams_influence_modifier = -0.15
		max_absolutism = 10
	}
	custom_attributes = {
		can_sell_crownland_to_single_estates = yes
		can_seize_crownland_of_single_estates = yes
		seizing_land_no_rebels = yes
	}
	ai = {
		factor = 1
	}
}

#Mamluks
modernized_furusiyya_reform = {
	icon = "modernized_furusiyya_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		OR = {
			have_had_reform = modernized_furusiyya_reform
			has_unlocked_government_reform = {
				government_reform = modernized_furusiyya_reform
			}
		}
		
	}
	modifiers = {
		allowed_mamluks_fraction = 0.05
	}

	custom_attributes = {
		recruiting_generals_increases_nobles_loyalty = yes
	}

	effect = {
		custom_tooltip = mams_disc_tt
		hidden_effect = {
			add_country_modifier = {
				name = mam_disc_troops_modifier
				duration = -1 
				hidden = yes 
			}
		}
	}

	removed_effect = {
		remove_country_modifier = mam_disc_troops_modifier
	}

	custom_attributes = {
		advisors_generate_innovativeness = yes
	}
	
	ai = {
		factor = 1
	}
}

karimi_stations_reform = {
	icon = "karimi_stations_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		OR = {
			have_had_reform = karimi_stations_reform
			has_unlocked_government_reform = {
				government_reform = karimi_stations_reform
			}
		}
		
	}
	modifiers = {
		trade_steering = 0.2
		global_foreign_trade_power = 0.25
	}

	conditional = {
		allow = {
			has_dlc = "Res Publica"
			has_dlc = "Mare Nostrum"
		}
		can_use_trade_post = yes
	}
	
	ai = {
		factor = 1
	}
}

diwan_al_khass_reform = {
	icon = "diwan_al_khass_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		is_or_was_tag = { tag = MAM }
		
	}
	modifiers = {
		development_cost = -0.05
		build_cost = -0.1
	}
	
	ai = {
		factor = 10
	}
}

state_madrasas_reform = {
	icon = "state_madrasas_reform"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		OR = {
			have_had_reform = state_madrasas_reform
			has_unlocked_government_reform = {
				government_reform = state_madrasas_reform
			}
		}
	}
	modifiers = {
		same_religion_advisor_cost = -0.2
		yearly_government_power = 0.33
	}

	conditional = {
		allow = { has_dlc = "Rule Britannia" }
		custom_attributes = {
			advisors_generate_innovativeness = yes
		}
	}
	
	ai = {
		factor = 10
	}
}

integrated_ottoman_officials = {
	icon = "integrated_ottoman_officials"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		OR = {
			have_had_reform = integrated_ottoman_officials
			has_unlocked_government_reform = {
				government_reform = integrated_ottoman_officials
			}
		}
	}
	modifiers = {
		global_autonomy = -0.05
		tolerance_of_heathens_capacity = 1
	}

	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
		}
		has_pashas = yes
		custom_attributes = { reveal_ruler_skills_for_mamluks = yes }
	}

	ai = {
		factor = 10
	}
}

russian_mercenary_guard_reform = {
	icon = russian_mercenary_guard_reform
	allow_normal_conversion = no
	potential = {
		has_country_flag = feo_unlock_russian_mercenary_guard_reform_flag
	}

	modifiers = {
		has_streltsy = yes
		allowed_streltsy_fraction = 0.1
	}
	effect = {
		custom_tooltip = FEO_STRELTSY_BUFF_TT
		hidden_effect = {
			add_country_modifier = {
				name = feo_elite_russian_guard
				duration = -1 
				hidden = yes 
			}
		}
	}
	removed_effect = {
		remove_country_modifier = feo_elite_russian_guard 
	}

	ai = {
		factor = 10
	}
}

ayyubid_dynasty = {
	icon = ayyubid_dynasty
	allow_convert = no
	allow_normal_conversion = no
	lock_level_when_selected = yes
	legacy_equivalent = iqta_legacy
	potential = {
		religion_group = muslim
		primary_culture = kurdish
		OR = {
			tag = HSN
			was_tag = HSN
		}
	}
	valid_for_nation_designer = no
	nation_designer_cost = 0
	modifiers = {
		advisor_pool = 1
		state_governing_cost = -0.1
	}
	custom_attributes = {
		negate_unaccepted_levantine_culture = yes
	}
	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					culture_group = turko_semitic
					NOT = { has_owner_accepted_culture = yes }
					NOT = { has_province_modifier = hsn_ayyubid_tolerance }
				}
				add_province_modifier = {
					name = hsn_ayyubid_tolerance
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = { has_province_modifier = hsn_ayyubid_tolerance }
				remove_province_modifier = hsn_ayyubid_tolerance
			}
		}
	}
	post_removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = { has_province_modifier = hsn_ayyubid_tolerance }
				remove_province_modifier = hsn_ayyubid_tolerance
			}
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Cradle of Civilization"
				has_dlc = "Winds of Change"
			}
		}
		government_abilities = {
			iqta_mechanic
		}
	}

}

ayyubid_high_command = {
	icon = "modernized_furusiyya_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			tag = HSN
			was_tag = HSN
		}
	}
	modifiers = {
		max_general_shock = 2
		general_cost = -0.1
		free_land_leader_pool = 2
	}
	custom_attributes = {
		army_tradition_for_generals = yes
	}
	trigger = {
		custom_trigger_tooltip = {
			tooltip = hsn_unlocked_reform_tt
			has_unlocked_government_reform = { government_reform = ayyubid_high_command }
		}
	}
}

#Germany
german_cultural_disunity_reform = {
	icon = "german_cultural_disunity_reform"
	lock_level_when_selected = yes
	block_cultural_union = yes
	potential = {
		tag = GER
		has_country_flag = GER_stuck_disunited
	}
	modifiers = {
    	promote_culture_cost = 0.5
	}
	government_abilities = {
		cultural_unity_mechanic
	}
	
	removed_effect = {
		clr_country_flag = GER_stuck_disunited
		hidden_effect = {
			remove_country_modifier = GER_pommeranian_modifier
			remove_country_modifier = GER_austrian_modifier
			remove_country_modifier = GER_bavarian_modifier
			remove_country_modifier = GER_swiss_modifier
			remove_country_modifier = GER_swabian_modifier
			remove_country_modifier = GER_franconian_modifier
			remove_country_modifier = GER_saxon_modifier
			remove_country_modifier = GER_hessian_modifier
			remove_country_modifier = GER_hannoverian_modifier
			remove_country_modifier = GER_lower_saxon_modifier
			remove_country_modifier = GER_prussian_modifier
		}
	}
		
	ai = {
		factor = 1
	}
}

german_franconian_reform = {
	icon = "paper_with_seal"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_franconian_reform
		}
	}
	modifiers = {
    	idea_cost = -0.1
		same_culture_advisor_cost = -0.1
	}
	
	effect = {
		hidden_effect = {
			custom_tooltip = GER_paper_provinces
			tooltip = {
				add_province_modifier = {
					name = GER_paper_provinces_franconian
					duration = -1
				}
			}
		}
		hidden_effect = {
			every_owned_province = {
				limit = {
					trade_goods = paper
				}
				add_province_modifier = { 
					name = GER_paper_provinces_franconian
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = GER_paper_provinces_franconian
				}
				remove_province_modifier = GER_paper_provinces_franconian
			}
		}
	}
	
	custom_attributes = {
		GER_buff_paper_provinces = yes
	}
	ai = {
		factor = 1
	}
}

german_saxon_reform = {
	icon = "paper_money_map"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_saxon_reform
		}
	}
	modifiers = {
    	production_efficiency = 0.1
	}
	
	effect = {
		hidden_effect = {
			custom_tooltip = GER_mining_provinces
			tooltip = {
				add_province_modifier = {
					name = GER_mining_provinces_saxon
					duration = -1
				}
			}
		}
		hidden_effect = {
			every_owned_province = {
				limit = {
					OR = {
						trade_goods = iron
						trade_goods = gold
						trade_goods = copper
					}
				}
				add_province_modifier = { 
					name = GER_mining_provinces_saxon
					duration = -1
				}
			}
		}
	}
	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = GER_mining_provinces_saxon
				}
				remove_province_modifier = GER_mining_provinces_saxon
			}
		}
	}
	
	custom_attributes = {
		GER_buff_mining_provinces = yes
	}
	ai = {
		factor = 1
	}
}

german_lower_saxon_reform = {
	icon = "consulate_of_the_sea"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_lower_saxon_reform
		}
	}
	modifiers = {
    	trade_efficiency = 0.1
		own_coast_naval_combat_bonus = 1.0
	}
	conditional = {
		allow = {
			has_dlc = "Res Publica"
		}
		can_use_trade_post = yes
	}
	
	ai = {
		factor = 1
	}
}

german_rhenish_reform = {
	icon = "merchant"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_rhenish_reform
		}
	}
	modifiers = {
    	ae_impact = -0.15 
		diplomats = 1
	}
	
	custom_attributes = {
		GER_buff_diplomat_advisor_for_rhenish = yes
	}
	
	ai = {
		factor = 1
	}
}

german_austrian_reform = {
	icon = "crown"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_austrian_reform
		}
	}
	modifiers = {
    	chance_to_inherit = 0.25
	}
	
	custom_attributes = {
		GER_unlock_integrated_vassal = yes
	}
	
	ai = {
		factor = 1
	}
}

german_bavarian_reform = {
    icon = "politician"
    potential = {
        custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_bavarian_reform
		}
    }
    modifiers = {
        monthly_splendor = 2
        prestige = 1
    }
    
    conditional = {
        allow = {
            has_dlc = "Mandate of Heaven"
        }
        custom_attributes = {
            GER_taking_age_rewards_gives_stability = yes
        }
    }
    
    conditional = {
        allow = {
            NOT = { has_dlc = "Mandate of Heaven" }
        }
        custom_attributes = {
            diet_increases_not_influence = yes
        }
    }
    
    ai = {
        factor = 1
    }
} 

german_prussian_reform = {
    icon = "prussian_monarchy"
    potential = {
        custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_prussian_reform
		}
    }
    modifiers = {
        monthly_militarized_society = 0.1
        monthly_prussian_militarized_society_1 = 0.1
        monthly_prussian_militarized_society_2 = 0.1
        monthly_prussian_militarized_society_3 = 0.1
        land_maintenance_modifier = -0.05
    }
    
    conditional = {
        allow = {
            OR = {
                has_dlc = "Rights of Man"
                has_dlc = "Domination"
            }
        }
        custom_attributes = {
            GER_buff_prussian_militarization = yes
        }
    }
    conditional = {
        allow = {
            NOT = {
                OR = {
                    has_dlc = "Rights of Man"
                    has_dlc = "Domination"
                }
            }
        }
        custom_attributes = {
            free_noble_levies = yes
        }
    }
    
    ai = {
        factor = 1
    }
} 

german_swiss_reform = {
	icon = "mercenaries"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_swiss_reform
		}
	}
	modifiers = {
    	mercenary_manpower = 0.25
	}
	
	conditional = {
		allow = { has_dlc = "Domination" }
		government_abilities = {
			hessian_militarization_mechanic
		}
		custom_attributes = {
			GER_sweeten_mercanary_deals_gives_twice = yes
		}
	}
	custom_attributes = {
		mercs_do_not_cost_army_professionalism = yes
	}
	
	ai = {
		factor = 1
	}
}

german_swabian_reform = {
    icon = "paper_with_seal_3"
    potential = {
        custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_swabian_reform
		}
    }
    modifiers = {
        inflation_reduction = 0.1
        development_cost_in_primary_culture = -0.1
    }
    
    conditional = {
        allow = { has_dlc = "Domination" }
        custom_attributes = {
            GER_upgrade_merchant_bookkeeping = yes
        }
    }
    conditional = {
        allow = {
            NOT = { has_dlc = "Domination" }
        }
        custom_attributes = {
            no_mercantilism_loss_from_privilege = yes
        }
    }
    
    ai = {
        factor = 1
    }
} 

german_westphalian_reform = {
	icon = "church"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_westphalian_reform
		}
	}
	modifiers = {
    	papal_influence = 1
		church_power_modifier = 0.25
		monthly_fervor_increase = 1
		global_missionary_strength = 0.02
	}
	
	custom_attributes = {
		GER_upgrade_religious_state = yes
	}
	
	ai = {
		factor = 1
	}
}

german_other_reform = {
	icon = "crown"
	potential = {
		custom_trigger_tooltip = {
			tooltip = GER_unlocked_via_kaiserreich
			has_country_flag = GER_unlocked_other_reform
		}
	}
	modifiers = {
    	governing_capacity_modifier = 0.15
	}
}

merchant_representation_reform = {
	icon = "merchant_representation_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = merchant_representation_reform
		}
	}
	trigger = {
	}
	modifiers = {
		global_trade_power = 0.1
		global_ship_trade_power = 0.33
	}
	conditional = {
		allow = {
			has_dlc = "Domination"
		}
		custom_attributes = {
			can_establish_trade_protectorates = yes
		}
	}
	conditional = {
		allow = {
			OR = {
				has_dlc = "Common Sense"
				has_dlc = "Domination"
			}
		}
		has_parliament = yes
	}

	ai = {
		factor = 100
	}
}

integrated_ottoman_officials = {
	icon = "integrated_ottoman_officials"
	allow_normal_conversion = yes
	potential = {
		has_dlc = "King of Kings"
		OR = {
			have_had_reform = integrated_ottoman_officials
			has_unlocked_government_reform = {
				government_reform = integrated_ottoman_officials
			}
		}
	}
	modifiers = {
		global_autonomy = -0.05
		tolerance_of_heathens_capacity = 1
	}

	conditional = {
		allow = { 
			has_dlc = "Cradle of Civilization"
		}
		has_pashas = yes
		custom_attributes = { reveal_ruler_skills_for_mamluks = yes }
	}

	ai = {
		factor = 10
	}
}

seven_provinces_reform = {
	icon = "seven_provinces_reform"
	allow_normal_conversion = yes

	potential = {
		tag = NED
	}

	modifiers = {
		manpower_in_culture_group_provinces = 0.15
		manpower_in_own_culture_provinces = 0.15
	}

	custom_attributes = {
		seven_provinces_organization = yes
	}

	effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					region = low_countries_region
					culture_group = ROOT
				}
				add_province_modifier = {
					name = ned_seven_provinces_organization_positive_modifier
					duration = -1
					hidden = yes
				}
			}
			every_owned_province = {
				limit = {
					NOT = { region = low_countries_region }
					continent = europe
				}
				add_province_modifier = {
					name = ned_seven_provinces_organization_negative_modifier
					duration = -1
					hidden = yes
				}
			}
		}
	}

	removed_effect = {
		hidden_effect = {
			every_owned_province = {
				limit = {
					has_province_modifier = ned_seven_provinces_organization_positive_modifier
				}
				remove_province_modifier = ned_seven_provinces_organization_positive_modifier
			}
			every_owned_province = {
				limit = {
					has_province_modifier = ned_seven_provinces_organization_negative_modifier
				}
				remove_province_modifier = ned_seven_provinces_organization_negative_modifier
			}
		}
	}

	ai = {
		factor = 1
	}
}

modern_economics_reform = {
	icon = "modern_economics_reform"
	allow_normal_conversion = yes

	potential = {
		tag = NED
	}

	modifiers = {
		trade_efficiency = 0.1
		burghers_loyalty_modifier = 0.1
	}

	custom_attributes = {
		economic_golden_age = yes
	}

	ai = {
		factor = 1
	}
}

support_state_reform = {
	icon = "support_state_reform"
	allow_normal_conversion = yes

	potential = {
		tag = NED
		has_reform = dutch_republic
	}

	modifiers = {
		republican_tradition = 0.2
	}

	custom_attributes = {
		republican_virtues = yes
	}

	ai = {
		factor = 1
	}
}

orangist_stadholders_reform = {
	icon = "orangist_stadholders_reform"
	allow_normal_conversion = yes

	potential = {
		tag = NED
		has_reform = dutch_republic
	}

	modifiers = {
		republican_tradition = -0.2
		max_absolutism = 25
	}

	custom_attributes = {
		orangist_cause = yes
	}

	ai = {
		factor = 1
	}
}

apostolic_kingdom = {
	icon = "apostolic_kingdom"
	allow_normal_conversion = yes
	potential = {
		religion = catholic
		OR = {
			tag = HUN
			was_tag = HUN
		}
	}
	legacy_equivalent = feudal_monarchy
	valid_for_nation_designer = no

	nation_designer_trigger = {
		primary_culture = hungarian
		religion = catholic
	}

	modifiers = {
		manpower_in_true_faith_provinces = 0.1
		recover_army_morale_speed = 0.1
	}

	conditional = {
		allow = { 
			has_dlc = "Winds of Change" 
			has_dlc = "Golden Century"
		}
		custom_attributes = {
			order_of_the_dragon_unlocked = yes
		}
	}
}

cuman_lancers_reform = {
	icon = "cuman_lancers_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			tag = HUN
			was_tag = HUN
			tag = AUH
		}
		has_dlc = "Winds of Change"
	}
	trigger = {
		if = {
			limit = { has_modifier_locking_military_tier = yes }
			OR = {
				has_reform = cuman_lancers_reform
				has_not_modifier_locking_military_tier = yes
			}
		}
	}
	custom_attributes = {
		army_tradition_on_stackwipe = yes
	}
	modifiers = {
		cav_to_inf_ratio = 0.25
		cavalry_cost = -0.2
	}
	
	ai = {
		factor = 1
	}
}

continue_the_renaissance_reform = {
	icon = man_on_podium
	allow_normal_conversion = yes
	potential = {
		OR = {
			tag = HUN
			was_tag = HUN
			tag = AUH
		}
		has_dlc = "Winds of Change"
	}
	custom_attributes = {
		monarch_power_on_institutions = yes
	}
	modifiers = {
		embracement_cost = -0.1
		global_institution_spread = 0.1
	}
	
	ai = {
		factor = 1
	}
}

extend_the_unio_trium_nationum_reform = {
	icon = "extend_the_unio_trium_nationum_reform"
	allow_normal_conversion = yes
	potential = {
		OR = {
			tag = HUN
			was_tag = HUN
			tag = AUH
		}
		has_dlc = "Winds of Change"
	}
	custom_attributes = {
		seizing_land_no_rebels_from_estate_nobles = yes
	}
	modifiers = {
		global_unrest = -1
		nobles_privilege_slots = 1
		nobles_influence_modifier = 0.1
		nobles_loyalty_modifier = 0.1
	}
	
	ai = {
		factor = 1
	}
}

imperial_hungarian_government = { #Hungarian alternative of the Imperial Austrian Monarchy
	icon = "austrian_dual_monarchy_reform"
	allow_normal_conversion = yes
	legacy_equivalent = feudal_monarchy
	potential = { #added via script
		has_dlc = "Winds of Change"
		has_unlocked_government_reform = {
			government_reform = imperial_hungarian_government
		}
	}
	valid_for_nation_designer = no

	modifiers = {
		num_accepted_cultures = 2
		global_unrest = -2
		monarch_diplomatic_power = 2
		promote_culture_cost = -0.33
	}
}

bergordnung_reforms_reform = {
	icon = "laesio_enormis_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = bergordnung_reforms_reform
		}
		OR = {
			tag = BOH
			was_tag = BOH
		}
		has_dlc = "Winds of Change"
	}
	custom_attributes = {
		developing_manufactories_extra_dev_chance = yes
	}
	modifiers = {
		production_efficiency = 0.1
	}
	
	ai = {
		factor = 1
	}
}

vozove_hradby_reform = {
	icon = "vozove_hradby_reform"
	allow_normal_conversion = yes
	potential = {
		has_unlocked_government_reform = {
			government_reform = vozove_hradby_reform
		}
		OR = {
			tag = BOH
			was_tag = BOH
		}
		has_dlc = "Winds of Change"
	}
	custom_attributes = {
		battles_on_own_territory_bonus_tradition = yes
	}
	modifiers = {
		morale_damage_received = -0.1
	}
	
	ai = {
		factor = 1
	}
}