#### INNER CIRCLE ###
add_namespace = UKR_inner_circle

# ADVISOR ORDER
# 1 = CHUBAR
# 2 = KHVYLOVY
# 3 = SHUMSKYI
# 4 = SOKOLOVSKA
# 5 = TROTSKY
# 6 = MAZEPA


# CONSTANT FOR INNER CIRCLE TIMES (These needs to be x7 compared to the Focus cost in the focus file) - NEEDS TO MATCH THE SAME CONSTANTS USED IN THE FOCUS FILE x7
@inner_circle_time_tier_1 = 140
@inner_circle_time_tier_2 = 140
@inner_circle_time_tier_3 = 280
# FLAG CONSTANTS (It is 1 day more so the tooltip and days shown in the focus about Focus Progress match exactly the moment when the focus is completed)
@inner_circle_time_tier_1_flag = 141
@inner_circle_time_tier_2_flag = 141
@inner_circle_time_tier_3_flag = 281

# A Strong Successor - Ascended Advisor can replace old leader
country_event = {
	id = UKR_inner_circle.01
	title = UKR_inner_circle.01.t
	desc = UKR_inner_circle.01.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_country_flag = GER_inner_circle_event_pending_flag
		}
	}

	option = { # Ascended Advisor 1 becomes Country Leader
		name = UKR_inner_circle.01.a

		ai_chance = {
			base = 1
		}
		
		if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 1 }
			}
			promote_character = UKR_vlas_chubar
			hidden_effect = {
				add_country_leader_trait = UKR_chubar_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 2 }
			}
			promote_character = UKR_mykola_khvylovy
			hidden_effect = {
				add_country_leader_trait = UKR_khvylovy_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 3 }
			}
			promote_character = UKR_oleksander_shumskyi
			hidden_effect = {
				if = {
					limit = { has_dlc = "La Resistance" }
					add_country_leader_trait = UKR_shumskyi_gensec
				}
				else = {
					add_country_leader_trait = UKR_shumskyi_gensec_no_lar
				}
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 4 }
			}
			promote_character = UKR_sofia_sokolovska
			hidden_effect = {
				add_country_leader_trait = UKR_sokolovska_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 5 }
			}
			promote_character = UKR_lev_trotsky
			hidden_effect = {
				add_country_leader_trait = UKR_trotsky_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_1 = 6 }
			}
			promote_character = {
				character = UKR_isaak_mazepa
				ideology = marxism
			}
			hidden_effect = {
				add_country_leader_trait = UKR_mazepa_gensec
			}
		}
		else = {
			log = "Couldn't find a valid Ascended Advisor (1) to Promote"
		}

		hidden_effect = {
			UKR_remove_replaced_advisor_1_effects = yes
		}

		custom_effect_tooltip = generic_skip_one_line_tt

		hidden_effect = {
			#Cleaning vars / flags / etc
			clr_country_flag = GER_inner_circle_event_pending_flag
		}
	}

	option = { # Ascended Advisor 2 becomes Country Leader
		name = UKR_inner_circle.01.b

		ai_chance = {
			base = 1
		}
		if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 1 }
			}
			promote_character = UKR_vlas_chubar
			hidden_effect = {
				add_country_leader_trait = UKR_chubar_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 2 }
			}
			promote_character = UKR_mykola_khvylovy
			hidden_effect = {
				add_country_leader_trait = UKR_khvylovy_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 3 }
			}
			promote_character = UKR_oleksander_shumskyi
			hidden_effect = {
				if = {
					limit = { has_dlc = "La Resistance" }
					add_country_leader_trait = UKR_shumskyi_gensec
				}
				else = {
					add_country_leader_trait = UKR_shumskyi_gensec_no_lar
				}
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 4 }
			}
			promote_character = UKR_sofia_sokolovska
			hidden_effect = {
				add_country_leader_trait = UKR_sokolovska_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 5 }
			}
			promote_character = UKR_lev_trotsky
			hidden_effect = {
				add_country_leader_trait = UKR_trotsky_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_2 = 6 }
			}
			promote_character = {
				character = UKR_isaak_mazepa
				ideology = marxism
			}
			hidden_effect = {
				add_country_leader_trait = UKR_mazepa_gensec
			}
		}
		else = {
			log = "Couldn't find a valid Ascended Advisor (2) to Promote"
		}

		hidden_effect = {
			UKR_remove_replaced_advisor_2_effects = yes
		}

		custom_effect_tooltip = generic_skip_one_line_tt

		hidden_effect = {
			#Cleaning vars / flags / etc
			clr_country_flag = GER_inner_circle_event_pending_flag
		}
	}

	option = { # Ascended Advisor 3 becomes Country Leader
		name = UKR_inner_circle.01.c

		ai_chance = {
			base = 1
		}

		if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 1 }
			}
			promote_character = UKR_vlas_chubar
			hidden_effect = {
				add_country_leader_trait = UKR_chubar_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 2 }
			}
			promote_character = UKR_mykola_khvylovy
			hidden_effect = {
				add_country_leader_trait = UKR_khvylovy_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 3 }
			}
			promote_character = UKR_oleksander_shumskyi
			hidden_effect = {
				if = {
					limit = { has_dlc = "La Resistance" }
					add_country_leader_trait = UKR_shumskyi_gensec
				}
				else = {
					add_country_leader_trait = UKR_shumskyi_gensec_no_lar
				}
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 4 }
			}
			promote_character = UKR_sofia_sokolovska
			hidden_effect = {
				add_country_leader_trait = UKR_sokolovska_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 5 }
			}
			promote_character = UKR_lev_trotsky
			hidden_effect = {
				add_country_leader_trait = UKR_trotsky_gensec
			}
		}
		else_if = {
			limit = {
				check_variable = { UKR_ascended_advisor_3 = 6 }
			}
			promote_character = {
				character = UKR_isaak_mazepa
				ideology = marxism
			}
			hidden_effect = {
				add_country_leader_trait = UKR_mazepa_gensec
			}
		}
		else = {
			log = "Couldn't find a valid Ascended Advisor (3) to Promote"
		}

		hidden_effect = {
			UKR_remove_replaced_advisor_3_effects = yes
		}

		custom_effect_tooltip = generic_skip_one_line_tt

		hidden_effect = {
			#Cleaning vars / flags / etc
			clr_country_flag = GER_inner_circle_event_pending_flag
		}
	}

	option = { # Abort!
		name = UKR_inner_circle.01.e

		ai_chance = {
			base = 0
		}

		uncomplete_national_focus = {
			focus = UKR_strong_successor
			uncomplete_children = no
			refund_political_power = yes
		}

		hidden_effect = {
			#Cleaning vars / flags / etc
			clr_country_flag = GER_inner_circle_event_pending_flag
		}
	}
}

