POL_set_coalition_relations_to_0 = {
	set_variable = { var = POL_relations_with_up value = 0 }
	set_variable = { var = POL_relations_with_PLD value = 0 }
	set_variable = { var = POL_relations_with_SD value = 0 }
	set_variable = { var = POL_relations_with_KPEiR value = 0 }
}

POL_upgrade_anarchy_nat_spir = {
	if = {
		limit = {
			NOT = {
				has_idea = POL_anarchist_ideals
				has_idea = POL_anarchist_ideals_2
				has_idea = POL_anarchist_ideals_3
				has_idea = POL_anarchist_ideals_4
			}
		}
		add_ideas = POL_anarchist_ideals
	}
	else_if = {
		limit = { has_idea = POL_anarchist_ideals }

		swap_ideas = {
			remove_idea = POL_anarchist_ideals
			add_idea = POL_anarchist_ideals_2
		}
	}
	else_if = {
		limit = { has_idea = POL_anarchist_ideals_2 }
		swap_ideas = {
			remove_idea = POL_anarchist_ideals_2
			add_idea = POL_anarchist_ideals_3
		}
	}
	else_if = {
		limit = { has_idea = POL_anarchist_ideals_3 }
		swap_ideas = {
			remove_idea = POL_anarchist_ideals_3
			add_idea = POL_anarchist_ideals_4
		}
	}
}

