﻿INJECT:ideology_nihilist = {
	lawgroup_health_system = { # VTM
		law_no_health_system = disapprove
		law_charitable_health_system = disapprove
		law_private_health_insurance = neutral
		law_public_health_insurance = neutral
	}
	
	lawgroup_education_system = { # VTM
		law_no_schools = disapprove
		law_religious_schools = strongly_disapprove
		law_private_schools = disapprove
		law_public_schools = neutral
	}
}

INJECT:ideology_radical = {
	lawgroup_army_model = {
		law_mass_conscription = strongly_approve
		law_professional_army = disapprove
		law_national_militia = approve
		law_peasant_levies = disapprove
	}
}

INJECT:ideology_social_democrat = {
	lawgroup_economic_system = {
		law_command_economy = neutral
		law_cooperative_ownership = neutral
		law_interventionism = approve
		law_agrarianism = disapprove
		law_traditionalism = strongly_disapprove		
		law_laissez_faire = disapprove	
		law_industry_banned = strongly_disapprove	
	}

	lawgroup_childrens_rights = {
		law_child_labor_allowed = strongly_disapprove
		law_restricted_child_labor = disapprove
		law_compulsory_primary_school = approve
	}
}

INJECT:ideology_communist = {
	lawgroup_childrens_rights = {
		law_child_labor_allowed = strongly_disapprove
		law_restricted_child_labor = disapprove
		law_compulsory_primary_school = approve
	}
}

INJECT:ideology_vanguardist = {
	lawgroup_army_model = {
		law_mass_conscription = strongly_approve
		law_professional_army = approve
		law_national_militia = disapprove
		law_peasant_levies = disapprove
	}
}

INJECT:ideology_anarchist = {
	lawgroup_army_model = {
		law_national_militia = approve
		law_professional_army = neutral
		law_mass_conscription = disapprove
		law_peasant_levies = strongly_disapprove
	}
}

REPLACE:ideology_jacksonian_democrat = {
	icon = "gfx/interface/icons/ideology_icons/ideology_leader/jackson_democrat.dds"

	character_ideology = yes

	lawgroup_governance_principles = {
		law_monarchy = strongly_disapprove
		law_theocracy = strongly_disapprove
		law_council_republic = strongly_disapprove
		law_parliamentary_republic = neutral
		law_corporate_state = disapprove
		law_presidential_republic = approve
	}

	lawgroup_distribution_of_power = {
		law_universal_suffrage = strongly_approve
		law_census_voting = approve
		law_wealth_voting = neutral
		law_landed_voting = disapprove
		law_anarchy = strongly_disapprove
		law_oligarchy = strongly_disapprove
		law_autocracy = strongly_disapprove
		law_single_party_state = disapprove
		law_technocracy = strongly_disapprove
	}

	lawgroup_bureaucracy = {
		law_elected_bureaucrats = approve
		law_appointed_bureaucrats = neutral
		law_hereditary_bureaucrats = disapprove
	}

	lawgroup_slavery = {
		law_slavery_banned = strongly_disapprove
		law_debt_slavery = strongly_disapprove
		law_slave_trade = neutral
		law_legacy_slavery = approve
		law_colonial_slavery = approve
	}

	lawgroup_citizenship = {
		law_ethnostate = strongly_disapprove
		law_national_supremacy = neutral
		law_subjecthood = disapprove
		law_racial_segregation = approve
		law_cultural_exclusion = neutral
		law_multicultural = strongly_disapprove
	}

	lawgroup_economic_system = {		
		law_traditionalism = neutral
		law_agrarianism = strongly_approve
		law_interventionism = neutral
		law_industry_banned = disapprove
		law_extraction_economy = approve
		law_laissez_faire = neutral
		law_cooperative_ownership = strongly_disapprove
		law_command_economy = strongly_disapprove
	}

	country_trigger = {
		exists = c:USA
		OR = {
			c:USA ?= this
			civil_war_origin_country ?= c:USA
		}
		any_scope_character = {
			has_variable = is_andrew_jackson
		}
	}

	interest_group_leader_trigger = {
		ideology_jacksonian_democrat_valid_trigger = yes
	}

	non_interest_group_leader_trigger = {
		NAND = {
			has_role_of_type = agitator
			owner = {
				has_law_or_variant = law_type:law_racial_segregation
				has_law_or_variant = law_type:law_legacy_slavery
				has_law_or_variant = law_type:law_elected_bureaucrats
				has_law_or_variant = law_type:law_universal_suffrage
				has_law_or_variant = law_type:law_presidential_republic
			}
		}
		interest_group = {
			ideology_jacksonian_democrat_valid_trigger = yes
		}
	}

	interest_group_leader_weight = {
		value = 300
		if = {
			limit = {
				OR = {
					has_variable = communist_ig_var
					has_variable = chose_vanguardism
					has_variable = chose_anarchism
					has_variable = chose_communism
					has_variable = chose_ethno_nationalism
					has_variable = chose_conservatism
					has_variable = chose_fascism
				}
			}
			multiply = 0.1
		}
	}

	non_interest_group_leader_weight = {
		value = 100
		if = {
			limit = {
				interest_group = {
					OR = {
						has_variable = communist_ig_var
						has_variable = chose_vanguardism
						has_variable = chose_anarchism
						has_variable = chose_communism
						has_variable = chose_ethno_nationalism
						has_variable = chose_conservatism
						has_variable = chose_fascism
					}
				}
			}
			multiply = 0.1
		}
	}
}