# CHUBAR - Start work on Focus
country_event = {
	id = UKR_inner_circle.101

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_chubar
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 1 }
			check_variable = { UKR_ascended_advisor_2 = 1 }
			check_variable = { UKR_ascended_advisor_3 = 1 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_finance_heavy_industry }
			}
			activate_shine_on_focus = UKR_finance_heavy_industry
			set_country_flag = { flag = UKR_finance_heavy_industry_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.102 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_financing_of_field_development }
			}
			activate_shine_on_focus = UKR_financing_of_field_development
			set_country_flag = { flag = UKR_financing_of_field_development_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.102 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_purchase_of_modern_machines }
			}
			activate_shine_on_focus = UKR_purchase_of_modern_machines
			set_country_flag = { flag = UKR_purchase_of_modern_machines_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.102 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH CHUBAR's FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# CHUBAR - Complete Focus
country_event = {
	id = UKR_inner_circle.102

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_chubar
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 1 }
			check_variable = { UKR_ascended_advisor_2 = 1 }
			check_variable = { UKR_ascended_advisor_3 = 1 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_finance_heavy_industry
			}
			complete_national_focus = {
				focus = UKR_finance_heavy_industry
				use_side_message = yes
				originator_name = UKR_vlas_chubar
			}
			clr_country_flag = UKR_finance_heavy_industry_progress_flag
			country_event = { id = UKR_inner_circle.101 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_financing_of_field_development
			}
			complete_national_focus = {
				focus = UKR_financing_of_field_development
				use_side_message = yes
				originator_name = UKR_vlas_chubar
			}
			clr_country_flag = UKR_financing_of_field_development_in_progress_flag
			country_event = { id = UKR_inner_circle.101 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_purchase_of_modern_machines
			}
			complete_national_focus = {
				focus = UKR_purchase_of_modern_machines
				use_side_message = yes
				originator_name = UKR_vlas_chubar
			}
			clr_country_flag = UKR_purchase_of_modern_machines_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH CHUBAR's FOCUS BRANCH - Cannot complete focus"
		}
	}
}

