council_of_ten = {
	alert_icon_gfx = GFX_alerticons_government_mechanics
	alert_icon_index = 17
	available = {
		has_dlc = "Winds of Change"
	}

	powers = {
		authority_power = {
			max = 100
			gui = council_of_ten_gov_mech
			show_before_interactions = yes
			reset_on_new_ruler = no
			base_monthly_growth = 0.05
			development_scaled_monthly_growth = 0
			scaled_modifier = {
				modifier = {
					max_absolutism = -50
					all_estate_influence_modifier = 0.15
					min_autonomy = 25
				}
			}
			scaled_modifier = {
				modifier = { 
					can_not_declare_war = yes
				}
				start_value = 90
				end_value = 100
			}
			scaled_modifier = {
				modifier = { 
					monthly_authority_power = -0.5
				}
				start_value = 50
				end_value = 100
			}
			reverse_scaled_modifier = {
				modifier = {
					monthly_authority_power = 0.5
				}
				start_value = 0
				end_value = 50
			}
			is_good = no
		}
	}
	
	interactions = {
		adm_interaction = {
			icon = GFX_council_of_ten_adm_interaction_button
			cooldown_years = 3
			trigger = {
				adm_power = 50
				custom_trigger_tooltip = {
					tooltip = any_faction_51_influence_tt
					OR = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_nobles
							value = 3
						}
						estate_loyalty = {
							estate = estate_nobles
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_burghers
							value = 3
						}
						estate_loyalty = {
							estate = estate_burghers
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						OR = {
							faction_influence = {
								faction = mr_aristocrats
								influence = 51
							}
							faction_influence = {
								faction = mr_traders
								influence = 51
							}
						}
					}
					crown_land_share = 3
				}
			}
			effect = {
				add_adm_power = -50
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					add_faction_influence = {
						faction = mr_aristocrats
						influence = 10
					}
					change_estate_land_share = {
						estate = estate_nobles
						share = 2.5
					}
					capital_scope = { add_base_manpower = 1 }
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					add_faction_influence = {
						faction = mr_traders
						influence = 10
					}
					if = {
						limit = { has_country_flag = ven_trade_ideas_reward_flag }
						change_estate_land_share = {
							estate = estate_burghers
							share = 2
						}
					}
					else = {
						change_estate_land_share = {
							estate = estate_burghers
							share = 2.5
						}
					}
					capital_scope = { add_base_production = 1 }
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
					add_faction_influence = {
						faction = mr_guilds
						influence = 10
					}
					if = {
						limit = { mission_completed = ven_modern_banking_system }
						add_republican_tradition = -2.5
					}
					else = { add_republican_tradition = -3.5 }
					change_government_reform_progress = 5
				}
				add_government_power = {
					mechanic_type = council_of_ten
					power_type = authority_power
					value = -5
				}
			}
			ai_chance = {
				factor = 1
			}
		}
		dip_interaction = { #
			icon = GFX_council_of_ten_dip_interaction_button
			cooldown_years = 3
			trigger = {
				dip_power = 50
				custom_trigger_tooltip = {
					tooltip = any_faction_51_influence_tt
					OR = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_nobles
							value = 3
						}
						estate_loyalty = {
							estate = estate_nobles
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_burghers
							value = 3
						}
						estate_loyalty = {
							estate = estate_burghers
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						OR = {
							faction_influence = {
								faction = mr_aristocrats
								influence = 51
							}
							faction_influence = {
								faction = mr_traders
								influence = 51
							}
						}
					}
					crown_land_share = 3
				}
			}
			effect = {
				add_dip_power = -50
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					random_owned_province = {
						limit = {
							any_neighbor_province = {
								OR = {
									province_has_center_of_trade_of_level = 1
									has_port = yes
								}
								NOT = { country_or_non_sovereign_subject_holds = VEN }
								owner = {
									NOT = { alliance_with = VEN }
								}
							}
						}
						every_neighbor_province = {
							limit = {
								OR = {
									province_has_center_of_trade_of_level = 1
									has_port = yes
								}
								NOT = { country_or_non_sovereign_subject_holds = VEN }
								owner = {
									NOT = { alliance_with = VEN }
								}
							}
							add_claim = VEN
						}
					}
					change_estate_land_share = {
						estate = estate_nobles
						share = 2.5
					}
					add_faction_influence = {
						faction = mr_aristocrats
						influence = 10
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					if = {
						limit = { has_country_flag = ven_trade_ideas_reward_flag }
						change_estate_land_share = {
							estate = estate_burghers
							share = 1.5
						}
					}
					else = {
						change_estate_land_share = {
							estate = estate_burghers
							share = 2.5
						}
					}
					VEN = {
						if = {
							limit = { naval_forcelimit = 200 }
							112 = {
								create_units_of_type_in_province = {
									custom_tooltip = spawn_20_galleys_for_root
									who = ROOT
									amount = 20
									unit_type = galley
								}	
							}
						}
						else_if = {
							limit = { naval_forcelimit = 150 }
							112 = {
								create_units_of_type_in_province = {
									custom_tooltip = spawn_15_galleys_for_root
									who = ROOT
									amount = 20
									unit_type = galley
								}	
							}
						}
						else_if = {
							limit = { naval_forcelimit = 100 }
							112 = {
								create_units_of_type_in_province = {
									custom_tooltip = spawn_10_galleys_for_root
									who = ROOT
									amount = 10
									unit_type = galley
								}	
							}
						}
						else = {
							112 = {
								create_units_of_type_in_province = {
									custom_tooltip = spawn_5_galleys_for_root
									who = ROOT
									amount = 5
									unit_type = galley
								}	
							}
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
					if = {
						limit = { mission_completed = ven_modern_banking_system }
						add_republican_tradition = -2.5
					}
					else = { add_republican_tradition = -3.5 }
					random_owned_province = {
						limit = {
							controlled_by = ROOT 
							OR = {
								has_mills_trade_goods = yes 
								has_trade_company_trade_goods = yes 
								has_textile_trade_goods = yes 
							}
							NOT = { is_prosperous =  yes }
						}
						add_prosperity = 25
					}
					add_mercantilism = 1
				}
				add_government_power = {
					mechanic_type = council_of_ten
					power_type = authority_power
					value = -5
				}
			}
			ai_chance = {
				factor = 1
			}
		}
		mil_interaction = {
			icon = GFX_council_of_ten_mil_interaction_button
			cooldown_years = 3
			trigger = {
				mil_power = 50
				custom_trigger_tooltip = {
					tooltip = any_faction_51_influence_tt
					OR = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_nobles
							value = 3
						}
						estate_loyalty = {
							estate = estate_nobles
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					OR = {
						num_of_estate_privileges = {
							estate = estate_burghers
							value = 3
						}
						estate_loyalty = {
							estate = estate_burghers
							loyalty = 60
						}
					}
				}
				if = {
					limit = {
						OR = {
							faction_influence = {
								faction = mr_aristocrats
								influence = 51
							}
							faction_influence = {
								faction = mr_traders
								influence = 51
							}
						}
					}
					crown_land_share = 3
				}
			}
			effect = {
				add_mil_power = -50
				if = {
					limit = {
						faction_influence = {
							faction = mr_aristocrats
							influence = 51
						}
					}
					add_army_professionalism = 0.025
					add_army_tradition = 5
					change_estate_land_share = {
						estate = estate_nobles
						share = 2.5
					}
					add_faction_influence = {
						faction = mr_aristocrats
						influence = 10
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_traders
							influence = 51
						}
					}
					if = {
						limit = { has_country_flag = ven_trade_ideas_reward_flag }
						change_estate_land_share = {
							estate = estate_burghers
							share = 2
						}
					}
					else = {
						change_estate_land_share = {
							estate = estate_burghers
							share = 2.5
						}
					}
					add_yearly_sailors = 1
				}
				if = {
					limit = { 
						OR = { 
							has_dlc = "Rule Britannia"
							has_dlc = "Domination"
							has_dlc = "Golden Century"
							has_dlc = "Lions of the North"
						}
					}
					capital_scope = {
						marine_infantry = ROOT
						marine_infantry = ROOT
						marine_infantry = ROOT
					}
				}
				if = {
					limit = {
						faction_influence = {
							faction = mr_guilds
							influence = 51
						}
					}
					if = {
						limit = { mission_completed = ven_modern_banking_system }
						add_republican_tradition = -2.5
					}
					else = { add_republican_tradition = -3.5 }
					add_yearly_manpower = 1.5
				}
				add_government_power = {
					mechanic_type = council_of_ten
					power_type = authority_power
					value = -5
				}
			}
			ai_chance = {
				factor = 1
			}
		}
	}
}
