russian_modernization_mechanic = {
	available = {
		has_dlc = "Domination"
	}
	powers = {
		russian_modernization = {
			gui = russian_modernization_gov_mech
			max = 100
			reset_on_new_ruler = no
			base_monthly_growth = 0
			development_scaled_monthly_growth = 0
			monarch_power = adm
			scaled_modifier = {
				modifier = {
					embracement_cost = -0.5
					global_institution_spread = 0.25
					same_culture_advisor_cost = -0.10
				}
			}
			is_good = yes
		}
	}
}

russian_rule_mechanic = {
	alert_icon_gfx = GFX_alerticons_government_mechanics
	alert_icon_index = 9
	available = {
		has_dlc = "Domination"
	}
	powers = {
		russian_administrative_rule = {
			max = 100
			min = 0
			reset_on_new_ruler = no
			base_monthly_growth = 0.25
			development_scaled_monthly_growth = 0
			monarch_power = adm
			scaled_modifier = {
				modifier = {
					development_cost = -0.1
					global_tax_modifier = 0.15
					core_creation = -0.25
				}
			}
		}
		russian_diplomatic_rule = {
			max = 100
			min = 0
			reset_on_new_ruler = yes
			base_monthly_growth = 0.25
			development_scaled_monthly_growth = 0
			monarch_power = dip
			scaled_modifier = {
				modifier = {
					diplomatic_reputation = 1.5
					unjustified_demands = -0.10
					improve_relation_modifier = 0.25
				}
			}
		}
		russian_military_rule = {
			max = 100
			min = 0
			reset_on_new_ruler = yes
			base_monthly_growth = 0.25
			development_scaled_monthly_growth = 0
			monarch_power = mil
			scaled_modifier = {
				modifier = {
					harsh_treatment_cost = -0.25
					army_tradition_decay = -0.015
					global_manpower_modifier = 0.10
				}
			}
		}
	}
	
	interactions = {
		enforce_absolute_rule = {
			icon = GFX_russian_rule_adm_button
			cost_type = russian_administrative_rule
			cost = 100
			trigger = {
				OR = {
					any_owned_province = {
						local_autonomy_above_min = 10
					}
					if = {
						limit = { has_parliament = yes }
						has_active_debate = yes
					}
					if = {
						limit = { has_any_estates = yes }
						has_any_active_estate_agenda = yes
					}
				}
			}
			effect = {
				custom_tooltip = RUSABIL_SUDEBNIK_EFFECT_TT
				tooltip = {
					capital_scope = {
						add_local_autonomy_no_authority_effect = -15
					}
				}
				hidden_effect = {
					every_owned_province = {
						add_local_autonomy_no_authority_effect = -15
					}
				}
				custom_tooltip = enforce_absolute_rule_tt
				hidden_effect = {
					if = {
						limit = {
							has_parliament = yes
							has_active_debate = yes
						}
						end_current_debate = yes
					}
					auto_complete_estate_agenda = {
						estate = all
					}
				}
			}
			cooldown_years = 1
			ai_chance = {
				factor = 1
				modifier = {
					factor = 100
					OR = {
						has_any_active_estate_agenda = yes
						has_active_debate = yes 
					}
					NOT = { personality = ai_militarist }
				}
				modifier = {
					factor = 0
					has_any_active_estate_agenda = no
					has_active_debate = no
					NOT = { average_autonomy_above_min = 20 }
					personality = ai_militarist	#CCR from the passive buff > autonomy reduction
				}
				modifier = {
					factor = 10
					average_autonomy_above_min = 20
				}
				modifier = {
					factor = 0
					overextension_percentage = 0.01
				}
			}
		}
		enforce_cultural_revolution = {
			icon = GFX_russian_rule_dip_button
			cost_type = russian_diplomatic_rule
			cost = 100
			trigger = {
				OR = {
					rebel_progress_at_least = { value = 35 }
					NOT = { has_country_modifier = cultural_revolution }
				}
			}
			effect = { 
				add_rebel_progress = {
					value = -35
				}
				if = {
					limit = { NOT = { has_country_modifier = cultural_revolution } }
					add_country_modifier = {
						name = cultural_revolution
						duration = 3650
					}
				}
				else = {
					extend_country_modifier = {
						name = cultural_revolution
						duration = 3650
					}
				}
			}
			cooldown_years = 1
			ai_chance = {
				factor = 0
				modifier = {
					factor = 100
					has_government_power = {
						mechanic_type = russian_rule_mechanic
						power_type = russian_diplomatic_rule
						value = 50
					}
					OR = {
						rebel_progress_at_least = { value = 30 }
						NOT = { has_country_modifier = cultural_revolution }
					}
				}
			}
		}
		mobilize_new_order_regiments = {
			icon = GFX_russian_rule_mil_button
			cost_type = russian_military_rule
			cost = 100
			trigger = {
				capital_scope = {
					controller = { 
						tag = ROOT
					}
					has_siege = no
				}
			}
			effect = {
				create_unit_forcelimit_percentage = {
					type = infantry
					force_limit_percentage = 0.1
				}
				add_war_exhaustion = -3.5
				if = {
					limit = { has_country_modifier = mobilized_new_order_regiments }
					extend_country_modifier = {
						name = mobilized_new_order_regiments
						duration = 3650
					}
				}
				else = {
					add_country_modifier = {
						name = mobilized_new_order_regiments
						duration = 3650
					}
				}
				add_yearly_manpower = 0.35
				if = {
					limit = {
						has_government_attribute = new_order_regiment_buff
					}
					add_country_modifier = {
						name = new_order_regiment_mobilized_modifier
						duration = 3650
					}
					custom_tooltip = MILITARY_DOCTRINES_AND_ORGANIZATION_LOCK_TT
				}
			}
			cooldown_years = 1
			ai_chance = {
				factor = 10
				modifier = {
					factor = 100
					is_at_war = yes
					OR = {
						war_exhaustion = 3
						NOT = { has_country_modifier = mobilized_new_order_regiments }
					}
				}
				modifier = {
					factor = 100
					is_in_important_war = yes
				}
				modifier = {
					factor = 100
					is_at_war = yes
				}
			}
		}
	}
}