#####---------------------------------------------------------------------> Mod by Sig "GreatExperiment" Altre

ideas = {

	r56i_laws_leadership = { 
	
		law = yes

		use_list_view = yes
		
		#Personality Cult
		r56i_laws_leadership_cult = {

			available = {
				OR = {
					has_country_leader_ideology = populism
					has_country_leader_ideology = leninism
					has_country_leader_ideology = stalinism
					has_country_leader_ideology = anti_revisionism
					has_country_leader_ideology = juche
					has_country_leader_ideology = arab_communism
					has_country_leader_ideology = national_bolshevism
					has_country_leader_ideology = nazism
					has_country_leader_ideology = gen_nazism
					has_country_leader_ideology = fascism_ideology
					has_country_leader_ideology = falangism
					has_country_leader_ideology = ultranationalism
					has_country_leader_ideology = clerical_fascism
					has_country_leader_ideology = rexism
					has_country_leader_ideology = emperor_fascism
					has_country_leader_ideology = islamism
					has_country_leader_ideology = absolute_monarchism
					has_country_leader_ideology = corporatism
					has_country_leader_ideology = military_junta
					has_country_leader_ideology = japan_militarism_ideology
					has_country_leader_ideology = marhaenism
					has_country_leader_ideology = revisionist_zionism
					has_country_leader_ideology = pashtun_nationalism
					has_country_leader_ideology = social_nationalism
				}
				NOT = {
					hidden_trigger = {
						has_global_flag = NATIONAL_CHARACTERS_BLOCKED
					}
				}
			}

			modifier = {
				democratic_drift = -0.05		#present also in communist countries, surely won't contribute to liberalization of society 
				justify_war_goal_time = -0.25
				political_power_cost = 0.05
			}

			
			cancel_if_invalid = no

			ai_will_do = {
				factor = 0
				# long list of political power things that should be taken first. If the idea impacts stability, checking for > 0.5 could be useful. I (Waffle) may have overdesigned it a bit, but this is just a reliable proof of concept, adaptable to more specific situations
				modifier = {
					has_political_power > 150

					amount_taken_ideas = { # have 3 political advisors 
					    amount > 2
					    slots = {
					        political_advisor
					    }
					}
					amount_taken_ideas = { # have 3 high command members
					    amount > 2
					    slots = {
					        high_command
					    }
					}
					amount_taken_ideas = { # have an army chief (because some countries have restrictions on it, no requirement for air chief and navy chief in this prototype, if you add navy chief requirement, demand that the number of dockyards be > 0
					    amount > 0
					    slots = {
					        army_chief
					    }
					}
					amount_taken_ideas = {
					    amount > 0
					    slots = {
					        industrial_concern
					    }
					}
					if = {
						limit = {
							NOT = {
								has_dlc = "Arms Against Tyranny"
							}
						}
						amount_taken_ideas = { # might cause problems with some manufacturers not being available (for example Ethiopia)
						    amount > 0
						    slots = {
						        tank_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        aircraft_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        materiel_manufacturer
						    }
						}
					}
					NOT = { # you will change gender law through effect or if the law becomes unavailable
						OR = {
							#has_idea = r56i_laws_leadership_cult
							has_idea = r56i_laws_leadership_divine
							has_idea = r56i_laws_leadership_secular
							has_idea = r56i_laws_leadership_people
							has_idea = r56i_laws_leadership_communal_decision_making
						}
					}
				
					add = 1
				}
		 	}
		}
		
		#Divine Inspiration
		r56i_laws_leadership_divine = {
		
			available = {
				if = {
					limit = { #Was a way to bypass war support limits in content
						has_government = democratic	
					}
					has_war = no
				}
				OR = {
					has_country_leader_ideology = conservatism
					has_country_leader_ideology = populism
					has_country_leader_ideology = oligarchic_democracy
					has_country_leader_ideology = centrism_democratic
					has_country_leader_ideology = general_zionism
					has_country_leader_ideology = buddhist_socialism
					has_country_leader_ideology = islamic_socialism
					has_country_leader_ideology = fascism_ideology
					has_country_leader_ideology = clerical_fascism
					has_country_leader_ideology = islamism
					has_country_leader_ideology = despotism
					has_country_leader_ideology = conservatism_n
					has_country_leader_ideology = absolute_monarchism
					has_country_leader_ideology = constitutional_monarchy
					has_country_leader_ideology = moderatism
					has_country_leader_ideology = oligarchism
					has_country_leader_ideology = centrism
					has_country_leader_ideology = monarchical_theocracy
					has_country_leader_ideology = moderate_islamism
					has_country_leader_ideology = revisionist_zionism
					has_country_leader_ideology = pashtun_nationalism
					has_country_leader_ideology = controlled_democracy
					has_country_leader_ideology = social_nationalism
				}
				hidden_trigger = {
					NOT = {
						has_global_flag = NATIONAL_CHARACTERS_BLOCKED
					}
				}
			}
			
			modifier = {
				communism_drift = -0.05			#stalinists and trotskyist and their stance on religion
				war_support_factor = 0.10
				political_power_cost = 0.05
			}

			on_add = {
				if = {
					limit = {
						original_tag = AFG
						has_power_balance = {
							id = AFG_power_balance
						}
					}
					add_power_balance_value = {
						id = AFG_power_balance
						value = 0.05
						tooltip_side = AFG_tribal_side
					}
				}
			}

			on_remove = {
				if = {
					limit = {
						original_tag = AFG
						has_power_balance = {
							id = AFG_power_balance
						}
					}
					add_power_balance_value = {
						id = AFG_power_balance
						value = -0.05
						tooltip_side = AFG_government_side
					}
				}
			}

			cost = 150
			ai_will_do = {
				factor = 0
				# long list of political power things that should be taken first. If the idea impacts stability, checking for > 0.5 could be useful. I (Waffle) may have overdesigned it a bit, but this is just a reliable proof of concept, adaptable to more specific situations
				modifier = {
					has_political_power > 150

					amount_taken_ideas = { # have 3 political advisors 
					    amount > 2
					    slots = {
					        political_advisor
					    }
					}
					amount_taken_ideas = { # have 3 high command members
					    amount > 2
					    slots = {
					        high_command
					    }
					}
					amount_taken_ideas = { # have an army chief (because some countries have restrictions on it, no requirement for air chief and navy chief in this prototype, if you add navy chief requirement, demand that the number of dockyards be > 0
					    amount > 0
					    slots = {
					        army_chief
					    }
					}
					amount_taken_ideas = {
					    amount > 0
					    slots = {
					        industrial_concern
					    }
					}
					if = {
						limit = {
							NOT = {
								has_dlc = "Arms Against Tyranny"
							}
						}
						amount_taken_ideas = { # might cause problems with some manufacturers not being available (for example Ethiopia)
						    amount > 0
						    slots = {
						        tank_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        aircraft_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        materiel_manufacturer
						    }
						}
					}
					NOT = { # you will change gender law through effect or if the law becomes unavailable
						OR = {
							has_idea = r56i_laws_leadership_cult
							#has_idea = r56i_laws_leadership_divine
							has_idea = r56i_laws_leadership_secular
							has_idea = r56i_laws_leadership_people
							has_idea = r56i_laws_leadership_communal_decision_making
						}
					}
				
					add = 1
				}
			}
		}

		#Secular Institutions
		r56i_laws_leadership_secular = {

			available = {
				OR = {
					has_country_leader_ideology = liberalism
					has_country_leader_ideology = socialism
					has_country_leader_ideology = populism
					has_country_leader_ideology = oligarchic_democracy
					has_country_leader_ideology = anarcho_capitalism
					has_country_leader_ideology = labour_zionism
					has_country_leader_ideology = marxism
					has_country_leader_ideology = leninism
					has_country_leader_ideology = stalinism
					has_country_leader_ideology = anti_revisionism
					has_country_leader_ideology = anarchist_communism
					has_country_leader_ideology = juche
					has_country_leader_ideology = soviet_labour_zionism
					has_country_leader_ideology = democratic_socialism
					has_country_leader_ideology = arab_communism
					has_country_leader_ideology = syndicalism
					has_country_leader_ideology = national_bolshevism
					has_country_leader_ideology = anarchism
					has_country_leader_ideology = anarcho_capitalism_n
					has_country_leader_ideology = arab_socialism
					has_country_leader_ideology = controlled_democracy
					has_country_leader_ideology = social_nationalism
				}
				hidden_trigger = {
					NOT = {
						has_global_flag = NATIONAL_CHARACTERS_BLOCKED
					}
				}
			}
			
			modifier = {
				neutrality_drift = -0.05		#to represent an absolute power + theocratic states VS civilian authorities
				research_speed_factor = 0.05
				political_power_cost = 0.05
			}

			on_add = {
				if = {
					limit = {
						original_tag = AFG
						has_power_balance = {
							id = AFG_power_balance
						}
					}
					add_power_balance_value = {
						id = AFG_power_balance
						value = -0.10
						tooltip_side = AFG_government_side
					}
				}
			}

			on_remove = {
				if = {
					limit = {
						original_tag = AFG
						has_power_balance = {
							id = AFG_power_balance
						}
					}
					add_power_balance_value = {
						id = AFG_power_balance
						value = 0.10
						tooltip_side = AFG_tribal_side
					}
				}
			}

			cost = 150
			
			cancel_if_invalid = no

			ai_will_do = {
				factor = 0
				# long list of political power things that should be taken first. If the idea impacts stability, checking for > 0.5 could be useful. I (Waffle) may have overdesigned it a bit, but this is just a reliable proof of concept, adaptable to more specific situations
				modifier = {
					has_political_power > 150

					amount_taken_ideas = { # have 3 political advisors 
					    amount > 2
					    slots = {
					        political_advisor
					    }
					}
					amount_taken_ideas = { # have 3 high command members
					    amount > 2
					    slots = {
					        high_command
					    }
					}
					amount_taken_ideas = { # have an army chief (because some countries have restrictions on it, no requirement for air chief and navy chief in this prototype, if you add navy chief requirement, demand that the number of dockyards be > 0
					    amount > 0
					    slots = {
					        army_chief
					    }
					}
					amount_taken_ideas = {
					    amount > 0
					    slots = {
					        industrial_concern
					    }
					}
					if = {
						limit = {
							NOT = {
								has_dlc = "Arms Against Tyranny"
							}
						}
						amount_taken_ideas = { # might cause problems with some manufacturers not being available (for example Ethiopia)
						    amount > 0
						    slots = {
						        tank_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        aircraft_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        materiel_manufacturer
						    }
						}
					}
					NOT = { # you will change gender law through effect or if the law becomes unavailable
						OR = {
							#has_idea = r56i_laws_leadership_cult
							has_idea = r56i_laws_leadership_divine
							#has_idea = r56i_laws_leadership_secular
							has_idea = r56i_laws_leadership_people
							has_idea = r56i_laws_leadership_communal_decision_making
						}
						
					}
				
					add = 1
				}
			}
		}
		
		#Will of the People
		r56i_laws_leadership_people = {

			available = {
				OR = {
					has_country_leader_ideology = socialism
					has_country_leader_ideology = anarcho_capitalism
					has_country_leader_ideology = labour_zionism
					has_country_leader_ideology = marxism
					has_country_leader_ideology = leninism
					has_country_leader_ideology = anarchist_communism
					has_country_leader_ideology = buddhist_socialism
					has_country_leader_ideology = islamic_socialism
					has_country_leader_ideology = soviet_labour_zionism
					has_country_leader_ideology = democratic_socialism
					has_country_leader_ideology = arab_communism
					has_country_leader_ideology = syndicalism
					has_country_leader_ideology = emperor_fascism
					has_country_leader_ideology = anarchism
					has_country_leader_ideology = anarcho_capitalism_n
					has_country_leader_ideology = marhaenism
					has_country_leader_ideology = arab_socialism
					has_country_leader_ideology = social_nationalism
				}
				hidden_trigger = {
					NOT = {
						has_global_flag = NATIONAL_CHARACTERS_BLOCKED
					}
				}
			}
			
			modifier = {
				fascism_drift = -0.05				#Sounds very pro-communist, historically some people might've applied to it too though
				stability_factor = 0.05
				political_power_cost = 0.05
			}

			cost = 150
			
			cancel_if_invalid = no

			ai_will_do = {
				factor = 0
				# long list of political power things that should be taken first. If the idea impacts stability, checking for > 0.5 could be useful. I (Waffle) may have overdesigned it a bit, but this is just a reliable proof of concept, adaptable to more specific situations
				modifier = {
					has_political_power > 150

					amount_taken_ideas = { # have 3 political advisors 
					    amount > 2
					    slots = {
					        political_advisor
					    }
					}
					amount_taken_ideas = { # have 3 high command members
					    amount > 2
					    slots = {
					        high_command
					    }
					}
					amount_taken_ideas = { # have an army chief (because some countries have restrictions on it, no requirement for air chief and navy chief in this prototype, if you add navy chief requirement, demand that the number of dockyards be > 0
					    amount > 0
					    slots = {
					        army_chief
					    }
					}
					amount_taken_ideas = {
					    amount > 0
					    slots = {
					        industrial_concern
					    }
					}
					if = {
						limit = {
							NOT = {
								has_dlc = "Arms Against Tyranny"
							}
						}
						amount_taken_ideas = { # might cause problems with some manufacturers not being available (for example Ethiopia)
						    amount > 0
						    slots = {
						        tank_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        aircraft_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        materiel_manufacturer
						    }
						}
					}
					NOT = { # you will change gender law through effect or if the law becomes unavailable
						OR = {
							has_idea = r56i_laws_leadership_cult
							has_idea = r56i_laws_leadership_divine
							has_idea = r56i_laws_leadership_secular
							#has_idea = r56i_laws_leadership_people
							has_idea = r56i_laws_leadership_communal_decision_making
						}		
					}
				
					add = 1
				}
			}
		}
		#Communal Decision Making
		r56i_laws_leadership_communal_decision_making = {
			picture = SPR_collectivized_society
			available = {
				OR = {
					custom_trigger_tooltip = {
						tooltip = has_government_anarchism_tt
						OR = {
							has_country_leader_ideology = anarchism
							has_country_leader_ideology = anarchist_communism
						}
					}
					has_idea = SPR_collectivized_society
				}
				hidden_trigger = {
					NOT = {
						has_global_flag = NATIONAL_CHARACTERS_BLOCKED
					}
				}
			}
			
			modifier = {
				democratic_drift = -0.02		#more communes, a bit more communism too on top
				fascism_drift = -0.02
				conscription_factor = 0.05
				research_speed_factor = 0.05
				political_power_cost = 0.05	
			}

			cost = 150

			ai_will_do = {
				factor = 0
				# long list of political power things that should be taken first. If the idea impacts stability, checking for > 0.5 could be useful. I (Waffle) may have overdesigned it a bit, but this is just a reliable proof of concept, adaptable to more specific situations
				modifier = {
					has_political_power > 150

					amount_taken_ideas = { # have 3 political advisors 
					    amount > 2
					    slots = {
					        political_advisor
					    }
					}
					amount_taken_ideas = { # have 3 high command members
					    amount > 2
					    slots = {
					        high_command
					    }
					}
					amount_taken_ideas = { # have an army chief (because some countries have restrictions on it, no requirement for air chief and navy chief in this prototype, if you add navy chief requirement, demand that the number of dockyards be > 0
					    amount > 0
					    slots = {
					        army_chief
					    }
					}
					amount_taken_ideas = {
					    amount > 0
					    slots = {
					        industrial_concern
					    }
					}
					if = {
						limit = {
							NOT = {
								has_dlc = "Arms Against Tyranny"
							}
						}
						amount_taken_ideas = { # might cause problems with some manufacturers not being available (for example Ethiopia)
						    amount > 0
						    slots = {
						        tank_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        aircraft_manufacturer
						    }
						}
						amount_taken_ideas = {
						    amount > 0
						    slots = {
						        materiel_manufacturer
						    }
						}
					}
					NOT = { # you will change gender law through effect or if the law becomes unavailable
						OR = {
							#has_idea = r56i_laws_leadership_cult
							has_idea = r56i_laws_leadership_divine
							has_idea = r56i_laws_leadership_secular
							has_idea = r56i_laws_leadership_people
							#has_idea = r56i_laws_leadership_communal_decision_making
						}
					}
				
					add = 1
				}
			}
		}		
	}
}

#####---------------------------------------------------------------------> End