# KHVYLOVY - Start work on Focus
country_event = {
	id = UKR_inner_circle.201

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_khvylovy
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 2 }
			check_variable = { UKR_ascended_advisor_2 = 2 }
			check_variable = { UKR_ascended_advisor_3 = 2 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_education_of_the_masses }
			}
			activate_shine_on_focus = UKR_education_of_the_masses
			set_country_flag = { flag = UKR_education_of_the_masses_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.202 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_finanses_for_kino }
			}
			activate_shine_on_focus = UKR_finanses_for_kino
			set_country_flag = { flag = UKR_finanses_for_kino_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.202 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_national_revival }
			}
			activate_shine_on_focus = UKR_national_revival
			set_country_flag = { flag = UKR_national_revival_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.202 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH KHVYLOVY's FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# KHVYLOVY - Complete Focus
country_event = {
	id = UKR_inner_circle.202

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_khvylovy
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 2 }
			check_variable = { UKR_ascended_advisor_2 = 2 }
			check_variable = { UKR_ascended_advisor_3 = 2 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_education_of_the_masses
			}
			complete_national_focus = {
				focus = UKR_education_of_the_masses
				use_side_message = yes
				originator_name = UKR_mykola_khvylovy
			}
			clr_country_flag = UKR_education_of_the_masses_in_progress_flag
			country_event = { id = UKR_inner_circle.201 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_finanses_for_kino
			}
			complete_national_focus = {
				focus = UKR_finanses_for_kino
				use_side_message = yes
				originator_name = UKR_mykola_khvylovy
			}
			clr_country_flag = UKR_finanses_for_kino_in_progress_flag
			country_event = { id = UKR_inner_circle.201 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_national_revival
			}
			complete_national_focus = {
				focus = UKR_national_revival
				use_side_message = yes
				originator_name = UKR_mykola_khvylovy
			}
			clr_country_flag = UKR_national_revival_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH KHVYLOVY's FOCUS BRANCH - Cannot complete focus"
		}
	}
}
# SHUMSKYI - Start work on Focus
country_event = {
	id = UKR_inner_circle.301

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_shumskyi
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 3 }
			check_variable = { UKR_ascended_advisor_2 = 3 }
			check_variable = { UKR_ascended_advisor_3 = 3 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_red_diplomacy }
			}
			activate_shine_on_focus = UKR_red_diplomacy
			set_country_flag = { flag = UKR_red_diplomacy_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.302 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_active_actions }
			}
			activate_shine_on_focus = UKR_active_actions
			set_country_flag = { flag = UKR_active_actions_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.302 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_ally_coordination }
			}
			activate_shine_on_focus = UKR_ally_coordination
			set_country_flag = { flag = UKR_ally_coordination_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.302 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH SHUMSKYI's FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# SHUMSKYI - Complete Focus
country_event = {
	id = UKR_inner_circle.302

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_shumskyi
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 3 }
			check_variable = { UKR_ascended_advisor_2 = 3 }
			check_variable = { UKR_ascended_advisor_3 = 3 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_red_diplomacy
			}
			complete_national_focus = {
				focus = UKR_red_diplomacy
				use_side_message = yes
				originator_name = UKR_oleksander_shumskyi
			}
			clr_country_flag = UKR_red_diplomacy_in_progress_flag
			country_event = { id = UKR_inner_circle.301 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_active_actions
			}
			complete_national_focus = {
				focus = UKR_active_actions
				use_side_message = yes
				originator_name = UKR_oleksander_shumskyi
			}
			clr_country_flag = UKR_active_actions_in_progress_flag
			country_event = { id = UKR_inner_circle.301 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_ally_coordination
			}
			complete_national_focus = {
				focus = UKR_ally_coordination
				use_side_message = yes
				originator_name = UKR_oleksander_shumskyi
			}
			clr_country_flag = UKR_ally_coordination_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH SHUMSKYI's FOCUS BRANCH - Cannot complete focus"
		}
	}
}
# SOKOLOVSKA - Start work on Focus
country_event = {
	id = UKR_inner_circle.401

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_sokolovska
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 4 }
			check_variable = { UKR_ascended_advisor_2 = 4 }
			check_variable = { UKR_ascended_advisor_3 = 4 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_socialistic_education }
			}
			activate_shine_on_focus = UKR_socialistic_education
			set_country_flag = { flag = UKR_socialistic_education_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.402 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_universal_equality }
			}
			activate_shine_on_focus = UKR_universal_equality
			set_country_flag = { flag = UKR_universal_equality_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.402 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_special_science_projects }
			}
			activate_shine_on_focus = UKR_special_science_projects
			set_country_flag = { flag = UKR_special_science_projects_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.402 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH SOKOLOVSKA FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# SOKOLOVSKA - Complete Focus
country_event = {
	id = UKR_inner_circle.402

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_sokolovska
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 4 }
			check_variable = { UKR_ascended_advisor_2 = 4 }
			check_variable = { UKR_ascended_advisor_3 = 4 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_socialistic_education
			}
			complete_national_focus = {
				focus = UKR_socialistic_education
				use_side_message = yes
				originator_name = UKR_sofia_sokolovska
			}
			clr_country_flag = UKR_socialistic_education_in_progress_flag
			country_event = { id = UKR_inner_circle.401 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_universal_equality
			}
			complete_national_focus = {
				focus = UKR_universal_equality
				use_side_message = yes
				originator_name = UKR_sofia_sokolovska
			}
			clr_country_flag = UKR_universal_equality_in_progress_flag
			country_event = { id = UKR_inner_circle.401 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_special_science_projects
			}
			complete_national_focus = {
				focus = UKR_special_science_projects
				use_side_message = yes
				originator_name = UKR_sofia_sokolovska
			}
			clr_country_flag = UKR_special_science_projects_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH SOKOLOVSKA FOCUS BRANCH - Cannot complete focus"
		}
	}
}
# TROTSKY - Start work on Focus
country_event = {
	id = UKR_inner_circle.501

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_trotsky
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 5 }
			check_variable = { UKR_ascended_advisor_2 = 5 }
			check_variable = { UKR_ascended_advisor_3 = 5 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_organisator_of_red_army }
			}
			activate_shine_on_focus = UKR_organisator_of_red_army
			set_country_flag = { flag = UKR_organisator_of_red_army_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.502 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_prepare_for_revolution }
			}
			activate_shine_on_focus = UKR_prepare_for_revolution
			set_country_flag = { flag = UKR_prepare_for_revolution_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.502 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_uniting_around_idea }
			}
			activate_shine_on_focus = UKR_uniting_around_idea
			set_country_flag = { flag = UKR_uniting_around_idea_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.502 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH TROTSKY FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# TROTSKY - Complete Focus
country_event = {
	id = UKR_inner_circle.502

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_trotsky
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 5 }
			check_variable = { UKR_ascended_advisor_2 = 5 }
			check_variable = { UKR_ascended_advisor_3 = 5 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_organisator_of_red_army
			}
			complete_national_focus = {
				focus = UKR_organisator_of_red_army
				use_side_message = yes
				originator_name = UKR_lev_trotsky
			}
			clr_country_flag = UKR_organisator_of_red_army_in_progress_flag
			country_event = { id = UKR_inner_circle.501 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_prepare_for_revolution
			}
			complete_national_focus = {
				focus = UKR_prepare_for_revolution
				use_side_message = yes
				originator_name = UKR_lev_trotsky
			}
			clr_country_flag = UKR_prepare_for_revolution_in_progress_flag
			country_event = { id = UKR_inner_circle.501 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_uniting_around_idea
			}
			complete_national_focus = {
				focus = UKR_uniting_around_idea
				use_side_message = yes
				originator_name = UKR_lev_trotsky
			}
			clr_country_flag = UKR_uniting_around_idea_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH TROTSKY FOCUS BRANCH - Cannot complete focus"
		}
	}
}
# MAZEPA - Start work on Focus
country_event = {
	id = UKR_inner_circle.601

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_mazepa
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 6 }
			check_variable = { UKR_ascended_advisor_2 = 6 }
			check_variable = { UKR_ascended_advisor_3 = 6 }
		}
	}

	immediate = {
		if = {
			limit = {
				NOT = { has_completed_focus = UKR_strengthening_of_security_service }
			}
			activate_shine_on_focus = UKR_strengthening_of_security_service
			set_country_flag = { flag = UKR_strengthening_of_security_service_in_progress_flag days = @inner_circle_time_tier_1_flag value = 1 }
			country_event = { id = UKR_inner_circle.602 days = @inner_circle_time_tier_1 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_unemployed_detachments }
			}
			activate_shine_on_focus = UKR_unemployed_detachments
			set_country_flag = { flag = UKR_unemployed_detachments_in_progress_flag days = @inner_circle_time_tier_2_flag value = 1 }
			country_event = { id = UKR_inner_circle.602 days = @inner_circle_time_tier_2 }
		}
		else_if = {
			limit = {
				NOT = { has_completed_focus = UKR_cooperation_or_death }
			}
			activate_shine_on_focus = UKR_cooperation_or_death
			set_country_flag = { flag = UKR_cooperation_or_death_in_progress_flag days = @inner_circle_time_tier_3_flag value = 1 }
			country_event = { id = UKR_inner_circle.602 days = @inner_circle_time_tier_3 }
		}
		else = { #Debug logs
			#log = "SOMETHING WENT WRONG WITH MAZEPA FOCUS BRANCH - Cannot start new focus"
		}
	}
}