POL_set_up_pagan_stuff = {
	set_country_flag = POL_pagan_decisions_unlocked
	set_variable = { var = POL_paganisation_progress_var value = 0 }
	set_variable = { var = POL_stability_nazi_var value = 0 }
	set_variable = { var = POL_nazification_progress_var value = 0 }
	unlock_decision_category_tooltip = POL_the_battle_on_the_inside
	add_ideas = {
		POL_paganisation_progress_1
		POL_nazification_progress_1
		POL_political_stability_1
	}
}
POL_increase_paganisation_progress_10 = {
	add_to_variable = {
		var = POL_paganisation_progress_var
		value = 10
	}
	clamp_variable = { var = POL_paganisation_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_paganisation_progress_10_tt
}

POL_increase_paganisation_progress_15 = {
	add_to_variable = {
		var = POL_paganisation_progress_var
		value = 15
	}
	clamp_variable = { var = POL_paganisation_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_paganisation_progress_15_tt
}

POL_increase_paganisation_progress_20 = {
	add_to_variable = {
		var = POL_paganisation_progress_var
		value = 20
	}
	clamp_variable = { var = POL_paganisation_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_paganisation_progress_20_tt
}

POL_increase_political_stability_10 = {
	add_to_variable = {
		var = POL_stability_nazi_var
		value = 10
	}
	clamp_variable = { var = POL_stability_nazi_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_political_stability_10_tt
}

POL_increase_political_stability_15 = {
	add_to_variable = {
		var = POL_stability_nazi_var
		value = 15
	}
	clamp_variable = { var = POL_stability_nazi_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_political_stability_15_tt
}

POL_increase_political_stability_20 = {
	add_to_variable = {
		var = POL_stability_nazi_var
		value = 20
	}
	clamp_variable = { var = POL_stability_nazi_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_political_stability_20_tt
}

POL_increase_nazification_progress_10 = {
	add_to_variable = {
		var = POL_nazification_progress_var
		value = 10
	}
	clamp_variable = { var = POL_nazification_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_nazification_progress_10_tt
}

POL_increase_nazification_progress_15 = {
	add_to_variable = {
		var = POL_nazification_progress_var
		value = 15
	}
	clamp_variable = { var = POL_nazification_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_nazification_progress_15_tt
}

POL_increase_nazification_progress_20 = {
	add_to_variable = {
		var = POL_nazification_progress_var
		value = 20
	}
	clamp_variable = { var = POL_nazification_progress_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_nazification_progress_20_tt
}

POL_upgrade_paganisation_progress = {
	#set_variable = { var = POL_paganisation_progress_var value = 0 }
	if = {
		limit = { has_idea = POL_paganisation_progress_1 }
		swap_ideas = {
			remove_idea = POL_paganisation_progress_1
			add_idea = POL_paganisation_progress_2
		}
	}
	else_if = {
		limit = { has_idea = POL_paganisation_progress_2 }

		swap_ideas = {
			remove_idea = POL_paganisation_progress_2
			add_idea = POL_paganisation_progress_3
		}
	}
	else_if = {
		limit = { has_idea = POL_paganisation_progress_3 }
		swap_ideas = {
			remove_idea = POL_paganisation_progress_3
			add_idea = POL_paganisation_progress_4
		}
	}
	else_if = {
		limit = { has_idea = POL_paganisation_progress_4 }
		swap_ideas = {
			remove_idea = POL_paganisation_progress_4
			add_idea = POL_paganisation_progress_5
		}
	}
	else_if = {
		limit = { has_idea = POL_paganisation_progress_5 }
		swap_ideas = {
			remove_idea = POL_paganisation_progress_5
			add_idea = POL_paganisation_progress_6
		}
	}
	else_if = {
		limit = { has_idea = POL_paganisation_progress_6 }
		add_war_support = 0.05
	}
}

POL_upgrade_nazification_progress = {
	#set_variable = { var = POL_nazification_progress_var value = 0 }
	if = {
		limit = { has_idea = POL_nazification_progress_1 }
		swap_ideas = {
			remove_idea = POL_nazification_progress_1
			add_idea = POL_nazification_progress_2
		}
	}
	else_if = {
		limit = { has_idea = POL_nazification_progress_2 }

		swap_ideas = {
			remove_idea = POL_nazification_progress_2
			add_idea = POL_nazification_progress_3
		}
	}
	else_if = {
		limit = { has_idea = POL_nazification_progress_3 }
		swap_ideas = {
			remove_idea = POL_nazification_progress_3
			add_idea = POL_nazification_progress_4
		}
	}
	else_if = {
		limit = { has_idea = POL_nazification_progress_4 }
		swap_ideas = {
			remove_idea = POL_nazification_progress_4
			add_idea = POL_nazification_progress_5
		}
	}
	else_if = {
		limit = { has_idea = POL_nazification_progress_5 }
		swap_ideas = {
			remove_idea = POL_nazification_progress_5
			add_idea = POL_nazification_progress_6
		}
	}
	else_if = {
		limit = { has_idea = POL_nazification_progress_6 }
		add_political_power = 50
	}
}

POL_upgrade_political_stability = {
	# set_variable = { var = POL_stability_nazi_var = 0 }
	if = {
		limit = { has_idea = POL_political_stability_1 }
		swap_ideas = {
			remove_idea = POL_political_stability_1
			add_idea = POL_political_stability_2
		}
	}
	else_if = {
		limit = { has_idea = POL_political_stability_2 }

		swap_ideas = {
			remove_idea = POL_political_stability_2
			add_idea = POL_political_stability_3
		}
	}
	else_if = {
		limit = { has_idea = POL_political_stability_3 }
		swap_ideas = {
			remove_idea = POL_political_stability_3
			add_idea = POL_political_stability_4
		}
	}
	else_if = {
		limit = { has_idea = POL_political_stability_4 }
		swap_ideas = {
			remove_idea = POL_political_stability_4
			add_idea = POL_political_stability_5
		}
	}
	else_if = {
		limit = { has_idea = POL_political_stability_5 }
		swap_ideas = {
			remove_idea = POL_political_stability_5
			add_idea = POL_political_stability_6
		}
	}
	else_if = {
		limit = { has_idea = POL_political_stability_6 }
		add_stability = 0.05
	}
}

POL_set_up_natmao_stuff = {
	#set_variable = { var = POL_natmao_x_position value = 190 }
	set_variable = { var = POL_natmao_ideology_drift_vat value = 0 }
	POL = { country_event = Poland_Events_News.133 }
	custom_effect_tooltip = POL_unlock_national_maoist_decisions
}

POL_decrease_upr_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_UPR
		value = -1
	}
	clamp_variable = { var = POL_popularity_of_UPR min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_upr_popularity_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = 1 }
	set_country_flag = POL_dont_take_from_upr_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_upr_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_UPR
		value = 1
	}
	clamp_variable = { var = POL_popularity_of_UPR min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_upr_popularity_by_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -1 }
	set_country_flag = POL_dont_take_from_upr_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_upr_popularity_2 = {
	add_to_variable = {
		var = POL_popularity_of_UPR
		value = 2
	}
	clamp_variable = { var = POL_popularity_of_UPR min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_upr_popularity_by_2_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -2 }
	set_country_flag = POL_dont_take_from_upr_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_upr_popularity_3 = {
	add_to_variable = {
		var = POL_popularity_of_UPR
		value = 3
	}
	clamp_variable = { var = POL_popularity_of_UPR min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_upr_popularity_by_3_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -3 }
	set_country_flag = POL_dont_take_from_upr_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_upr_popularity_5 = {
	add_to_variable = {
		var = POL_popularity_of_UPR
		value = 5
	}
	clamp_variable = { var = POL_popularity_of_UPR min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_upr_popularity_by_5_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -5 }
	set_country_flag = POL_dont_take_from_upr_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_sld_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = 1
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_sld_popularity_by_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -1 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes
}

POL_decrease_sld_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = -1
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_sld_popularity_by_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = 1 }
	set_country_flag = POL_dont_take_from_sld_flag
	}

POL_decrease_sld_popularity_2 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = -2
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_sld_popularity_by_2_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = 2 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes #originally made for increasing but it can also work for increases
}

POL_decrease_sld_popularity_5 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = -5
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_sld_popularity_by_5_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = 5 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes #originally made for increasing but it can also work for increases
}

POL_increase_sld_popularity_2 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = 2
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_sld_popularity_by_2_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -2 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_sld_popularity_3 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = 3
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_sld_popularity_by_3_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -3 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_sld_popularity_5 = {
	add_to_variable = {
		var = POL_popularity_of_SLD
		value = 5
	}
	clamp_variable = { var = POL_popularity_of_SLD min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_sld_popularity_by_5_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -5 }
	set_country_flag = POL_dont_take_from_sld_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_pis_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_PiS
		value = 1
	}
	clamp_variable = { var = POL_popularity_of_PiS min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_pis_popularity_by_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -1 }
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_pis_popularity_2 = {
	add_to_variable = {
		var = POL_popularity_of_PiS
		value = 2
	}
	clamp_variable = { var = POL_popularity_of_PiS min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_pis_popularity_by_2_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -2 }
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_pis_popularity_3 = {
	add_to_variable = {
		var = POL_popularity_of_PiS
		value = 3
	}
	clamp_variable = { var = POL_popularity_of_PiS min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_pis_popularity_by_3_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -3 }
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_pis_popularity_5 = {
	add_to_variable = {
		var = POL_popularity_of_PiS
		value = 5
	}
	clamp_variable = { var = POL_popularity_of_PiS min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_pis_popularity_by_5_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -5 }
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_pis_popularity_10 = { #used to get popularity to level in which they started
	add_to_variable = {
		var = POL_popularity_of_PiS
		value = 10
	}
	clamp_variable = { var = POL_popularity_of_PiS min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_pis_popularity_by_10_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -10 }
	set_country_flag = POL_dont_take_from_po_flag
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_po_popularity_1 = {
	add_to_variable = {
		var = POL_popularity_of_PO
		value = 1
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_po_popularity_by_1_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -1 }
	set_country_flag = POL_dont_take_from_po_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_po_popularity_2 = {
	add_to_variable = {
		var = POL_popularity_of_PO
		value = 2
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_po_popularity_by_2_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -2 }
	set_country_flag = POL_dont_take_from_po_flag
	POL_roll_which_lose_popularity = yes
}

POL_decrease_po_popularity_3 = {
	add_to_variable = {
		var = POL_popularity_of_PO
		value = -3
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_po_popularity_by_3_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = 3 }
	set_country_flag = POL_dont_take_from_po_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_po_popularity_3 = {
	add_to_variable = {
		var = POL_popularity_of_PO
		value = 3
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_po_popularity_by_3_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -3 }
	set_country_flag = POL_dont_take_from_po_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_po_popularity_5 = {
	add_to_variable = {
		var = POL_popularity_of_PO
		value = 5
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_po_popularity_by_5_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -5 }
	set_country_flag = POL_dont_take_from_po_flag
	POL_roll_which_lose_popularity = yes
}

POL_increase_po_popularity_10 = { #used to get popularity to level in which they started
	add_to_variable = {
		var = POL_popularity_of_PO
		value = 10
	}
	clamp_variable = { var = POL_popularity_of_PO min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_po_popularity_by_10_tt
	set_variable = { var = POL_decrease_random_other_popularity_var value = -10 }
	set_country_flag = POL_dont_take_from_po_flag
	set_country_flag = POL_dont_take_from_pis_flag
	POL_roll_which_lose_popularity = yes
}

POL_random_party_selector = {
if = {
limit = { NOT = { has_country_flag = POL_po_active_flag } } #only need to add one cuz both PiS and PO are created at the same time
if = {
limit = { has_country_flag = POL_sld_supported_flag }
random_list = {
					40 = {
					POL_decrease_sld_popularity_2 = yes
					}
					10 = {
                    POL_decrease_sld_popularity_5 = yes
					}
					50 = {
                    POL_increase_upr_popularity_1 = yes
					}
				}
}
if = {
limit = { has_country_flag = POL_upr_supported_flag }
random_list = {
					40 = {
					POL_increase_sld_popularity_1 = yes
					}
					20 = {
                    POL_decrease_sld_popularity_2 = yes
					}
					40 = {
                    POL_decrease_upr_popularity_1 = yes
					}
				}
}
}
else = {
if = {
limit = { has_country_flag = POL_sld_supported_flag }
random_list = {
					25 = {
					POL_decrease_sld_popularity_1 = yes
					}
					25 = {
                    POL_increase_pis_popularity_2 = yes
					}
					25 = {
                    POL_increase_po_popularity_2 = yes
					}
					25 = {
                    POL_increase_upr_popularity_1 = yes
					}
				}
				}
				
else_if = {
limit = { has_country_flag = POL_upr_supported_flag  }
random_list = {
					25 = {
					POL_decrease_sld_popularity_1 = yes
					}
					25 = {
                    POL_increase_pis_popularity_1 = yes
					}
					25 = {
                    POL_increase_po_popularity_1 = yes
					}
					25 = {
                    POL_decrease_upr_popularity_1 = yes
					}
				}
				}
else_if = {
limit = { has_country_flag = POL_pis_supported_flag  }
random_list = {
					25 = {
					POL_decrease_sld_popularity_1 = yes
					}
					25 = {
                    
					}
					25 = {
                    POL_increase_po_popularity_1 = yes
					}
					25 = {
                    POL_decrease_upr_popularity_1 = yes
					}
				}
				}
				
else_if = {
limit = { has_country_flag = POL_po_supported_flag  }
random_list = {
					25 = {
					POL_decrease_sld_popularity_1 = yes
					}
					25 = {
                    POL_increase_pis_popularity_1 = yes
					}
					25 = {
                    
					}
					25 = {
                    POL_decrease_upr_popularity_1 = yes
					}
				}
				}
}
}

POL_roll_which_lose_popularity = {
	hidden_effect = {
		if = {
		limit = { NOT = { has_country_flag = POL_po_active_flag } } #don't take/add PiS or PO popularity
		random_list = {
			33 = {
				if = {
					limit = {
						OR = {
							has_country_flag = POL_dont_take_from_upr_flag
							check_variable = { POL_popularity_of_UPR < POL_decrease_random_other_popularity_var }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_upr_flag }
						}
						set_country_flag = POL_dont_take_from_upr_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity
					set_country_flag = POL_decrease_from_UPR_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_UPR_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			33 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_SLD < POL_decrease_random_other_popularity_var }
							has_country_flag = POL_dont_take_from_sld_flag
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_sld_flag }
						}
						set_country_flag = POL_dont_take_from_sld_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity
					set_country_flag = POL_decrease_from_SLD_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_SLD_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			34 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_other_parties < POL_decrease_random_other_popularity_var }
						}
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity or not created yet
					set_country_flag = POL_decrease_from_others_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_others_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
		}
		}
		else = {
		random_list = {
			20 = {
				if = {
					limit = {
						OR = {
							has_country_flag = POL_dont_take_from_upr_flag
							check_variable = { POL_popularity_of_UPR < POL_decrease_random_other_popularity_var }
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_upr_flag }
						}
						set_country_flag = POL_dont_take_from_upr_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity
					set_country_flag = POL_decrease_from_UPR_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_UPR_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			20 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_SLD < POL_decrease_random_other_popularity_var }
							has_country_flag = POL_dont_take_from_sld_flag
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_sld_flag }
						}
						set_country_flag = POL_dont_take_from_sld_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity
					set_country_flag = POL_decrease_from_SLD_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_SLD_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			20 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_PiS < POL_decrease_random_other_popularity_var }
							NOT = { has_country_flag = POL_pis_active_flag }
							has_country_flag = POL_dont_take_from_pis_flag
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_pis_flag }
						}
						set_country_flag = POL_dont_take_from_pis_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity or not created yet
					set_country_flag = POL_decrease_from_PiS_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_PiS_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			20 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_PO < POL_decrease_random_other_popularity_var }
							NOT = { has_country_flag = POL_po_active_flag }
							has_country_flag = POL_dont_take_from_po_flag
						}
					}
					if = {
						limit = {
							NOT = { has_country_flag = POL_dont_take_from_po_flag }
						}
						set_country_flag = POL_dont_take_from_po_flag
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity or not created yet
					set_country_flag = POL_decrease_from_PO_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_PO_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
			20 = {
				if = {
					limit = {
						OR = {
							check_variable = { POL_popularity_of_other_parties < POL_decrease_random_other_popularity_var }
						}
					}
					#POL_roll_which_lose_popularity = yes #roll once more if 0 popularity or not created yet
					set_country_flag = POL_decrease_from_others_flag
					POL_decrease_random_other_popularity_effect = yes
				}
				else = {
					set_country_flag = POL_decrease_from_others_flag
					POL_decrease_random_other_popularity_effect = yes
				}
			}
		}
	  }
	clr_country_flag = POL_dont_take_from_po_flag
	clr_country_flag = POL_dont_take_from_pis_flag
	clr_country_flag = POL_dont_take_from_sld_flag
	clr_country_flag = POL_dont_take_from_upr_flag
	}
}
POL_decrease_random_other_popularity_effect = {
	if = {
		limit = {
			has_country_flag = POL_decrease_from_others_flag
		}
		add_to_variable = {
			var = POL_popularity_of_other_parties
			value = POL_decrease_random_other_popularity_var
		}
		clr_country_flag = POL_decrease_from_others_flag
	}

	else_if = {
		limit = {
			has_country_flag = POL_decrease_from_PO_flag
		}
		add_to_variable = {
			var = POL_popularity_of_PO
			value = POL_decrease_random_other_popularity_var
		}
		clr_country_flag = POL_decrease_from_PO_flag
	}

	else_if = {
		limit = {
			has_country_flag = POL_decrease_from_SLD_flag
		}
		add_to_variable = {
			var = POL_popularity_of_SLD
			value = POL_decrease_random_other_popularity_var
		}
		clr_country_flag = POL_decrease_from_SLD_flag
	}

	else_if = {
		limit = {
			has_country_flag = POL_decrease_from_UPR_flag
		}
		add_to_variable = {
			var = POL_popularity_of_UPR
			value = POL_decrease_random_other_popularity_var
		}
		clr_country_flag = POL_decrease_from_UPR_flag
	}

	else_if = {
		limit = {
			has_country_flag = POL_decrease_from_PiS_flag
		}
		add_to_variable = {
			var = POL_popularity_of_PiS
			value = POL_decrease_random_other_popularity_var
		}
		clr_country_flag = POL_decrease_from_PiS_flag
	}
	set_variable = { var = POL_decrease_random_other_popularity_var value = 0 }
}

POL_increase_unity_and_obidience_by_2 = {
	add_to_variable = {
		var = POL_unity_and_obidience_var
		value = 2
	}
	clamp_variable = { var = POL_unity_and_obidience_var min = 0 max = 100 }
	custom_effect_tooltip = POL_unity_and_obidience_by_2_tt
	POL_update_church_variables = yes
}

POL_increase_unity_and_obidience_by_5 = {
	add_to_variable = {
		var = POL_unity_and_obidience_var
		value = 5
	}
	clamp_variable = { var = POL_unity_and_obidience_var min = 0 max = 100 }
	custom_effect_tooltip = POL_unity_and_obidience_by_5_tt
	POL_update_church_variables = yes
}

POL_increase_unity_and_obidience_by_10 = {
	add_to_variable = {
		var = POL_unity_and_obidience_var
		value = 10
	}
	clamp_variable = { var = POL_unity_and_obidience_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_by_5_tt
	POL_update_church_variables = yes
}

POL_decrease_unity_and_obidience_by_5 = {
	add_to_variable = {
		var = POL_unity_and_obidience_var
		value = -5
	}
	clamp_variable = { var = POL_unity_and_obidience_var min = 0 max = 100 }
	custom_effect_tooltip = POL_unity_and_obidience_decrease_by_5_tt
	POL_update_church_variables = yes
}

POL_increase_church_strenght_by_2 = {
	add_to_variable = {
		var = POL_church_strenght_var
		value = 2
	}
	clamp_variable = { var = POL_church_strenght_var min = 0 max = 100 }
	custom_effect_tooltip = POL_church_strenghtour_by_2_tt
	POL_update_church_variables = yes
}

POL_increase_church_strenght_by_5 = {
	add_to_variable = {
		var = POL_church_strenght_var
		value = 5
	}
	clamp_variable = { var = POL_church_strenght_var min = 0 max = 100 }
	custom_effect_tooltip = POL_church_strenght_by_5_tt
	POL_update_church_variables = yes
}

POL_increase_church_strenght_by_10 = {
	add_to_variable = {
		var = POL_church_strenght_var
		value = 10
	}
	clamp_variable = { var = POL_cchurch_strenght_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_by_5_tt
	POL_update_church_variables = yes
}

POL_decrease_church_strenght_by_5 = {
	add_to_variable = {
		var = POL_church_strenght_var
		value = -5
	}
	clamp_variable = { var = POL_church_strenght_var min = 0 max = 100 }
	custom_effect_tooltip = POL_church_strenght_decrease_by_5_tt
	POL_update_church_variables = yes
}

POL_increase_religius_fevour_by_2 = {
	add_to_variable = {
		var = POL_religius_fevour_var
		value = 2
	}
	clamp_variable = { var = POL_religius_fevour_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_by_2_tt
	POL_update_church_variables = yes
}

POL_increase_religius_fevour_by_5 = {
	add_to_variable = {
		var = POL_religius_fevour_var
		value = 5
	}
	clamp_variable = { var = POL_religius_fevour_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_by_5_tt
	POL_update_church_variables = yes
}

POL_increase_religius_fevour_by_10 = {
	add_to_variable = {
		var = POL_religius_fevour_var
		value = 10
	}
	clamp_variable = { var = POL_religius_fevour_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_by_5_tt
	POL_update_church_variables = yes
}

POL_decrease_religius_fevour_by_5 = {
	add_to_variable = {
		var = POL_religius_fevour_var
		value = -5
	}
	clamp_variable = { var = POL_religius_fevour_var min = 0 max = 100 }
	custom_effect_tooltip = POL_religius_fevour_decrease_by_5_tt
	POL_update_church_variables = yes
}

POL_update_church_variables = {
	hidden_effect = {
		if = {
			limit = {
				has_variable = POL_religius_fevour_var
			}
			set_variable = {POL_church_conscription_factor = POL_religius_fevour_var}
			set_variable = {POL_church_army_defence_factor = POL_religius_fevour_var}
			set_variable = {POL_church_army_attack_factor = POL_religius_fevour_var}
			set_variable = {POL_church_army_org_Factor = POL_religius_fevour_var}
			divide_variable = { POL_church_army_defence_factor = 1000 }
			divide_variable = { POL_church_conscription_factor = 1000 }
			divide_variable = { POL_church_army_attack_factor = 1000 }
			divide_variable = { POL_church_army_org_Factor = 1000 }
		}
		if = {
			limit = {
				has_variable = POL_church_strenght_var
			}
			set_variable = {POL_church_stability_factor = POL_church_strenght_var}
			set_variable = {POL_church_political_power_gain = POL_church_strenght_var}
			set_variable = {POL_church_drift_defence_factor = POL_church_strenght_var}
			divide_variable = { POL_church_stability_factor = 1000 }
			divide_variable = { POL_church_political_power_gain = 800 }
			divide_variable = { POL_church_drift_defence_factor = 800 }
		}
		if = {
			limit = {
				has_variable = POL_unity_and_obidience_var
			}
			set_variable = {POL_church_industrial_capacity_factory = POL_unity_and_obidience_var}
			set_variable = {POL_church_production_factory_efficiency_gain_factor = POL_unity_and_obidience_var}
			set_variable = {POL_church_production_speed_buildings_factor = POL_unity_and_obidience_var}
			divide_variable = { POL_church_industrial_capacity_factory = 1000 }
			divide_variable = { POL_church_production_factory_efficiency_gain_factor = 900 }
			divide_variable = { POL_church_production_speed_buildings_factor = 1000 }
		}
		force_update_dynamic_modifier = yes
	}
}

POL_increase_monthly_samobronna_progress_2_effect = {
	custom_effect_tooltip = POL_increase_monthly_samobronna_progress_2_tt
	add_to_variable = {
		var = POL_monthly_gain_progress_var
		value = 2
	}
}

POL_increase_monthly_samobronna_progress_5_effect = {
	custom_effect_tooltip = POL_increase_monthly_samobronna_progress_5_tt
	add_to_variable = {
		var = POL_monthly_gain_progress_var
		value = 5
	}
}

POL_increase_samobronna_progress_10_effect = {
	custom_effect_tooltip = POL_increase_samobronna_progress_10_tt
	add_to_variable = {
		var = POL_progress_gained_var
		value = 10
	}
	clamp_variable = { var = POL_progress_gained_var min = 0 max = 100 }
}

POL_increase_samobronna_progress_5_effect = {
	custom_effect_tooltip = POL_increase_samobronna_progress_5_tt
	add_to_variable = {
		var = POL_progress_gained_var
		value = 5
	}
	clamp_variable = { var = POL_progress_gained_var min = 0 max = 100 }
}
POL_weaken_the_opposition_effect = {
	custom_effect_tooltip = POL_opposition_gets_weaker
	if = {
		limit = { has_idea = POL_small_opposition }
		swap_ideas = {
			remove_idea = POL_small_opposition
			add_idea = POL_irrelevant_opposition
		}
	}
	else_if = {
		limit = { has_idea = POL_active_opposition }
		swap_ideas = {
			remove_idea = POL_active_opposition
			add_idea = POL_small_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_medium_opposition }
		swap_ideas = {
			remove_idea = POL_medium_opposition
			add_idea = POL_active_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_strong_opposition }
		swap_ideas = {
			remove_idea = POL_strong_opposition
			add_idea = POL_medium_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_very_strong_opposition }
		swap_ideas = {
			remove_idea = POL_very_strong_opposition
			add_idea = POL_strong_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_overpowering_opposition }
		swap_ideas = {
			remove_idea = POL_overpowering_opposition
			add_idea = POL_very_strong_opposition
		}
	}
}

POL_strenghten_the_opposition_effect = {
	custom_effect_tooltip = POL_opposition_gets_stronger
	if = {
		limit = { has_idea = POL_irrelevant_opposition }
		swap_ideas = {
			remove_idea = POL_irrelevant_opposition
			add_idea = POL_small_opposition
		}
	}
	else_if = {
		limit = { has_idea = POL_small_opposition }
		swap_ideas = {
			remove_idea = POL_small_opposition
			add_idea = POL_active_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_active_opposition }
		swap_ideas = {
			remove_idea = POL_active_opposition
			add_idea = POL_medium_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_medium_opposition }
		swap_ideas = {
			remove_idea = POL_medium_opposition
			add_idea = POL_strong_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_strong_opposition }
		swap_ideas = {
			remove_idea = POL_strong_opposition
			add_idea = POL_very_strong_opposition
		}
	}

	else_if = {
		limit = { has_idea = POL_very_strong_opposition }
		swap_ideas = {
			remove_idea = POL_very_strong_opposition
			add_idea = POL_overpowering_opposition
		}
	}
}

POL_fix_political_crisis_effect = {
	if = {
		limit = { has_idea = POL_political_chaos }
		swap_ideas = {
			remove_idea = POL_political_chaos
			add_idea = POL_political_chaos_2
		}
	}
	else_if = {
		limit = { has_idea = POL_political_chaos_2 }
		remove_ideas = POL_political_chaos_2
	}
}

POL_shoot_at_dockyard_workers = {
	if = {
		limit = { has_idea = POL_memories_of_solidarity }
		swap_ideas = {
			remove_idea = POL_memories_of_solidarity
			add_idea = POL_memories_of_solidarity_2
		}
	}
	else_if = {
		limit = { has_idea = POL_memories_of_solidarity_2 }
		swap_ideas = {
			remove_idea = POL_memories_of_solidarity_2
			add_idea = POL_memories_of_solidarity_3
		}
	}
	else_if = {
		limit = { has_idea = POL_memories_of_solidarity_3 }
		swap_ideas = {
			remove_idea = POL_memories_of_solidarity_3
			add_idea = POL_memories_of_solidarity_4
		}
	}
	else_if = {
		limit = { has_idea = POL_memories_of_solidarity_4 }
		remove_ideas = POL_memories_of_solidarity_4
	}
}

POL_lower_effects_of_everything_is_on_fire = {
	if = {
		limit = { has_idea = POL_everything_is_on_fire }
		swap_ideas = {
			remove_idea = POL_everything_is_on_fire
			add_idea = POL_everything_is_on_fire_2
		}
	}
	else_if = {
		limit = { has_idea = POL_everything_is_on_fire_2 }

		swap_ideas = {
			remove_idea = POL_everything_is_on_fire_2
			add_idea = POL_everything_is_on_fire_3
		}
	}
	else_if = {
		limit = { has_idea = POL_everything_is_on_fire_3 }

		swap_ideas = {
			remove_idea = POL_everything_is_on_fire_3
			add_idea = POL_everything_is_on_fire_4
		}
	}
	else_if = {
		limit = { has_idea = POL_everything_is_on_fire_4 }

		swap_ideas = {
			remove_idea = POL_everything_is_on_fire_4
			add_idea = POL_everything_is_on_fire_5
		}
	}
	else_if = {
		limit = { has_idea = POL_everything_is_on_fire_5 }
		remove_ideas = POL_everything_is_on_fire_5
	}
}
POL_set_up_faction_decisions_futurologist_effect = {
	unlock_decision_category_tooltip = POL_the_three_powers
	set_country_flag = POL_the_three_powers_unlocked_tt
	set_variable = { var = POL_futurologist_power_var value = 50 }
	set_variable = { var = POL_futurist_power_var value = 25 }
	set_variable = { var = POL_technocratic_power_var value = 25 }
}

POL_increase_furutologist_power_by_2 = {
	custom_effect_tooltip = POL_increase_furutologist_power_by_2_tt
	hidden_effect = {
		add_to_variable = {
			var = POL_futurologist_power_var
			value = 2
		}
		clamp_variable = { var = POL_futurologist_power_var min = 0 max = 100 }
		random_list = {
			33 = {
				add_to_variable = {
					var = POL_technocratic_power_var
					value = -2
				}
				clamp_variable = { var = POL_technocratic_power_var min = 0 max = 100 }
			}
			33 = {
				add_to_variable = {
					var = POL_futurist_power_var
					value = -2
				}
				clamp_variable = { var = POL_futurist_power_var min = 0 max = 100 }
			}
			34 = {
				add_to_variable = {
					var = POL_technocratic_power_var
					value = -1
				}
				clamp_variable = { var = POL_technocratic_power_var min = 0 max = 100 }
				add_to_variable = {
					var = POL_futurist_power_var
					value = -1
				}
				clamp_variable = { var = POL_futurist_power_var min = 0 max = 100 }
			}
		}
	}
}

POL_increase_technocratic_power_by_2 = {
	custom_effect_tooltip = POL_increase_technocratic_power_by_2_tt
	hidden_effect = {
		add_to_variable = {
			var = POL_technocratic_power_var
			value = 2
		}
		clamp_variable = { var = POL_technocratic_power_var min = 0 max = 100 }
		random_list = {
			33 = {
				add_to_variable = {
					var = POL_futurologist_power_var
					value = -2
				}
				clamp_variable = { var = POL_futurologist_power_var min = 0 max = 100 }
			}
			33 = {
				add_to_variable = {
					var = POL_futurist_power_var
					value = -2
				}
				clamp_variable = { var = POL_futurist_power_var min = 0 max = 100 }
			}
			34 = {
				add_to_variable = {
					var = POL_futurologist_power_var
					value = -1
				}
				clamp_variable = { var = POL_futurologist_power_var min = 0 max = 100 }
				add_to_variable = {
					var = POL_futurist_power_var
					value = -1
				}
				clamp_variable = { var = POL_futurist_power_var min = 0 max = 100 }
			}
		}
	}
}

POL_increase_futurist_power_by_2 = {
	custom_effect_tooltip = POL_increase_futurist_power_by_2_tt
	hidden_effect = {
		add_to_variable = {
			var = POL_futurist_power_var
			value = 2
		}
		clamp_variable = { var = POL_futurist_power_var min = 0 max = 100 }
		random_list = {
			33 = {
				add_to_variable = {
					var = POL_futurologist_power_var
					value = -2
				}
				clamp_variable = { var = POL_futurologist_power_var min = 0 max = 100 }
			}
			33 = {
				add_to_variable = {
					var = POL_technocratic_power_var
					value = -2
				}
				clamp_variable = { var = POL_technocratic_power_var min = 0 max = 100 }
			}
			34 = {
				add_to_variable = {
					var = POL_futurologist_power_var
					value = -1
				}
				clamp_variable = { var = POL_futurologist_power_var min = 0 max = 100 }
				add_to_variable = {
					var = POL_technocratic_power_var
					value = -1
				}
				clamp_variable = { var = POL_technocratic_power_var min = 0 max = 100 }
			}
		}
	}
}

POL_slightly_decrease_party_support_pulawianie = {
	custom_effect_tooltip = POL_slightly_decrease_party_support_pulawianie_tt
	add_to_variable = {
		var = POL_party_support_for_pulawianie_var
		value = -2
	}
}

POL_slightly_decrease_party_support_for_neo_marx = {
	custom_effect_tooltip = POL_slightly_decrease_party_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_party_support_for_neomarx_var
		value = -2
	}
}

POL_slightly_increase_party_support_pulawianie = {
	custom_effect_tooltip = POL_slightly_increase_party_support_pulawianie_tt
	add_to_variable = {
		var = POL_party_support_for_pulawianie_var
		value = 2
	}
}

POL_slightly_increase_party_support_for_neo_marx = {
	custom_effect_tooltip = POL_slightly_increase_party_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_party_support_for_neomarx_var
		value = 2
	}
}

POL_increase_party_support_for_neo_marx = {
	custom_effect_tooltip = POL_increase_party_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_party_support_for_neomarx_var
		value = 5
	}
}

POL_increase_party_support_pulawianie = {
	custom_effect_tooltip = POL_increase_party_support_pulawianie_tt
	add_to_variable = {
		var = POL_party_support_for_pulawianie_var
		value = 5
	}
}

POL_slightly_decrease_popular_support_pulawianie = {
	custom_effect_tooltip = POL_slightly_decrease_popular_support_pulawianie_tt
	add_to_variable = {
		var = POL_popular_support_for_pulawianie_var
		value = 2
	}
}

POL_slightly_decrease_popular_support_for_neo_marx = {
	custom_effect_tooltip = POL_slightly_decrease_popular_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_popular_support_for_neomarx_var
		value = 2
	}
}

POL_slightly_increase_popular_support_pulawianie = {
	custom_effect_tooltip = POL_slightly_increase_popular_support_pulawianie_tt
	add_to_variable = {
		var = POL_popular_support_for_pulawianie_var
		value = 2
	}
}

POL_slightly_increase_popular_support_for_neo_marx = {
	custom_effect_tooltip = POL_slightly_increase_popular_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_popular_support_for_neomarx_var
		value = 2
	}
}

POL_increase_popular_support_pulawianie = {
	custom_effect_tooltip = POL_increase_popular_support_pulawianie_tt
	add_to_variable = {
		var = POL_popular_support_for_pulawianie_var
		value = 5
	}
}

POL_increase_popular_support_for_neo_marx = {
	custom_effect_tooltip = POL_increase_popular_support_for_neo_marx_tt
	add_to_variable = {
		var = POL_popular_support_for_neomarx_var
		value = 5
	}
}

POL_upgrade_polish_maoism_effect = {
	custom_effect_tooltip = POL_upgrade_polish_maoism_tt
	if = {
		limit = { has_idea = POL_polish_maoism }
		swap_ideas = {
			remove_idea = POL_polish_maoism
			add_idea = POL_polish_maoism_2
		}
	}
	else_if = {
		limit = { has_idea = POL_polish_maoism_2 }

		swap_ideas = {
			remove_idea = POL_polish_maoism_2
			add_idea = POL_polish_maoism_3
		}
	}
	else_if = {
		limit = { has_idea = POL_polish_maoism_3 }
		swap_ideas = {
			remove_idea = POL_polish_maoism_3
			add_idea = POL_polish_maoism_4
		}
	}

	else_if = {
		limit = { has_idea = POL_polish_maoism_4 }
		swap_ideas = {
			remove_idea = POL_polish_maoism_4
			add_idea = POL_polish_maoism_5
		}
	}
}

POL_strenghten_national_communist_party = {
	custom_effect_tooltip = POL_natcom_party_will_be_strenghtened_tt
	add_to_variable = {
		var = POL_natmao_x_position
		value = -25
	}
	clamp_variable = { var = POL_natmao_x_position min = 150 max = 350 }
	add_to_variable = {
		var = POL_natmao_ideology_drift_vat
		value = 1
	}
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat < 0 }
			}
			remove_ideas = POL_natmao_national_commie_party
			add_ideas = POL_natmao_maoist_party
			remove_ideas = POL_natmao_central_party
		}
		else_if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat = 0 }
			}
			remove_ideas = POL_natmao_national_commie_party
			remove_ideas = POL_natmao_maoist_party
			add_ideas = POL_natmao_central_party
		}

		else_if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat > 0 }
			}
			add_ideas = POL_natmao_national_commie_party
			remove_ideas = POL_natmao_maoist_party
			remove_ideas = POL_natmao_central_party
		}
	}
}
POL_strenghten_maoist_party = {
	add_to_variable = {
		var = POL_natmao_x_position
		value = -25
	}
	clamp_variable = { var = POL_natmao_x_position min = 150 max = 350 }
	custom_effect_tooltip = POL_maoist_party_will_be_strenghtened_tt
	add_to_variable = {
		var = POL_natmao_ideology_drift_vat
		value = -1
	}

	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat < 0 }
			}
			remove_ideas = POL_natmao_national_commie_party
			add_ideas = POL_natmao_maoist_party
			remove_ideas = POL_natmao_central_party
		}
		else_if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat = 0 }
			}
			remove_ideas = POL_natmao_national_commie_party
			remove_ideas = POL_natmao_maoist_party
			add_ideas = POL_natmao_central_party
		}

		else_if = {
			limit = {
				check_variable = { POL_natmao_ideology_drift_vat > 0 }
			}
			add_ideas = POL_natmao_national_commie_party
			remove_ideas = POL_natmao_maoist_party
			remove_ideas = POL_natmao_central_party
		}
	}
}

