POL_danzig_decisions = {

	POL_unification_propaganda = {

		icon = infiltrate_state

		available = {
			85 = {
				NOT = {
					has_dynamic_modifier = { modifier = unity_propaganda }
				}
			}
		}

		cost = 75
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		complete_effect = {
			85 = {
				add_dynamic_modifier = {
					modifier = unity_propaganda
					days = 60
				}
			}
		}
	}

	POL_military_appeasement = {

		icon = infiltrate_state

		available = {
			85 = {
				NOT = {
					has_dynamic_modifier = { modifier = military_appeasement }
				}
			}
		}

		custom_cost_trigger = {
			command_power > 24
			has_political_power > 49
		}
		custom_cost_text = decision_cost_CP_25_pp_50
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			command_power_gain = -0.1
		}
		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -50
			}
			85 = {
				add_dynamic_modifier = {
					modifier = military_appeasement
					days = 60
				}
			}
		}
	}

	POL_raid_nazi_resistance = {

		icon = infiltrate_state

		available = {
		}

		custom_cost_trigger = {
			command_power > 49
			has_political_power > 49
		}
		custom_cost_text = decision_cost_CP_50_pp_50
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			command_power_gain = -0.05
			political_power_gain = -0.05
		}
		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				add_political_power = -50
			}
			85 = {
				add_resistance = -15
				add_compliance = 10
			}
		}
	}

	POL_tighten_control = {

		icon = infiltrate_state

		available = {
			85 = {
				compliance > 40
			}
		}

		custom_cost_trigger = {
			command_power > 24
			has_political_power > 74
		}
		custom_cost_text = decision_cost_CP_25_pp_75
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			command_power_gain = -0.05
			political_power_gain = -0.05
		}
		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -75
			}
			85 = {
				add_resistance = -5
				POL_increase_danzig_control = yes
			}
		}
	}
}

