# For Government Reforms to identify properly influence and loyalty modifiers, remember to put disqualifying triggers before the has_reform

estate_maratha = {
	icon = 7

	# If true, country will get estate
	trigger = {
		OR = {
			has_dlc = "Dharma"
			has_dlc = "Winds of Change"
		}
		NOT = { has_government_attribute = disables_estate_maratha }
		NOT = { has_disabled_estate = { estate = estate_maratha } }
		OR = {
			has_government_attribute = enables_estate_maratha
			has_enabled_estate = { estate = estate_maratha }
			AND = {
				OR = {
					culture_group = western_aryan
					culture_group = dravidian
					primary_culture = sinhala
					has_unlocked_estate = { estate = estate_maratha }
				}
				OR = {
					technology_group = indian
					technology_group = early_indian
				}
				NOT = { primary_culture = rajput }
				NOT = { primary_culture = malvi }
				NOT = { has_government_attribute = is_pirate_republic_reform }
				NOT = { has_government_attribute = is_merchant_republic }
				NOT = { is_revolutionary_republic_trigger = yes }
				NOT = { government = native }
				NOT = { has_reform = siberian_tribe }
				NOT = { has_reform = celestial_empire }
				NOT = { has_reform = roman_empire_reform }
				NOT = { has_reform = multi_party_system }
				NOT = { has_reform = single_party_system }
				NOT = { has_reform = military_government }
				NOT = { has_reform = communist_government }
				NOT = { has_reform = fascist_government }
				is_nomad = no
				is_colonial_nation = no
				NOT = { has_reform = revolutionary_empire_reform }
			}
		}
	}

	# These scale with loyalty & power
	country_modifier_happy = {
		cavalry_power = 0.1
		army_tradition = 0.5
	}
	country_modifier_neutral = {
		army_tradition = 0.5
	}	
	country_modifier_angry = {
		army_tradition = -0.5
		global_unrest = 2
	}
	land_ownership_modifier = {
		maratha_loyalty_modifier = 0.2
	}
	
	province_independence_weight = {
		factor = 1
		modifier = {
			factor = 0.5
			OR = {
				AND = {
					NOT = { culture_group = western_aryan }
					NOT = { culture_group = dravidian }
					NOT = { culture = sinhala }
				}
				culture = rajput
				culture = malvi
			}
		}
		modifier = {
			factor = 0.5
			NOT = { religion = hinduism }
		}
		modifier = {
			factor = 0.5
			NOT = { religion_group = dharmic }
		}
		modifier = {
			factor = 0.5
			NOT = { superregion = india_superregion }
			NOT = { culture = owner }
		}
		modifier = {
			factor = 1.5
			OR = {
				culture = owner
				culture = marathi
			}
		}
		modifier = {
			factor = 0.67
			NOT = { is_state_core = owner }
		}
		modifier = {
			factor = 1.5
			has_province_modifier = popular_palkhis
		}
	}

	# Influence modifiers
	base_influence = 10
	influence_modifier = {
		desc = EST_VAL_PROMOTED_MARATHI_CULTURE
		trigger = {
			OR = {
				accepted_culture = marathi
				primary_culture = marathi
			}
		}
		influence = 10		
	}
	influence_modifier = {
		desc = EST_VAL_RULED_BY_NON_HINDU
		trigger = {
			NOT = { religion = hinduism }
			any_owned_province = {
				NOT = { religion_group = dharmic }
			}
		}
		influence = -5
	}
	influence_modifier = {
		desc = EST_VAL_OTHER_ESTATE_IN_POWER
		trigger = {
			has_any_estate_disaster_active = yes
			has_not_own_estate_disaster_active = { estate = estate_maratha }
		}
		influence = -40
	}
	
	#Loyalty Modifiers
	loyalty_modifier = {
		desc = EST_VAL_OTHER_ESTATE_IN_POWER_LOY
		trigger = {
			has_any_estate_disaster_active = yes
			has_not_own_estate_disaster_active = { estate = estate_maratha }
		}
		loyalty = -20
	}
	
	#Marathi Culture Promoted
	loyalty_modifier = {
		desc = EST_VAL_PROMOTED_MARATHI_CULTURE_LOY
		trigger = {
			OR = {
				accepted_culture = marathi
				primary_culture = marathi
			}
		}
		loyalty = 5
	}

	privileges = {
		estate_maratha_land_rights
		estate_maratha_military
		estate_maratha_advisor
		estate_maratha_special_privilege
		estate_maratha_loyalty_privilege
		estate_maratha_levies
		estate_maratha_levies_for_muslims
		estate_maratha_monopoly_of_metals
		estate_maratha_monopoly_of_livestock
		estate_maratha_monopoly_of_gems
		estate_maratha_subject_rights
		estate_maratha_better_integration
		estate_maratha_development_of_marathi_lands
		estate_maratha_military_ministerium
		estate_maratha_royal_court_tasks
		estate_maratha_noble_promotion
		estate_maratha_force_conscription
	}
	
	agendas = {
		estate_maratha_build_army_building_in_y
		estate_maratha_build_fort_building_in_y
		estate_maratha_build_manufactory_in_y
		estate_maratha_build_university_in_y
		estate_maratha_condottieri_rivals
		estate_maratha_support_independence
		estate_maratha_retake_core
		estate_maratha_crush_revolts
		estate_maratha_regain_liberty
		estate_maratha_convert_province_culture
		estate_maratha_protect_our_culture
		estate_maratha_vassalise_vulnerable_country
		estate_maratha_expand_into_x
		estate_maratha_complete_conquest_of_x
		estate_maratha_annex_subject
		estate_maratha_build_an_army
		estate_maratha_bigger_army_than_rival
		estate_maratha_build_up_manpower_reserves
		estate_maratha_recover_abysmal_prestige
		estate_maratha_improve_prestige
		estate_maratha_develop_x
		estate_maratha_hire_advisor
		estate_maratha_fire_advisor
	}

	#New added in MMETR
	custom_name = {
		desc = estate_vellalar
		trigger = {
			primary_culture = tamil
		}
	}
	
	color = { 230 145 20 }
	
	influence_from_dev_modifier = 1.0
}