POL_decrease_revolutionary_stability_by_10_effect = {
	custom_effect_tooltip = POL_decrease_revolutionary_stability_by_10_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = -5
	}
}

POL_decrease_revolutionary_stability_by_5_effect = {
	custom_effect_tooltip = POL_decrease_revolutionary_stability_by_5_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = -5
	}
}

POL_decrease_revolutionary_stability_by_3_effect = {
	custom_effect_tooltip = POL_decrease_revolutionary_stability_by_3_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = -3
	}
}

POL_increase_revolutionary_stability_by_10_effect = {
	custom_effect_tooltip = POL_increase_revolutionary_stability_by_10_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = 5
	}
}

POL_increase_revolutionary_stability_by_5_effect = {
	custom_effect_tooltip = POL_increase_revolutionary_stability_by_5_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = 5
	}
}

POL_increase_revolutionary_stability_by_3_effect = {
	custom_effect_tooltip = POL_increase_revolutionary_stability_by_3_tt
	add_to_variable = {
		var = POL_revolutionary_stability_var
		value = 3
	}
}

POL_commie_set_up_propaganda_stuff_effect = {
	set_country_flag = POL_commie_propaganda_decisions_unlocked
	set_variable = { var = POL_commie_available_campaign_slots value = 3 }
	add_to_variable = { var = POL_what_did_you_do_to_help_realise_the_plan_cost value = 10 }
	add_to_variable = { var = POL_our_young_hearts_beat_for_the_motherland_cost value = 10 }
	add_to_variable = { var = POL_best_regards_to_women_at_work_cost value = 10 }
	add_to_variable = { var = POL_we_are_build_a_new_culture_for_poland_cost value = 10 }
	add_to_variable = { var = POL_every_arm_for_poland_cost value = 10 }
	add_to_variable = { var = POL_be_careful_of_the_enemies_of_the_nation_cost value = 10 }
	add_to_variable = { var = POL_we_are_building_poland_anew_cost value = 10 }
	add_to_variable = { var = POL_youth_for_socialist_countryside_cost value = 10 }
	unlock_decision_category_tooltip = POL_commie_propaganda_campaigns_cat
}