POL_sanation_decisions = {
	POL_sanation_left_irritation = {

		allowed = { tag = POL }

		icon = {
			key = GFX_decision_POL_sanation_left_opposition_4
			trigger = {
				has_idea = POL_sanation_left_opposition_4
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_left_opposition_3
			trigger = {
				has_idea = POL_sanation_left_opposition_3
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_left_opposition_2
			trigger = {
				has_idea = POL_sanation_left_opposition_2
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_left_opposition_1
			trigger = {
				has_idea = POL_sanation_left_opposition_1
			}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 175
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			NOT = {
				has_idea = POL_sanation_left_opposition_1
				has_idea = POL_sanation_left_opposition_2
				has_idea = POL_sanation_left_opposition_3
				has_idea = POL_sanation_left_opposition_4
			}
		}
		
		activation = {
			always = no
		}

		visible = {
			OR = {
				has_idea = POL_sanation_left_opposition_1
				has_idea = POL_sanation_left_opposition_2
				has_idea = POL_sanation_left_opposition_3
				has_idea = POL_sanation_left_opposition_4
			}
		}
		
		cancel_effect = {
		
		}

		timeout_effect = {
			POL_sanation_left_opposition_up = yes
			activate_mission = POL_sanation_left_irritation
		}

		ai_will_do = {
			factor = 200
		}
	}
	POL_sanation_right_irritation = {

		allowed = { tag = POL }

		icon = {
			key = GFX_decision_POL_sanation_right_opposition_4
			trigger = {
				has_idea = POL_sanation_right_opposition_4
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_right_opposition_3
			trigger = {
				has_idea = POL_sanation_right_opposition_3
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_right_opposition_2
			trigger = {
				has_idea = POL_sanation_right_opposition_2
			}
		}

		icon = {
			key = GFX_decision_POL_sanation_right_opposition_1
			trigger = {
				has_idea = POL_sanation_right_opposition_1
			}
		}

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 175
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			NOT = {
				has_idea = POL_sanation_right_opposition_1
				has_idea = POL_sanation_right_opposition_2
				has_idea = POL_sanation_right_opposition_3
				has_idea = POL_sanation_right_opposition_4
			}
		}
		
		activation = {
			always = no
		}

		visible = {
			OR = {
				has_idea = POL_sanation_right_opposition_1
				has_idea = POL_sanation_right_opposition_2
				has_idea = POL_sanation_right_opposition_3
				has_idea = POL_sanation_right_opposition_4
			}
		}
		
		cancel_effect = {
		
		}

		timeout_effect = {
			POL_sanation_right_opposition_up = yes
			activate_mission = POL_sanation_right_irritation
		}

		ai_will_do = {
			factor = 200
		}
	}
	POL_sideline_the_left = {

		icon = infiltrate_state

		available = {
			NOT = {
				has_idea = POL_sanation_left_opposition_1
				has_completed_focus = POL_the_left_chairman
			}
		}

		visible = {
			has_active_mission = POL_sanation_left_irritation
		}

		cost = 100
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.05
			neutrality_drift = 0.1
		}
		complete_effect = {
			POL_sanation_left_opposition_down = yes
			POL_sanation_right_opposition_up = yes
		}
	}
	POL_sideline_the_right = {

		icon = infiltrate_state

		available = {
			NOT = {
				has_idea = POL_sanation_right_opposition_1
				has_completed_focus = POL_second_man_of_the_state
			}
		}

		visible = {
			has_active_mission = POL_sanation_right_irritation
		}

		cost = 100
		fire_only_once = no
		days_remove = 60
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.05
			neutrality_drift = 0.1
		}
		complete_effect = {
			POL_sanation_left_opposition_up = yes
			POL_sanation_right_opposition_down = yes
		}
	}
}

POL_peasant_strike_category = {
	POL_looming_peasants_strike_mission = {

		allowed = { tag = POL }

		icon = POL_looming_peasants_strike

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 365
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			has_completed_focus = POL_agrarian_reform
		}
		
		activation = {
			has_idea = POL_looming_peasants_strike
		}

		visible = {
			has_idea = POL_looming_peasants_strike
		}
		
		cancel_effect = {
		
		}

		timeout_effect = {
			activate_mission = POL_peasants_strike
			swap_ideas = {
				remove_idea = POL_looming_peasants_strike
				add_idea = POL_great_peasants_strike
			}
			hidden_effect = {
				country_event = poland.24
			}
		}

		ai_will_do = {
			factor = 200
		}
	}
	POL_peasants_strike = {

		allowed = { tag = POL }

		icon = POL_organize_strike_two

		available = {
			hidden_trigger = { always = no }
		}

		days_mission_timeout = 150
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			has_completed_focus = POL_agrarian_reform
		}

		activation = {
			has_idea = POL_great_peasants_strike
			NOT = { has_country_flag = peasants_war_happened_flag }
		}

		visible = {
			has_idea = POL_great_peasants_strike
		}
		
		cancel_effect = {
		
		}

		timeout_effect = {
			if = {
				limit = {
					NOT = { has_completed_focus = POL_organize_the_peasants_strike }
				}
				if = { #If Krakow is the capital, then start in Warsaw
					limit = {
						capital_scope = {
							state = 88
						}
					}
					start_civil_war = {
						ideology = democratic
						size = 0.6
						capital = 10
						states = { 
							10 92 91 1400 93 94 89 1256 1530 1532 1399 1531 1533 1534 1535 1484 #One state less but that's probably better than having Vilnius completely encircled by peasants (as Habsburg Poland)
						}
					}
				}
				else = { #Regular CW starting in Krakow
					start_civil_war = {
						ideology = democratic
						size = 0.6
						capital = 88
						states = { 
							88 89 91 1400 93 94 95 96 1529 1385 1386 1528 1483 1532 1399 1531 1533 1534 1535 1484 1261 1244 1246 1144 1145 1173
						}
					}
				}
				
				hidden_effect = {
					random_other_country = {
						limit = {
							original_tag = ROOT
							NOT = { tag = ROOT }
							has_government = democratic
						}
						promote_character = POL_stanislaw_mikolajczyk
						set_cosmetic_tag = POL_PEASANT
						save_event_target_as = peasant_poland_target
						set_popularities = { #The strike was mostly a coalition of SocDems, Socialists, and Communists
							democratic = 65
							communism = 35
						}
					}
				}
			}
			#If you have Organized the Peasant Strike, you will become the leader of the strike
			else = {
				#Initialize variables
				set_variable = {
					var = total_states
					value = 0
				}
				set_variable = {
					var = peasant_states
					value = 0
				}
				#Equipment size is added to the civil war size
				set_variable = {
					var = equipment_size_relevancy
					value = infantry_for_civil_war_var
				}
				divide_variable = {
					var = equipment_size_relevancy
					value = 20000 #1000 becomes 0.05
				}
				set_variable = {
					var = civil_war_size_var
					value = 1
				}
				every_owned_state = { #Gets the total number of states Poland owns
					owner = {
						add_to_variable = {
							var = total_states
							value = 1
						}
					}
				}
				every_owned_state = { #Gets the total number of states in the Peasant Strike
					limit = {
						has_state_flag = POL_added_to_strike_flag
					}
					owner = {
						add_to_variable = {
							var = peasant_states
							value = 1
						}
					}
				}
				set_variable = {
					var = peasant_size_var
					value = peasant_states
				}
				#Divides the number of peasant states by the total number of states to arrive at the civil war size ( If Poland owns 18 states, 9 peasant states means 18/9 = 0.5 )
				divide_variable = {
					var = peasant_size_var
					value = total_states
				}
				#Equipment size is added to the civil war size. Every 1000 equipment is 0.05 civil war size
				add_to_variable = {
					var = peasant_size_var
					value = equipment_size_relevancy
				}
				subtract_from_variable = {
					var = civil_war_size_var
					value = peasant_size_var
				}
				set_capital = { state = 88 } #Move the capital to Krakow
				start_civil_war = {
					ruling_party = democratic
					ideology = ROOT
					size = civil_war_size_var
					capital = 10 #The old government is moved to Warsaw
					states = all
					states_filter = {
						NOT = { has_state_flag = POL_added_to_strike_flag } #All non-Peasant states are added to the old government's side
					}
					keep_unit_leaders_trigger = {
						has_trait = peasant_sympathiser
						NOT = { has_trait = POL_sanation_right_leader }
					}
				}
				if = { #AI needs some equipment so that it does not die miserably
					limit = {
						is_ai = yes
					}
					add_equipment_to_stockpile = {
						type = infantry_equipment
						amount = 4000
						producer = POL
					}
				}
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = infantry_for_civil_war_var
					producer = POL
				}
				set_cosmetic_tag = POL_PEASANT
				save_event_target_as = peasant_poland_target
				set_variable = {
					var = pol_peasant_neutrality
					value = 100
				}
				subtract_from_variable = {
					var = pol_peasant_neutrality
					value = pol_peasant_democracy
				}
				subtract_from_variable = {
					var = pol_peasant_neutrality
					value = pol_peasant_communism
				}
				set_popularities = {
					democratic = pol_peasant_democracy
					communism = pol_peasant_communism
					neutrality = pol_peasant_neutrality
				}
				promote_character = POL_stanislaw_mikolajczyk
				hidden_effect = {
					random_other_country = {
						limit = {
							has_war_with = ROOT
							original_tag = ROOT
						}
						set_cosmetic_tag = POL_SANATION #Make the other side of the civil war less generic
					}
					division_template = { 
						name = "Peasant Militia"
						division_names_group = POL_INF_01
						is_locked = yes
						regiments = { 
							infantry = { x = 0 y = 0 }
							infantry = { x = 1 y = 0 }
							infantry = { x = 2 y = 0 }
							infantry = { x = 3 y = 0 }

							infantry = { x = 0 y = 1 }
							infantry = { x = 1 y = 1 }
						}
						support = {
							
						}
					}
					random_owned_controlled_state = {
						hidden_effect = {
							create_unit = { 
								division = "name = \"1. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
							create_unit = { 
								division = "name = \"2. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
						}
					}
					random_owned_controlled_state = {
						hidden_effect = {
							create_unit = { 
								division = "name = \"3. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
							create_unit = { 
								division = "name = \"4. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
						}
					}
					random_owned_controlled_state = {
						hidden_effect = {
							create_unit = { 
								division = "name = \"5. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
							create_unit = { 
								division = "name = \"6. Peasant Militia\" division_template = \"Peasant Militia\" start_experience_factor = 0.5" 
								owner = ROOT
							}
						}
					}
					if = {
						limit = {
							has_completed_focus = POL_arm_peasant_militia
						}
						POL_peasant_division_effect = yes
					}
				}
			}
			hidden_effect = {
				news_event = {
					id = nsb_news.1
					days = 1
				}
			}
		}

		ai_will_do = {
			factor = 200
		}
	}
	POL_crackdown_in_lviv = {

		allowed = { tag = POL }

		icon = GFX_decision_oppression

		available = {
			divisions_in_state = {
				state = 91	
				size > 4
			}
		}

		highlight_states = {
		 	highlight_state_targets = {
					state = 91
				} 
		}
		
		on_map_mode = map_and_decisions_view
		
		visible = {
			OR = {
				has_active_mission = POL_looming_peasants_strike_mission
				has_active_mission = POL_peasants_strike
			}
			OR = {
				has_completed_focus = POL_complete_april_constitution
				has_completed_focus = POL_assemble_the_regency_council
			}
			NOT = { has_completed_focus = POL_organize_the_peasants_strike }
		}

		fire_only_once = yes
		cost = 100
		days_remove = 60

		complete_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = 100
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = 90
				}
			}
		}

		remove_effect = {
			set_country_flag = POL_crackdown_in_lviv_flag
			unlock_decision_tooltip = POL_pacify_zamosc
		}

		ai_will_do = {
			factor = 20
		}
	}
	POL_pacify_zamosc = {

		allowed = { tag = POL }

		icon = GFX_decision_oppression

		available = {
			divisions_in_state = {
				state = 1528	
				size > 9
			}
		}

		highlight_states = {
		 	highlight_state_targets = {
					state = 1528
				} 
		}
		
		visible = {
			OR = {
				has_active_mission = POL_looming_peasants_strike_mission
				has_active_mission = POL_peasants_strike
			}
			NOT = { has_completed_focus = POL_organize_the_peasants_strike }
			has_country_flag = POL_crackdown_in_lviv_flag
		}

		fire_only_once = yes
		cost = 90
		days_remove = 60

		complete_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = 70
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = 60
				}
			}
			hidden_effect = {
				set_variable = {
					var = strike_days_remove_var
					value = 60
				}
				random_owned_controlled_state = {
					limit = {
						OR = {
							is_core_of = UKR
							is_core_of = BLR
							state = 92
							state = 97
						}
					}
					PREV = {
						set_variable = {
							var = peasant_state_var
							value = PREV
						}
					}
				}
			}
		}

		remove_effect = {
			set_country_flag = POL_pacify_zamosc_flag
			unlock_decision_tooltip = POL_pacify_peasants_repeatable
		}

		ai_will_do = {
			factor = 20
		}
	}
	POL_pacify_peasants_repeatable = {

		allowed = { tag = POL }

		icon = GFX_decision_oppression

		available = {
			divisions_in_state = {
				state = var:peasant_state_var	
				size > 9
			}
		}

		highlight_states = {
		 	highlight_state_targets = {
					state = var:peasant_state_var
				} 
		}
		
		visible = {
			OR = {
				has_active_mission = POL_looming_peasants_strike_mission
				has_active_mission = POL_peasants_strike
			}
			NOT = { has_completed_focus = POL_organize_the_peasants_strike }
			has_country_flag = POL_pacify_zamosc_flag
			check_variable = {
				strike_days_remove_var > 29
			}
		}

		fire_only_once = no
		cost = 80
		days_remove = 60

		complete_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = var:strike_days_remove_var
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = var:strike_days_remove_var
				}
			}
			hidden_effect = {
				subtract_from_variable = {
					var = strike_days_remove_var
					value = 10
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				random_owned_controlled_state = {
					limit = {
						OR = {
							is_core_of = UKR
							is_core_of = BLR
							state = 92
							state = 97
						}
						NOT = {
							state = var:peasant_state_var #Prevent the same state from being targeted twice
						}
					}
					PREV = {
						set_variable = {
							var = peasant_state_var
							value = PREV
						}
					}
				}
			}
		}

		ai_will_do = {
			factor = 20
		}
	}
}

