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 
			}
		}
	}
	effect = {
		change_variable = {
			which = Plutocrat_Influence
			value = 1
		}
	}
	removed_effect = {
		change_variable = {
			which = Plutocrat_Influence
			value = -1
		}
	}
	
	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 }
	}
}

# for Spain

council_of_the_indies_reform = {
	icon = "paper_money_map"
	allow_normal_conversion = yes
	effect = {
		change_variable = {
			which = Royal_Influence
			value = 1
		}
	}
	removed_effect = {
		change_variable = {
			which = Royal_Influence
			value = -1
		}
	}
	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
	effect = {
		change_variable = {
			which = Royal_Influence
			value = 1
		}
	}
	removed_effect = {
		change_variable = {
			which = Royal_Influence
			value = -1
		}
	}
	potential = {
		num_of_colonists = 1
		has_dlc = "Golden Century"
		capital_scope = {
			NOT = {
				OR = {
					continent = north_america
					continent = south_america
					continent = new_world
					continent = oceania
				}
			}
		}
	}
	trigger = {
		num_of_colonists = 1
		num_of_continents = 2
	}
	modifiers = {
		expel_minorities_cost = -1
		colonist_placement_chance = 0.05
	}
	ai = {
		factor = 0.1
	}
}

#Soft Military / Military Organisation

rajput_military_leadership_reform = {
	icon = "rajput_soldiers"
	allow_normal_conversion = yes
	potential = {
		has_estate = estate_rajput
	}
	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
	}
	effect = {
		add_country_modifier = {
			name = GE_rajput_regiments
			duration = -1
		}
	}
	removed_effect = {
		if = {
			limit = {
				NOT = { has_estate_privilege = estate_rajput_rajput_regiments }
			}
			remove_country_modifier = GE_rajput_regiments
		}
	}
	ai = {
		factor = 1000
	}
}