POL_commie_set_up_stuff_effect = {
	set_country_flag = POL_commie_decisions_unlocked
	set_variable = { var = POL_revolutionary_stability_var value = 25 }
	unlock_decision_category_tooltip = POL_securing_the_revoluttion
}

POL_increase_leader_influence_by_5 = {
	add_to_variable = {
		var = POL_nazi_leader_influence
		value = 5
	}
	clamp_variable = { var = POL_nazi_leader_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_nazi_party_influence
		value = -5
	}
	clamp_variable = { var = POL_nazi_party_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_leader_influence_by_5_tt
}

POL_increase_leader_influence_by_2 = {
	add_to_variable = {
		var = POL_nazi_leader_influence
		value = 2
	}
	clamp_variable = { var = POL_nazi_leader_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_nazi_party_influence
		value = -2
	}
	clamp_variable = { var = POL_nazi_party_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_leader_influence_by_2_tt
}

POL_increase_party_influence_by_5 = {
	add_to_variable = {
		var = POL_nazi_leader_influence
		value = -5
	}
	clamp_variable = { var = POL_nazi_leader_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_nazi_party_influence
		value = 5
	}
	clamp_variable = { var = POL_nazi_party_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_party_influence_by_5_tt
}

POL_increase_party_influence_by_2 = {
	add_to_variable = {
		var = POL_nazi_leader_influence
		value = -2
	}
	clamp_variable = { var = POL_nazi_leader_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_nazi_party_influence
		value = 2
	}
	clamp_variable = { var = POL_nazi_party_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_party_influence_by_2_tt
}

POL_decrease_inasnity_effect = {
	add_to_variable = {
		var = POL_nazi_insanity
		value = -5
	}
	clamp_variable = { var = POL_nazi_insanity min = 0 max = 100 }
	custom_effect_tooltip = POL_decrease_insanity_nazi_tt
	hidden_effect = {
		if = {
			limit = {
				check_variable = {
					POL_nazi_insanity < 19
					POL_nazi_insanity > -1
				}
			}
			add_ideas = POL_high_insanity
			remove_ideas = POL_very_high_insanity
		}
		else_if = {
			limit = {
				check_variable = {
					POL_nazi_insanity > 19
				}
			}
			remove_ideas = POL_high_insanity
			add_ideas = POL_very_high_insanity
		}
	}
}

POL_progress_the_purge_effect = {
	add_to_variable = {
		var = POL_nazi_opposition_to_government
		value = -10
	}
	custom_effect_tooltip = POL_progress_the_purge_tt
}

POL_increase_inasnity_effect = {
	add_to_variable = {
		var = POL_nazi_insanity
		value = 5
	}
	clamp_variable = { var = POL_nazi_insanity min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_insanity_nazi
	hidden_effect = {
		if = {
			limit = {
				check_variable = {
					POL_nazi_insanity < 19
					POL_nazi_insanity > -1
				}
			}
			add_ideas = POL_high_insanity
			remove_ideas = POL_very_high_insanity
		}
		else_if = {
			limit = {
				check_variable = {
					POL_nazi_insanity > 19
				}
			}
			remove_ideas = POL_high_insanity
			add_ideas = POL_very_high_insanity
		}
	}
}

POL_improve_falangist_army = {
	if = {
		limit = { has_idea = POL_army_purification }
		swap_ideas = {
			remove_idea = POL_army_purification
			add_idea = POL_army_purification_2
		}
	}
	else_if = {
		limit = { has_idea = POL_army_purification_2 }

		swap_ideas = {
			remove_idea = POL_army_purification_2
			add_idea = POL_army_purification_3
		}
	}
	else_if = {
		limit = { has_idea = POL_army_purification_3 }

		swap_ideas = {
			remove_idea = POL_army_purification_3
			add_idea = POL_army_purification_4
		}
	}
	else_if = {
		limit = { has_idea = POL_army_purification_4 }

		swap_ideas = {
			remove_idea = POL_army_purification_4
			add_idea = POL_army_purification_5
		}
	}
	else_if = {
		limit = { has_idea = POL_army_purification_5 }

		swap_ideas = {
			remove_idea = POL_army_purification_5
			add_idea = POL_reorganised_army
		}
	}
}

POL_increase_nop_influence_by_5 = {
	add_to_variable = {
		var = POL_ONR_influence
		value = -5
	}
	clamp_variable = { var = POL_ONR_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_NOP_influence
		value = 5
	}
	clamp_variable = { var = POL_NOP_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_nop_influence_by_5_tt
}

POL_increase_nop_influence_by_2 = {
	add_to_variable = {
		var = POL_ONR_influence
		value = -2
	}
	clamp_variable = { var = POL_ONR_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_NOP_influence
		value = 2
	}
	clamp_variable = { var = POL_NOP_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_nop_influence_by_2_tt
}

POL_increase_onr_influence_by_5 = {
	add_to_variable = {
		var = POL_ONR_influence
		value = 5
	}
	clamp_variable = { var = POL_ONR_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_NOP_influence
		value = -5
	}
	clamp_variable = { var = POL_NOP_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_onr_influence_by_5_tt
}

POL_increase_onr_influence_by_2 = {
	add_to_variable = {
		var = POL_ONR_influence
		value = 2
	}
	clamp_variable = { var = POL_ONR_influence min = 0 max = 100 }
	add_to_variable = {
		var = POL_NOP_influence
		value = -2
	}
	clamp_variable = { var = POL_NOP_influence min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_onr_influence_by_2_tt
}

POL_falangist_fix_party_issues = {
	if = {
		limit = { has_idea = POL_falangist_government_in_crisis }
		swap_ideas = {
			remove_idea = POL_falangist_government_in_crisis
			add_idea = POL_falangist_government_in_crisis_2
		}
	}
	else_if = {
		limit = { has_idea = POL_falangist_government_in_crisis_2 }

		swap_ideas = {
			remove_idea = POL_falangist_government_in_crisis_2
			add_idea = POL_falangist_government_in_crisis_3
		}
	}
	else_if = {
		limit = { has_idea = POL_falangist_government_in_crisis_3 }
		remove_ideas = POL_falangist_government_in_crisis_3
	}
}

POL_increase_lmir_influence = {
	add_to_variable = {
		var = POL_monarchist_lmir_strength_var
		value = 5
	}
	clamp_variable = { var = POL_monarchist_lmir_strength_var min = 0 max = 100 }
	custom_effect_tooltip = POL_pis_increase_lmir_strength
}

POL_lower_russian_influence_effect = {
	custom_effect_tooltip = POL_lower_russian_influence_tt
	if = {
		limit = { has_idea = POL_very_high_russian_influence }
		swap_ideas = {
			remove_idea = POL_very_high_russian_influence
			add_idea = POL_high_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_high_russian_influence }

		swap_ideas = {
			remove_idea = POL_high_russian_influence
			add_idea = POL_average_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_average_russian_influence }

		swap_ideas = {
			remove_idea = POL_average_russian_influence
			add_idea = POL_low_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_low_russian_influence }

		swap_ideas = {
			remove_idea = POL_low_russian_influence
			add_idea = POL_very_low_russian_influence
		}
	}
}

POL_increase_russian_influence_effect = {
	custom_effect_tooltip = POL_increase_russian_influence_tt
	if = {
		limit = { has_idea = POL_very_low_russian_influence }
		swap_ideas = {
			remove_idea = POL_very_low_russian_influence
			add_idea = POL_low_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_low_russian_influence }

		swap_ideas = {
			remove_idea = POL_low_russian_influence
			add_idea = POL_average_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_average_russian_influence }

		swap_ideas = {
			remove_idea = POL_average_russian_influence
			add_idea = POL_high_russian_influence
		}
	}
	else_if = {
		limit = { has_idea = POL_high_russian_influence }

		swap_ideas = {
			remove_idea = POL_high_russian_influence
			add_idea = POL_very_high_russian_influence
		}
	}
}

POL_pis_socialist_economy_increase_effect = {
	custom_effect_tooltip = POL_increase_socialist_economy_tt
	#socialist bonuses
	add_to_variable = { var = POL_pis_economic_interventionalism value = 1 } #is only added to show which side has more influence
	add_to_variable = { var = POL_pis_production_factory_max_efficiency_factor value = 0.01 }
	clamp_variable = { var = POL_pis_production_factory_max_efficiency_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_production_speed_buildings_factor value = 0.01 }
	clamp_variable = { var = POL_pis_production_speed_buildings_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_production_factory_start_efficiency_factor value = 0.01 }
	clamp_variable = { var = POL_pis_production_factory_start_efficiency_factor min = -0.15 max = 0.15 }
	#liberal bonuses
	add_to_variable = { var = POL_pis_production_factory_efficiency_gain_factor value = -0.01 }
	clamp_variable = { var = POL_pis_production_factory_efficiency_gain_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_trade_opinion_factor value = -0.01 }
	clamp_variable = { var = POL_pis_trade_opinion_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_consumer_goods_expected_value value = 0.005 }
	clamp_variable = { var = POL_pis_consumer_goods_expected_value min = -0.075 max = 0.075 }
}

POL_pis_liberal_economy_increase_effect = {
	custom_effect_tooltip = POL_increase_liberal_economy_tt
	#socialist bonuses
	add_to_variable = { var = POL_pis_economic_interventionalism value = -1 } #is only added to show which side has more influence
	add_to_variable = { var = POL_pis_production_factory_max_efficiency_factor value = -0.01 }
	clamp_variable = { var = POL_pis_production_factory_max_efficiency_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_production_speed_buildings_factor value = -0.01 }
	clamp_variable = { var = POL_pis_production_speed_buildings_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_production_factory_start_efficiency_factor value = -0.01 }
	clamp_variable = { var = POL_pis_production_factory_start_efficiency_factor min = -0.15 max = 0.15 }
	#liberal bonuses
	add_to_variable = { var = POL_pis_production_factory_efficiency_gain_factor value = 0.01 }
	clamp_variable = { var = POL_pis_production_factory_efficiency_gain_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_trade_opinion_factor value = 0.01 }
	clamp_variable = { var = POL_pis_trade_opinion_factor min = -0.15 max = 0.15 }
	add_to_variable = { var = POL_pis_consumer_goods_expected_value value = -0.005 }
	clamp_variable = { var = POL_pis_consumer_goods_expected_value min = -0.075 max = 0.075 }
}

POL_work_towards_unifing_the_party_effect = {
	if = {
		limit = { has_idea = POL_po_government_in_crisis }
		swap_ideas = {
			remove_idea = POL_po_government_in_crisis
			add_idea = POL_po_government_in_crisis_2
		}
	}
	else_if = {
		limit = { has_idea = POL_po_government_in_crisis_2 }

		swap_ideas = {
			remove_idea = POL_po_government_in_crisis_2
			add_idea = POL_po_government_in_crisis_3
		}
	}
	else_if = {
		limit = { has_idea = POL_po_government_in_crisis_3 }
		remove_ideas = POL_po_government_in_crisis_3
	}
}

POL_increase_legitimacy_influence_larger = {
	add_to_variable = {
		var = POL_slavic_legitimacy_var
		value = 5
	}
	clamp_variable = { var = POL_slavic_legitimacy_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_legimitacy_larg
}

POL_increase_legitimacy_influence = {
	add_to_variable = {
		var = POL_slavic_legitimacy_var
		value = 4
	}
	clamp_variable = { var = POL_slavic_legitimacy_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_legimitacy
}

POL_increase_strength_larger = {
	add_to_variable = {
		var = POL_slavic_strength_var
		value = 5
	}
	clamp_variable = { var = POL_slavic_strength_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_strength_larg
}

POL_increase_strenth = {
	add_to_variable = {
		var = POL_slavic_strength_var
		value = 4
	}
	clamp_variable = { var = POL_slavic_strength_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_strength
}

POL_increase_unity_larger = {
	add_to_variable = {
		var = POL_slavic_unity_var
		value = 5
	}
	clamp_variable = { var = POL_slavic_unity_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_unity_larg
}

POL_increase_unity = {
	add_to_variable = {
		var = POL_slavic_unity_var
		value = 4
	}
	clamp_variable = { var = POL_slavic_unity_var min = 0 max = 100 }
	custom_effect_tooltip = POL_increase_slavic_unity
}

POL_pis_check_slav_legitimacy = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var = 0 }
			}
			add_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 0 }
				check_variable = { POL_slavic_legitimacy_var < 20 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			add_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 20 }
				check_variable = { POL_slavic_legitimacy_var < 40 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			add_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 40 }
				check_variable = { POL_slavic_legitimacy_var < 60 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			add_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 60 }
				check_variable = { POL_slavic_legitimacy_var < 80 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			add_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 80 }
				check_variable = { POL_slavic_legitimacy_var < 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			add_ideas = POL_pis_very_good_slavic_legitimacty
			remove_ideas = POL_pis_perfect_slavic_legitimacty
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_legitmiacy
			remove_ideas = POL_pis_very_small_slavic_legitimacty
			remove_ideas = POL_pis_small_slavic_legitimacty
			remove_ideas = POL_pis_average_slavic_legitimacty
			remove_ideas = POL_pis_good_slavic_legitimacty
			remove_ideas = POL_pis_very_good_slavic_legitimacty
			add_ideas = POL_pis_perfect_slavic_legitimacty
		}
	}
}

POL_pis_check_slav_unity = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_slavic_unity_var = 0 }
			}
			add_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_unity_var > 0 }
				check_variable = { POL_slavic_unity_var < 20 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			add_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_unity_var > 20 }
				check_variable = { POL_slavic_unity_var < 40 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			add_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_unity_var > 40 }
				check_variable = { POL_slavic_unity_var < 60 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			add_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_unity_var > 60 }
				check_variable = { POL_slavic_unity_var < 80 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			add_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_unity_var > 80 }
				check_variable = { POL_slavic_unity_var < 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			add_ideas = POL_pis_very_good_slavic_unity
			remove_ideas = POL_pis_perfect_slavic_unity
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_legitimacy_var > 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_unity
			remove_ideas = POL_pis_very_small_slavic_unity
			remove_ideas = POL_pis_small_slavic_unity
			remove_ideas = POL_pis_average_slavic_unity
			remove_ideas = POL_pis_good_slavic_unity
			remove_ideas = POL_pis_very_good_slavic_unity
			add_ideas = POL_pis_perfect_slavic_unity
		}
	}
}

POL_pis_check_slav_strength = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_slavic_strength_var = 0 }
			}
			add_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 0 }
				check_variable = { POL_slavic_strength_var < 20 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			add_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 20 }
				check_variable = { POL_slavic_strength_var < 40 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			add_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 40 }
				check_variable = { POL_slavic_strength_var < 60 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			add_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 60 }
				check_variable = { POL_slavic_strength_var < 80 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			add_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 80 }
				check_variable = { POL_slavic_strength_var < 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			add_ideas = POL_pis_very_good_slavic_strength
			remove_ideas = POL_pis_perfect_slavic_strength
		}
		else_if = {
			limit = {
				check_variable = { POL_slavic_strength_var > 99 }
			}
			remove_ideas = POL_pis_nonexistant_slavic_strength
			remove_ideas = POL_pis_very_small_slavic_strength
			remove_ideas = POL_pis_small_slavic_strength
			remove_ideas = POL_pis_average_slavic_strength
			remove_ideas = POL_pis_good_slavic_strength
			remove_ideas = POL_pis_very_good_slavic_strength
			add_ideas = POL_pis_perfect_slavic_strength
		}
	}
}