POL_organize_the_peasants_strike = {
	POL_escelate_the_strike = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_interacting_with_peasants_flag }
		}

		visible = {
			is_debug = yes
		}

		fire_only_once = no
		days_remove = 1
		ai_will_do = {
			base = 0
		}
		
		remove_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = -365
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = -150
				}
			}
			clr_country_flag = POL_interacting_with_peasants_flag
		}
		
		complete_effect = {
			set_country_flag = POL_interacting_with_peasants_flag
		}
	}

	POL_woo_military_staff = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_interacting_with_peasants_flag }
			any_army_leader = {
				NOT = { has_trait = POL_sanation_right_leader }
				NOT = { has_trait = peasant_sympathiser }
			}
		}

		visible = {
			has_country_flag = POL_morges_flag
		}

		custom_cost_trigger = {
			command_power > 24
			has_political_power > 24
		}
		custom_cost_text = decision_cost_CP_25_pp_25
		fire_only_once = no
		days_remove = 25
		ai_will_do = {
			factor = 10
		}
		
		remove_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = -5
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = -10
				}
			}

			IF = {
				limit = { var:ROOT.woo_general_selected = { has_trait = POL_sanation_left_leader } }
				var:ROOT.woo_general_selected = { remove_unit_leader_trait = POL_sanation_left_leader } 
			}
			var:ROOT.woo_general_selected = { add_unit_leader_trait = peasant_sympathiser }

			hidden_effect = { #Next leader to be targeted by these decisions
				if = {
					limit = {
						any_army_leader = {
							NOT = { has_trait = POL_sanation_right_leader }
							NOT = { has_trait = POL_sanation_left_leader }
							NOT = { has_trait = peasant_sympathiser }
						}
					}
					random_army_leader = {
						limit = {
							NOT = { has_trait = POL_sanation_right_leader }
							NOT = { has_trait = POL_sanation_left_leader }
							NOT = { has_trait = peasant_sympathiser }
						}
						set_variable = { ROOT.woo_general_selected = THIS }
					}
				}
				else = { #It should be possible to woo Sanation Left leaders, but less likely.
					random_army_leader = {
						limit = {
							NOT = { has_trait = POL_sanation_right_leader }
							NOT = { has_trait = peasant_sympathiser }
						}
						set_variable = { ROOT.woo_general_selected = THIS }
					}
				}
			}
			clr_country_flag = POL_interacting_with_peasants_flag
		}
		
		complete_effect = {
			hidden_effect = {
				add_political_power = -25
				add_command_power = -25
			}
			set_country_flag = POL_interacting_with_peasants_flag
		}
	}

	POL_seize_equipment = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_interacting_with_peasants_flag }
			any_army_leader = {
				NOT = { has_trait = POL_sanation_right_leader }
				NOT = { has_trait = peasant_sympathiser }
			}
		}

		visible = {
			
		}

		custom_cost_trigger = {
			has_political_power > 24
			has_equipment = { infantry_equipment > 999 }
		}
		custom_cost_text = decision_cost_pp_25_ie_1000
		fire_only_once = no
		days_remove = 25
		ai_will_do = {
			factor = 10
		}
		
		remove_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = -5
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = -10
				}
			}
			hidden_effect = {
				add_equipment_to_stockpile = {
					type = infantry_equipment
					amount = -1000
				}
				add_to_variable = {
					var = infantry_for_civil_war_var
					value = 1000
				}
				add_political_power = -25
			}
			custom_effect_tooltip = more_equipment_civil_war_tt
			clr_country_flag = POL_interacting_with_peasants_flag
		}
		
		complete_effect = {
			set_country_flag = POL_interacting_with_peasants_flag
		}
	}

	POL_add_state_to_strike = {

		icon = {
			key = POL_looming_peasants_strike
			trigger = {
				NOT = { FROM = { has_state_flag = POL_added_to_strike_flag } }
			}
		}

		icon = {
			key = POL_organize_strike_two
			trigger = {
				FROM = { has_state_flag = POL_added_to_strike_flag }
			}
		}

		state_target = yes
		
		targets = { 96 784 95 94 93 91 1400 89 90 88 92 97 98 87 86 807 85 762 1554 1389 1481 1252 1482 1245 1241 1242 1530 1238 1247 1248 1244 1239 1243 1246 1240 1261 1535 1484 1534 1533 1531 1532 1399 1483 1528 1256 1141 1142 1143 1144 1145 1173 }

		available = {
			NOT = { has_country_flag = adding_state_to_strike_flag }
			FROM = {
				NOT = {
					has_state_flag = POL_added_to_strike_flag
				}
				is_demilitarized_zone = no #Danzig should not be added unless it has been dealt with
			}
		}
		target_trigger = {
			FROM = {
				is_core_of = POL
				OR = {
					owner = { has_country_flag = POL_expanded_to_factories }
					state = 97
					state = 1241
					state = 1242
					state = 88
					state = 1144
					state = 1145
					state = 1529
					state = 1385
					state = 1386
					state = 1528
					state = 1483
					is_core_of = UKR #Ukraine and Belarus are where the majority of Poland's agriculture was, expanding it beyond those states would mean expanding the strike to the industrial sector.
					is_core_of = BLR
				}
			}
		}
		visible = {
		}

		fire_only_once = no
		custom_cost_trigger = {
			command_power > 2
			has_political_power > 14
		}
		custom_cost_text = decision_cost_CP_3_pp_15

		days_remove = 14
		on_map_mode = map_only
		complete_effect = {
			hidden_effect = {
				FROM = { set_state_flag = POL_currently_being_added_to_strike_flag }
				add_political_power = -15
				add_command_power = -3
			}
			set_country_flag = adding_state_to_strike_flag
		}
		
		remove_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = -10
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = -20
				}
			}
			clr_country_flag = adding_state_to_strike_flag
			FROM = {
				set_state_flag = POL_added_to_strike_flag
			}
		}

		ai_will_do = {
			base = 100
			modifier = { #Make sure peasant strike borders are contiguous
				factor = 0
				NOT = {
					FROM = {
						any_neighbor_state = {
							has_state_flag = POL_added_to_strike_flag
						}
					}
				}
			}
			modifier = { #Go for mils, you need them
				factor = 100
				FROM = {
					arms_factory > 0
				}
			}
			modifier = { #Civs aren't bad either
				factor = 10
				FROM = {
					industrial_complex > 0
				}
			}
		}
	}
	POL_expand_strikes_to_factories = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_interacting_with_peasants_flag }
			any_owned_state = {
				OR = {
					is_core_of = UKR
					is_core_of = BLR
				}
				has_state_flag = POL_added_to_strike_flag
			}
		}

		visible = {
			NOT = { has_country_flag = POL_expanded_to_factories }
		}

		cost = 50
		fire_only_once = no
		days_remove = 10
		ai_will_do = {
			factor = 5 # the AI should be unlikely to move into the factories
		}
		
		remove_effect = {
			if = {
				limit = {
					has_active_mission = POL_looming_peasants_strike_mission
				}
				add_days_mission_timeout  = {
					mission = POL_looming_peasants_strike_mission
					days = -25
				}
			}
			if = {
				limit = {
					has_active_mission = POL_peasants_strike
				}
				add_days_mission_timeout  = {
					mission = POL_peasants_strike
					days = -25
				}
			}
			set_country_flag = POL_expanded_to_factories
			clr_country_flag = POL_interacting_with_peasants_flag
			custom_effect_tooltip = POL_expand_strikes_to_factories_tt
		}
		
		complete_effect = {
			set_country_flag = POL_interacting_with_peasants_flag
		}
	}
}

