fascism_on_the_rise = {

	prepare_for_fascism_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			fascism > 0.1
			num_of_controlled_states > 1
		}

		visible = {
			NOT = { has_country_flag = preparation_for_fascism_civil_war }
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_country_flag = preparation_for_fascism_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	expand_civil_fascism_support = {

		icon = generic_civil_support

		visible = {
			OR = {
				has_country_flag = preparation_for_fascism_civil_war
				has_country_flag = open_up_political_discourse_fascism
			}
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			fascism_drift = 0.02
			stability_weekly = -0.03
 			political_power_gain = -0.2
		}

		days_remove = 30

		cost = 25

		ai_will_do = {
			factor = 1
		}
	}

	army_support_for_fascism_civil_war = {

		icon = generic_army_support

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			command_power_gain = -0.2
		}

		days_remove = 30

		cost = 50

		complete_effect = {
		}

		remove_effect = {
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = less_than }
				}
				set_variable = { var = army_support_var value = 0.1 } 
			}
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = greater_than_or_equals }
				}
				add_to_variable = { var = army_support_var value = 0.1 } 
			}
			set_country_flag = military_support_for_fascism_civil_war
			custom_effect_tooltip = army_support_TT
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_general_loyalty_for_fascism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_fascism_civil_war
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
			any_army_leader = {
				is_field_marshal = no
				NOT = { has_trait = hidden_sympathies }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.1 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_marshal_loyalty_for_fascism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_fascism_civil_war
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
			any_army_leader = {
				NOT = { has_trait = hidden_sympathies }
			}
			any_army_leader = {
				is_field_marshal = yes
				NOT = { has_unit_leader_flag = hidden_sympathies_marshal }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.2 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	siphon_equipment_stockpiles_for_fascism_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			has_country_flag = military_support_for_fascism_civil_war
			has_equipment = { infantry_equipment > 1000 }
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			has_country_flag = military_support_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
		}

		fire_only_once = no

		cost = 50

		complete_effect = {
			add_command_power = -2
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
			set_country_flag = siphoned_equipment_stockpiles_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	formulate_surprise_attack_plan_for_fascism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_fascism_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_command_power = -2
			custom_effect_tooltip = formulate_surprise_attack_plan_for_civil_war_tt
			set_country_flag = formulated_surprise_attack_plan_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_fascism_civil_war_single_state = {

		icon = generic_ignite_civil_war

		name = ignite_the_fascism_civil_war

		available = {
			has_stability < 0.5
			fascism > 0.50
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
			check_variable = { num_owned_states = 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_politics = { ruling_party = fascism elections_allowed = no }
			clr_country_flag = preparation_for_fascism_civil_war
			clr_country_flag = military_support_for_fascism_civil_war
			clr_country_flag = civil_support_for_fascism_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_fascism_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			has_stability < 0.5
		}

		visible = {
			has_country_flag = preparation_for_fascism_civil_war
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_government = fascism }
			check_variable = { num_owned_states > 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			if = {
				limit = {
					has_government = absolutist
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@absolutist
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@communism
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@democratic
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@neutrality
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@radical
				}
			}
			subtract_from_variable = {
				var = civil_war_size_var
				value = army_support_var
			}
			if = {
				limit = {
					check_variable = {
						var = civil_war_size_var
						value = 0.3
						compare = less_than
					}
				}
				set_variable = {
					var = civil_war_size_var
					value = 0.3
				}
			}
			start_civil_war = {
				ruling_party = fascism
				ideology = ROOT
				size = civil_war_size_var
				keep_unit_leaders_trigger = {
					has_trait = hidden_sympathies
				}
			}
			clr_country_flag = preparation_for_fascism_civil_war
			clr_country_flag = military_support_for_fascism_civil_war
			clr_country_flag = civil_support_for_fascism_civil_war
			set_country_flag = ideology_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	rebuild_the_nation_fascism = {

		icon = generic_construction

		visible = {
			has_government = fascism
			has_country_flag = won_ideology_civil_war
		}

		fire_only_once = yes

		modifier = {
			political_power_gain = -1
			industry_repair_factor = 0.20
			production_speed_industrial_complex_factor = 0.1
			production_speed_infrastructure_factor = 0.1
			industrial_capacity_factory = 0.1
			industrial_capacity_dockyard = 0.1
		}

		days_remove = 365

		cost = 25

		ai_will_do = {
			factor = 200
		}
	}

	open_up_political_discourse_fascism = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.9
			communism < 0.9
			democratic < 0.9
			fascism < 0.9
			neutrality < 0.9
			radical < 0.9
		}

		visible = {
			OR = {
				has_idea_with_trait = fascism_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
			NOT = { has_country_flag = open_up_political_discourse_fascism }
			NOT = { has_government = fascism }
		}

		remove_trigger = {
			has_government = fascism
		}

		fire_only_once = yes

		cost = 75

		complete_effect = {
			set_country_flag = open_up_political_discourse_fascism
		}

		ai_will_do = {
			factor = 1
		}
	}

	discredit_government_fascism = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.8
			communism < 0.8
			democratic < 0.8
			fascism < 0.8
			neutrality < 0.8
			radical < 0.8
			OR = {
				has_idea_with_trait = fascist_demagogue
				has_idea_with_trait = syncretic_revanchist
			}
		}

		visible = {
			has_country_flag = open_up_political_discourse_fascism
			NOT = { has_government = fascism }
		}

		remove_trigger = {
			has_government = fascism
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_stability = -0.010
			if = {
				limit = {
					has_government = absolutist
				}
				add_popularity = {
					ideology = absolutist
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				add_popularity = {
					ideology = communism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				add_popularity = {
					ideology = democratic
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_popularity = {
					ideology = neutrality
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				add_popularity = {
					ideology = radical
					popularity = -0.1
				}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	hold_the_fascism_national_referendum = {

		icon = generic_political_discourse

		available = {
			fascism > 0.5
		}

		visible = {
			NOT = { has_government = fascism }
			OR = {
				fascism > 0.6
				has_country_flag = open_up_political_discourse_fascism
			}
		}

		remove_trigger = {
			has_government = fascism
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			country_event = { id = conv.political.19 }
		}

		ai_will_do = {
			factor = 210
			modifier = {
				fascism > 0.6
				factor = 10
			}
		}
	}
}

political_actions = {

	anti_fascism_raids = {

		icon = generic_civil_support

		available = {
			fascism > 0.1
		}

		visible = {
			NOT = { has_government = fascism }
		}

		modifier = {
			fascism_drift = -0.05
			stability_weekly = 0.007
		}

		days_remove = 120

		cost = 50

		complete_effect = {
			add_stability = -0.1
		}

		remove_effect = {
		}

		ai_will_do = {
			base = 0
		}
	}

	ban_fascism_party = {

		icon = generic_civil_support

		available = {
			fascism < 0.2
		}

		visible = {
			NOT = { has_government = fascism }
			fascism > 0
		}

		remove_trigger = {
			hidden_trigger = {
				has_government = fascism
			}
		}

		modifier = {
			fascism_drift = -0.02
		}

		days_remove = -1

		cost = 100

		complete_effect = {
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@fascism
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = fascism
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}				
			}
			custom_effect_tooltip = ban_fascism_party_tt
			add_stability = ban_ideology_var
		}

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_fascism_state = {

		icon = generic_political_discourse

		visible = {
			has_government = fascism
		}

		modifier = {
			absolutist_drift = -0.01
			communism_drift = -0.01
			democratic_drift = -0.01
			fascism_drift = 0.03
			neutrality_drift = -0.01
			radical_drift = -0.01
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}

	anti_democratic_raids = {

		icon = generic_civil_support

		available = {
			democratic > 0.1
		}

		visible = {
			NOT = { has_government = democratic }
		}

		modifier = {
			democratic_drift = -0.05
			stability_weekly = 0.007
		}

		days_remove = 120

		cost = 50

		complete_effect = {
			add_stability = -0.1
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 0
		}
	}

	ban_democratic_party = {

		icon = generic_civil_support

		available = {
			democratic < 0.2
		}

		visible = {
			NOT = { has_government = democratic }
			democratic > 0
		}

		remove_trigger = {
			hidden_trigger = {
				has_government = democratic
			}
		}

		modifier = {
			democratic_drift = -0.02
		}

		days_remove = -1

		cost = 100

		complete_effect = {
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@democratic
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = democratic
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}				
			}
			custom_effect_tooltip = ban_democratic_party_tt
			add_stability = ban_ideology_var
		}

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_democratic_state = {

		icon = generic_political_discourse

		visible = {
			has_government = democratic
		}

		modifier = {
			absolutist_drift = -0.01
			communism_drift = -0.01
			democratic_drift = 0.03
			fascism_drift = -0.01
			neutrality_drift = -0.01
			radical_drift = -0.01
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}

	anti_communism_raids = {

		icon = generic_civil_support

		available = {
			communism > 0.1
		}

		visible = {
			NOT = { has_government = communism }
		}

		modifier = {
			communism_drift = -0.05
			stability_weekly = 0.007
		}

		days_remove = 120

		cost = 50

		complete_effect = {
			add_stability = -0.1
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 0
		}
	}

	ban_communism_party = {

		icon = generic_civil_support

		available = {
			communism < 0.2
		}

		visible = {
			NOT = { has_government = communism }
			communism > 0
		}

		remove_trigger = {
			hidden_trigger = {
				has_government = communism
			}
		}

		modifier = {
			communism_drift = -0.02
		}

		days_remove = -1

		cost = 100

		complete_effect = {
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@communism
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = communism
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}				
			}
			custom_effect_tooltip = ban_communism_party_tt
			add_stability = ban_ideology_var
		}

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_communism_state = {

		icon = generic_political_discourse

		visible = {
			has_government = communism
		}

		modifier = {
			absolutist_drift = -0.01
			communism_drift = 0.03
			democratic_drift = -0.01
			fascism_drift = -0.01
			neutrality_drift = -0.01
			radical_drift = -0.01
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_neutrality_state = {

		icon = generic_political_discourse

		visible = {
			has_government = neutrality
		}

		modifier = {
			absolutist_drift = -0.01
			communism_drift = -0.01
			democratic_drift = -0.01
			fascism_drift = -0.01
			neutrality_drift = 0.03
			radical_drift = -0.01
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}

	anti_absolutist_raids = {

		icon = generic_civil_support

		available = {
			absolutist > 0.1
		}

		visible = {
			NOT = { has_government = absolutist }
		}

		modifier = {
			absolutist_drift = -0.05
			stability_weekly = 0.007
		}

		days_remove = 120

		cost = 50

		complete_effect = {
			add_stability = -0.1
		}

		remove_effect = {
		}

		ai_will_do = {
			base = 0
		}
	}

	ban_absolutist_party = {

		icon = generic_civil_support

		available = {
			absolutist < 0.2
		}

		visible = {
			NOT = { has_government = absolutist }
			absolutist > 0
		}

		remove_trigger = {
			hidden_trigger = {
				has_government = absolutist
			}
		}

		modifier = {
			absolutist_drift = -0.02
		}

		days_remove = -1

		cost = 100

		complete_effect = {
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@absolutist
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = absolutist
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}				
			}
			custom_effect_tooltip = ban_absolutist_party_tt
			add_stability = ban_ideology_var
		}

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_absolutist_state = {

		icon = generic_political_discourse

		visible = {
			has_government = absolutist
		}

		modifier = {
			absolutist_drift = 0.03
			communism_drift = -0.01
			democratic_drift = -0.01
			fascism_drift = -0.01
			neutrality_drift = -0.01
			radical_drift = -0.01
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}

	anti_radical_raids = {

		icon = generic_civil_support

		available = {
			radical > 0.1
		}

		visible = {
			NOT = { has_government = radical }
		}

		modifier = {
			radical_drift = -0.05
			stability_weekly = 0.007
		}

		days_remove = 120

		cost = 50

		complete_effect = {
			add_stability = -0.1
		}

		remove_effect = {
		}

		ai_will_do = {
			base = 0
		}
	}

	ban_radical_party = {

		icon = generic_civil_support

		available = {
			radical < 0.2
		}

		visible = {
			NOT = { has_government = radical }
			radical > 0
		}

		remove_trigger = {
			hidden_trigger = {
				has_government = radical
			}
		}

		modifier = {
			radical_drift = -0.02
		}

		days_remove = -1

		cost = 100

		complete_effect = {
			hidden_effect = {
				set_temp_variable = {
					var = ban_ideology_var
					value = party_popularity@radical
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = -1
				}
				add_popularity = {
					ideology = radical
					popularity = ban_ideology_var
				}
				multiply_temp_variable = {
					var = ban_ideology_var
					value = 0.66
				}				
			}
			custom_effect_tooltip = ban_radical_party_tt
			add_stability = ban_ideology_var
		}

		ai_will_do = {
			factor = 0
		}
	}

	institute_press_censorship_radical_state = {

		icon = generic_political_discourse

		visible = {
			has_government = radical
		}

		modifier = {
			absolutist_drift = -0.01
			communism_drift = -0.01
			democratic_drift = -0.01
			fascism_drift = -0.01
			neutrality_drift = -0.01
			radical_drift = 0.03
		}

		days_remove = 360

		cost = 150

		ai_will_do = {
			factor = 0
		}
	}
}

democratic_on_the_rise = {

	prepare_for_democratic_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			democratic > 0.1
			num_of_controlled_states > 1
		}

		visible = {
			NOT = { has_country_flag = preparation_for_democratic_civil_war }
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_country_flag = preparation_for_democratic_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	expand_civil_democratic_support = {

		icon = generic_civil_support

		visible = {
			OR = {
				has_country_flag = preparation_for_democratic_civil_war
				has_country_flag = open_up_political_discourse_democratic
			}
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			democratic_drift = 0.02
			stability_weekly = -0.03
 			political_power_gain = -0.2
		}

		days_remove = 30

		cost = 25

		ai_will_do = {
			factor = 1
		}
	}

	army_support_for_democratic_civil_war = {

		icon = generic_army_support

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			command_power_gain = -0.2
		}

		days_remove = 30

		cost = 50

		complete_effect = {
		}

		remove_effect = {
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = less_than }
				}
				set_variable = { var = army_support_var value = 0.1 } 
			}
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = greater_than_or_equals }
				}
				add_to_variable = { var = army_support_var value = 0.1 } 
			}
			set_country_flag = military_support_for_democratic_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_general_loyalty_for_democratic_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_democratic_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
			any_army_leader = {
				is_field_marshal = no
				NOT = { has_trait = hidden_sympathies }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.1 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_marshal_loyalty_for_democratic_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_democratic_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
			any_army_leader = {
				NOT = { has_trait = hidden_sympathies }
			}
			any_army_leader = {
				is_field_marshal = yes
				NOT = { has_unit_leader_flag = hidden_sympathies_marshal }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.2 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	siphon_equipment_stockpiles_for_democratic_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			has_country_flag = military_support_for_democratic_civil_war
			has_equipment = { infantry_equipment > 1000 }
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			has_country_flag = military_support_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		fire_only_once = no

		cost = 50

		complete_effect = {
			add_command_power = -2
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
			set_country_flag = siphoned_equipment_stockpiles_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	formulate_surprise_attack_plan_for_democratic_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_democratic_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_command_power = -2
			custom_effect_tooltip = formulate_surprise_attack_plan_for_civil_war_tt
			set_country_flag = formulated_surprise_attack_plan_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_democratic_civil_war_single_state = {

		icon = generic_ignite_civil_war

		name = ignite_the_democratic_civil_war

		available = {
			has_stability < 0.5
			democratic > 0.50
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
			check_variable = { num_owned_states = 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_politics = { ruling_party = democratic elections_allowed = yes }
			clr_country_flag = preparation_for_democratic_civil_war
			clr_country_flag = military_support_for_democratic_civil_war
			clr_country_flag = civil_support_for_democratic_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_democratic_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			has_stability < 0.5
		}

		visible = {
			has_country_flag = preparation_for_democratic_civil_war
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
			check_variable = { num_owned_states > 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			if = {
				limit = {
					has_government = absolutist
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@absolutist
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@communism
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@fascism
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@neutrality
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@radical
				}
			}
			subtract_from_variable = {
				var = civil_war_size_var
				value = army_support_var
			}
			if = {
				limit = {
					check_variable = {
						var = civil_war_size_var
						value = 0.3
						compare = less_than
					}
				}
				set_variable = {
					var = civil_war_size_var
					value = 0.3
				}
			}
			start_civil_war = {
				ruling_party = democratic
				ideology = ROOT
				size = civil_war_size_var
				keep_unit_leaders_trigger = {
					has_trait = hidden_sympathies
				}
			}
			clr_country_flag = preparation_for_democratic_civil_war
			clr_country_flag = military_support_for_democratic_civil_war
			clr_country_flag = civil_support_for_democratic_civil_war
			set_country_flag = ideology_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	rebuild_the_nation_democratic = {

		icon = generic_construction

		visible = {
			has_government = democratic
			has_country_flag = won_ideology_civil_war
		}

		fire_only_once = yes

		modifier = {
			political_power_gain = -1
			industry_repair_factor = 0.20
			production_speed_industrial_complex_factor = 0.1
			production_speed_infrastructure_factor = 0.1
			industrial_capacity_factory = 0.1
			industrial_capacity_dockyard = 0.1
		}

		days_remove = 365

		cost = 25

		ai_will_do = {
			factor = 200
		}
	}

	open_up_political_discourse_democratic = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.9
			communism < 0.9
			democratic < 0.9
			fascism < 0.9
			neutrality < 0.9
			radical < 0.9
		}

		visible = {
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
			NOT = { has_government = democratic }
		}

		remove_trigger = {
			has_government = democratic
		}

		fire_only_once = yes

		cost = 75

		complete_effect = {
			set_country_flag = open_up_political_discourse_democratic
		}

		ai_will_do = {
			factor = 1
		}
	}

	discredit_government_democratic = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.8
			communism < 0.8
			democratic < 0.8
			fascism < 0.8
			neutrality < 0.8
			radical < 0.8
			OR = {
				has_idea_with_trait = democratic_reformer
				has_idea_with_trait = social_reformer
			}
		}

		visible = {
			has_country_flag = open_up_political_discourse_democratic
			NOT = { has_government = democratic }
		}

		remove_trigger = {
			has_government = democratic
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_stability = -0.010
			if = {
				limit = {
					has_government = absolutist
				}
				add_popularity = {
					ideology = absolutist
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				add_popularity = {
					ideology = communism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				add_popularity = {
					ideology = fascism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_popularity = {
					ideology = neutrality
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				add_popularity = {
					ideology = radical
					popularity = -0.1
				}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	hold_the_democratic_national_referendum = {

		icon = generic_political_discourse

		available = {
			democratic > 0.5
		}

		visible = {
			NOT = { has_government = democratic }
			OR = {
				democratic > 0.6
				has_country_flag = open_up_political_discourse_democratic
			}
		}

		remove_trigger = {
			has_government = democratic
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			country_event = { id = conv.political.18 }
		}

		ai_will_do = {
			factor = 210
			modifier = {
				democratic > 0.6
				factor = 10
			}
		}
	}
}

communism_on_the_rise = {

	prepare_for_communism_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			communism > 0.1
			num_of_controlled_states > 1
		}

		visible = {
			NOT = { has_country_flag = preparation_for_communism_civil_war }
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_country_flag = preparation_for_communism_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	expand_civil_communism_support = {

		icon = generic_civil_support

		visible = {
			OR = {
				has_country_flag = preparation_for_communism_civil_war
				has_country_flag = open_up_political_discourse_communism
			}
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			communism_drift = 0.02
			stability_weekly = -0.03
 			political_power_gain = -0.2
		}

		days_remove = 30

		cost = 25

		ai_will_do = {
			factor = 1
		}
	}

	army_support_for_communism_civil_war = {

		icon = generic_army_support

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			command_power_gain = -0.2
		}

		days_remove = 30

		cost = 50

		complete_effect = {
		}

		remove_effect = {
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = less_than }
				}
				set_variable = { var = army_support_var value = 0.1 } 
			}
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = greater_than_or_equals }
				}
				add_to_variable = { var = army_support_var value = 0.1 } 
			}
			set_country_flag = military_support_for_communism_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_general_loyalty_for_communism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_communism_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
			any_army_leader = {
				is_field_marshal = no
				NOT = { has_trait = hidden_sympathies }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.1 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_marshal_loyalty_for_communism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_communism_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
			any_army_leader = {
				NOT = { has_trait = hidden_sympathies }
			}
			any_army_leader = {
				is_field_marshal = yes
				NOT = { has_unit_leader_flag = hidden_sympathies_marshal }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.2 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	siphon_equipment_stockpiles_for_communism_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			has_country_flag = military_support_for_communism_civil_war
			has_equipment = { infantry_equipment > 1000 }
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			has_country_flag = military_support_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		fire_only_once = no

		cost = 50

		complete_effect = {
			add_command_power = -2
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
			set_country_flag = siphoned_equipment_stockpiles_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	formulate_surprise_attack_plan_for_communism_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_communism_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_command_power = -2
			custom_effect_tooltip = formulate_surprise_attack_plan_for_civil_war_tt
			set_country_flag = formulated_surprise_attack_plan_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_communism_civil_war_single_state = {

		icon = generic_ignite_civil_war

		name = ignite_the_communism_civil_war

		available = {
			has_stability < 0.5
			communism > 0.50
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
			check_variable = { num_owned_states = 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_politics = { ruling_party = communism elections_allowed = no }
			clr_country_flag = preparation_for_communism_civil_war
			clr_country_flag = military_support_for_communism_civil_war
			clr_country_flag = civil_support_for_communism_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_communism_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			has_stability < 0.5
		}

		visible = {
			has_country_flag = preparation_for_communism_civil_war
			OR = {
				has_idea_with_trait = communism_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
			check_variable = { num_owned_states > 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			if = {
				limit = {
					has_government = absolutist
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@absolutist
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@democratic
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@fascism
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@neutrality
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@radical
				}
			}
			subtract_from_variable = {
				var = civil_war_size_var
				value = army_support_var
			}
			if = {
				limit = {
					check_variable = {
						var = civil_war_size_var
						value = 0.3
						compare = less_than
					}
				}
				set_variable = {
					var = civil_war_size_var
					value = 0.3
				}
			}
			start_civil_war = {
				ruling_party = communism
				ideology = ROOT
				size = civil_war_size_var
				keep_unit_leaders_trigger = {
					has_trait = hidden_sympathies
				}
			}
			clr_country_flag = preparation_for_communism_civil_war
			clr_country_flag = military_support_for_communism_civil_war
			clr_country_flag = civil_support_for_communism_civil_war
			set_country_flag = ideology_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	rebuild_the_nation_communism = {

		icon = generic_construction

		visible = {
			has_government = communism
			has_country_flag = won_ideology_civil_war
		}

		fire_only_once = yes

		modifier = {
			political_power_gain = -1
			industry_repair_factor = 0.20
			production_speed_industrial_complex_factor = 0.1
			production_speed_infrastructure_factor = 0.1
			industrial_capacity_factory = 0.1
			industrial_capacity_dockyard = 0.1
		}

		days_remove = 365

		cost = 25

		ai_will_do = {
			factor = 200
		}
	}

	open_up_political_discourse_communism = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.9
			communism < 0.9
			democratic < 0.9
			fascism < 0.9
			neutrality < 0.9
			radical < 0.9
		}

		visible = {
			OR = {
				has_idea_with_trait = communist_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
			NOT = { has_government = communism }
		}

		remove_trigger = {
			has_government = communism
		}

		fire_only_once = yes

		cost = 75

		complete_effect = {
			set_country_flag = open_up_political_discourse_communism
		}

		ai_will_do = {
			factor = 1
		}
	}

	discredit_government_communism = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.8
			communism < 0.8
			democratic < 0.8
			fascism < 0.8
			neutrality < 0.8
			radical < 0.8
			OR = {
				has_idea_with_trait = communist_revolutionary
				has_idea_with_trait = ambitious_union_boss
			}
		}

		visible = {
			has_country_flag = open_up_political_discourse_communism
			NOT = { has_government = communism }
		}

		remove_trigger = {
			has_government = communism
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_stability = -0.010
			if = {
				limit = {
					has_government = absolutist
				}
				add_popularity = {
					ideology = absolutist
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				add_popularity = {
					ideology = democratic
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				add_popularity = {
					ideology = fascism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_popularity = {
					ideology = neutrality
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				add_popularity = {
					ideology = radical
					popularity = -0.1
				}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	hold_the_communism_national_referendum = {

		icon = generic_political_discourse

		available = {
			communism > 0.5
		}

		visible = {
			NOT = { has_government = communism }
			OR = {
				communism > 0.6
				has_country_flag = open_up_political_discourse_communism
			}
		}

		remove_trigger = {
			has_government = communism
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			country_event = { id = conv.political.17 }
		}

		ai_will_do = {
			factor = 210
			modifier = {
				communism > 0.6
				factor = 10
			}
		}
	}
}

absolutist_on_the_rise = {

	prepare_for_absolutist_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			absolutist > 0.1
		}

		visible = {
			NOT = { has_country_flag = preparation_for_absolutist_civil_war }
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_country_flag = preparation_for_absolutist_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	expand_civil_absolutist_support = {

		icon = generic_civil_support

		visible = {
			OR = {
				has_country_flag = preparation_for_absolutist_civil_war
				has_country_flag = open_up_political_discourse_absolutist
			}
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			absolutist_drift = 0.02
			stability_weekly = -0.03
 			political_power_gain = -0.2
		}

		days_remove = 30

		cost = 25

		ai_will_do = {
			factor = 1
		}
	}

	army_support_for_absolutist_civil_war = {

		icon = generic_army_support

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			command_power_gain = -0.2
		}

		days_remove = 30

		cost = 50

		complete_effect = {
		}

		remove_effect = {
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = less_than }
				}
				set_variable = { var = army_support_var value = 0.1 } 
			}
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = greater_than_or_equals }
				}
				add_to_variable = { var = army_support_var value = 0.1 } 
			}
			set_country_flag = military_support_for_absolutist_civil_war
			custom_effect_tooltip = army_support_TT
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_general_loyalty_for_absolutist_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_absolutist_civil_war
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
			any_army_leader = {
				is_field_marshal = no
				NOT = { has_trait = hidden_sympathies }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.1 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_marshal_loyalty_for_absolutist_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_absolutist_civil_war
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
			any_army_leader = {
				NOT = { has_trait = hidden_sympathies }
			}
			any_army_leader = {
				is_field_marshal = yes
				NOT = { has_unit_leader_flag = hidden_sympathies_marshal }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.2 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	siphon_equipment_stockpiles_for_absolutist_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			has_country_flag = military_support_for_absolutist_civil_war
			has_equipment = { infantry_equipment > 1000 }
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_country_flag = military_support_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
		}

		fire_only_once = no

		cost = 50

		complete_effect = {
			add_command_power = -2
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
			set_country_flag = siphoned_equipment_stockpiles_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	formulate_surprise_attack_plan_for_absolutist_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_absolutist_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_command_power = -2
			custom_effect_tooltip = formulate_surprise_attack_plan_for_civil_war_tt
			set_country_flag = formulated_surprise_attack_plan_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_absolutist_civil_war_single_state = {

		icon = generic_ignite_civil_war

		name = ignite_the_absolutist_civil_war

		available = {
			has_stability < 0.5
			absolutist > 0.50
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
			check_variable = { num_owned_states = 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_politics = { ruling_party = absolutist elections_allowed = no }
			clr_country_flag = preparation_for_absolutist_civil_war
			clr_country_flag = military_support_for_absolutist_civil_war
			clr_country_flag = civil_support_for_absolutist_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_absolutist_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			has_stability < 0.5
		}

		visible = {
			has_country_flag = preparation_for_absolutist_civil_war
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_government = absolutist }
			check_variable = { num_owned_states > 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			if = {
				limit = {
					has_government = communism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@communism
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@democratic
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@fascism
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@neutrality
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@radical
				}
			}
			subtract_from_variable = {
				var = civil_war_size_var
				value = army_support_var
			}
			if = {
				limit = {
					check_variable = {
						var = civil_war_size_var
						value = 0.3
						compare = less_than
					}
				}
				set_variable = {
					var = civil_war_size_var
					value = 0.3
				}
			}
			start_civil_war = {
				ruling_party = absolutist
				ideology = ROOT
				size = civil_war_size_var
				keep_unit_leaders_trigger = {
					has_trait = hidden_sympathies
				}
			}
			clr_country_flag = preparation_for_absolutist_civil_war
			clr_country_flag = military_support_for_absolutist_civil_war
			clr_country_flag = civil_support_for_absolutist_civil_war
			set_country_flag = ideology_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	rebuild_the_nation_absolutist = {

		icon = generic_construction

		visible = {
			has_government = absolutist
			has_country_flag = won_ideology_civil_war
		}

		fire_only_once = yes

		modifier = {
			political_power_gain = -1
			industry_repair_factor = 0.20
			production_speed_industrial_complex_factor = 0.1
			production_speed_infrastructure_factor = 0.1
			industrial_capacity_factory = 0.1
			industrial_capacity_dockyard = 0.1
		}

		days_remove = 365

		cost = 25

		ai_will_do = {
			factor = 200
		}
	}

	open_up_political_discourse_absolutist = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.9
			communism < 0.9
			democratic < 0.9
			fascism < 0.9
			neutrality < 0.9
			radical < 0.9
		}

		visible = {
			has_idea_with_trait = absolutist_demagogue
			NOT = { has_country_flag = open_up_political_discourse_absolutist }
			NOT = { has_government = absolutist }
		}

		remove_trigger = {
			has_government = absolutist
		}

		fire_only_once = yes

		cost = 75

		complete_effect = {
			set_country_flag = open_up_political_discourse_absolutist
		}

		ai_will_do = {
			factor = 1
		}
	}

	discredit_government_absolutist = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.8
			communism < 0.8
			democratic < 0.8
			fascism < 0.8
			neutrality < 0.8
			radical < 0.8
			has_idea_with_trait = absolutist_minister
		}

		visible = {
			has_country_flag = open_up_political_discourse_absolutist
			NOT = { has_government = absolutist }
		}

		remove_trigger = {
			has_government = absolutist
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_stability = -0.010
			if = {
				limit = {
					has_government = communism
				}
				add_popularity = {
					ideology = communism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				add_popularity = {
					ideology = democratic
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				add_popularity = {
					ideology = fascism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_popularity = {
					ideology = neutrality
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = radical
				}
				add_popularity = {
					ideology = radical
					popularity = -0.1
				}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	hold_the_absolutist_national_referendum = {

		icon = generic_political_discourse

		available = {
			absolutist > 0.5
		}

		visible = {
			NOT = { has_government = absolutist }
			OR = {
				absolutist > 0.6
				has_country_flag = open_up_political_discourse_absolutist
			}
		}

		remove_trigger = {
			has_government = absolutist
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			country_event = { id = conv.political.16 }
		}

		ai_will_do = {
			factor = 210
			modifier = {
				absolutist > 0.6
				factor = 10
			}
		}
	}
}

radical_on_the_rise = {

	prepare_for_radical_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			radical > 0.1
		}

		visible = {
			NOT = { has_country_flag = preparation_for_radical_civil_war }
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_country_flag = preparation_for_radical_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	expand_civil_radical_support = {

		icon = generic_civil_support

		visible = {
			OR = {
				has_country_flag = preparation_for_radical_civil_war
				has_country_flag = open_up_political_discourse_radical
			}
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			radical_drift = 0.02
			stability_weekly = -0.03
 			political_power_gain = -0.2
		}

		days_remove = 30

		cost = 25

		ai_will_do = {
			factor = 1
		}
	}

	army_support_for_radical_civil_war = {

		icon = generic_army_support

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
		}

		cancel_trigger = {
			hidden_trigger = {
				has_civil_war = yes
			}
		}

		fire_only_once = no

		modifier = {
			command_power_gain = -0.2
		}

		days_remove = 30

		cost = 50

		complete_effect = {
		}

		remove_effect = {
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = less_than }
				}
				set_variable = { var = army_support_var value = 0.1 } 
			}
			if = {
				limit = {
					check_variable = { var = army_support_var value = 0.1 compare = greater_than_or_equals }
				}
				add_to_variable = { var = army_support_var value = 0.1 } 
			}
			set_country_flag = military_support_for_radical_civil_war
			custom_effect_tooltip = army_support_TT
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_general_loyalty_for_radical_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_radical_civil_war
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
			any_army_leader = {
				is_field_marshal = no
				NOT = { has_trait = hidden_sympathies }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.1 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	ensure_marshal_loyalty_for_radical_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_radical_civil_war
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
			any_army_leader = {
				NOT = { has_trait = hidden_sympathies }
			}
			any_army_leader = {
				is_field_marshal = yes
				NOT = { has_unit_leader_flag = hidden_sympathies_marshal }
			}
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			country_event = { id = decisions.2 }
		}

		ai_will_do = {
			factor = 0
		}
	}

	siphon_equipment_stockpiles_for_radical_civil_war = {

		icon = generic_prepare_civil_war

		available = {
			has_country_flag = military_support_for_radical_civil_war
			has_equipment = { infantry_equipment > 1000 }
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_country_flag = military_support_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
		}

		fire_only_once = no

		cost = 50

		complete_effect = {
			add_command_power = -2
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
			set_country_flag = siphoned_equipment_stockpiles_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	formulate_surprise_attack_plan_for_radical_civil_war = {

		icon = generic_army_support

		available = {
			has_country_flag = military_support_for_radical_civil_war
			command_power > 2
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_command_power = -2
			custom_effect_tooltip = formulate_surprise_attack_plan_for_civil_war_tt
			set_country_flag = formulated_surprise_attack_plan_for_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_radical_civil_war_single_state = {

		icon = generic_ignite_civil_war

		name = ignite_the_radical_civil_war

		available = {
			has_stability < 0.5
			radical > 0.50
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
			check_variable = { num_owned_states = 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			set_politics = { ruling_party = radical elections_allowed = no }
			clr_country_flag = preparation_for_radical_civil_war
			clr_country_flag = military_support_for_radical_civil_war
			clr_country_flag = civil_support_for_radical_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	ignite_the_radical_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			has_stability < 0.5
		}

		visible = {
			has_country_flag = preparation_for_radical_civil_war
			has_idea_with_trait = radical_demagogue
			NOT = { has_government = radical }
			check_variable = { num_owned_states > 1 }
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			if = {
				limit = {
					has_government = absolutist
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@absolutist
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@communism
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@democratic
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@fascism
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				set_variable = {
					var = civil_war_size_var
					value = party_popularity@neutrality
				}
			}
			subtract_from_variable = {
				var = civil_war_size_var
				value = army_support_var
			}
			if = {
				limit = {
					check_variable = {
						var = civil_war_size_var
						value = 0.3
						compare = less_than
					}
				}
				set_variable = {
					var = civil_war_size_var
					value = 0.3
				}
			}
			start_civil_war = {
				ruling_party = radical
				ideology = ROOT
				size = civil_war_size_var
				keep_unit_leaders_trigger = {
					has_trait = hidden_sympathies
				}
			}
			clr_country_flag = preparation_for_radical_civil_war
			clr_country_flag = military_support_for_radical_civil_war
			clr_country_flag = civil_support_for_radical_civil_war
			set_country_flag = ideology_civil_war
		}

		ai_will_do = {
			factor = 0
		}
	}

	rebuild_the_nation_radical = {

		icon = generic_construction

		visible = {
			has_government = radical
			has_country_flag = won_ideology_civil_war
		}

		fire_only_once = yes

		modifier = {
			political_power_gain = -1
			industry_repair_factor = 0.20
			production_speed_industrial_complex_factor = 0.1
			production_speed_infrastructure_factor = 0.1
			industrial_capacity_factory = 0.1
			industrial_capacity_dockyard = 0.1
		}

		days_remove = 365

		cost = 25

		ai_will_do = {
			factor = 200
		}
	}

	open_up_political_discourse_radical = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.9
			communism < 0.9
			democratic < 0.9
			fascism < 0.9
			neutrality < 0.9
			radical < 0.9
		}

		visible = {
			has_idea_with_trait = radical_demagogue
			NOT = { has_country_flag = open_up_political_discourse_radical }
			NOT = { has_government = radical }
		}

		remove_trigger = {
			has_government = radical
		}

		fire_only_once = yes

		cost = 75

		complete_effect = {
			set_country_flag = open_up_political_discourse_radical
		}

		ai_will_do = {
			factor = 1
		}
	}

	discredit_government_radical = {

		icon = generic_political_discourse

		available = {
			absolutist < 0.8
			communism < 0.8
			democratic < 0.8
			fascism < 0.8
			neutrality < 0.8
			radical < 0.8
			has_idea_with_trait = radical_minister
		}

		visible = {
			has_country_flag = open_up_political_discourse_radical
			NOT = { has_government = radical }
		}

		remove_trigger = {
			has_government = radical
		}

		fire_only_once = yes

		cost = 50

		complete_effect = {
			add_stability = -0.010
			if = {
				limit = {
					has_government = absolutist
				}
				add_popularity = {
					ideology = absolutist
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = communism
				}
				add_popularity = {
					ideology = communism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = democratic
				}
				add_popularity = {
					ideology = democratic
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = fascism
				}
				add_popularity = {
					ideology = fascism
					popularity = -0.1
				}
			}
			if = {
				limit = {
					has_government = neutrality
				}
				add_popularity = {
					ideology = neutrality
					popularity = -0.1
				}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	hold_the_radical_national_referendum = {

		icon = generic_political_discourse

		available = {
			radical > 0.5
		}

		visible = {
			NOT = { has_government = radical }
			OR = {
				radical > 0.6
				has_country_flag = open_up_political_discourse_radical
			}
		}

		remove_trigger = {
			has_government = radical
		}

		fire_only_once = yes

		cost = 100

		complete_effect = {
			country_event = { id = conv.political.20 }
		}

		ai_will_do = {
			factor = 210
			modifier = {
				radical > 0.6
				factor = 10
			}
		}
	}
}