POL_pis_check_party_control = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_PiS_party_control_var < 10 }
			}
			add_ideas = POL_pis_low_party_control_idea
			remove_ideas = POL_pis_medium_party_control_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_pis_pretty_large_party_control_idea
			remove_ideas = POL_pis_large_party_control_idea
			remove_ideas = POL_pis_very_large_party_control_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_PiS_party_control_var > 10 }
				check_variable = { POL_PiS_party_control_var < 25 }
			}
			remove_ideas = POL_pis_low_party_control_idea
			add_ideas = POL_pis_medium_party_control_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_pis_pretty_large_party_control_idea
			remove_ideas = POL_pis_large_party_control_idea
			remove_ideas = POL_pis_very_large_party_control_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_PiS_party_control_var > 25 }
				check_variable = { POL_PiS_party_control_var < 40 }
			}
			remove_ideas = POL_pis_low_party_control_idea
			remove_ideas = POL_pis_medium_party_control_idea
			add_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_pis_pretty_large_party_control_idea
			remove_ideas = POL_pis_large_party_control_idea
			remove_ideas = POL_pis_very_large_party_control_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_PiS_party_control_var > 40 }
				check_variable = { POL_PiS_party_control_var < 55 }
			}
			remove_ideas = POL_pis_low_party_control_idea
			remove_ideas = POL_pis_medium_party_control_idea
			remove_ideas = POL_pis_okay_party_control_idea
			add_ideas = POL_pis_pretty_large_party_control_idea
			remove_ideas = POL_pis_large_party_control_idea
			remove_ideas = POL_pis_very_large_party_control_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 55 }
				check_variable = { POL_SLD_corruption_var < 70 }
			}
			remove_ideas = POL_pis_low_party_control_idea
			remove_ideas = POL_pis_medium_party_control_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_pis_pretty_large_party_control_idea
			add_ideas = POL_pis_large_party_control_idea
			remove_ideas = POL_pis_very_large_party_control_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 70 }
				check_variable = { POL_SLD_corruption_var < 90 }
			}
			remove_ideas = POL_pis_low_party_control_idea
			remove_ideas = POL_pis_medium_party_control_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_pis_pretty_large_party_control_idea
			remove_ideas = POL_pis_large_party_control_idea
			add_ideas = POL_pis_very_large_party_control_idea
		}
	}
}
POL_sld_check_party_corruption = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_SLD_corruption_var < 10 }
			}
			add_ideas = POL_sld_controlled_corruption
			remove_ideas = POL_sld_medium_corruption_levels_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_sld_pretty_large_corruption_idea
			remove_ideas = POL_sld_large_corruption_idea
			remove_ideas = POL_sld_very_large_corruption_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 10 }
				check_variable = { POL_SLD_corruption_var < 25 }
			}
			remove_ideas = POL_sld_controlled_corruption
			add_ideas = POL_sld_medium_corruption_levels_idea
			remove_ideas = POL_pis_okay_party_control_idea
			remove_ideas = POL_sld_pretty_large_corruption_idea
			remove_ideas = POL_sld_large_corruption_idea
			remove_ideas = POL_sld_very_large_corruption_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 25 }
				check_variable = { POL_SLD_corruption_var < 40 }
			}
			remove_ideas = POL_sld_controlled_corruption
			remove_ideas = POL_sld_medium_corruption_levels_idea
			add_ideas = POL_sld_kind_of_large_idea
			remove_ideas = POL_sld_pretty_large_corruption_idea
			remove_ideas = POL_sld_large_corruption_idea
			remove_ideas = POL_sld_very_large_corruption_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 40 }
				check_variable = { POL_SLD_corruption_var < 55 }
			}
			remove_ideas = POL_sld_controlled_corruption
			remove_ideas = POL_sld_medium_corruption_levels_idea
			remove_ideas = POL_sld_kind_of_large_idea
			add_ideas = POL_sld_pretty_large_corruption_idea
			remove_ideas = POL_sld_large_corruption_idea
			remove_ideas = POL_sld_very_large_corruption_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 55 }
				check_variable = { POL_SLD_corruption_var < 70 }
			}
			remove_ideas = POL_sld_controlled_corruption
			remove_ideas = POL_sld_medium_corruption_levels_idea
			remove_ideas = POL_sld_kind_of_large_idea
			remove_ideas = POL_sld_pretty_large_corruption_idea
			add_ideas = POL_sld_large_corruption_idea
			remove_ideas = POL_sld_very_large_corruption_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_corruption_var > 70 }
				check_variable = { POL_SLD_corruption_var < 90 }
			}
			remove_ideas = POL_sld_controlled_corruption
			remove_ideas = POL_sld_medium_corruption_levels_idea
			remove_ideas = POL_sld_kind_of_large_idea
			remove_ideas = POL_sld_pretty_large_corruption_idea
			remove_ideas = POL_sld_large_corruption_idea
			add_ideas = POL_sld_very_large_corruption_idea
		}
	}
}
POL_sld_check_party_strenght = {
	hidden_effect = {
		if = {
			limit = {
				check_variable = { POL_SLD_government_strenght < 5 }
			}
			add_ideas = POL_sld_very_weak_govermnet_idea
			remove_ideas = POL_sld_weak_govermnet_idea
			remove_ideas = POL_sld_neither_weak_or_strong_govermnet_idea
			remove_ideas = POL_sld_strong_govermnet_idea
			remove_ideas = POL_sld_very_strong_govermnet_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_government_strenght > 5 }
				check_variable = { POL_SLD_government_strenght < 20 }
			}
			remove_ideas = POL_sld_very_weak_govermnet_idea
			add_ideas = POL_sld_weak_govermnet_idea
			remove_ideas = POL_sld_neither_weak_or_strong_govermnet_idea
			remove_ideas = POL_sld_strong_govermnet_idea
			remove_ideas = POL_sld_very_strong_govermnet_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_government_strenght > 20 }
				check_variable = { POL_SLD_government_strenght < 35 }
			}
			remove_ideas = POL_sld_very_weak_govermnet_idea
			remove_ideas = POL_sld_weak_govermnet_idea
			add_ideas = POL_sld_neither_weak_or_strong_govermnet_idea
			remove_ideas = POL_sld_strong_govermnet_idea
			remove_ideas = POL_sld_very_strong_govermnet_idea
		}
		else_if = {
			limit = {
				check_variable = { POL_SLD_government_strenght > 35 }
				check_variable = { POL_SLD_government_strenght < 50 }
			}
			remove_ideas = POL_sld_very_weak_govermnet_idea
			remove_ideas = POL_sld_weak_govermnet_idea
			remove_ideas = POL_sld_neither_weak_or_strong_govermnet_idea
			add_ideas = POL_sld_strong_govermnet_idea
			remove_ideas = POL_sld_very_strong_govermnet_idea
			else_if = {
				limit = {
					check_variable = { POL_SLD_government_strenght > 50 }
				}
				remove_ideas = POL_sld_very_weak_govermnet_idea
				remove_ideas = POL_sld_weak_govermnet_idea
				remove_ideas = POL_sld_neither_weak_or_strong_govermnet_idea
				remove_ideas = POL_sld_strong_govermnet_idea
				add_ideas = POL_sld_very_strong_govermnet_idea
			}
		}
	}
}