POL_invite_foreign_motor_decisions = {
	POL_invite_ford = {

		icon = infiltrate_state

		available = {
			USA = {
				has_opinion = {
					target = POL
					value > 25
				}
			}
		}

		visible = {
			has_completed_focus = POL_attract_foreign_motors
			NOT = {
				has_country_flag = invited_motor_co
			}
		}

		cost = 0
		fire_only_once = yes
		ai_will_do = {
			factor = 2
		}
		complete_effect = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				custom_effect_tooltip = available_mio_tt
				show_mio_tooltip = USA_ford_motor_company_organization
			}
			else = {
				show_ideas_tooltip = POL_ford
			}
			set_country_flag = invited_motor_co
			set_country_flag = POL_ford_motors
		}
	}
	POL_invite_vauxhall = {

		icon = infiltrate_state

		available = {
			ENG = {
				has_opinion = {
					target = POL
					value > 25
				}
			}
		}

		visible = {
			has_completed_focus = POL_attract_foreign_motors
			NOT = {
				has_country_flag = invited_motor_co
			}
		}

		cost = 0
		fire_only_once = yes
		ai_will_do = {
			factor = 2
		}
		complete_effect = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				custom_effect_tooltip = available_mio_tt
				show_mio_tooltip = ENG_vauxhall_automotive_organization
			}
			else = {
				show_ideas_tooltip = POL_vauxhall
			}
			set_country_flag = invited_motor_co
			set_country_flag = POL_vauxhall_motors
		}
	}
	POL_invite_somua = {

		icon = infiltrate_state

		available = {
			FRA = {
				has_opinion = {
					target = POL
					value > 25
				}
			}
		}

		visible = {
			has_completed_focus = POL_attract_foreign_motors
			NOT = {
				has_country_flag = invited_motor_co
			}
		}

		cost = 0
		fire_only_once = yes
		ai_will_do = {
			factor = 2
		}
		complete_effect = {
			if = {
				limit = {
					has_dlc = "Arms Against Tyranny"
				}
				custom_effect_tooltip = available_mio_tt
				show_mio_tooltip = FRA_somua_organization
			}
			else = {
				show_ideas_tooltip = POL_somua
			}
			set_country_flag = invited_motor_co
			set_country_flag = POL_somua_motors
		}
	}
}

