UKR_russia_reworked_load_decision_category_russia2 = {

	UKR_russia_reworked_load_decision_russia2 = {
		allowed = {
			original_tag = UKR
		}

		visible = {
			always = no
		}
	}
}

UKR_industrial_revival_project = {

	UKR_mass_infrastructure_investment = {

		icon = generic_construction

		allowed = {
			original_tag = UKR
		}

		visible = {
			any_state = {
				is_fully_controlled_by = ROOT
				infrastructure < 10
			}
		}

		available = {
			surrender_progress < 0.25
		}

		cost = 100

		ai_will_do = {
			factor = 1
		}

		fire_only_once = yes

		complete_effect = {
			every_state = {
				limit = {
					is_fully_controlled_by = ROOT
					infrastructure < 10
				}
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}

	UKR_ask_early_factories = {

		icon = generic_factory

		days_re_enable = 25

		allowed = {
			original_tag = UKR
		}

		visible = {
			check_variable = {
				var = ukr_ask_early_factories_count
				value = 5
				compare = less_than_or_equals
			}
		}

		available = {
			surrender_progress < 0.25
		}

		cost = 15

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			random_owned_controlled_state = {
				limit = {
					infrastructure < 5
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
			if = {
				limit = {
					NOT = {
						has_idea = UKR_Early_payments
					}
				}
				add_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			else = {
				modify_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			add_to_variable = { ukr_ask_early_factories_count = 1 }
		}
	}

	UKR_ask_early_guns = {

		icon = generic_industry

		days_re_enable = 25

		allowed = {
			original_tag = UKR
		}

		visible = {
			check_variable = {
				var = ukr_ask_early_guns_count
				value = 5
				compare = less_than_or_equals
			}
		}

		available = {
			surrender_progress < 0.25
		}

		cost = 15

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = 3000
				producer = UKR
			}
			if = {
				limit = {
					NOT = {
						has_idea = UKR_Early_payments
					}
				}
				add_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			else = {
				modify_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			add_to_variable = { ukr_ask_early_guns_count = 1 }
		}
	}

	UKR_give_up_territory = {

		icon = hol_draw_up_staff_plans

		days_re_enable = 25

		allowed = {
			original_tag = UKR
		}

		visible = {
			check_variable = {
				var = ukr_give_up_territory_count
				value = 5
				compare = less_than_or_equals
			}
		}

		available = {
			surrender_progress < 0.25
		}

		ai_will_do = {
			factor = 1
		}

		complete_effect = {
			add_political_power = 100
			if = {
				limit = {
					NOT = {
						has_idea = UKR_Early_payments
					}
				}
				add_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			else = {
				modify_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			add_to_variable = { ukr_give_up_territory_count = 1 }
		}
	}

	UKR_pay_in_advance = {

		icon = hol_attract_foreign_investors

		allowed = {
			original_tag = UKR
		}

		visible = {
			if = {
				limit = {
					has_idea = UKR_Industrial_revival
				}
				has_completed_focus = UKR_revival_project_one
				NOT = {
					has_country_flag = UKR_revival_project_one_started
					has_country_flag = UKR_revival_project_one_finished
				}
				check_variable = {
					var = pay_in_advance_one
					value = 2
					compare = less_than
				}
			}
			else_if = {
				limit = {
					has_idea = UKR_Industrial_revival_2
				}
				has_completed_focus = UKR_revival_project_two
				NOT = {
					has_country_flag = UKR_revival_project_two_started
					has_country_flag = UKR_revival_project_two_finished
				}
				check_variable = {
					var = pay_in_advance_two
					value = 2
					compare = less_than
				}
			}
			else_if = {
				limit = {
					has_idea = UKR_Industrial_revival_3
				}
				has_completed_focus = UKR_revival_project_three
				NOT = {
					has_country_flag = UKR_revival_project_three_started
					has_country_flag = UKR_revival_project_three_finished
				}
				check_variable = {
					var = pay_in_advance_three
					value = 2
					compare = less_than
				}
			}
		}

		available = {
			custom_trigger_tooltip = {
				tooltip = has_idea_industrial_revival_tt
				OR = {
					has_idea = UKR_Industrial_revival
					has_idea = UKR_Industrial_revival_2
					has_idea = UKR_Industrial_revival_3
				}
			}
		}

		cost = 25

		ai_will_do = {
			factor = 10
		}

		complete_effect = {
			if = {
				limit = {
					has_idea = UKR_Industrial_revival
				}
				subtract_from_variable = { ukr_days_remove_phase_one = 50 }
				add_to_variable = { pay_in_advance_one = 1 }
				custom_effect_tooltip = phase_one_loses_50_days
			}
			else_if = {
				limit = {
					has_idea = UKR_Industrial_revival_2
				}
				subtract_from_variable = { ukr_days_remove_phase_two = 50 }
				add_to_variable = { pay_in_advance_two = 1 }
				custom_effect_tooltip = phase_two_loses_50_days
			}
			else_if = {
				limit = {
					has_idea = UKR_Industrial_revival_3
				}
				subtract_from_variable = { ukr_days_remove_phase_three = 50 }
				add_to_variable = { pay_in_advance_three = 1 }
				custom_effect_tooltip = phase_three_loses_50_days
			}
			if = {
				limit = {
					NOT = {
						has_idea = UKR_Early_payments
					}
				}
				add_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
			else = {
				modify_timed_idea = {
					idea = UKR_Early_payments
					days = 50
				}
			}
		}
	}

	UKR_industrial_revival_project_phase_one = {

		icon = gre_investment_decisions

		allowed = {
			original_tag = UKR
		}

		days_re_enable = 10

		visible = {
			has_idea = UKR_Industrial_revival
			has_completed_focus = UKR_revival_project_one
		}

		available = {
			has_idea = UKR_Industrial_revival
			surrender_progress < 0.25
		}

		cost = 50

		ai_will_do = {
			factor = 1000
		}

		days_remove = var:ukr_days_remove_phase_one

		complete_effect = {
			add_tech_bonus = {
				name = UKR_industrial_revival_project_phase_one
				bonus = 0.5
				uses = 1
				category = industry
			}
			set_country_flag = UKR_revival_project_one_started
		}

		cancel_trigger = {
			surrender_progress > 0.25
		}

		cancel_effect = {
			clr_country_flag = UKR_revival_project_one_started
		}

		remove_effect = {
			clr_country_flag = UKR_revival_project_one_started
			set_country_flag = UKR_revival_project_one_finished
			swap_ideas = {
				remove_idea = UKR_Industrial_revival
				add_idea = UKR_Industrial_revival_2
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = dockyard
					level = 1
					instant_build = yes
				}
			}
		}
	}

	UKR_industrial_revival_project_phase_two = {

		icon = gre_investment_decisions

		allowed = {
			original_tag = UKR
		}

		days_re_enable = 10

		visible = {
			has_idea = UKR_Industrial_revival_2
			has_completed_focus = UKR_revival_project_two
		}

		available = {
			has_idea = UKR_Industrial_revival_2
			surrender_progress < 0.25
		}

		cost = 75

		ai_will_do = {
			factor = 1000
		}

		days_remove = var:ukr_days_remove_phase_two

		complete_effect = {
			add_tech_bonus = {
				name = UKR_industrial_revival_project_phase_two
				bonus = 0.5
				uses = 1
				category = electronics
			}
			set_country_flag = UKR_revival_project_two_started
		}

		cancel_trigger = {
			surrender_progress > 0.25
		}

		cancel_effect = {
			clr_country_flag = UKR_revival_project_two_started
		}

		remove_effect = {
			clr_country_flag = UKR_revival_project_two_started
			set_country_flag = UKR_revival_project_two_finished
			swap_ideas = {
				remove_idea = UKR_Industrial_revival_2
				add_idea = UKR_Industrial_revival_3
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = industrial_complex
					level = 3
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = arms_factory
					level = 3
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = dockyard
					level = 2
					instant_build = yes
				}
			}
		}
	}

	UKR_industrial_revival_project_phase_three = {

		icon = gre_investment_decisions

		allowed = {
			original_tag = UKR
		}

		days_re_enable = 10

		visible = {
			has_idea = UKR_Industrial_revival_3
			has_completed_focus = UKR_revival_project_three
		}

		available = {
			has_idea = UKR_Industrial_revival_3
			surrender_progress < 0.25
		}

		cost = 100

		ai_will_do = {
			factor = 1000
		}

		days_remove = var:ukr_days_remove_phase_three

		complete_effect = {
			add_tech_bonus = {
				name = UKR_industrial_revival_project_phase_three
				bonus = 0.5
				uses = 1
				category = industry
			}
			add_tech_bonus = {
				name = UKR_industrial_revival_project_phase_three
				bonus = 0.5
				uses = 1
				category = electronics
			}
			set_country_flag = UKR_revival_project_three_started
		}

		cancel_trigger = {
			surrender_progress > 0.25
		}

		cancel_effect = {
			clr_country_flag = UKR_revival_project_three_started
		}

		remove_effect = {
			clr_country_flag = UKR_revival_project_three_started
			set_country_flag = UKR_revival_project_three_finished
			swap_ideas = {
				remove_idea = UKR_Industrial_revival_3
				add_idea = UKR_Industrial_revival_4
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = industrial_complex
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				add_extra_state_shared_building_slots = 2
				add_building_construction = {
					type = arms_factory
					level = 2
					instant_build = yes
				}
			}
			random_owned_controlled_state = {
				limit = {
					is_coastal = yes
				}
				add_extra_state_shared_building_slots = 3
				add_building_construction = {
					type = dockyard
					level = 3
					instant_build = yes
				}
			}
		}
	}
}

UKR_kyivan_industry_decisions = {

	UKR_industrial_development_planning = {

		icon = hol_draw_up_staff_plans

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				OR = {
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = yes
					}
				}
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 25

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			202 = {
				add_extra_state_shared_building_slots = 3
			}
		}
	}

	UKR_civilian_industry_development = {

		icon = generic_factory

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				free_building_slots = {
					building = industrial_complex
					size > 0
					include_locked = yes
				}
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 50

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = {
					202 = {
						free_building_slots = {
							building = industrial_complex
							size > 1
							include_locked = yes
						}
					}
				}
				202 = {
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = industrial_complex
						level = 2
						instant_build = yes
					}
				}
			}
			else = {
				202 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_military_industry_development = {

		icon = ger_military_buildup

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				free_building_slots = {
					building = arms_factory
					size > 0
					include_locked = yes
				}
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 50

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = {
					202 = {
						free_building_slots = {
							building = arms_factory
							size > 1
							include_locked = yes
						}
					}
				}
				202 = {
					add_extra_state_shared_building_slots = 2
					add_building_construction = {
						type = arms_factory
						level = 2
						instant_build = yes
					}
				}
			}
			else = {
				202 = {
					add_extra_state_shared_building_slots = 1
					add_building_construction = {
						type = arms_factory
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_infrastructure_development = {

		icon = generic_operation

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				infrastructure < 5
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 50

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = {
					202 = {
						infrastructure > 3
						infrastructure < 5
					}
				}
				202 = {
					add_building_construction = {
						type = infrastructure
						level = 1
						instant_build = yes
					}
				}
			}
			else_if = {
				limit = {
					202 = {
						infrastructure < 4
					}
				}
				202 = {
					add_building_construction = {
						type = infrastructure
						level = 2
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_kiev_radar_station = {

		icon = generic_air

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				radar_station < 5
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 50

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			if = {
				limit = {
					NOT = {
						has_tech = radio_detection
					}
				}
				set_technology = {
					radio_detection = 1
				}
			}
			if = {
				limit = {
					has_tech = cavity_magnatron
					202 = {
						radar_station < 4
					}
				}
				202 = {
					add_building_construction = {
						type = radar_station
						level = 2
						instant_build = yes
					}
				}
			}
			else = {
				202 = {
					add_building_construction = {
						type = radar_station
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_kiev_heavy_fortifications = {

		icon = generic_construction

		allowed = {
			original_tag = UKR
		}

		visible = {
			202 = {
				any_province_building_level = {
					province = {
						id = 489
						id = 11557
						id = 3494
						id = 504
						id = 3543
						id = 525
					}
					building = bunker
					level < 10
				}
			}
		}

		available = {
			has_full_control_of_state = 202
		}

		cost = 75

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			custom_effect_tooltip = add_forts_around_kiev_tt
			hidden_effect = {
				202 = {
					add_building_construction = {
						type = bunker
						level = 2
						instant_build = yes
						province = {
							id = 489
							id = 11557
							id = 3494
							id = 504
							id = 3543
						}
					}
					add_building_construction = {
						type = bunker
						level = 3
						instant_build = yes
						province = 525
					}
				}
			}
		}
	}

	UKR_kiev_military_schools = {

		icon = generic_military

		allowed = {
			original_tag = UKR
		}

		visible = {

		}

		available = {
			has_full_control_of_state = 202
			202 = {
				arms_factory > 9
			}
		}

		cost = 100

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			add_ideas = UKR_Kiev_military_schools
		}
	}

	UKR_kiev_universities = {

		icon = generic_research

		allowed = {
			original_tag = UKR
		}

		visible = {

		}

		available = {
			has_full_control_of_state = 202
			202 = {
				industrial_complex > 9
			}
		}

		cost = 100

		ai_will_do = {
			factor = 20
		}

		fire_only_once = yes

		complete_effect = {
			add_ideas = UKR_Kiev_universities
		}
	}
}

UKR_second_civil_war_category_decisions = {

	UKR_claim_state_scw = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = global.sov_original_states

		target_trigger = {
			FROM = {
				is_controlled_by = ROOT
				NOT = {
					is_owned_by = ROOT
				}
			}
			soj_in_scw = yes
			sov_in_scw = yes
			NOT = {
				is_in_array = { ukr.scw_claimed_states = FROM }
			}
			OR = {
				any_of_scopes = {
					array = global.russian_scw_participants_sov

					owns_state = FROM
				}
				any_of_scopes = {
					array = global.russian_scw_participants_soj

					owns_state = FROM
				}
			}
		}

		available = {
			ROOT = {
				controls_state = FROM
			}
		}

		visible = {
			FROM = {
				is_controlled_by = ROOT
				NOT = {
					is_owned_by = ROOT
				}
			}
			soj_in_scw = yes
			sov_in_scw = yes
			NOT = {
				is_in_array = { ukr.scw_claimed_states = FROM }
			}
			FROM = {
				any_neighbor_state = {
					OR = {
						is_in_array = { ukr.scw_claimed_states = THIS }
						is_in_array = { ukr.owned_states = THIS }
					}
				}
			}
			OR = {
				any_of_scopes = {
					array = global.russian_scw_participants_sov

					owns_state = FROM
				}
				any_of_scopes = {
					array = global.russian_scw_participants_soj

					owns_state = FROM
				}
			}
		}

		cost = 0

		ai_will_do = {
			factor = 1000
			modifier = {
				factor = 0
				UKR = {
					has_country_flag = accept_to_help_whiteguard
					check_variable = {
						var = ukr.scw_claimed_states^num
						value = 3
						compare = greater_than_or_equals
					}
					NOT = {
						has_war_with = SOV
					}
				}
			}
		}

		complete_effect = {
			custom_effect_tooltip = UKR_claim_state_scw_tt
			if = {
				limit = {
					sov_in_scw = yes
					NOT = {
						has_war_with = SOV
					}
				}
				custom_effect_tooltip = UKR_claim_state_scw_tt2
			}
			if = {
				limit = {
					NOT = {
						has_government = anarchy
					}
				}
				if = {
					limit = {
						NOT = {
							has_template = "Ukrayins'ka Dyviziya"
						}
					}
					division_template = {
						name = "Ukrayins'ka Dyviziya"
						division_names_group = UKR_INF_01
						priority = 1
						regiments = {
							infantry = { x = 0 y = 0 }
							infantry = { x = 0 y = 1 }
							infantry = { x = 0 y = 2 }
							infantry = { x = 0 y = 3 }
							infantry = { x = 0 y = 4 }
							infantry = { x = 1 y = 0 }
							infantry = { x = 1 y = 1 }
							infantry = { x = 1 y = 2 }
							infantry = { x = 1 y = 3 }
						}
						support = {
							engineer = { x = 0 y = 0 }
							artillery = { x = 0 y = 1 }
						}
					}
				}
				FROM = {
					create_unit = {
						division = "name = \"1ya Anarkhist Dobrovolets\" division_template = \"Ukrayins'ka Dyviziya\" start_experience_factor = 0.4 start_equipment_factor = 1.0"
						owner = UKR
					}
				}
			}
			hidden_effect = {
				ROOT = {
					add_to_array = { ukr.scw_claimed_states = FROM }
				}
			}
		}
	}

	UKR_coup_belarus_scw = {

		icon = GFX_decision_generic_speech

		allowed = {
			original_tag = UKR
		}

		fire_only_once = yes

		highlight_states = {
			highlight_states_trigger = {
				state = BLR.capital
			}
		}

		visible = {
			has_global_flag = second_russian_civil_war_in_progress
			is_subject = no
			custom_trigger_tooltip = {
				tooltip = is_in_scw_tt
				is_in_array = { global.russian_scw_participants = UKR.id }
			}
			has_war = yes
			BLR = {
				exists = yes
				is_subject_of = SOV
				custom_trigger_tooltip = {
					tooltip = is_in_scw_tt
					is_in_array = { global.russian_scw_participants = BLR.id }
				}
			}
		}

		available = {
			surrender_progress < 0.25
			NOT = {
				has_government = anarchy
			}
		}

		cost = 100

		ai_will_do = {
			factor = 50
			modifier = {
				factor = 0
				UKR = {
					has_country_flag = accept_to_help_whiteguard
					NOT = {
						has_war_with = SOV
					}
				}
			}
		}

		days_remove = 60

		cancel_if_not_visible = yes

		complete_effect = {
			set_country_flag = ukr_is_making_coup_blr
		}

		cancel_effect = {
			clr_country_flag = ukr_is_making_coup_blr
		}

		remove_effect = {
			clr_country_flag = ukr_is_making_coup_blr
			BLR = {
				country_event = russia2_ukraine.41
			}
			custom_effect_tooltip = UKR_coup_belarus_scw_tt
		}
	}
}

UKR_anarchist_legitimacy_category_decisions = {

	UKR_recruit_division_in_claimed_state = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.scw_claimed_states

		fire_only_once = yes

		target_trigger = {
			FROM = {
				is_controlled_by = ROOT
			}
		}

		target_root_trigger = {
			check_variable = {
				var = ukr.num_core_states
				value = 20
				compare = greater_than_or_equals
			}
		}

		available = {
			ROOT = {
				controls_state = FROM
				if = {
					limit = {
						FROM = {
							is_core_of = ROOT
						}
					}
					has_manpower > 10000
				}
				else = {
					has_manpower > 5000
				}
			}
		}

		visible = {
			ROOT = {
				has_government = anarchy
				is_subject = no
				check_variable = {
					var = ukr.num_core_states
					value = 20
					compare = greater_than_or_equals
				}
			}
			FROM = {
				is_controlled_by = ROOT
			}
		}

		cost = 50

		ai_will_do = {
			factor = 1
			modifier = {
				factor = 1000
				OR = {
					check_variable = {
						var = ukr.anarchist_coring_points
						value = 1
						compare = less_than
					}
					FROM = {
						is_core_of = ROOT
					}
				}
			}
		}

		complete_effect = {
			if = {
				limit = {
					FROM = {
						is_core_of = ROOT
					}
				}
				custom_effect_tooltip = UKR_recruit_division_in_claimed_state_tt
				add_manpower = -10000
			}
			else = {
				add_manpower = -5000
			}
			if = {
				limit = {
					NOT = {
						has_template = "Ukrayins'ka Dyviziya"
					}
				}
				division_template = {
					name = "Ukrayins'ka Dyviziya"
					division_names_group = UKR_INF_01
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
						infantry = { x = 1 y = 0 }
						infantry = { x = 1 y = 1 }
						infantry = { x = 1 y = 2 }
						infantry = { x = 1 y = 3 }
					}
					support = {
						engineer = { x = 0 y = 0 }
						artillery = { x = 0 y = 1 }
					}
				}
			}
			FROM = {
				create_unit = {
					division = "name = \"1ya Anarkhist Dobrovolets\" division_template = \"Ukrayins'ka Dyviziya\" start_experience_factor = 0.4 start_equipment_factor = 1.0"
					owner = UKR
				}
				create_unit = {
					division = "name = \"1ya Anarkhist Dobrovolets\" division_template = \"Ukrayins'ka Dyviziya\" start_experience_factor = 0.4 start_equipment_factor = 1.0"
					owner = UKR
				}
				if = {
					limit = {
						is_core_of = ROOT
					}
					create_unit = {
						division = "name = \"1ya Anarkhist Dobrovolets\" division_template = \"Ukrayins'ka Dyviziya\" start_experience_factor = 0.4 start_equipment_factor = 1.0"
						owner = UKR
					}
					create_unit = {
						division = "name = \"1ya Anarkhist Dobrovolets\" division_template = \"Ukrayins'ka Dyviziya\" start_experience_factor = 0.4 start_equipment_factor = 1.0"
						owner = UKR
					}
				}
			}
		}
	}

	UKR_move_anarchist_capital_paris = {

		icon = generic_nationalism

		allowed = {
			original_tag = UKR
		}

		highlight_states = {
			highlight_states_trigger = {
				state = 16
			}
		}

		cost = 25

		fire_only_once = yes

		visible = {
			is_subject = no
			has_government = anarchy
			16 = {
				is_controlled_by = ROOT
				is_owned_by = ROOT
				is_core_of = ROOT
			}
		}

		available = {
			surrender_progress < 0.05
		}

		complete_effect = {
			set_capital = {
				state = 16
			}
		}
	}

	UKR_enable_view_on_map_anarchist_states = {

		icon = generic_decision

		allowed = {
			original_tag = UKR
		}

		visible = {
			is_subject = no
			has_government = anarchy
			is_ai = no
			NOT = {
				has_country_flag = ukr_view_on_map_anarchist_states
			}
		}

		complete_effect = {
			set_country_flag = ukr_view_on_map_anarchist_states
			custom_effect_tooltip = ukr_enabled_view_on_map
		}
	}

	UKR_disable_view_on_map_anarchist_states = {

		icon = generic_decision

		allowed = {
			original_tag = UKR
		}

		visible = {
			is_subject = no
			has_government = anarchy
			is_ai = no
			has_country_flag = ukr_view_on_map_anarchist_states
		}

		complete_effect = {
			clr_country_flag = ukr_view_on_map_anarchist_states
			custom_effect_tooltip = ukr_disabled_view_on_map
		}
	}

	UKR_anarchism_timeout = {

		icon = generic_civil_support

		allowed = {
			original_tag = UKR
		}

		available = {
			custom_trigger_tooltip = {
		    	tooltip = UKR_anarchism_timeout_tt
				check_variable = {
					var = ukr.num_core_states
					value = 20
					compare = greater_than_or_equals
				}
			}
		}

		activation = {
			has_government = anarchy
			is_subject = no
		}

		visible = {
			has_government = anarchy
			is_subject = no
		}

		is_good = no

		fire_only_once = yes

		days_mission_timeout = 500

		cancel_trigger = {
			hidden_trigger = {
				OR = {
					NOT = {
						has_government = anarchy
					}
					is_subject = yes
					exists = no
				}
			}
		}

		timeout_effect = {
            country_event = russia2_ukraine.54
        }

		complete_effect = {
			country_event = russia2_ukraine.55
		}
	}
}

UKR_free_the_people_invade_states_decision_cat = {

    UKR_take_over_baltics_decision = {

        icon = generic_decision

        highlight_states = {
			highlight_states_trigger = {
				state = 808
			}
        }

		allowed = {
			original_tag = UKR
		}

		visible = {
			has_government = anarchy
		    is_subject = no
		    has_completed_focus = UKR_spread_revolution
		}

        available = {
            has_completed_focus = UKR_take_over_baltics
            custom_trigger_tooltip = {
                tooltip = UKR_take_over_baltics_decision_tt
                any_state = {
                    is_controlled_by = ROOT
                    OR = {
                        state = 191
                        state = 13
                        state = 12
                        state = 190
                        state = 11
                        state = 189
                        state = 188
                        state = 763
                        state = 5
                        state = 85
                        state = 86
                        state = 87
                        state = 98
                        state = 10
                        state = 97
                        state = 784
                        state = 96
                        state = 95
                        state = 94
                        state = 93
                        state = 91
                        state = 89
                        state = 88
                        state = 762
                        state = 90
                        state = 92
                        state = 146
                        state = 150
                        state = 111
                        state = 149
                        state = 148
                        state = 147
                        state = 722
                        state = 145
                        state = 195
                        state = 208
                        state = 216
                        state = 215
                        state = 213
                        state = 666
                        state = 38
                        state = 141
                        state = 140
                        state = 139
                        state = 138
                        state = 124
                        state = 37
                        state = 99
						state = 813
						state = 812
						state = 811
						state = 809
						state = 808
						state = 810
						state = 815
						state = 814
                    }
                }
            }
        }

        cost = 25

        fire_only_once = yes

		complete_effect = {
			add_timed_idea = {
                idea = UKR_Take_over_baltics
                days = 100
            }
		}
    }

    UKR_push_balkans_decision = {

        icon = generic_decision

        highlight_states = {
			highlight_states_trigger = {
				state = 107
			}
        }

		allowed = {
			original_tag = UKR
		}

		visible = {
			has_government = anarchy
		    is_subject = no
		    has_completed_focus = UKR_spread_revolution
		}

        available = {
            has_completed_focus = UKR_push_balkans
            custom_trigger_tooltip = {
                tooltip = UKR_push_balkans_decision_tt
                any_state = {
                    is_controlled_by = ROOT
                    OR = {
                        state = 736
                        state = 102
                        state = 109
                        state = 103
                        state = 104
                        state = 45
                        state = 163
                        state = 804
                        state = 105
                        state = 764
                        state = 107
                        state = 108
                        state = 802
                        state = 803
                        state = 106
                        state = 44
                        state = 805
                        state = 185
                        state = 731
                        state = 184
                        state = 47
                        state = 186
                        state = 182
                        state = 187
                        state = 48
                        state = 212
                        state = 801
                        state = 211
                        state = 341
                        state = 797
                        state = 77
                        state = 46
                        state = 766
                        state = 78
                        state = 80
                        state = 79
                        state = 76
                        state = 84
                        state = 81
                        state = 83
                        state = 82
                        state = 154
                        state = 43
                        state = 155
                        state = 73
                        state = 664
                        state = 71
                        state = 70
                        state = 72
						state = 853
                    }
                }
            }
        }

        cost = 25

        fire_only_once = yes

		complete_effect = {
			add_timed_idea = {
                idea = UKR_Push_balkans
                days = 100
            }
		}
    }

    UKR_invade_old_asian_territories_decision = {

        icon = generic_decision

        highlight_states = {
			highlight_states_trigger = {
				state = 207
			}
        }

		allowed = {
			original_tag = UKR
		}

		visible = {
			has_government = anarchy
		    is_subject = no
		    has_completed_focus = UKR_spread_revolution
		}

        available = {
            has_completed_focus = UKR_invade_old_asian_territories
            custom_trigger_tooltip = {
                tooltip = UKR_invade_old_asian_territories_decision_tt
                any_state = {
                    is_controlled_by = ROOT
                    OR = {
                        state = 329
                        state = 330
                        state = 644
                        state = 637
                        state = 562
                        state = 574
                        state = 565
                        state = 564
                        state = 563
                        state = 561
                        state = 560
                        state = 657
                        state = 409
                        state = 408
                        state = 655
                        state = 537
                        state = 654
                        state = 40
                        state = 570
                        state = 571
                        state = 578
                        state = 577
                        state = 516
                        state = 576
                        state = 568
                        state = 569
                        state = 567
                        state = 566
                        state = 575
                        state = 714
                        state = 761
                        state = 715
                        state = 328
                        state = 717
                        state = 716
                        state = 610
                        state = 609
                        state = 611
                        state = 612
                        state = 745
                        state = 527
                        state = 525
                        state = 732
                        state = 742
                        state = 405
                        state = 585
                        state = 584
                        state = 586
                        state = 404
                        state = 589
                        state = 588
                        state = 590
                        state = 583
                        state = 402
                        state = 587
                        state = 406
                        state = 407
                        state = 267
                        state = 415
						state = 820
						state = 818
						state = 817
						state = 819
                    }
                }
            }
        }

        cost = 25

        fire_only_once = yes

		complete_effect = {
			add_timed_idea = {
                idea = UKR_Invade_old_asian_territories
                days = 100
            }
		}
    }

    UKR_end_warlord_era_decision = {

        icon = generic_decision

        highlight_states = {
			highlight_states_trigger = {
				state = 608
			}
        }

		allowed = {
			original_tag = UKR
		}

		visible = {
			has_government = anarchy
		    is_subject = no
		    has_completed_focus = UKR_spread_revolution
		}

        available = {
            has_completed_focus = UKR_end_warlord_era
            custom_trigger_tooltip = {
                tooltip = UKR_end_warlord_era_decision_tt
                any_state = {
                    is_controlled_by = ROOT
                    OR = {
                        state = 608
                        state = 614
                        state = 597
                        state = 743
                        state = 607
                        state = 615
                        state = 621
                        state = 746
                        state = 622
                        state = 598
                        state = 613
                        state = 606
                        state = 620
                        state = 744
                        state = 596
                        state = 600
                        state = 595
                        state = 602
                        state = 750
                        state = 605
                        state = 748
                        state = 603
                        state = 751
                        state = 752
                        state = 601
                        state = 524
                        state = 593
                        state = 592
                        state = 599
                        state = 594
                        state = 591
                        state = 326
                        state = 729
                        state = 728
                        state = 325
                        state = 747
                        state = 753
                        state = 283
                        state = 616
                        state = 756
                        state = 755
                        state = 754
                        state = 604
                        state = 760
                        state = 759
                        state = 618
                        state = 617
                        state = 287
                        state = 619
                        state = 322
                        state = 758
                        state = 757
                    }
                }
            }
        }

        cost = 25

        fire_only_once = yes

		complete_effect = {
			add_timed_idea = {
                idea = UKR_End_warlord_era
                days = 100
            }
		}
    }

    UKR_last_bastion_decision = {

        icon = generic_decision

		allowed = {
			original_tag = UKR
		}

		visible = {
			has_government = anarchy
		    is_subject = no
		    has_completed_focus = UKR_spread_revolution
		}

        available = {
            has_completed_focus = UKR_last_bastion
            custom_trigger_tooltip = {
                tooltip = UKR_last_bastion_decision_tt
                any_state = {
                    is_controlled_by = ROOT
                    OR = {
                        is_on_continent = north_america
                        is_on_continent = south_america
                    }
                }
            }
        }

        cost = 25

        fire_only_once = yes

		complete_effect = {
            add_tech_bonus = {
				name = UKR_last_bastion_decision
				bonus = 1
				uses = 1
				category = tp_tech
			}
			add_timed_idea = {
                idea = UKR_Last_bastion
                days = 100
            }
		}
    }

	UKR_european_freedom_people_decision = {

		icon = GFX_decision_generic_independence

        #Doesn't work apparently :(
        #highlight_states = {
         #   OR = {
          #      is_on_continent = north_america
           #     is_on_continent = south_america
            #}
        #}

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = europe
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_european_anarchism
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_european_anarchism
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
            hidden_effect = {

            }
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_europe_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_europe_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

	UKR_asian_freedom_people_decision = {

		icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = asia
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_asian_anarchism
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_asian_anarchism
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_asia_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_asia_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

    #Australia is apparently a continent for the devs
    #upside down continent lol #KYS pls - another dev
	UKR_australia_freedom_people_decision = {

        icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = australia
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_asian_anarchism
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_asian_anarchism
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_australia_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_australia_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

	UKR_middle_east_freedom_people_decision = {

		icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = middle_east
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_free_middle_east
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_free_middle_east
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_middle_east_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_middle_east_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

	UKR_african_freedom_people_decision = {

		icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = africa
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_free_africa
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_free_africa
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_africa_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_africa_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

    #For Country Holding African State such as the UK or France
	UKR_african_freedom_colony_edition_people_decision = {

        icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
                NOT = {
                    capital_scope = {
                        is_on_continent = africa
                    }
                }
			}
            any_state = {
                is_owned_and_controlled_by = FROM
                is_on_continent = africa
                NOT = {
                    is_capital = yes
                }
            }
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_free_africa
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_free_africa
            any_state = {
                is_owned_and_controlled_by = FROM
                is_on_continent = africa
            }
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_free_africa
			any_state = {
                is_owned_and_controlled_by = FROM
                is_on_continent = africa
                NOT = {
                    is_capital = yes
                }
            }
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_africa_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_africa_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
						ukr_spawn_free_division_decision_scripted_effect_african_colonist_edition = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

	UKR_north_america_freedom_people_decision = {

		icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = north_america
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_free_america
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_free_america
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_north_america_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_north_america_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}

	UKR_south_america_freedom_people_decision = {

		icon = GFX_decision_generic_independence

		allowed = {
			tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				NOT = {
                    tag = ROOT
                    is_in_faction_with = ROOT
                    is_subject_of = ROOT
                    has_government = anarchy
                }
                has_war_with = ROOT
                has_capitulated = no
				capital_scope = {
					is_on_continent = south_america
                    is_owned_by = FROM
				}
			}
		}

		target_root_trigger = {
            has_government = anarchy
            is_subject = no
			has_completed_focus = UKR_free_america
		}

		visible = {
			FROM = {
				exists = yes
                has_capitulated = no
                NOT = {
                    has_government = anarchy
                }
			}
			has_war_with = FROM
			has_completed_focus = UKR_spread_revolution
		}

		available = {
			has_war_with = FROM
            has_completed_focus = UKR_free_america
			any_state = {
				is_owned_by = FROM
				is_controlled_by = ROOT
			}
			set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			has_equipment = {
				infantry_equipment > var:gun_cost
			}
		}

        cancel_if_not_visible = yes

		days_remove = 35

        fire_only_once = yes

		complete_effect = {
            set_temp_variable = { gun_cost = FROM.max_available_manpower_k }
			multiply_temp_variable = { gun_cost = -1 }
			add_equipment_to_stockpile = {
				type = infantry_equipment
				amount = var:gun_cost
			}
			if = {
				limit = {
					NOT = {
						has_template = "Zvil'nennya Dyviziya"
					}
				}
				division_template = {
					name = "Zvil'nennya Dyviziya"
					division_names_group = UKR_INF_01
					is_locked = yes
					priority = 1
					regiments = {
						infantry = { x = 0 y = 0 }
						infantry = { x = 0 y = 1 }
						infantry = { x = 0 y = 2 }
						infantry = { x = 0 y = 3 }
						infantry = { x = 0 y = 4 }
					}
					support = {
						engineer = { x = 0 y = 0 }
					}
				}
			}
		}

		remove_effect = {
			hidden_effect = {
				FROM = {
					country_event = { id = russia2_ukraine.62 }
				}
			}
			if = {
				limit = {
					ukr_malus_south_america_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_one_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else_if = {
				limit = {
					ukr_bonus_south_america_anarchist_states = yes
				}
				custom_effect_tooltip = ukr_spawn_division_in_three_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
			else = {
				custom_effect_tooltip = ukr_spawn_division_in_two_state_tt
				hidden_effect = {
					FROM = {
						ukr_spawn_free_division_decision_scripted_effect = yes
						ukr_spawn_free_division_decision_scripted_effect = yes
                        country_event = russia2_ukraine.62
					}
				}
			}
		}
	}
}

UKR_develop_rural_regions_decisions_cat = {

	UKR_develop_from_state_wasteland_enclave = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.owned_states

		target_trigger = {
			FROM = {
				is_fully_controlled_by = ROOT
				OR = {
					has_state_category = wasteland
					has_state_category = enclave
				}
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_develop_rural_regions
		}

		available = {
			FROM = {
				is_fully_controlled_by = ROOT
			}
		}

		visible = {
			FROM = {
				is_fully_controlled_by = ROOT
				OR = {
					has_state_category = wasteland
					has_state_category = enclave
				}
			}
		}

		cost = 15

		ai_will_do = {
			factor = 10
		}

		days_remove = 30

		cancel_if_not_visible = yes

		remove_effect = {
			FROM = {
				set_state_category = pastoral
			}
		}
	}

	UKR_develop_from_state_tiny_island = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.owned_states

		target_trigger = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = tiny_island
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_develop_rural_regions
		}

		available = {
			FROM = {
				is_fully_controlled_by = ROOT
			}
		}

		visible = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = tiny_island
			}
		}

		cost = 15

		ai_will_do = {
			factor = 10
		}

		days_remove = 40

		cancel_if_not_visible = yes

		remove_effect = {
			FROM = {
				set_state_category = small_island
				if = {
					limit = {
						is_coastal = yes
						is_core_of = ROOT
					}
					add_building_construction = {
						type = dockyard
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_develop_from_state_pastoral = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.owned_states

		target_trigger = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = pastoral
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_develop_rural_regions
		}

		available = {
			FROM = {
				is_fully_controlled_by = ROOT
			}
		}

		visible = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = pastoral
			}
		}

		cost = 40

		ai_will_do = {
			factor = 10
		}

		days_remove = 50

		cancel_if_not_visible = yes

		remove_effect = {
			FROM = {
				set_state_category = rural
				if = {
					limit = {
						is_core_of = ROOT
					}
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_develop_from_state_rural = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.owned_states

		target_trigger = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = rural
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_develop_rural_regions
		}

		available = {
			num_of_civilian_factories_available_for_projects > 0
			FROM = {
				is_fully_controlled_by = ROOT
			}
		}

		visible = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = rural
			}
		}

		modifier = {
			civilian_factory_use = 1
		}

		cost = 60

		ai_will_do = {
			factor = 10
		}

		days_remove = 75

		cancel_if_not_visible = yes

		remove_effect = {
			FROM = {
				set_state_category = town
				if = {
					limit = {
						is_core_of = ROOT
					}
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}

	UKR_develop_from_state_town = {

		icon = GFX_decision_generic_form_nation

		allowed = {
			original_tag = UKR
		}

		state_target = yes

		target_array = ukr.owned_states

		target_trigger = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = town
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_develop_rural_regions
		}

		available = {
			num_of_civilian_factories_available_for_projects > 1
			FROM = {
				is_fully_controlled_by = ROOT
			}
		}

		visible = {
			FROM = {
				is_fully_controlled_by = ROOT
				has_state_category = town
			}
		}

		modifier = {
			civilian_factory_use = 2
		}

		cost = 100

		ai_will_do = {
			factor = 10
		}

		days_remove = 100

		cancel_if_not_visible = yes

		remove_effect = {
			FROM = {
				set_state_category = large_town
				if = {
					limit = {
						is_core_of = ROOT
					}
					add_building_construction = {
						type = industrial_complex
						level = 1
						instant_build = yes
					}
				}
			}
		}
	}
}

UKR_ukrainian_friendship_decision_cat = {

	UKR_friendship_invite_from = {

		icon = GFX_decision_generic_form_nation

		on_map_mode = map_and_decisions_view

		allowed = {
			original_tag = UKR
		}

        highlight_states = {
			highlight_states_trigger = {
				state = FROM.capital
			}
        }

		target_trigger = {
			FROM = {
				exists = yes
				is_subject = no
				NOT = {
					has_government = anarchy
					is_in_faction_with = ROOT
					has_war_with = ROOT
				}
				OR = {
					is_neighbor_of = ROOT
					has_war_together_with = ROOT
				}
			}
		}

		target_root_trigger = {
			has_completed_focus = UKR_ukrainian_friendship
		}

		available = {
			NOT = {
				has_war_with = FROM
				has_country_flag = ukr_friendship_is_inviting_someone
			}
			FROM = {
				is_faction_leader = no
				OR = {
					is_neighbor_of = ROOT
					has_war_together_with = ROOT
				}
			}
		}

		fire_only_once = yes

		visible = {
			is_faction_leader = yes
			FROM = {
				exists = yes
				is_subject = no
				NOT = {
					has_government = anarchy
					is_in_faction_with = ROOT
					has_war_with = ROOT
				}
				OR = {
					is_neighbor_of = ROOT
					has_war_together_with = ROOT
				}
			}
		}

		cost = 25

		ai_will_do = {
			factor = 10
		}

		days_remove = 10

		cancel_if_not_visible = yes

		complete_effect = {
			set_country_flag = ukr_friendship_is_inviting_someone
		}

		remove_effect = {
			clr_country_flag = ukr_friendship_is_inviting_someone
			FROM = {
				country_event = { id = russia2_ukraine.65 days = 1 }
			}
		}
	}
}

political_actions = {

	UKR_rename_kiev = {

		icon = GFX_decision_generic_decision

		allowed = {
			tag = UKR
		}

		ai_will_do = {
			factor = 10
			modifier = {
				factor = 0
				has_global_flag = UKR_kiev_renamed
			}
		}

		visible = {
			owns_state = 202
		}

        highlight_states = {
			highlight_states_trigger = {
				state = 202
			}
        }

		available = {
			has_full_control_of_state = 202
		}

		complete_effect = {
			if = {
				limit = {
					has_global_flag = UKR_kiev_renamed
				}
				reset_province_name = 525
				hidden_effect = {
					clr_global_flag = UKR_kiev_renamed
					202 = {
						reset_state_name = yes
					}
				}
			}
			else = {
				set_province_name = { id = 525 name = "Kyiv" }
				hidden_effect = {
					set_global_flag = UKR_kiev_renamed
					202 = {
						set_state_name = "Kyiv"
					}
				}
			}
		}
	}
}