POL_remove_all_debt = {
	remove_ideas = POL_Polish_national_debt_1
	remove_ideas = POL_Polish_national_debt_2
	remove_ideas = POL_Polish_national_debt_3
	remove_ideas = POL_Polish_national_debt_4
	remove_ideas = POL_Polish_national_debt_5
	remove_ideas = POL_Polish_national_debt_6
	remove_ideas = POL_Polish_national_debt_7
	remove_ideas = POL_Polish_national_debt_8
	remove_ideas = POL_Polish_national_debt_9
	remove_ideas = POL_Polish_national_debt_10
	remove_ideas = POL_Polish_national_debt_11
	remove_ideas = POL_Polish_national_debt_12
	remove_ideas = POL_Polish_national_debt_13
	remove_ideas = POL_Polish_national_debt_14
	remove_ideas = POL_Polish_national_debt_15
	remove_ideas = POL_Polish_national_debt_16
	remove_ideas = POL_Polish_national_debt_17
	remove_ideas = POL_Polish_national_debt_18
	remove_ideas = POL_Polish_national_debt_19
	remove_ideas = POL_Polish_national_debt_20
}

POL_increase_national_debt = {
	if = {
		limit = { has_idea = POL_Polish_national_debt_1 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_1
			add_idea = POL_Polish_national_debt_2
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_2 }

		swap_ideas = {
			remove_idea = POL_Polish_national_debt_2
			add_idea = POL_Polish_national_debt_3
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_3 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_3
			add_idea = POL_Polish_national_debt_4
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_4 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_4
			add_idea = POL_Polish_national_debt_5
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_5 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_5
			add_idea = POL_Polish_national_debt_6
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_6 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_6
			add_idea = POL_Polish_national_debt_7
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_7 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_7
			add_idea = POL_Polish_national_debt_8
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_8 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_8
			add_idea = POL_Polish_national_debt_9
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_9 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_9
			add_idea = POL_Polish_national_debt_10
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_10 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_10
			add_idea = POL_Polish_national_debt_11
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_11 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_11
			add_idea = POL_Polish_national_debt_12
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_12 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_12
			add_idea = POL_Polish_national_debt_13
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_13 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_13
			add_idea = POL_Polish_national_debt_14
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_14 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_14
			add_idea = POL_Polish_national_debt_15
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_15 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_15
			add_idea = POL_Polish_national_debt_16
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_16 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_16
			add_idea = POL_Polish_national_debt_17
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_17 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_17
			add_idea = POL_Polish_national_debt_18
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_18 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_18
			add_idea = POL_Polish_national_debt_19
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_19 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_19
			add_idea = POL_Polish_national_debt_20
		}
	}
}