POL_miedzymorze_decisions = {
	POL_diplomatic_mission_to_FIN = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_the_north_sea
			FIN = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			FIN = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_DEN = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_finno_polish_pact
			DEN = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			DEN = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_NOR = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_finno_polish_pact
			NOR = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			NOR = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_SWE = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_finno_polish_pact
			SWE = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			SWE = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_CZE = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_the_mediterranean
			CZE = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			CZE = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_YUG = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_the_mediterranean
			YUG = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			YUG = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_AUS = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_coerce_czechoslovakia
			AUS = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			AUS = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_HUN = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_coerce_czechoslovakia
			HUN = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			HUN = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_GRE = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_protect_yugoslavia
			NOT = {
				has_completed_focus = POL_control_the_bosporus
			}
			GRE = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			GRE = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_TUR = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
		}

		visible = {
			has_completed_focus = POL_protect_yugoslavia
			NOT = {
				has_completed_focus = POL_invite_greece
			}
			TUR = {
				is_ai = yes
				exists = yes
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			TUR = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
	POL_diplomatic_mission_to_ITA = {

		icon = infiltrate_state

		available = {
			NOT = { has_country_flag = POL_completing_miedzymorze_decision }
			has_completed_focus = POL_austro_hungarian_alliance
			OR = {
				has_completed_focus = POL_invite_greece
				has_completed_focus = POL_control_the_bosporus
			}
		}

		visible = {
			OR = {
				has_completed_focus = POL_austro_hungarian_alliance
				has_completed_focus = POL_invite_greece
				has_completed_focus = POL_control_the_bosporus
			}
			ITA = {
				NOT = {
					is_in_faction = yes
					has_war_with = ROOT
					has_country_flag = rejected_miedzymorze_flag
					has_country_flag = delegation_recieved_flag
				}
			}
		}

		cost = 10
		fire_only_once = yes
		days_remove = 35
		ai_will_do = {
			factor = 2
		}
		modifier = {
			political_power_gain = -0.1
		}
		remove_effect = {
			custom_effect_tooltip = more_likely_to_join_miezymorze_tt
			clr_country_flag = POL_completing_miedzymorze_decision
			ITA = {
				set_country_flag = delegation_recieved_flag
				add_ai_strategy = {
					type = alliance
					id = POL
					value = 20
				}
			}
		}
		complete_effect = {
			set_country_flag = POL_completing_miedzymorze_decision
		}
	}
}

POL_defensive_plans = {
	POL_defend_in_east_state = {

		icon = hol_draw_up_staff_plans

		state_target = any_controlled_state
		target_root_trigger = {
			has_completed_focus = POL_local_eastern_plans
			has_war_with = SOV
			num_of_controlled_states > 0
		}
		available = {
			FROM = {
				OR = {
					AND = {
						is_controlled_by = POL
						any_neighbor_state = {
							is_controlled_by = SOV
						}
					}
					AND = {
						is_controlled_by = SOV
						any_neighbor_state = {
							is_controlled_by = POL
						}
					}
				}
			}
			has_war_with = SOV
		}
		target_trigger = {
			FROM = {
				OR = {
					AND = {
						is_controlled_by = POL
						any_neighbor_state = {
							is_controlled_by = SOV
						}
					}
					AND = {
						is_controlled_by = SOV
						any_neighbor_state = {
							is_controlled_by = POL
						}
					}
				}
			}
		}
		visible = {
			has_completed_focus = POL_local_eastern_plans
		}

		fire_only_once = no
		cost = 50

		days_re_enable = 60
		on_map_mode = map_only
		complete_effect = {
			FROM = { 
				add_dynamic_modifier = {
					modifier = POL_anti_soviet_offensive
					days = 60
					scope = POL
				}
			}
		}

		ai_will_do = {
			base = 0
		}
	}
	POL_defend_in_west_state = {

		icon = hol_draw_up_staff_plans

		state_target = any_controlled_state

		available = {
			FROM = {
				OR = {
					AND = {
						is_controlled_by = POL
						any_neighbor_state = {
							is_controlled_by = GER
						}
					}
					AND = {
						is_controlled_by = GER
						any_neighbor_state = {
							is_controlled_by = POL
						}
					}
				}
			}
			has_war_with = GER
		}
		target_trigger = {
			FROM = {
				OR = {
					AND = {
						is_controlled_by = POL
						any_neighbor_state = {
							is_controlled_by = GER
						}
					}
					AND = {
						is_controlled_by = GER
						any_neighbor_state = {
							is_controlled_by = POL
						}
					}
				}
			}
		}
		visible = {
			has_completed_focus = POL_local_western_plans
		}

		fire_only_once = no
		cost = 50

		days_re_enable = 60
		on_map_mode = map_only
		complete_effect = {
			FROM = { 
				add_dynamic_modifier = {
					modifier = POL_anti_german_offensive
					days = 60
					scope = POL
				}
			}
		}

		ai_will_do = {
			base = 10
		}
	}
}

POL_reopen_the_maritime_and_colonial_league = {

	# Purchasing Madagascar
	POL_purchase_madagascar = {

		icon = decision_generic_nationalism

		allowed = {
		}

		available = {
			543 = {
				owner = {
					is_in_faction_with = ROOT
				}
			}
		}
		
		visible = {
			NOT = {
				owns_state = 543
			}
			NOT = {
				543 = {
					has_state_flag = rejected_purchase_flag
				}
			}
			MAD = { exists = no }
		}
		
		highlight_states = {
			highlight_states_trigger = {
				OR = {
					state = 543
					AND = {
						state = 708
						708 = {
							owner = { is_in_faction_with = ROOT }
						}
					}
					AND = {
						state = 706
						706 = {
							owner = { is_in_faction_with = ROOT }
						}
					}
				}
			}
		}

		on_map_mode = map_and_decisions_view

		custom_cost_trigger = {
			num_of_civilian_factories_available_for_projects > 4
		}
		custom_cost_text = decision_cost_civ_factory_5
		
		fire_only_once = yes
		days_remove = 720
		
		modifier = {
			civilian_factory_use = 5
		}

		complete_effect = {
			543 = {
				save_event_target_as = POL_colony_purchase
				owner = {
					country_event = { id = NSB_poland_events.4 } #Event where the owner gets to decide if they want to sell Madagascar (and Comoro and Reunion if they are owned)
				}
			}
		}

		ai_will_do = {
			factor = 10
		}

	}

	# Purchasing Gambia
	POL_purchase_gambia = {

		icon = decision_generic_nationalism

		allowed = {
		}

		available = {
			701 = {
				owner = {
					is_in_faction_with = ROOT
				}
			}
		}
		
		visible = {
			NOT = {
				owns_state = 701
			}
			NOT = {
				701 = {
					has_state_flag = rejected_purchase_flag
				}
			}
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = 701
			}
		}

		on_map_mode = map_and_decisions_view

		custom_cost_trigger = {
			num_of_civilian_factories_available_for_projects > 0
		}
		custom_cost_text = decision_cost_civ_factory_1
		
		fire_only_once = yes
		days_remove = 720
		
		modifier = {
			civilian_factory_use = 1
		}

		complete_effect = {
			701 = {
				save_event_target_as = POL_colony_purchase
				owner = {
					country_event = { id = NSB_poland_events.5 }
				}
			}
		}

		ai_will_do = {
			factor = 10
		}

	}

	# Purchasing Cameroon
	POL_purchase_cheap_colony = {

		icon = decision_generic_nationalism
		
		state_target = yes
		
		target_trigger = {
			FROM = {
				OR = {
					state = 773 #Cameroon
					state = 546 #Tanganyika
					state = 454 #Palestine
				}
			}
		}

		available = {
			FROM = {
				owner = {
					is_in_faction_with = ROOT
				}
				is_capital = no #Prevent countries from selling their last state (ie, Cameroon should not be able to sell itself)
			}
		}
		
		visible = {
			NOT = {
				owns_state = FROM
			}
			NOT = {
				FROM = {
					has_state_flag = rejected_purchase_flag
				}
			}
		}
		
		highlight_states = {
			highlight_states_trigger = {
				state = FROM
			}
		}


		on_map_mode = map_and_decisions_view

		custom_cost_trigger = {
			num_of_civilian_factories_available_for_projects > 2
		}
		custom_cost_text = decision_cost_civ_factory_3
		
		fire_only_once = yes
		days_remove = 720
		
		modifier = {
			civilian_factory_use = 3
		}

		complete_effect = {
			FROM = {
				save_event_target_as = POL_colony_purchase
				owner = {
					country_event = { id = NSB_poland_events.5 }
				}
			}
		}

		ai_will_do = {
			factor = 10
		}

	}
}