REPLACE:ideology_liberal_leader = { # Average Progressiveness - 64.06
	icon = "gfx/interface/icons/ideology_icons/ideology_leader/ideology_leader_liberal.dds"

	character_ideology = yes

	lawgroup_distribution_of_power = {
		law_universal_suffrage = strongly_approve
		law_census_voting = strongly_approve
		law_wealth_voting = approve
		law_landed_voting = neutral
		law_single_party_state = disapprove
		law_technocracy = disapprove
		law_oligarchy = disapprove
		law_autocracy = strongly_disapprove
		law_anarchy = strongly_disapprove
	}

	lawgroup_bureaucracy = {
		law_elected_bureaucrats = approve
		law_appointed_bureaucrats = disapprove
		law_hereditary_bureaucrats = strongly_disapprove
	}

	lawgroup_internal_security = {
		law_guaranteed_liberties = strongly_approve
		law_no_home_affairs = neutral
		law_national_guard = approve
		law_secret_police = disapprove
	}

	lawgroup_free_speech = {
		law_protected_speech = strongly_approve
		law_right_of_assembly = approve
		law_censorship = neutral
		law_outlawed_dissent = disapprove
	}

	country_trigger = {
		has_technology_researched = democracy
	}

	non_interest_group_leader_trigger = {
		# Agitators should have an ideology at odds with current laws
		NAND = {
			has_role_of_type = agitator
			owner = {
				OR = {
					has_law_or_variant = law_type:law_universal_suffrage
					has_law_or_variant = law_type:law_census_voting
					has_law_or_variant = law_type:law_wealth_voting
					has_law_or_variant = law_type:law_landed_voting
				}
				has_law_or_variant = law_type:law_elected_bureaucrats
			}
		}
	}

	interest_group_leader_weight = {
		value = 100
		# not very relevant if issues are already addressed
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_universal_suffrage
						has_law_or_variant = law_type:law_census_voting
						has_law_or_variant = law_type:law_wealth_voting
						has_law_or_variant = law_type:law_landed_voting
					}
					has_law_or_variant = law_type:law_elected_bureaucrats
				}
			}
			add = -50
		}
		# IGs will not sabotage their own dictatorships
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_autocracy
						has_law_or_variant = law_type:law_oligarchy
						has_law_or_variant = law_type:law_technocracy
						has_law_or_variant = law_type:law_single_party_state
					}
				}
				OR = {
					is_in_government = yes
					any_scope_character = {
						is_ruler_of_own_country = yes
					}
				}
			}
			add = -75
		}

		# Angry IGs will try to oppose others' dictatorships
		if = {
			limit = {
				ig_approval <= define:NPolitics|APPROVAL_THRESHOLD_UNHAPPY
				NOR = {
					is_in_government = yes
					any_scope_character = {
						is_ruler_of_own_country = yes
					}
				}
			}
			subtract = {
				value = ig_approval
				multiply = 5
			}
		}

		# More common in republics
		if = {
			limit = {
				owner = {
					NOR = {
						country_has_monarchy_law = yes
						has_law_or_variant = law_type:law_theocracy
					}
				}
			}
			add = 25
		}
		else = {
			add = -50
		}
		# liberal and/or radical leaders have a higher spawn chance if the Dreyfusards won.
		if = {
			limit = {
				has_variable = dreyfusard_victory
			}
			add = {
				value = 25
				desc = "DREYFUSARD_VICTORY"
			}
		}
		# liberal and/or radical leaders have a higher spawn chance if you win the Two Spains as the liberals.
		if = {
			limit = {
				has_variable = spa_two_spains_liberal_victory
			}
			add = {
				value = 25
				desc = "SPA_LIBERAL_VICTORY"
			}
		}
		# liberal and/or radical leaders have a higher spawn chance if you succeed in Portugal's Second Liberalism.
		if = {
			limit = {
				has_variable = por_second_liberalism_victory
			}
			add = {
				value = 25
				desc = "POR_LIBERAL_VICTORY"
			}
		}
		# liberal and/or radical leaders have a higher spawn chance if the Hungarian Revolution was successful.
		if = {
			limit = {
				has_variable = hungarian_revolution_increased_liberalism
			}
			add = {
				value = 25
				desc = "HUNGARIAN_REVOLUTION"
			}
		}
		if = {
			limit = {
				OR = {
					has_variable = communist_ig_var
					has_variable = chose_vanguardism
					has_variable = chose_anarchism
					has_variable = chose_communism
					has_variable = chose_ethno_nationalism
					has_variable = chose_conservatism
					has_variable = chose_fascism
				}
			}
			multiply = {
				value = 0.1
				desc = "CHOSE_A_DIFFERENT_PATH"
			}
		}
	}

	non_interest_group_leader_weight = {
		value = 100
		# not very relevant if issues are already addressed
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_universal_suffrage
						has_law_or_variant = law_type:law_census_voting
						has_law_or_variant = law_type:law_wealth_voting
						has_law_or_variant = law_type:law_landed_voting
					}
					has_law_or_variant = law_type:law_elected_bureaucrats
				}
			}
			add = -50
		}
		# IGs will not sabotage their own dictatorships
		if = {
			limit = {
				owner = {
					OR = {
						has_law_or_variant = law_type:law_autocracy
						has_law_or_variant = law_type:law_oligarchy
						has_law_or_variant = law_type:law_technocracy
						has_law_or_variant = law_type:law_single_party_state
					}
				}
				interest_group ?= {
					OR = {
						is_in_government = yes
						any_scope_character = {
							is_ruler_of_own_country = yes
						}
					}
				}
			}
			add = -75
		}

		# Angry IGs will try to oppose others' dictatorships
		if = {
			limit = {
				interest_group ?= {
					ig_approval <= define:NPolitics|APPROVAL_THRESHOLD_UNHAPPY
					NOR = {
						is_in_government = yes
						any_scope_character = {
							is_ruler_of_own_country = yes
						}
					}
				}
			}
			subtract = {
				value = interest_group.ig_approval
				multiply = 5
			}
		}

		# liberal and/or radical leaders have a higher spawn chance if you win the Two Spains as the liberals and choose to have woke commanders.
		if = {
			limit = {
				OR = {
					has_role_of_type = general
					has_role_of_type = admiral
				}
				has_variable = spa_liberal_military_var
			}
			add = 50
		}

		# More common in republics
		if = {
			limit = {
				owner = {
					NOR = {
						country_has_monarchy_law = yes
						has_law_or_variant = law_type:law_theocracy
					}
				}
			}
			add = 25
		}
		else = {
			add = -50
		}

		if = {
			limit = {
				interest_group ?= {
					OR = {
						has_variable = communist_ig_var
						has_variable = chose_vanguardism
						has_variable = chose_anarchism
						has_variable = chose_communism
						has_variable = chose_ethno_nationalism
						has_variable = chose_conservatism
						has_variable = chose_fascism
					}
				}
			}
			multiply = 0.1
		}
	}
}