POL_decrease_national_debt = {
	if = {
		limit = { has_idea = POL_Polish_national_debt_20 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_20
			add_idea = POL_Polish_national_debt_19
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_19 }

		swap_ideas = {
			remove_idea = POL_Polish_national_debt_19
			add_idea = POL_Polish_national_debt_18
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_18 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_18
			add_idea = POL_Polish_national_debt_17
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_17 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_17
			add_idea = POL_Polish_national_debt_16
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_16 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_16
			add_idea = POL_Polish_national_debt_15
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_15 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_15
			add_idea = POL_Polish_national_debt_14
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_14 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_14
			add_idea = POL_Polish_national_debt_13
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_13 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_13
			add_idea = POL_Polish_national_debt_12
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_12 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_12
			add_idea = POL_Polish_national_debt_11
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_11 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_11
			add_idea = POL_Polish_national_debt_10
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_10 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_10
			add_idea = POL_Polish_national_debt_9
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_9 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_9
			add_idea = POL_Polish_national_debt_8
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_8 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_8
			add_idea = POL_Polish_national_debt_7
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_7 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_7
			add_idea = POL_Polish_national_debt_6
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_6 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_6
			add_idea = POL_Polish_national_debt_5
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_5 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_5
			add_idea = POL_Polish_national_debt_4
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_4 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_4
			add_idea = POL_Polish_national_debt_3
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_3 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_3
			add_idea = POL_Polish_national_debt_2
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_2 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_2
			add_idea = POL_Polish_national_debt_1
		}
	}
}