POL_anti_capitalist_decisions = {
	POL_anti_capitalist_revolution = {

		icon = decision_generic_nationalism

		allowed = {
		}

		available = {
			has_war_with = FROM
		}

		activation = { has_completed_focus = POL_anti_capitalist_revolution }
		
		target_trigger = {
			FROM = {
				is_major = yes
				has_government = democratic
			}
		}

		visible = {
			
		}

		cancel_trigger = {
			FROM = {
				OR = {
					is_major = no
					has_government = communism
					has_government = fascism
					has_government = neutrality
				}
			}
		}

		fire_only_once = no
		days_remove = -1
		
		targeted_modifier = {
			tag = FROM
			attack_bonus_against = 0.1
			defense_bonus_against = 0.1
		}

		complete_effect = {
			
		}

		ai_will_do = {
			factor = 10
		}
	}
}

POL_anti_fascist_revolution_category = {
	POL_anti_fascist_military = {

		icon = decision_generic_nationalism

		allowed = {
		}

		available = {
			has_war_with = FROM
		}

		activation = { has_completed_focus = POL_anti_fascist_military }
		
		target_trigger = {
			FROM = {
				is_major = yes
				has_government = fascism
			}
		}

		visible = {
			
		}

		cancel_trigger = {
			FROM = {
				OR = {
					is_major = no
					NOT = { has_government = fascism }
				}
			}
		}

		fire_only_once = no
		days_remove = -1
		
		targeted_modifier = {
			tag = FROM
			attack_bonus_against = 0.1
			defense_bonus_against = 0.1
		}

		complete_effect = {
			
		}

		ai_will_do = {
			factor = 10
		}
	}
}