# MAZEPA - Complete Focus
country_event = {
	id = UKR_inner_circle.602

	hidden = yes

	is_triggered_only = yes

	trigger = {
		has_completed_focus = UKR_secsec_mazepa
		OR = {
			check_variable = { UKR_ascended_advisor_1 = 6 }
			check_variable = { UKR_ascended_advisor_2 = 6 }
			check_variable = { UKR_ascended_advisor_3 = 6 }
		}
	}

	immediate = {
		if = {
			limit = {
				has_shine_effect_on_focus = UKR_strengthening_of_security_service
			}
			complete_national_focus = {
				focus = UKR_strengthening_of_security_service
				use_side_message = yes
				originator_name = UKR_isaak_mazepa
			}
			clr_country_flag = UKR_strengthening_of_security_service_in_progress_flag
			country_event = { id = UKR_inner_circle.601 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_unemployed_detachments
			}
			complete_national_focus = {
				focus = UKR_unemployed_detachments
				use_side_message = yes
				originator_name = UKR_isaak_mazepa
			}
			clr_country_flag = UKR_unemployed_detachments_in_progress_flag
			country_event = { id = UKR_inner_circle.601 days = UKR_inner_circle_days_to_start_focus random_days = UKR_inner_circle_random_days }
		}
		else_if = {
			limit = {
				has_shine_effect_on_focus = UKR_cooperation_or_death
			}
			complete_national_focus = {
				focus = UKR_cooperation_or_death
				use_side_message = yes
				originator_name = UKR_isaak_mazepa
			}
			clr_country_flag = UKR_cooperation_or_death_in_progress_flag
		}
		else = { #Debug logs
			log = "SOMETHING WENT WRONG WITH MAZEPA FOCUS BRANCH - Cannot complete focus"
		}
	}
}