POL_increase_national_debt_by_2 = {
	if = {
		limit = { has_idea = POL_Polish_national_debt_1 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_1
			add_idea = POL_Polish_national_debt_3
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_2 }

		swap_ideas = {
			remove_idea = POL_Polish_national_debt_2
			add_idea = POL_Polish_national_debt_4
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_3 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_3
			add_idea = POL_Polish_national_debt_5
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_4 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_4
			add_idea = POL_Polish_national_debt_6
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_5 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_5
			add_idea = POL_Polish_national_debt_7
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_6 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_6
			add_idea = POL_Polish_national_debt_8
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_7 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_7
			add_idea = POL_Polish_national_debt_9
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_8 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_8
			add_idea = POL_Polish_national_debt_10
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_9 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_9
			add_idea = POL_Polish_national_debt_11
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_10 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_10
			add_idea = POL_Polish_national_debt_12
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_11 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_11
			add_idea = POL_Polish_national_debt_13
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_12 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_12
			add_idea = POL_Polish_national_debt_14
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_13 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_13
			add_idea = POL_Polish_national_debt_15
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_14 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_14
			add_idea = POL_Polish_national_debt_16
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_15 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_15
			add_idea = POL_Polish_national_debt_17
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_16 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_16
			add_idea = POL_Polish_national_debt_18
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_17 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_17
			add_idea = POL_Polish_national_debt_19
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_18 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_18
			add_idea = POL_Polish_national_debt_20
		}
	}
}

POL_decrease_national_debt_by_2 = {
	if = {
		limit = { has_idea = POL_Polish_national_debt_20 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_20
			add_idea = POL_Polish_national_debt_18
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_19 }

		swap_ideas = {
			remove_idea = POL_Polish_national_debt_19
			add_idea = POL_Polish_national_debt_17
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_18 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_18
			add_idea = POL_Polish_national_debt_16
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_17 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_17
			add_idea = POL_Polish_national_debt_15
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_16 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_16
			add_idea = POL_Polish_national_debt_14
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_15 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_15
			add_idea = POL_Polish_national_debt_13
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_14 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_14
			add_idea = POL_Polish_national_debt_12
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_13 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_13
			add_idea = POL_Polish_national_debt_11
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_12 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_12
			add_idea = POL_Polish_national_debt_10
		}
	}

	else_if = {
		limit = { has_idea = POL_Polish_national_debt_11 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_11
			add_idea = POL_Polish_national_debt_9
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_10 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_10
			add_idea = POL_Polish_national_debt_8
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_9 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_9
			add_idea = POL_Polish_national_debt_7
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_8 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_8
			add_idea = POL_Polish_national_debt_6
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_7 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_7
			add_idea = POL_Polish_national_debt_5
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_6 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_6
			add_idea = POL_Polish_national_debt_4
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_5 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_5
			add_idea = POL_Polish_national_debt_3
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_4 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_4
			add_idea = POL_Polish_national_debt_2
		}
	}
	else_if = {
		limit = { has_idea = POL_Polish_national_debt_3 }
		swap_ideas = {
			remove_idea = POL_Polish_national_debt_3
			add_idea = POL_Polish_national_debt_1
		}
	}
}

POL_increase_relations_with_PLD = {
	if = {
		limit = { check_variable = { POL_relations_with_PLD = -1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_PLD_tt
		set_variable = { var = POL_relations_with_PLD value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_PLD = 0 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_PLD_tt
		set_variable = { var = POL_relations_with_PLD value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_PLD
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_PLD = 1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_PLD_tt
		set_variable = { var = POL_relations_with_PLD value = 2 }
		hidden_effect = {
			add_ideas = POL_loyal_PLD
		}
	}
}

POL_decrease_relations_with_PLD = {
	if = {
		limit = { check_variable = { POL_relations_with_PLD = 2 compare = equals } }
		set_variable = { var = POL_relations_with_PLD value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_PLD
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_PLD = 1 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_PLD_tt
		set_variable = { var = POL_relations_with_PLD value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_PLD = 0 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_PLD_tt
		set_variable = { var = POL_relations_with_PLD value = -1 }
		hidden_effect = {
			add_ideas = POL_unfriendly_PLD
		}
	}
}

POL_increase_relations_with_SD = {
	if = {
		limit = { check_variable = { POL_relations_with_SD = -1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_SD = 0 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_SD
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_SD = 1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = 2 }
		hidden_effect = {
			add_ideas = POL_loyal_SD
		}
	}
}

POL_decrease_relations_with_SD = {
	if = {
		limit = { check_variable = { POL_relations_with_SD = 2 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_SD
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_SD = 1 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = 0 }

	}
	else_if = {
		limit = { check_variable = { POL_relations_with_SD = 0 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_SD_tt
		set_variable = { var = POL_relations_with_SD value = -1 }
		hidden_effect = {
			add_ideas = POL_unfriendly_SD
		}
	}
}

POL_increase_relations_with_KPEiR = {
	if = {
		limit = { check_variable = { POL_relations_with_KPEiR = -1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_KPEiR = 0 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_KPEiR
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_KPEiR = 1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = 2 }
		add_ideas = POL_loyal_KPEiR
	}
}

POL_decrease_relations_with_KPEiR = {
	if = {
		limit = { check_variable = { POL_relations_with_KPEiR = 2 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_KPEiR
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_KPEiR = 1 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_KPEiR = 0 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_KPEiR_tt
		set_variable = { var = POL_relations_with_KPEiR value = -1 }
		hidden_effect = {
			add_ideas = POL_unfriendly_KPEiR
		}
	}
}

POL_increase_relations_with_UP = {
	if = {
		limit = { check_variable = { POL_relations_with_up = -1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_up = 0 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_UP
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_up = 1 compare = equals } }
		custom_effect_tooltip = POL_increase_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = 2}
		hidden_effect = {
			add_ideas = POL_loyal_UP
		}
	}
}

POL_decrease_relations_with_UP = {
	if = {
		limit = { check_variable = { POL_relations_with_up = 2 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = 1 }
		hidden_effect = {
			add_ideas = POL_friendly_UP
		}
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_up = 1 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = 0 }
	}
	else_if = {
		limit = { check_variable = { POL_relations_with_up = 0 compare = equals } }
		custom_effect_tooltip = POL_decrease_relations_with_UP_tt
		set_variable = { var = POL_relations_with_up value = -1 }
		hidden_effect = {
			add_ideas = POL_unfriendly_UP

		}
	}
}