POL_support_monarchy_in_LIT_cat = {
	POL_propagandise_monarchist_sentiment = {

		icon = eng_propaganda_campaigns

		available = {
		}
		targets = {
			CZE LIT ROM POL
		}

		cancel_trigger = {
			hidden_trigger = {
				POL_is_valid_to_boost_monarchy = no
			}
		}

		target_trigger = {

		}
		
		visible = {
			POL_is_valid_to_boost_monarchy = yes
		}
		
		fire_only_once = no
		days_remove = 20

		cost = 50

		remove_effect = {
			FROM = {
				add_to_variable = {
					var = monarchist_support
					value = 10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
				custom_effect_tooltip = add_10_monarchy_tt
			}
		}

		ai_will_do = {
			factor = 10
		}

	}

	POL_double_propagandise_monarchist_sentiment = {

		icon = decision_generic_nationalism

		available = {
			FROM = {
				custom_trigger_tooltip = {
					tooltip = has_monarchy_support_25_tt
					check_variable = {
						monarchist_support > 24
					}
				}
			}
		}
		targets = {
			CZE LIT ROM POL
		}
		target_trigger = {
		}

		cancel_trigger = {
			hidden_trigger = {
				POL_is_valid_to_boost_monarchy = no
			}
		}
		
		visible = {
			POL_is_valid_to_boost_monarchy = yes
		}
		
		fire_only_once = no
		days_remove = 25

		cost = 100

		remove_effect = {
			FROM = {
				add_to_variable = {
					var = monarchist_support
					value = 15
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
				custom_effect_tooltip = add_15_monarchy_tt
			}
		}

		ai_will_do = {
			factor = 10
		}

	}

	POL_sway_lithuanian_generals = {

		icon = generic_army_support

		available = {
			FROM = {
				custom_trigger_tooltip = {
					tooltip = has_monarchy_support_25_tt
					check_variable = {
						monarchist_support > 24
					}
				}
			}
		}
		targets = {
			CZE LIT ROM POL
		}
		target_trigger = {

		}
		
		cancel_trigger = {
			hidden_trigger = {
				POL_is_valid_to_boost_monarchy = no
			}
		}
		
		visible = {
			POL_is_valid_to_boost_monarchy = yes
		}
		
		fire_only_once = no
		days_remove = 25

		custom_cost_trigger = {
			command_power > 24
			has_political_power > 24
		}
		custom_cost_text = decision_cost_CP_25_pp_25
		
		complete_effect = {
			hidden_effect = {
				add_command_power = -25
				add_political_power = -25
			}
		}

		remove_effect = {
			FROM = {
				add_to_variable = {
					var = monarchist_support
					value = 10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
			}

			custom_effect_tooltip = add_10_monarchy_tt
			custom_effect_tooltip = random_general_monarchy_tt
			hidden_effect = {
				FROM = {
					random_unit_leader = {
						set_unit_leader_flag = POL_monarchy_sympathies_flag
					}
				}
			}
		}

		ai_will_do = {
			factor = 10
		}

	}

	POL_invest_in_lithuania = {

		icon = generic_construction

		available = {
			FROM = {
				custom_trigger_tooltip = {
					tooltip = has_monarchy_support_25_tt
					check_variable = {
						monarchist_support > 24
					}
				}
			}
		}
		targets = {
			CZE LIT ROM POL
		}
		target_trigger = {

		}

		cancel_trigger = {
			hidden_trigger = {
				POL_is_valid_to_boost_monarchy = no
			}
		}

		cancel_effect = {
			FROM = { remove_ideas = POL_investments_monarchist }
		}
		
		visible = {
			POL_is_valid_to_boost_monarchy = yes
		}
		
		fire_only_once = no
		days_remove = 30

		custom_cost_trigger = {
			num_of_civilian_factories_available_for_projects > 2
		}
		custom_cost_text = decision_cost_civ_factory_3
		
		modifier = {
			civilian_factory_use = 3
		}
		
		complete_effect = {
			FROM = { add_ideas = POL_investments_monarchist }
		}

		remove_effect = {
			FROM = {
				add_to_variable = {
					var = monarchist_support
					value = 10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
			}
			custom_effect_tooltip = add_10_monarchy_tt
			FROM = { remove_ideas = POL_investments_monarchist }
		}

		ai_will_do = {
			factor = 10
		}

	}

	POL_arm_monarchist_militants = {

		icon = generic_prepare_civil_war

		available = {
			if = {
				limit = {
					OR = {
						has_completed_focus = POL_support_monarchism_in_LIT
						has_completed_focus = POL_internal_romanian_support
					}
				}
				has_completed_focus = POL_arm_monarchist_militants
			}
			if = {
				limit = {
					has_completed_focus = POL_support_monarchy_in_CZE
				}
				has_completed_focus = POL_habsburg_monarchist_militants
			}
			IF = {
				limit = { tag = LIT }
				has_completed_focus = LIT_arm_monarchist_militants
			}
		}
		targets = {
			CZE LIT ROM POL
		}
		target_trigger = {

		}
		
		cancel_trigger = {
			hidden_trigger = {
				POL_is_valid_to_boost_monarchy = no
			}
		}

		visible = {
			POL_is_valid_to_boost_monarchy = yes
		}
		
		fire_only_once = no
		days_remove = 30

		custom_cost_trigger = {
			has_equipment = { infantry_equipment > 999 }
		}
		custom_cost_text = decision_cost_ie_1000
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -1000
			}
		}

		remove_effect = {
			FROM = {
				add_to_variable = {
					var = monarchist_support
					value = 15
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
			}
			custom_effect_tooltip = add_15_monarchy_tt
		}

		ai_will_do = {
			factor = 10
		}

	}
}

POL_fight_against_monarchy_in_LIT_cat = {

	POL_suppress_monarchist_sentiment = {	

		icon = decision_generic_nationalism

		available = {
			#NOT = { has_active_mission = POL_growing_monarchist_sentiment }
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_1_tt
				check_variable = {
					monarchist_support > 0
				}
			}
			hidden_trigger = { is_ai = no }
		}
		
		targets = {
			LIT POL CZE ROM
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}

		visible = {
			
		}
		
		fire_only_once = no
		days_remove = 20

		cost = 50

		remove_effect = {
			custom_effect_tooltip = remove_10_monarchy_tt
			ROOT = {
				add_to_variable = {
					var = monarchist_support
					value = -10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
			}
		}

		ai_will_do = {
			factor = 10
		}
	}

	POL_ban_monarchist_propaganda = {

		icon = decision_generic_nationalism

		available = {
			has_decision = POL_suppress_monarchist_sentiment
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_10_tt
				check_variable = {
					monarchist_support > 9
				}
			}
			hidden_trigger = { is_ai = no }
		}
		
		cancel_trigger = {
			hidden_trigger ={
				POL_is_valid_to_reject_monarchy = no
			}
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}
		
		
		visible = {
			
		}
		
		fire_only_once = no
		days_remove = 20

		cost = 50

		remove_effect = {
			custom_effect_tooltip = remove_10_monarchy_tt
				add_to_variable = {
					var = monarchist_support
					value = -10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
		}

		ai_will_do = {
			factor = 0
		}
	}

	POL_root_out_monarchists = {

		icon = generic_prepare_civil_war

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_25_tt
				check_variable = {
					monarchist_support > 24
				}
			}
		}
		
		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}

		cancel_trigger = {
			hidden_trigger ={
				POL_is_valid_to_reject_monarchy = no
			}
		}
		
		visible = {
			
		}
		
		fire_only_once = no
		days_remove = 25

		custom_cost_trigger = {
			command_power > 49
		}
		custom_cost_text = decision_cost_CP_50
		
		complete_effect = {
			hidden_effect = {
				add_command_power = -50
			}
		}

		remove_effect = {
			custom_effect_tooltip = remove_10_monarchy_tt
				add_to_variable = {
					var = monarchist_support
					value = -10
				}
				clamp_variable = {
					var = monarchist_support
					min = 0
					max = 100
				}
		}

		ai_will_do = {
			factor = 10
		}
	}

	POL_anti_monarchist_purge = {

		icon = decision_generic_nationalism

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_25_tt
				check_variable = {
					monarchist_support > 24
				}
			}
		}
		
		cancel_trigger = {
			hidden_trigger ={
				POL_is_valid_to_reject_monarchy = no
			}
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}
		
		
		visible = {
			
		}
		
		fire_only_once = no
		days_remove = 25

		custom_cost_trigger = {
			command_power > 49
			has_political_power > 24
		}
		custom_cost_text = decision_cost_CP_50_pp_50
		
		complete_effect = {
			hidden_effect = {
				add_command_power = -50
				add_political_power = -25
			}
		}

		remove_effect = {
			custom_effect_tooltip = remove_20_monarchy_tt
			add_to_variable = {
				var = monarchist_support
				value = -20
			}
			clamp_variable = {
				var = monarchist_support
				min = 0
				max = 100
			}
		}

		ai_will_do = {
			factor = 0
		}
	}

	POL_ban_polish_imports = {

		icon = generic_break_treaty

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_25_tt
				check_variable = {
					monarchist_support > 24
				}
			}
		}
		
		cancel_trigger = {
			hidden_trigger ={
				POL_is_valid_to_reject_monarchy = no
			}
		}

		targets = {
			LIT POL
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}
		
		visible = {
			
		}
		
		fire_only_once = no
		days_remove = 45

		custom_cost_trigger = {
			always = yes
		}
		custom_cost_text = decision_cost_civ_factory_3
		
		modifier = {
			civilian_factory_use = 3
		}

		remove_effect = {
			custom_effect_tooltip = remove_15_monarchy_tt
			add_to_variable = {
				var = monarchist_support
				value = -15
			}
			clamp_variable = {
				var = monarchist_support
				min = 0
				max = 100
			}
		}

		ai_will_do = {
			factor = 0
		}
	}

	POL_skirmish_with_monarchist_militants = {

		icon = generic_prepare_civil_war

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_80_tt
				check_variable = {
					monarchist_support > 79
				}
			}
		}
		
		cancel_trigger = {
			hidden_trigger ={
				POL_is_valid_to_reject_monarchy = no
			}
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}
		
		visible = {

		}

		fire_only_once = no
		days_remove = 30

		custom_cost_trigger = {
			has_equipment = { infantry_equipment > 499 }
		}
		custom_cost_text = decision_cost_ie_500
		
		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = -500
			}
		}

		remove_effect = {
			custom_effect_tooltip = remove_20_monarchy_tt
			add_to_variable = {
				var = monarchist_support
				value = -20
			}
			clamp_variable = {
				var = monarchist_support
				min = 0
				max = 100
			}
		}

		ai_will_do = {
			factor = 0
		}
	}

	POL_monarchist_civil_war = {

		icon = generic_ignite_civil_war

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_lessthan_40_tt
				check_variable = {
					monarchist_support < 39
				}
			}
		}
		
		
		visible = {

		}
		
		fire_only_once = yes

		cost = 50
		
		complete_effect = {
			POL_monarchist_civil_war_effect = yes
		}

		ai_will_do = {
			factor = 0
		}
	}

	POL_ban_monarchists = {

		icon = eng_propaganda_campaigns

		available = {
			custom_trigger_tooltip = {
				tooltip = has_monarchy_support_lessthan_20_tt
				check_variable = {
					monarchist_support < 19
				}
			}
			hidden_trigger = { is_ai = no }
		}

		targets = {
			LIT POL
		}

		target_trigger = {
			POL_is_valid_to_reject_monarchy = yes
		}
		
		cancel_trigger = {
			hidden_trigger ={
				OR = {
					has_country_flag = POL_banned_monarchy_flag
					has_completed_focus = POL_support_monarchy_in_CZE
					has_completed_focus = POL_internal_romanian_support
					has_completed_focus = LIT_a_king_for_our_people
					has_completed_focus = LIT_support_monarchism_in_POL
					has_country_flag = achievement_POL_elected_monarch
					AND = {
						original_tag = LIT 
						POL = { has_country_flag = attempted_royal_takeover_in_LIT }
					}
					AND = {
						original_tag = POL 
						LIT = { has_country_flag = attempted_royal_takeover_in_POL }
					}
					AND = {
						original_tag = CZE 
						POL = { has_country_flag = attempted_royal_takeover_in_CZE }
					}
					AND = {
						original_tag = ROM 
						POL = { has_country_flag = attempted_royal_takeover_in_ROM }
					}
				}
			}
		}
		
		visible = {

		}
		
		fire_only_once = yes

		cost = 100

		days_remove = 15

		complete_effect = {
		}

		remove_effect = {
			custom_effect_tooltip = monarchy_banned_tt
			FROM = {
				country_event = NSB_poland_monarchist_events.2
			}
			hidden_effect = {
				set_country_flag = POL_banned_monarchy_flag
			}
		}

		ai_will_do = {
			factor = 0
		} 
	}
}

