# Radicals and Republicans extremely attracted to this ideology
# Attracts weak leftists and liberals

radical_party = {
	color = { 255 102 0 }
	name = {
		first_valid = {
			# triggered_desc = {
				# desc = party_radical_civic_union
				# trigger = {
					# exists = c:ARG
					# THIS = c:ARG
				# }
			# }
			triggered_desc = {
				desc = party_democratic_progressive_party
				trigger = {
					exists = c:SPA
					THIS = c:SPA
				}
			}
			triggered_desc = {
				desc = party_free_democratic_party
				trigger = {
					exists = c:SWI
					THIS = c:SWI
				}
			}
			triggered_desc = {
				desc = party_national_progressive_party
				trigger = {
					exists = c:FIN
					THIS = c:FIN
				}
			}
			triggered_desc = {
				desc = party_free_thinking_democratic_league
				trigger = {
					exists = c:NET
					THIS = c:NET
				}
			}
			# triggered_desc = {
				# desc = party_radical_liberal_party
				# trigger = {
					# exists = c:LUX
					# THIS = c:LUX
				# }
			# }
			triggered_desc = {
				desc = party_progressive_club
				trigger = {
					exists = c:AUS
					THIS = c:AUS
				}
			}
			triggered_desc = {
				desc = party_radical_peoples_party
				trigger = {
					exists = c:SER
					THIS = c:SER
				}
			}
			triggered_desc = {
				desc = party_revival_party
				trigger = {
					exists = c:PER
					THIS = c:PER
				}
			}
			triggered_desc = {
				desc = party_mexican_liberal_party
				trigger = {
					exists = c:MEX
					THIS = c:MEX
				}
			}
			triggered_desc = {
				desc = party_democratic_progressive_party
				trigger = {
					exists = c:GBR
					THIS = c:GBR
					has_law = law_type:law_universal_suffrage
				}
			}
			triggered_desc = {
				desc = party_committee_of_union_and_progress
				trigger = {
					exists = c:TUR
					THIS = c:TUR
					has_law = law_type:law_monarchy
				}
			}
			triggered_desc = {
				desc = party_freedom_and_accord_party
				trigger = {
					exists = c:TUR
					THIS = c:TUR
					NOT = { has_law = law_type:law_monarchy }
				}
			}
			triggered_desc = {
				desc = party_trudovik_group
				trigger = {
					exists = c:RUS
					THIS = c:RUS
				}
			}
			triggered_desc = {
				desc = party_revive_china_society
				trigger = {
					exists = c:CHI
					THIS = c:CHI
					has_law = law_type:law_monarchy
				}
			}
			triggered_desc = {
				desc = party_french_party
				trigger = {
					exists = c:GRE
					THIS = c:GRE
				}
			}
			triggered_desc = {
				desc = party_the_far_left
				trigger = {
					OR = {
						country_has_primary_culture = cu:north_italian
						country_has_primary_culture = cu:south_italian
						country_has_primary_culture = cu:central_italian #DVG
						country_has_primary_culture = cu:sardinian #DVG
						country_has_primary_culture = cu:venetian #DVG
					}
				}
			}
			triggered_desc = {
				desc = party_tongmenghui
				trigger = {
					AND = {
						OR = {
							country_has_primary_culture = cu:han
							country_has_primary_culture = cu:hakka
							country_has_primary_culture = cu:miao
							country_has_primary_culture = cu:min
							country_has_primary_culture = cu:zhuang
							country_has_primary_culture = cu:yi
							country_has_primary_culture = cu:yue
						}
						NOT = { has_law = law_type:law_monarchy }
					}
				}
			}
			triggered_desc = {
				desc = party_progressive_party
				trigger = {
					OR = {
						AND = {
							exists = c:JAP
							THIS = c:JAP
						}
						# AND = {
							# exists = c:USA
							# THIS = c:USA
						# }
					}
				}
			}
			# triggered_desc = {
				# desc = party_radical_liberal_party
				# trigger = {
					# exists = c:ECU
					# THIS = c:ECU
				# }
			# }
			# triggered_desc = {
				# desc = party_national_union
				# trigger = {
					# exists = c:PEU
					# THIS = c:PEU
				# }
			# }
			# triggered_desc = {
				# desc = party_radical_liberal_party
				# trigger = {
					# country_has_primary_culture = cu:dixie
				# }
			# }
			triggered_desc = {
				desc = party_progressive_dissidence
				trigger = {
					country_has_primary_culture = cu:portuguese
				}
			}
			# triggered_desc = {
				# desc = party_progressive_league
				# trigger = {
					# country_has_primary_culture = cu:brazilian
				# }
			# }
			triggered_desc = {
				desc = party_radical_peoples_party
				trigger = {
					country_has_primary_culture = cu:scandinavian
				}
			}
			triggered_desc = {
				desc = party_social_liberal_party
				trigger = {
					country_has_primary_culture = cu:scandinavian
				}
			}
			triggered_desc = {
				desc = party_free_minded_peoples_party
				trigger = {
					OR = {
						country_has_primary_culture = cu:north_german
						country_has_primary_culture = cu:south_german
						country_has_primary_culture = cu:rheinish #DVG
					}
				}
			}
			triggered_desc = {
				desc = party_chartists
				trigger = {
					exists = c:GBR
					THIS = c:GBR
					NOT = { has_law = law_type:law_universal_suffrage }
				}
			}
			triggered_desc = {
				desc = party_radicals
				trigger = {
					always = yes
				}
			}
		}
	}
	icon = {
		default = "/gfx/interface/icons/political_parties/radical.dds"
	}
	unlocking_technologies = {
		egalitarianism
	}
	# THIS IS RUN ONLY ONCE AT GAME START
	valid_for_country = {
		always = yes
	}
	available_for_interest_group = {
		owner = {
			country_has_voting_franchise = yes
			any_interest_group = {
				is_marginal = no
				leader = {
					has_ideology = ideology_radical
				}
			}
		}
		NOR = {
			is_interest_group_type = ig_landowners
			is_interest_group_type = ig_devout
		}
		leader = { # fascists and conservatives hate radicals
			NOT = {
				has_ideology = ideology_fascist
				has_ideology = ideology_ethno_nationalist
				has_ideology = ideology_traditionalist
				has_ideology = ideology_royalist
				has_ideology = ideology_theocrat
				has_ideology = ideology_slaver
			}
		}
	}
	    
    # Root - IG considering joining
    # scope:number - the number of IGs that would join this party before the root IG
	join_weight = {
		value = {
			value = -5
			desc = "base_value"
		}
		if = { # radicals love radicalism
			limit = {
				leader = {
					has_ideology = ideology_radical
				}
			}
			add = {
				value = 5
				desc = "from_radical"
			}
		}
		if = {
			limit = {
				is_powerful = yes
				leader = {
					has_ideology = ideology_radical
				}
			}
			add = {
				value = 10
				desc = "from_powerful_radical"
			}
		}
		if = { # radicals will fall in line behind stronger liberals
			limit = {
				leader = {
					has_ideology = ideology_radical
				}
				is_powerful = no
				owner = {
					any_interest_group = {
						is_powerful = yes
						has_ideology = ideology_liberal
					}
				}
			}
			add = {
				value = -5
				desc = "from_weak_radicals"
			}
		}
		if = { # weak liberals will fall in line behind strong radicals
			limit = {
				is_powerful = no
				has_ideology = ideology_liberal
				owner = {
					any_interest_group = {
						is_powerful = yes
						leader = {
							has_ideology = ideology_radical
						}
					}
				}
			}
			add = {
				value = 10
				desc = "from_weak_liberals_radical"
			}
		}
		if = { # weak leftists will fall in line behind radicals pre-revolution
			limit = {
				is_powerful = no
				leader = {
					OR = {
						has_ideology = ideology_communist
						has_ideology = ideology_vanguardist
						has_ideology = ideology_anarchist
					}
				}
				owner = {
					NOT = { has_law = law_type:law_council_republic }
					any_interest_group = {
						is_powerful = yes
						leader = {
							has_ideology = ideology_radical
						}
					}
				}
			}
			add = {
				value = 10
				desc = "from_weak_leftists_radical"
			}
		}
		if = { # various progressives are inclined towards radicalism
			limit = {
				leader = {
					OR = {
						has_ideology = ideology_feminist
						has_ideology = ideology_abolitionist
						has_ideology = ideology_pacifist
						has_ideology = ideology_social_democrat
						has_ideology = ideology_reformer
						has_ideology = ideology_republican_leader
						has_ideology = ideology_atheist
					}
				}
			}
			add = {
				value = 10
				desc = "from_progressives_radical"
			}
		}
		if = { # republican
			limit = {
				OR = {
					has_ideology = ideology_republican
					has_ideology = ideology_populist
					leader = {
						OR = {
							has_ideology = ideology_atheist
							has_ideology = ideology_republican_leader
							has_ideology = ideology_radical
						}
					}
				}
				owner = {
					OR = {
						has_law = law_type:law_monarchy
						has_law = law_type:law_theocracy
					}
				}
			}
			add = {
				value = 10
				desc = "from_republican"
			}
		}
		if = {
			limit = { # particularists will join in when their issues are relevant
				has_ideology = ideology_particularist
				owner = {
					OR = {
						has_law = law_type:law_serfdom
						has_law = law_type:law_debt_slavery
					}
				}
			}
			add = {
				value = 3
				desc = "from_particularism_cares_about_laws"
			}
		}
		if = { # moderates are scared of radical politics
			limit = {
				leader = {
					has_ideology = ideology_moderate
				}
			}
			add = {
				value = -3
				desc = "from_moderate"
			}
		}
		if = { # from lack of democracy
			limit = {
				owner = {
					NOT = { has_law = law_type:law_universal_suffrage }
				}
				OR = {
					has_ideology = ideology_republican
					has_ideology = ideology_populist
					leader = {
						OR = {
							has_ideology = ideology_radical
							has_ideology = ideology_social_democrat
						}
					}
				}
			}
			add = {
				value = 10
				desc = "from_no_universal_suffrage"
			}
		}
		if = { # radical anti-censorship
			limit = {
				leader = {
					OR = {
						has_ideology = ideology_radical
						has_ideology = ideology_anarchist
					}
				}
				owner = {
					OR = {
						has_law = law_type:law_outlawed_dissent
						has_law = law_type:law_censorship
					}
				}
			}
			add = {
				value = 3
				desc = from_censorship
			}
		}
		if = { # anti-censorship
			limit = {
				OR = {
					has_ideology = ideology_liberal
					has_ideology = ideology_egalitarian
				}
				owner = {
					has_law = law_type:law_outlawed_dissent
				}
			}
			add = {
				value = 6
				desc = from_outlawed_dissent
			}
		}
		if = { # opposition to secret police or national guard
			limit = {
				OR = {
					has_ideology = ideology_liberal
					leader = {
						has_ideology = ideology_radical
					}
				}
				owner = {
					OR = {
						has_law = law_type:law_national_guard
						has_law = law_type:law_secret_police
					}
				}
			}
			add = {
				value = 6
				desc = from_bad_home_affairs
			}
		}
		if = { # general anti-slavery
			limit = {
				owner = {
					OR = {
						has_law = law_type:law_legacy_slavery
						has_law = law_type:law_slave_trade
					}
				}
				OR = {
					has_ideology = ideology_anti_slavery
					leader = {
						has_ideology = ideology_abolitionist
					}
				}
			}
			add = {
				value = 3
				desc = "from_slavery"
			}
		}
		if = { # anti-serfdom
			limit = {
				owner = {
					has_law = law_type:law_serfdom
				}
				OR = {
					has_ideology = ideology_egalitarian
					has_ideology = ideology_anti_slavery
					has_ideology = ideology_laissez_faire
					has_ideology = ideology_particularist
					leader = {
						has_ideology = ideology_abolitionist
						has_ideology = ideology_social_democrat
						has_ideology = ideology_communist
					}
				}
			}
			add = {
				value = 3
				desc = "from_serfdom"
			}
		}
		if = {
            limit = {
                scope:number = 1
                is_powerful = no
                is_marginal = no
            }
            multiply = {
                value = 2
                desc = "from_influential_supporting_member"
            }
        }
        else_if = {
            limit = {
                scope:number = 2
            }
            multiply = {
                value = 0.5
                desc = "from_two_prior_members"
            }
        }
        else_if = {
            limit = {
                scope:number = 3
            }
            multiply = {
                value = 0.25
                desc = "from_three_prior_members"
            }
        }
        else_if = {
            limit = {
                scope:number > 3
            }
            multiply = {
                value = 0.1
                desc = "from_more_than_three_prior_members"
            }
        }
	}
}
