legitimation_through_representation_mechanic = {
	alert_icon_gfx = GFX_legitimation_through_representation_mechanic_alert_icon
	alert_icon_index = 1
	available = {
		always = yes
	}

	powers = {
		legitimation_through_representation_power = {
			gui = legitimation_through_representation_mechanic_power
			min = 0
			max = 100
			default = 0
			scaled_modifier = {
				start_value = 0
				end_value = 100
				modifier = {
					prestige = 1
					diplomatic_reputation = 1
					max_absolutism = 20
					monthly_legitimation_through_representation_power = -0.5
				}
			}
		}
	}

	interactions = {
		legitimation_through_representation_mechanic_obtain_new_paintings = {
			gui = legitimation_through_representation_mechanic_interaction
			icon = GFX_legitimation_through_representation_mechanic_obtain_new_paintings_button
			trigger = {
				years_of_income = 0.5
				adm_power = 100
			}
			effect = {
				add_years_of_income = -0.5
				add_adm_power = -100
				add_government_power = {
					mechanic_type = legitimation_through_representation_mechanic
					power_type = legitimation_through_representation_power
					value = 10
				}
			}
			cooldown_years = 5
			ai_chance = {
				factor = 1
				modifier = {
					factor = 0
					NOT = { years_of_income = 2 }
				}
				modifier = {
					factor = 0
					NOT = { adm_power = 700 }
				}
			}
		}
		legitimation_through_representation_mechanic_host_a_court_festival = {
			gui = legitimation_through_representation_mechanic_interaction
			icon = GFX_legitimation_through_representation_mechanic_host_a_court_festival_button
			trigger = {
				years_of_income = 0.5
				dip_power = 100
			}
			effect = {
				add_years_of_income = -0.5
				add_dip_power = -100
				add_government_power = {
					mechanic_type = legitimation_through_representation_mechanic
					power_type = legitimation_through_representation_power
					value = 10
				}
			}
			cooldown_years = 5
			ai_chance = {
				factor = 1
				modifier = {
					factor = 0
					NOT = { years_of_income = 2 }
				}
				modifier = {
					factor = 0
					NOT = { dip_power = 700 }
				}
			}
		}
		legitimation_through_representation_mechanic_perform_an_opera = {
			gui = legitimation_through_representation_mechanic_interaction
			icon = GFX_legitimation_through_representation_mechanic_perform_an_opera_button
			trigger = {
				years_of_income = 0.5
				mil_power = 100
			}
			effect = {
				add_years_of_income = -0.5
				add_mil_power = -100
				add_government_power = {
					mechanic_type = legitimation_through_representation_mechanic
					power_type = legitimation_through_representation_power
					value = 10
				}
			}
			cooldown_years = 5
			ai_chance = {
				factor = 1
				modifier = {
					factor = 0
					NOT = { years_of_income = 2 }
				}
				modifier = {
					factor = 0
					NOT = { mil_power = 700 }
				}
			}
		}
		legitimation_through_representation_mechanic_renovate_the_palace = {
			gui = legitimation_through_representation_mechanic_interaction2
			icon = GFX_legitimation_through_representation_mechanic_renovate_the_palace_button
			trigger = {
				years_of_income = 2.5
				adm_power = 50
				dip_power = 50
				mil_power = 50
			}
			effect = {
				add_years_of_income = -2.5
				add_adm_power = -50
				add_dip_power = -50
				add_mil_power = -50
				add_country_modifier = {
					name = legitimation_through_representation_mechanic_renovate_the_palace_modifier
					duration = 1825
				}
			}
			cooldown_years = 20
			ai_chance = {
				factor = 1
				modifier = {
					factor = 0
					NOT = { years_of_income = 6 }
				}
				modifier = {
					factor = 0
					OR = {
						NOT = { adm_power = 500 }
						NOT = { dip_power = 500 }
						NOT = { mil_power = 500 }
					}
				}
			}
		}
	}
}