POL_cossack_republic_decisions = {
	POL_restore_don_cossacks = {

		icon = generic_form_nation

		available = {
			controls_state = 218
			controls_state = 245
			controls_state = 238
			controls_state = 217
			controls_state = 265
			controls_state = 1096
			controls_state = 1078
			controls_state = 1079
			controls_state = 1095
			#controls_state = 237
			#controls_state = 236
		}
		
		
		visible = {
			OR = {
				has_country_leader = {
					character = POL_pavel_bermondt_avalov
					ruling_only = yes
				}
				has_country_leader = {
					character = POL_rudinger_von_der_goltz
					ruling_only = yes
				}
			}
		}
		
		fire_only_once = yes

		cost = 100
		
		complete_effect = {
			country_event = { id = pavel_events.1 }
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 10
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}
	}
	POL_restore_kuban_cossacks = {

		icon = generic_form_nation

		available = {
			controls_state = 234
			controls_state = 235
			controls_state = 233
			controls_state = 232
			controls_state = 1098
			controls_state = 1097
			controls_state = 1077
		}
		
		
		visible = {
			OR = {
				has_country_leader = {
					character = POL_pavel_bermondt_avalov
					ruling_only = yes
				}
				has_country_leader = {
					character = POL_rudinger_von_der_goltz
					ruling_only = yes
				}
			}
		}
		
		fire_only_once = yes

		cost = 100
		
		complete_effect = {
			country_event = { id = pavel_events.2 }
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 10
			modifier = {
				is_historical_focus_on = yes
				factor = 0
			}
		}
	}
}

POL_sanacja_falanga_decisions = {
	POL_nationwide_fascist_displays = {

		icon = decision_generic_nationalism

		available = {
		}
		
		
		visible = {
			NOT = { has_government = fascism }
		}
		
		fire_only_once = no

		cost = 50
		days_remove = 70
		
		modifier = {
			fascism_drift = 0.1
			stability_weekly = -0.02
		}
		
		complete_effect = {
			
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 5
			modifier = {
				factor = 0
				has_stability < 0.3 #The AI shouldn't just kill its own stability over this.
			}
		}
	}
	POL_appoint_nationalist_ministers = {

		icon = decision_generic_nationalism

		available = {
		}
		
		
		visible = {
			NOT = { has_government = fascism }
		}
		
		fire_only_once = no

		cost = 50
		days_remove = 70
		
		modifier = {
			fascism_drift = 0.1
			political_power_factor = -0.5
		}
		
		complete_effect = {
			
		}

		remove_effect = {
		}

		ai_will_do = {
			factor = 5
		}
	}
}

POL_promote_falangism_decisions = {
	POL_promote_falangism = {

		icon = hol_draw_up_staff_plans

		state_target = yes

		available = {
		}
		target_trigger = {
			FROM = {
				owner = {
					OR = {
						AND = {
							OR = {
								original_tag = HOL
								original_tag = BEL
								original_tag = LUX
							}
							ROOT = { NOT = { has_completed_focus = POL_invite_the_lowlands } }
						}
						AND = {
							is_latin_american_country = yes
							NOT = {
								original_tag = MEX
								original_tag = BRA
								original_tag = ARG
								original_tag = COL
								original_tag = VEN
								original_tag = PRU
							}
							ROOT = { NOT = { has_completed_focus = POL_support_falangists_in_the_americas } }
						}
					}
					NOT = { has_government = fascism }
					NOT = { has_country_flag = banned_fascism_flag }
				}
				is_capital = yes
			}
		}
		visible = {
		}

		fire_only_once = no
		cost = 50
		on_map_mode = map_only

		days_remove = 70
		complete_effect = {
			FROM = {
				owner = {
					add_timed_idea = {
						idea = POL_falangist_propaganda
						days = 70
					}
				}
			}
		}
		
		remove_effect = {
			
		}

		ai_will_do = {
			base = 10
		}
	}
	POL_promote_falangism_in_major = {

		icon = hol_draw_up_staff_plans

		state_target = yes

		available = {
		}
		target_trigger = {
			FROM = {
				owner = {
					OR = {
						original_tag = MEX
						original_tag = BRA
						original_tag = ARG
						original_tag = COL
						original_tag = VEN
						original_tag = PRU
					}
					ROOT = { NOT = { has_completed_focus = POL_support_falangists_in_the_americas } }
					NOT = { has_government = fascism }
					NOT = { has_country_flag = banned_fascism_flag }
				}
				is_capital = yes
			}
		}
		visible = {
		}

		fire_only_once = no
		cost = 100
		on_map_mode = map_only

		days_remove = 70
		complete_effect = {
			FROM = {
				owner = {
					add_timed_idea = {
						idea = POL_falangist_propaganda
						days = 70
					}
				}
			}
		}
		
		remove_effect = {
			
		}

		ai_will_do = {
			base = 10
		}
	}
}