###########################
# Ukraine Events
###########################

add_namespace = ukraine

# Nationalists miting
country_event = {
	id = ukraine.1
	title = ukraine.1.t
	desc = ukraine.1.d
	picture = GFX_report_event_worker_protests
	trigger = {
		has_government = neutrality
		tag = UKR
		date < 1937.1.1
	}
	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 85
			modifier = {
				factor = 0
				OR = {
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST_ALTERNATE
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST_TRUE
					}
				}
			}
		}
		name = ukraine.1.a
		add_political_power = -25
	}
	option = {
		ai_chance = {
			base = 15
		}
		name = ukraine.1.b
		add_popularity = {
			ideology = fascism
			popularity = 0.03
		}		
	}
}

# Ukraine - Britain accepts Ally request
country_event = {
	id = ukraine.2
	title = ukraine.2.t
	desc = ukraine.2.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.2.a
	}
}

# Ukraine - Britain denies Ally request
country_event = {
	id = ukraine.3
	title = ukraine.3.t
	desc = ukraine.3.d
	picture = GFX_report_event_chamberlain

	is_triggered_only = yes

	option = {
		name = ukraine.3.a
	}
}
# Fate of Skoropadskyi
country_event = {
	id = ukraine.4
	title = ukraine.4.t
	desc = ukraine.4.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		NOT = { has_government = neutrality }
		tag = UKR
		has_civil_war = no
		has_start_date < 1936.01.02
		has_unit_leader = 655
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.4.a
		add_timed_idea = {
			idea = UKR_grey_eminence
			days = 730
		}
	}
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.4.b
		retire_character = UKR_pavlo_skoropadskyi
		add_timed_idea = {
			idea = UKR_disorganized_staff
			days = 90
		}
	}
	option = {
		name = ukraine.4.c
		ai_chance = {
			base = 15
		}
		trigger = {
			has_government = democratic
		}
		retire_character = UKR_pavlo_skoropadskyi
		add_field_marshal_role = {
			character = UKR_symon_petliura
			desc = UKR_symon_petliura_desc
			traits = { organizer logistics_wizard old_guard }
			skill = 2
			attack_skill = 2
			defense_skill = 2`
			planning_skill = 1
			logistics_skill = 2
			legacy_id = 668
		}
		add_command_power = -50
		add_timed_idea = {
			idea = UKR_disorganized_staff
			days = 90
		}
	}
}
# Andriy Melnyk
country_event = {
	id = ukraine.5
	title = ukraine.5.t
	desc = ukraine.5.d
	picture = GFX_report_event_oun_council

	is_triggered_only = yes

	option = {
		name = ukraine.5.a
		promote_character = UKR_andriy_melnyk
	}
}
# Stepan Bandera
country_event = {
	id = ukraine.6
	title = ukraine.6.t
	desc = ukraine.6.d
	picture = GFX_report_event_oun_council

	is_triggered_only = yes

	option = {
		name = ukraine.6.a
		promote_character = UKR_stepan_bandera
	}
}
# Ultimatum to Poland
country_event = {
	id = ukraine.7
	title = ukraine.7.t
	desc = ukraine.7.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.7.a
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0
			}
			modifier = {
				factor = 2
				has_civil_war = yes
			}
		}
		FROM = { country_event = { id = ukraine.8 hours = 6 } }
		add_timed_idea = {
			idea = POL_new_revanchism
			days = 365
		}
		effect_tooltip = {
			FROM = {
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
			}
		}
	}
	
	option = {
		name = ukraine.7.b
		ai_chance = {
			factor = 80
			modifier = {
				factor = 3
				strength_ratio = {
					tag = UKR
					ratio > 0.7
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = POL
				}
			}
		}
		FROM = { 
			country_event = { id = ukraine.9 hours = 6 } 
			if = {
				limit = {
					is_in_faction_with = POL
					is_faction_leader = yes
				}
				remove_from_faction = POL
			}
			if = {
				limit = { 
					is_in_faction_with = POL
					is_faction_leader = no
				}
				random_other_country = {
					limit = { 
						is_in_faction_with = FROM
						is_faction_leader = yes
					}
					remove_from_faction = FROM
				}
			}			
		}
		if = {
			limit = { has_civil_war = yes }
			every_other_country = {
				limit = { 
					original_tag = POL
					has_civil_war = yes
				}
				country_event = { id = ukraine.456 hours = 6 } 
			}
		}		

		effect_tooltip = {
			FROM = {
				declare_war_on = {
					target = POL
					type = take_state
					generator = { 89 91 93 987 }
				}
			}
		}
	}
}
# Poland Cedes West Ukraine
country_event = {
	id = ukraine.8
	title = ukraine.8.t
	desc = ukraine.8.d
	picture = GFX_report_event_german_polish_border

	is_triggered_only = yes
	
	option = {
		name = ukraine.8.a
		transfer_state = 89
		transfer_state = 91
		transfer_state = 93
		transfer_state = 987
	}
}
# Poland Refuses to Cede West Ukraine
country_event = {
	id = ukraine.9
	title = ukraine.9.t
	desc = ukraine.9.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.9.a
		declare_war_on = {
			target = POL
			type = take_state
			generator = { 89 91 93 987 }
		}
		add_war_support = 0.05
	}
}
# West Line builds - outdated
country_event = {
	id = ukraine.10
	title = ukraine.10.t
	desc = ukraine.10.d
	picture = GFX_report_event_bunker_01

	is_triggered_only = yes
	
	option = {
		name = ukraine.10.a
		194 = {
			add_building_construction = {
				type = bunker
				province = 9554
				level = 2
				instant_build = yes
			}
		}
		if = {
			limit = {
				89 = { is_fully_controlled_by = ROOT }
				91 = { is_fully_controlled_by = ROOT }
				93 = { is_fully_controlled_by = ROOT }
			}
			93 = {
				add_building_construction = {
					type = bunker
					province = 6579
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 11503
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 3496
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 9520
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 3412
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 11441
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 422
					level = 2
					instant_build = yes
				}
			}
			91 = {
				add_building_construction = {
					type = bunker
					province = 536
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 9468
					level = 2
					instant_build = yes
				}
			}
			89 = {
				add_building_construction = {
					type = bunker
					province = 6431
					level = 2
					instant_build = yes
				}
			}
			else = {
				199 = {
					add_building_construction = {
						type = bunker
						province = 3430
						level = 2
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						province = 462
						level = 2
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						province = 6509
						level = 2
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						province = 3511
						level = 2
						instant_build = yes
					}
				}
				201 = {
					add_building_construction = {
						type = bunker
						province = 3470
						level = 2
						instant_build = yes
					}
					add_building_construction = {
						type = bunker
						province = 9493
						level = 2
						instant_build = yes
					}
				}
			}
		}
		
		
	}
}
# East Line builds - outdated
country_event = {
	id = ukraine.11
	title = ukraine.11.t
	desc = ukraine.11.d
	picture = GFX_report_event_bunker_01

	is_triggered_only = yes
	
	option = {
		name = ukraine.11.a
		221 = {
			add_building_construction = {
				type = bunker
				province = 11397
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 418
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 9556
				level = 2
				instant_build = yes
			}
		}
		225 = {
			add_building_construction = {
				type = bunker
				province = 9566
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 6565
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 522
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 3520
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 501
				level = 2
				instant_build = yes
			}
		}
		227 = {
			add_building_construction = {
				type = bunker
				province = 3421
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 6493
				level = 2
				instant_build = yes
			}
		}
		228 = {
			add_building_construction = {
				type = bunker
				province = 9446
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = bunker
				province = 9461
				level = 2
				instant_build = yes
			}
		}
	}
}
# Black Sea forts
country_event = {
	id = ukraine.12
	title = ukraine.12.t
	desc = ukraine.12.d
	picture = GFX_report_event_bunker_01

	is_triggered_only = yes
	
	option = {
		name = ukraine.12.a
		192 = {
			add_building_construction = {
				type = bunker
				province = 11670
				level = 2
				instant_build = yes
			}
			add_building_construction = {
				type = coastal_bunker
				province = 11670
				level = 2
				instant_build = yes
			}
		}
		196 = {
			add_building_construction = {#Perekop
				type = bunker
				province = 568
				level = 3
				instant_build = yes
			}
			add_building_construction = {#Chongar
				type = coastal_bunker
				province = 6771
				level = 2
				instant_build = yes
			}
		}
		197 = {
			add_building_construction = {
				type = coastal_bunker
				province = 11683
				level = 2
				instant_build = yes
			}
		}
		227 = {
			add_building_construction = {
				type = coastal_bunker
				province = 6420
				level = 2
				instant_build = yes
			}
		}
	}
}
# Ukraine want join to Comintern
country_event = {
	id = ukraine.13
	title = ukraine.13.t
	desc = ukraine.13.d
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes

	option = {
		name = ukraine.13.a
		ai_chance = { base = 100 }
		if = {
			limit = { is_faction_leader = yes }
			add_to_faction = FROM
		}
		else = {
			create_faction = NewComintern
			add_to_faction = FROM
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		if = {
			limit = { has_civil_war = yes }
			FROM = { set_country_flag = UKR_ready_for_RCW_flag }
		}
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
			country_event = { id = ukraine.161 hours = 6 }
		}
	}
	option = {
		name = ukraine.13.b
		ai_chance = { base = 0 }
		FROM = { country_event = { id = ukraine.145 } }
	}
}
# Putsch of nationalists
country_event = {
	id = ukraine.14
	title = ukraine.14.t
	desc = ukraine.14.d
	picture = GFX_report_event_generic_riot
	
	trigger = {
		tag = UKR
		focus_progress = {
			focus = UKR_alliance_with_Poland
			progress > 0.25
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7 }

	option = {
		name = ukraine.14.a
		add_manpower = -3000
		hidden_effect = {
			set_temp_variable = {
				var = ukr_nat_putsch_var
				value = party_popularity@fascism
			}
			multiply_temp_variable = {
				var = ukr_nat_putsch_var
				value = -0.5
			}			
		}
		add_stability = ukr_nat_putsch_var
		add_political_power = -50
		add_popularity = {
			ideology = fascism
			popularity = -0.1
		}
		add_timed_idea = {
			idea = UKR_opposition_for_polonophiles
			days = 1095
		}	
		retire_character = UKR_yevhen_konovalets
		retire_character = UKR_pavlo_shandruk
	}
}
#Invite to Poland alliance
country_event = {
	id = ukraine.15
	title = ukraine.15.t
	desc = ukraine.15.d
	picture = GFX_report_event_polish_tanks_01

	is_triggered_only = yes

	option = { #Enter alliance
		name = ukraine.15.a
		ai_chance = {
			factor = 100
		}
		FROM = {
			add_to_faction = UKR
			UKR = {
				add_ai_strategy = {
					type = alliance
					id = "POL"
					value = 200
				}
			}
			country_event = { id = poland.10 days = 1 }
		}
	}

	option = {
		name = ukraine.15.b
		ai_chance = {
			factor = 0
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}
		FROM = {
			country_event = { id = poland.11 days = 1 }
		}
	}
}
#Surrender for Poland when Ukraine has taken too much land
country_event = {
	id = ukraine.16
	title = ukraine.16.t
	desc = ukraine.16.d
	picture = GFX_report_event_soviet_tanks_snow
	
	trigger = {
		tag = POL
		has_war_with = UKR
		#has_civil_war = no
		UKR = {
			surrender_progress < 0.1
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
		}
		OR = {
			is_in_faction = no
			is_faction_leader = yes
		}
		89 = { is_controlled_by = UKR }
		91 = { is_controlled_by = UKR }
		93 = { is_controlled_by = UKR }
		89 = { is_owned_by = POL }
		91 = { is_owned_by = POL }
		93 = { is_owned_by = POL }
	}

	mean_time_to_happen = { days = 20 }

	fire_only_once = yes

	#Surrender and offer territory
	option = {
		name = ukraine.16.a
		ai_chance = {
			base = 80
			modifier = {
				factor = 1.5
				casualties_inflicted_by = {
					opponent = UKR
					thousands > 300
				}
			}
		}
		UKR = {
			country_event = { id = ukraine.17 }
		}
		effect_tooltip = {
			UKR = { 
				white_peace = {
					tag = POL 
					message = POL_agree_peace 
				} 
			}
			transfer_state = 89
			transfer_state = 91
			transfer_state = 93
			transfer_state = 987
		}
	}

	#Never give up!
	option = {
		name = ukraine.16.b
		UKR = { add_state_claim = 834 } #Transcurzonia
		ai_chance = {
			base = 20
			modifier = {
				factor = 2
				casualties_inflicted_by = {
					opponent = UKR
					thousands < 100
				}
			}
			modifier = {
				factor = 0
				has_civil_war = yes
			}
		}
	}
}
#Ukraine response to Poland surrender
country_event = {
	id = ukraine.17
	title = ukraine.17.t
	desc = ukraine.17.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	#Accept surrender
	option = {
		name = ukraine.17.a
		ai_chance = {
			base = 90
		}
		white_peace = FROM
		every_other_country = {
			limit = { 
				OR = {
					is_in_faction_with = FROM
					is_puppet_of = FROM
					original_tag = POL #for other sides in civil war
				}
				has_war_with = UKR
			}
			white_peace = UKR
		}
		FROM = {
			add_timed_idea = {
				idea = POL_new_revanchism
				days = 365
			}
		}
		transfer_state = 89
		transfer_state = 91
		transfer_state = 93
		transfer_state = 987
		if = {
			limit = {
				834 = { is_claimed_by = UKR }
			}
			834 = { remove_claim_by = UKR }
		}
	}

	#Take it all
	option = {
		name = ukraine.17.b
		ai_chance = {
			base = 10
		}
		add_state_claim = 834
		POL = { country_event = { id = ukraine.18 } }
	}
}
#Ukraine says no!
country_event = {
	id = ukraine.18
	title = ukraine.18.t
	desc = ukraine.18.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	option = {
		name = ukraine.18.a
	}
}
#Surrender for Ukraine when Poland has taken the capital
country_event = {
	id = ukraine.19
	title = ukraine.19.t
	desc = ukraine.19.d
	picture = GFX_report_event_soviet_tanks_snow
	
	trigger = {
		tag = UKR
		has_war_with = POL
		has_civil_war = no
		OR = {
			is_in_faction = no
			is_faction_leader = yes
		}
        has_completed_focus = UKR_ultimatum_to_Poland
		202 = { is_controlled_by = POL }
	}

	mean_time_to_happen = { days = 20 }

	fire_only_once = yes

	#Surrender and offer territory
	option = {
		name = ukraine.19.a
		ai_chance = {
			base = 8
		}
		POL = {
			country_event = { id = ukraine.20 }
		}
		effect_tooltip = {
			POL = { 
				white_peace = {
					tag = UKR 
					message = UKR_agree_peace 
				} 
			}
			transfer_state = 194
			transfer_state = 198
			transfer_state = 199
			transfer_state = 201
		}
	}

	#Never give up!
	option = {
		name = ukraine.19.b
		ai_chance = {
			base = 2
		}
	}
}
#Poland response to Ukraine surrender
country_event = {
	id = ukraine.20
	title = ukraine.20.t
	desc = ukraine.20.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	#Accept surrender
	option = {
		name = ukraine.20.a
		ai_chance = {
			base = 9
		}
		white_peace = UKR
		every_other_country = {
			limit = { 
				OR = {
					is_in_faction_with = UKR
					is_puppet_of = UKR
				}
				has_war_with = POL
			}
			white_peace = POL
		}
		transfer_state = 194
		transfer_state = 198
		transfer_state = 199
		transfer_state = 201
		if = { #if ROM and POL have mutual guaranties and war with UKR
			limit = {
				has_guaranteed = ROM
				ROM = {
					has_war_with = UKR
					is_in_faction = no
					is_puppet = no
					has_guaranteed = POL
				}
			}
			ROM = { white_peace = UKR }
			192 = { set_demilitarized_zone = yes }
		}
	}

	#Take it all
	option = {
		name = ukraine.20.b
		ai_chance = {
			base = 1
		}
		UKR = { country_event = { id = ukraine.21 } }
	}
}
#Poland says no!
country_event = {
	id = ukraine.21
	title = ukraine.21.t
	desc = ukraine.21.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	option = {
		name = ukraine.21.a
	}
}
# Status of russian language
country_event = {
	id = ukraine.22
	title = ukraine.22.t
	desc = ukraine.22.d
	picture = GFX_report_event_worker_protests
	
	trigger = {
		has_start_date < 1936.01.02
		tag = UKR
		OR = { 
			has_government = democratic
			has_government = communism 
		}
		OR = { 
			NOT = { has_completed_focus = UKR_administrative_reform }
			NOT = { has_completed_focus = UKR_second_language }
		}
		has_civil_war = no
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.22.a
		add_ideas = UKR_language_question
	}
}
# Puppet of USSR
country_event = {
	id = ukraine.23
	title = ukraine.23.t
	desc = ukraine.23.d
	picture = GFX_report_event_soviet_japanese_pact

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = SOV }
	}
	
	option = {
		name = ukraine.23.a
		ai_chance = {
			factor = 50
			modifier = {
				#If they have a fighting chance, they should stand their ground
				factor = 0
				strength_ratio = {
					tag = SOV
					ratio > 0.75
				}
			}
		}
		SOV = { 
			country_event = { id = ukraine.24 }
			effect_tooltip = { puppet = UKR }
		}
	}
	
	option = {
		name = ukraine.23.b
		ai_chance = {
			factor = 50
		}
		SOV = { 
			country_event = { id = ukraine.25 }
			effect_tooltip = {
				declare_war_on = {
					target = UKR
					type = puppet_wargoal_focus
				}
			}
		}
	}
}
# Ukraine accepts and is puppeted
country_event = {
	id = ukraine.24
	title = ukraine.24.t
	desc = ukraine.24.d
	picture = GFX_report_event_soviet_japanese_pact
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.24.a
		puppet = UKR
		UKR = {
			set_cosmetic_tag = UKR_SOV
		}
	}
}
# Ukraine refuses, nations go to war 
country_event = {
	id = ukraine.25
	title = ukraine.25.t
	desc = ukraine.25.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.25.a
		declare_war_on = {
			target = UKR
			type = puppet_wargoal_focus
		}
	}
}
# Forming of DKSR
country_event = {
	id = ukraine.26
	title = ukraine.26.t
	desc = ukraine.26.d
	picture = GFX_report_event_dksr_leaders

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = SOV }
	}
	
	option = {
		name = ukraine.26.a
		ai_chance = {
			factor = 50
			modifier = {
				#If they have a fighting chance, they should stand their ground
				factor = 0
				strength_ratio = {
					tag = SOV
					ratio > 0.75
				}
			}
		}
		remove_ideas = comintern_influence
		add_war_support = 0.05
		SOV = { 
			country_event = { id = ukraine.27 }
			effect_tooltip = { 
				DKR = {
					transfer_state = 196
					transfer_state = 200
					transfer_state = 226
					transfer_state = 227
					transfer_state = 228
					if = {
						limit = {
							OR = {
								137 = { is_owned_and_controlled_by = UKR }
								CRM = { is_puppet_of = UKR }
							}
						}
						transfer_state = 137
					}
					if = {
						limit = {
							OR = {
								986 = { is_owned_and_controlled_by = UKR }
								CRM = { is_puppet_of = UKR }
							}
						}
						transfer_state = 986
					}
				}
				puppet = DKR
			}
		}
		UKR_lazar_kaganovich = { set_nationality = DKR }
		UKR_grigory_petrovsky = { set_nationality = DKR }
		UKR_demyan_korotchenko = { set_nationality = DKR }
		UKR_serhiy_savchenko = { set_nationality = DKR }
		UKR_ivan_duboviy = { set_nationality = DKR }
	}
	
	option = {
		name = ukraine.26.b
		ai_chance = {
			factor = 50
		}
		remove_ideas = comintern_influence
		add_timed_idea = {
			idea = UKR_rebellion_of_dksr
			days = 60
		}
		SOV = { 
			country_event = { id = ukraine.28 }
			effect_tooltip = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = UKR
				}
			}
		}
	}
	option = {
		name = ukraine.26.c
		trigger = {
			has_idea = UKR_second_rus_lang
		}
		ai_chance = {
			factor = 100
		}
		DKR = {
			add_state_core = 196
			add_state_core = 200
			add_state_core = 226
			add_state_core = 227
			add_state_core = 228
			if = {
				limit = {
					137 = { is_owned_and_controlled_by = UKR }
				}
				add_state_core = 137
			}
			if = {
				limit = {
					986 = { is_owned_and_controlled_by = UKR }
				}
				add_state_core = 986
			}
			inherit_technology = UKR
			set_research_slots = 3
		}
		release = DKR 
		add_timed_idea = {
			idea = UKR_comintern_influence
			days = 365
		}
		add_state_core = 196
		add_state_core = 200
		add_state_core = 226
		add_state_core = 227
		add_state_core = 228
		puppet = DKR
		SOV = { 
			country_event = { id = ukraine.345 }
		}
	}
}
# Ukraine retread, DKSR now is puppet of USSR
country_event = {
	id = ukraine.27
	title = ukraine.27.t
	desc = ukraine.27.d
	picture = GFX_report_event_dksr_leaders
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.27.a
		DKR = {
			add_state_core = 196
			add_state_core = 200
			add_state_core = 226
			add_state_core = 227
			add_state_core = 228
			if = {
				limit = {
					137 = { is_owned_and_controlled_by = UKR }
				}
				add_state_core = 137
			}
			if = {
				limit = {
					986 = { is_owned_and_controlled_by = UKR }
				}
				add_state_core = 986
			}
			inherit_technology = UKR
			set_research_slots = 3
		}
		UKR = { 
			release = DKR 
			add_timed_idea = {
				idea = UKR_comintern_influence
				days = 365
			}
			add_state_core = 196
			add_state_core = 200
			add_state_core = 226
			add_state_core = 227
			add_state_core = 228
		}
		puppet = DKR
		if = {
			limit = { CRM = { is_puppet_of = UKR } }
			puppet = CRM
		}
	}
}
# Ukraine suppresses the insurrection of DKSR/OSR, USSR ready to war
country_event = {
	id = ukraine.28
	title = ukraine.28.t
	desc = ukraine.28.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.28.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = UKR
		}
	}
}
# DKSR annexed by USSR or Soviet Ukraine
country_event = {
	id = ukraine.29
	title = ukraine.29.t
	desc = ukraine.29.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = DKR
		OR = {
			NOT = {	country_exists = UKR }
			UKR = { is_puppet_of = SOV }
		}
		has_government = communism
		is_puppet_of = SOV 
		country_exists = SOV
		SOV = {
			is_puppet = no
		}
		has_war = no
	}

	fire_only_once = yes
	
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.29.a
		trigger = {
			NOT = {	country_exists = UKR }
		}
		SOV = { 
			country_event = { id = ukraine.30 }
		}
	}
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.29.b
		trigger = {
			UKR = { is_puppet_of = SOV }
		}
		UKR = { 
			country_event = { id = ukraine.31 }
		}
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.29.c
	}
}
# DKSR/OSR joined to USSR
country_event = {
	id = ukraine.30
	title = ukraine.30.t
	desc = ukraine.30.d
	picture = GFX_report_event_generic_rally2
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.30.a
		annex_country = { target = FROM transfer_troops = yes }
		every_owned_state = {
			limit = {
				is_core_of = FROM
			}
			remove_core_of = FROM
			add_core_of = SOV
		}
	}
}
# DKSR/OSR joined to Ukraine - puppet of USSR
country_event = {
	id = ukraine.31
	title = ukraine.31.t
	desc = ukraine.31.d
	picture = GFX_report_event_generic_rally2
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.31.a
		annex_country = { target = FROM }
		every_owned_state = {
			limit = {
				is_core_of = FROM
			}
			remove_core_of = FROM
		}
	}
}
#London arbitrage for faction leader
country_event = {
	id = ukraine.32
	title = ukraine.32.t
	desc = ukraine.32.d
	picture = GFX_report_event_degaulle_churchill

	is_triggered_only = yes
	
	option = {
		name = ukraine.32.a
		ai_chance = { factor = 85 }
 		POL = { country_event = { id = ukraine.33} }
	}
	
	option = {
		name = ukraine.32.b
		ai_chance = { 
			factor = 15 
			modifier = {
				factor = 0
				NOT = { is_in_faction_with = POL }
			}
		}
		UKR = { 
			add_opinion_modifier = {
				target = ROOT
				modifier = UKR_london_arbitrage_reject
			}
			country_event = { id = ukraine.34 }
		}
	}
}
#London arbitrage - faction leader accept - choice for Poland
country_event = {
	id = ukraine.33
	title = ukraine.33.t
	desc = ukraine.33.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.33.a
		ai_chance = { 
			factor = 70 
			modifier = {
				factor = 1.2
				UKR = { has_country_flag = UKR_consent_to_arrest_of_bandera }
			}
		}
 		POL = { country_event = { id = ukraine.35 days = 1} }
	}
	
	option = {
		name = ukraine.33.b
		ai_chance = { factor = 30 }
		UKR = { 
			country_event = { id = ukraine.36 days = 1}
		}
	}
}
#London arbitrage - faction leader reject
country_event = {
	id = ukraine.34
	title = ukraine.34.t
	desc = ukraine.34.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.34.a
 		UKR_create_wargoal_against_poland = yes
	}
}
#London arbitrage - faction leader accept - Poland accept (forming WUA autonomy)
country_event = {
	id = ukraine.35
	title = ukraine.35.t
	desc = ukraine.35.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.35.a
		WUA = {
			add_state_core = 89
			add_state_core = 91
			add_state_core = 93
			add_state_core = 987
			transfer_state = 89
			transfer_state = 91
			transfer_state = 93
			transfer_state = 987
			inherit_technology = POL
			set_research_slots = 2
		}
		POL = {
			puppet = WUA
		}
		UKR = { UKR_kost_levytsky = { set_nationality = WUA } }
		WUA = {
			set_politics = { ruling_party = democratic elections_allowed = yes }
			promote_character = UKR_kost_levytsky
			add_popularity = { ideology = democratic popularity = 0.5 }
			set_cosmetic_tag = WUA_C
		}
		UKR = { 
			country_event = { id = ukraine.37 }
		}
	}
}
#London arbitrage - faction leader accept - Poland reject
country_event = {
	id = ukraine.36
	title = ukraine.36.t
	desc = ukraine.36.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.36.a
		if = {
			limit = {
				is_in_faction_with = POL
			}
			remove_from_faction = POL
		}
		add_state_claim = 834
 		UKR_create_wargoal_against_poland = yes
	}
}
#London arbitrage - Poland accept - message for Ukraine
country_event = {
	id = ukraine.37
	title = ukraine.37.t
	desc = ukraine.37.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.37.a
	}
}
#Separation of WUA
country_event = {
	id = ukraine.38
	title = ukraine.38.t
	desc = ukraine.38.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.38.a
		WUA = {
			OVERLORD = {
				country_event = { id = ukraine.39 }
			}
		}
		puppet = WUA
	}
}
#Separation of WUA - reaction of WUA overlord
country_event = {
	id = ukraine.39
	title = ukraine.39.t
	desc = ukraine.39.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.39.a
		ai_chance = { 
			factor = 70 
			modifier = { 
				factor = 2
				UKR = { is_faction_leader = yes }
			}
		}
 		UKR = { country_event = { id = ukraine.40 days = 1} }
	}
	
	option = {
		name = ukraine.39.b
		ai_chance = { factor = 30 }
		UKR = { 
			country_event = { id = ukraine.41 days = 1}
		}
	}
}
#Separation of WUA - Overlord accept
country_event = {
	id = ukraine.40
	title = ukraine.40.t
	desc = ukraine.40.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.40.a
	}
}
#Separation of WUA - Poland reject
country_event = {
	id = ukraine.41
	title = ukraine.41.t
	desc = ukraine.41.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.41.a
		if = {
			limit = { FROM = { is_in_faction_with = ROOT } }
			remove_from_faction = FROM
		}
		FROM = {
			declare_war_on = {
				target = WUA
				type = take_state
				generator = { 89 91 93 987 }
			}
		}
	}
}
#WUA joined to Ukraine
country_event = {
	id = ukraine.42
	title = ukraine.42.t
	desc = ukraine.42.d
	picture = GFX_report_event_election_vote
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.42.a
		ai_chance = {
			base = 100
		}
		UKR_kost_levytsky = { set_nationality = UKR }
		WUA = {
			remove_state_core = 89
			remove_state_core = 91
			remove_state_core = 93
			remove_state_core = 987
			if = {
				limit = { UKR = { NOT = { has_government = communism } } }
				every_unit_leader = {
					set_nationality = UKR
				}
			}
		}
		UKR = {
			annex_country = { target = WUA transfer_troops = yes }
			country_event = { id = ukraine.43 }
		}
	}
	option = {
		name = ukraine.42.b
		ai_chance = {
			base = 0
		}
	}
}
#WUA joined to Ukraine - message for Ukraine
country_event = {
	id = ukraine.43
	title = ukraine.43.t
	desc = ukraine.43.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.43.a
		hidden_effect = {
			news_event = { hours = 6 id = news.551 }
		}
	}
}
#Rebellion in East Poland after fall of Warshaw, forming of WUA
country_event = {
	id = ukraine.44
	title = ukraine.44.t
	desc = ukraine.44.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes
	
	option = {
		name = ukraine.44.a
		ai_chance = {
			base = 100
		}
		WUA = {
			add_state_core = 89
			add_state_core = 91
			add_state_core = 93
			add_state_core = 987
			transfer_state = 89
			transfer_state = 91
			transfer_state = 93
			transfer_state = 987
			inherit_technology = POL
			set_research_slots = 2
		}
		puppet = WUA
		if = {
			limit = {
				NOT = { has_government = communism }
			}
			UKR_kost_levytsky = { set_nationality = WUA }
			WUA = {
				set_politics = { ruling_party = democratic elections_allowed = yes }
				promote_character = UKR_kost_levytsky
				add_popularity = { ideology = democratic popularity = 0.5 }
				set_cosmetic_tag = WUA_C
				hidden_effect = { load_oob = WUA_battalions }
			}
		}
		if = {
			limit = {
				has_government = communism
			}
			WUA = {
				set_politics = { ruling_party = communism elections_allowed = yes }
				add_popularity = { ideology = communism popularity = 0.5 }
				set_cosmetic_tag = WUA_C
				if = { limit = { UKR = { has_completed_focus = UKR_natcom_coup } } promote_character = WUA_josyp_krilyk }
				hidden_effect = { load_oob = WUA_battalions }
			}
		}
		GER = {
			country_event = { id = ukraine.45 days = 1}
		}
	}
	option = {
		name = ukraine.44.b
		ai_chance = {
			base = 0
		}
	}
}
#Choice for Germany
country_event = {
	id = ukraine.45
	title = ukraine.45.t
	desc = ukraine.45.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.45.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 100
				is_historical_focus_on = yes
			}
		}
		UKR = { country_event = { id = ukraine.46 days = 1 } }
		effect_tooltip = {
			UKR = {
				add_timed_idea = {
					idea = UKR_deliveries_to_germany
					days = 1825
				}
			}
			GER = {
				add_timed_idea = {
					idea = UKR_deliveries_from_ukraine
					days = 1825
				}
			}
		}
	}
	
	option = {
		name = ukraine.45.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				FROM = { is_in_faction_with = SOV }
				has_global_flag = sov_yes_pact
			}
		}
		declare_war_on = {
			target = UKR
			type = take_state
			generator = { 202 }
		}
		UKR = { country_event = { id = ukraine.47 } }		

		effect_tooltip = {
			GER = {
				declare_war_on = {
					target = WUA
					type = take_state
					generator = { 91 }
				}
			}
		}
	}
}
#Choice for Ukraine - do accept deliveries to Germany?
country_event = {
	id = ukraine.46
	title = ukraine.46.t
	desc = ukraine.46.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	option = {
		name = ukraine.46.a
		ai_chance = {
			factor = 80
			modifier = {
				factor = 100
				is_historical_focus_on = yes
			}
		}
		GER = { 
			country_event = { id = ukraine.48 } 
			add_opinion_modifier = { target = UKR modifier = HUN_trade_deal_with_germany }
		}
		UKR = {
			add_timed_idea = {
				idea = UKR_deliveries_to_germany
				days = 1825
			}
			add_opinion_modifier = { target = GER modifier = HUN_trade_deal_with_germany }
		}
		every_other_country = {
			limit = { 
				has_war_with = GER
			}
			add_opinion_modifier = { 
				target = ROOT
				modifier = UKR_deal_with_nazi_germany
			}
		}
		GER = {
			add_timed_idea = {
				idea = UKR_deliveries_from_ukraine
				days = 1825
			}
		}
	}
	
	option = {
		name = ukraine.46.b
		ai_chance = {
			factor = 20
		}
		GER = {
			country_event = { id = ukraine.49 }
			add_opinion_modifier = { target = UKR modifier = UKR_reject_deal_for_wur }
		}
	}
}
#Germany declare war Ukraine
country_event = {
	id = ukraine.47
	title = ukraine.47.t
	desc = ukraine.47.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.47.a
	}
}
#Ukraine accept deal with TR - message for TR
country_event = {
	id = ukraine.48
	title = ukraine.48.t
	desc = ukraine.48.d
	picture = GFX_report_event_generic_sign_treaty1

	is_triggered_only = yes

	option = {
		name = ukraine.48.a
	}
}
#Ukraine reject deal with TR - message for TR
country_event = {
	id = ukraine.49
	title = ukraine.49.t
	desc = ukraine.49.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.49.a
	}
}
#Germany pressure on Ukraine - do join to Axis?
country_event = {
	id = ukraine.50
	title = ukraine.50.t
	desc = ukraine.50.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { 
		name = ukraine.50.a
		ai_chance = {
			factor = 90
		}
		GER = {
			add_to_faction = UKR
			country_event = { id = ukraine.51 }
		}
		UKR = {
			declare_war_on = {
				target = ENG
				type = take_state
				generator = { 126 }
			}
		}
	}

	option = {
		name = ukraine.50.b
		ai_chance = {
			factor = 10
		}
		GER = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = UKR
			}
		}
		GER = {
			country_event = { id = ukraine.52 }
		}
	}
}
#Ukraine accept demand and joined to Axis
country_event = {
	id = ukraine.51
	title = ukraine.51.t
	desc = ukraine.51.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.51.a
	}
}
#Ukraine reject demand of joined to Axis
country_event = {
	id = ukraine.52
	title = ukraine.52.t
	desc = ukraine.52.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.52.a
	}
}
#Remove deliveries to Germany early
country_event = {
    id = ukraine.53
    hidden = yes
    fire_only_once = yes

    trigger = {
        tag = UKR
        UKR = {	has_idea = UKR_deliveries_to_germany } 
        OR = {
        	UKR = { has_war_with = GER }
        	NOT = { GER = { has_government = fascism } }
        	NOT = { country_exists = GER }
        	NOT = { country_exists = UKR }
        }
    }

   
    option = {
        name = ukraine.53.a
        UKR = {
        	remove_ideas = UKR_deliveries_to_germany
        }
        GER = {
        	remove_ideas = UKR_deliveries_from_ukraine
        }
    }
}
#Adding core for Moldova
country_event = {
	id = ukraine.54
	title = ukraine.54.t
	desc = ukraine.54.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia3

	mean_time_to_happen = { days = 20 }

	fire_only_once = yes
	
	trigger = {
		78 = {
			is_owned_and_controlled_by = UKR
		}
		has_country_flag = UKR_moldavian_integration_is_ready
	}

	option = {
		name = ukraine.54.a
		UKR = { 
			add_state_core = 78 
		}
		ROM = {
			remove_state_core = 78
		}
	}
}
#Adding core for Bukovina
country_event = {
	id = ukraine.55
	title = ukraine.55.t
	desc = ukraine.55.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia1

	is_triggered_only = yes
	
	trigger = {
		80 = {
			is_controlled_by = UKR
		}
	}

	option = {
		name = ukraine.55.a
		UKR = { 
			add_state_core = 80 
		}
		ROM = {
			remove_state_core = 80
		}
	}
}
#Adding core for Carpathian Ukraine
country_event = {
	id = ukraine.56
	title = ukraine.56.t
	desc = ukraine.56.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes
	
	trigger = {
		73 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.56.a
		every_owned_state = {
			limit = { is_core_of = CUA }
			remove_core_of = CUA
			add_core_of	= UKR
		}
		CZE = {
			remove_state_core = 73
		}
		73 = { set_state_name = UKR_zakarpattia }
	}
}
#Invitation to Ukraine Faction
country_event = {
	id = ukraine.57
	title = ukraine.57.t
	desc = ukraine.57.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.57.a
		ai_chance = { 
			factor = 90
			modifier = {
				factor = 0.7
				tag = CRM
			}
			modifier = {
				factor = 0.5
				tag = POL
				NOT = { GER = { has_government = fascism } }
			}
		}
		UKR = {
			country_event = ukraine.58
			add_to_faction = ROOT
		}
		add_ai_strategy = {
			type = alliance
			id = "UKR"
			value = 200
		}
		add_ideas = UKR_ready_for_war
		if = {
			limit = {
				tag = YUG
				UKR = { has_completed_focus = UKR_internationalism }
			}
			hidden_effect = {
				news_event = { hours = 4 id = news.554 }
			}  
		}
	}

	option = {
		name = ukraine.57.b
		ai_chance = { 
			factor = 10 
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < 0 }
			}
			modifier = {
				factor = 0.5
				has_opinion = { target = FROM value > 19 }
			}
		}
		UKR = { country_event = ukraine.59 }
	}
}
# [Country] Accepts
country_event = {
	id = ukraine.58
	title = ukraine.58.t
	desc = ukraine.58.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.58.a
		effect_tooltip = {
			add_to_faction = FROM
		}
	}
}
# [Country] Refuses
country_event = {
	id = ukraine.59
	title = ukraine.59.t
	desc = ukraine.59.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.59.a
		if = { #unlock next focuses if Crimea refuses
			limit = { 
				FROM = { tag = CRM }
				has_completed_focus = UKR_invite_crimea
			}
			unlock_national_focus = UKR_support_for_fleet
		}
	}
}
# Plebiscite in Romania for Bukovina and Bessarabia
country_event = {
	id = ukraine.60
	title = ukraine.60.t
	desc = ukraine.60.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.60.a
		ai_chance = {
			factor = 65
			modifier = {
				factor = 3
				has_government = democratic
			}
		}
		UKR = { country_event = { id = ukraine.61 days = 1 } }
	}
	
	option = {
		name = ukraine.60.b
		ai_chance = {
			factor = 35
			modifier = {
				factor = 3
				strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		UKR = { country_event = { id = ukraine.62 days = 1 } }		
		effect_tooltip = {
			UKR = {
				add_state_claim = 78
				add_state_claim = 80
				add_state_claim = 766
				add_state_claim = 989
			}
		}
	}
}
#Romania accept plebiscite
country_event = {
	id = ukraine.61
	title = ukraine.61.t
	desc = ukraine.61.d
	picture = GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.61.a
		give_guarantee = ROM
		random_list = {
			80 = {
				country_event = { id = ukraine.63 days = 3 } #Bukovina join to Ukraine
			}
			20 = {
				country_event = { id = ukraine.64 days = 3 } #Bukovina stay as romanian
			}
		}
	}
}
#Romania reject plebiscite
country_event = {
	id = ukraine.62
	title = ukraine.62.t
	desc = ukraine.62.d
	picture = GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.62.a
		ai_chance = {
			factor = 40
		}
		add_state_claim = 78
		add_state_claim = 80
		add_state_claim = 766
		add_state_claim = 989
		set_country_flag = UKR_romania_reject_plebiscite
	}
}
#Bukovina join to Ukraine
country_event = {
	id = ukraine.63
	title = ukraine.63.t
	desc = ukraine.63.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia1

	is_triggered_only = yes
	
	option = {
		name = ukraine.63.a
		add_state_claim = 80
		transfer_state = 80
		80 = { add_compliance = 50 }
		random_list = {
			20 = {
				country_event = { id = ukraine.65 days = 1 } #Bessarabia join to Ukraine
			}
			80 = {
				country_event = { id = ukraine.66 days = 1 } #Bessarabia stay as romanian
			}
		}
	}
}
#Bukovina stay as romanian
country_event = {
	id = ukraine.64
	title = ukraine.64.t
	desc = ukraine.64.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.64.a
		random_list = {
			20 = {
				country_event = { id = ukraine.65 days = 1 } #Bessarabia join to Ukraine
			}
			80 = {
				country_event = { id = ukraine.66 days = 1 } #Bessarabia stay as romanian
			}
		}
	}
}
#Bessarabia join to Ukraine
country_event = {
	id = ukraine.65
	title = ukraine.65.t
	desc = ukraine.65.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia3

	is_triggered_only = yes
	
	option = {
		name = ukraine.65.a
		add_state_claim = 78
		transfer_state = 78
		78 = { add_compliance = 50 }
		random_list = {
			80 = {
				country_event = { id = ukraine.274 days = 1 } #Bujak join to Ukraine
			}
			20 = {
				country_event = { id = ukraine.275 days = 1 } #Bujak stay as romanian
			}
		}
	}
}
#Bessarabia stay as romanian
country_event = {
	id = ukraine.66
	title = ukraine.66.t
	desc = ukraine.66.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.66.a
		random_list = {
			80 = {
				country_event = { id = ukraine.274 days = 1 } #Bujak join to Ukraine
			}
			20 = {
				country_event = { id = ukraine.275 days = 1 } #Bujak stay as romanian
			}
		}
	}
}
#Intermarium_headquarters
country_event = {
	id = ukraine.67
	title = ukraine.67.t
	desc = ukraine.67.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes
	
	option = {
		name = ukraine.67.a
		add_ideas = UKR_intermarium_headquarters
	}
}
#Bulba-Borovets for intermarium root
country_event = {
	id = ukraine.68
	title = ukraine.68.t
	desc = ukraine.68.d
	
	trigger = {
		tag = UKR
		is_in_faction_with = POL
		has_completed_focus = UKR_alliance_with_Poland
		WUA = { has_character = WUA_taras_bulba_borovets }
		POL = {
			is_faction_leader = yes
		}
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.68.a
		WUA = { WUA_taras_bulba_borovets = { set_nationality = UKR } }
		add_manpower = 2000
	}
}
#New economic course
country_event = {
	id = ukraine.69
	title = ukraine.69.t
	desc = ukraine.69.d
	picture = GFX_report_event_generic_factory

	is_triggered_only = yes

	option = {
		name = ukraine.69.a
		ai_chance = {
			factor = 10
		}
		add_timed_idea = {
			idea = UKR_new_economic1
			days = 365
		}
	}
	option = {
		name = ukraine.69.b
		ai_chance = {
			factor = 50
		}
		add_timed_idea = {
			idea = UKR_new_economic2
			days = 365
		}
	}
	option = {
		name = ukraine.69.c
		ai_chance = {
			factor = 40
		}
		add_timed_idea = {
			idea = UKR_new_economic3
			days = 365
		}
		add_tech_bonus = {
			name = UKR_new_economic3
			bonus = 1.0
			uses = 1
			category = electronics
		}
	}
}
#Istanbul conference
country_event = {
	id = ukraine.71
	title = ukraine.71.t
	desc = ukraine.71.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.71.a
		ai_chance = {
			factor = 25
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		UKR = {
			country_event = ukraine.72
			add_to_faction = TUR
		}
		add_ai_strategy = {
			type = alliance
			id = "UKR"
			value = 200
		}
		add_ideas = UKR_ready_for_war
	}
	option = {
		name = ukraine.71.b
		ai_chance = {
			factor = 25
		}
		UKR = {
			country_event = ukraine.73
			create_wargoal = {
				type = puppet_wargoal_focus
				target = TUR
				expire = 0
			}
		}
	}
	option = {
		name = ukraine.71.c
		trigger = {
			OR = {
				137 = { is_owned_and_controlled_by = UKR }
				CRM = { 
					is_puppet_of = UKR
					137 = { is_owned_and_controlled_by = CRM }
				}
				CRI = { 
					is_puppet_of = UKR
					137 = { is_owned_and_controlled_by = CRI }
				}
			}
		}
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				is_in_faction = yes
			}
		}
		UKR = {
			country_event = ukraine.138
		}
	}
}
#Turkey accept alliance
country_event = {
	id = ukraine.72
	title = ukraine.72.t
	desc = ukraine.72.d
	picture = GFX_report_event_tur_kemalists_positive
	
	is_triggered_only = yes

	option = {
		name = ukraine.72.a
		if = {
			limit = {
				country_exists = BUL
				BUL = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			BUL = {	country_event = { id = ukraine.57 days = 1}	}
		}
		
	}
}
#Turkey decline alliance
country_event = {
	id = ukraine.73
	title = ukraine.73.t
	desc = ukraine.73.d
	picture = GFX_report_event_tur_inonu_diplomacy
	
	is_triggered_only = yes

	option = {
		name = ukraine.73.a
		if = {
			limit = {
				country_exists = GRE
				GRE = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			GRE = {	
				add_state_claim = 339
				country_event = { id = ukraine.57 days = 1}	
			}
		}
		if = {
			limit = {
				country_exists = BUL
				BUL = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			BUL = {	country_event = { id = ukraine.57 days = 1}	}
		}
	}
}
#Ultimatum to Crimea
country_event = {
	id = ukraine.74
	title = ukraine.74.t
	desc = ukraine.74.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.74.a
		ai_chance = {
			factor = 90
		}
		UKR = {
			country_event = { id = ukraine.75 days = 1 }
		}
		effect_tooltip = {
			UKR = {
				puppet = CRM
			}
		}
	}
	option = {
		name = ukraine.74.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 10
				naval_strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
		}
		FROM = {
			country_event = { id = ukraine.76 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = CRM
					expire = 0
				}
			}
		}
	}
}
#Crimea accept ultimatum
country_event = {
	id = ukraine.75
	title = ukraine.75.t
	desc = ukraine.75.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.75.a
		puppet = FROM
		FROM = {
			set_cosmetic_tag = CRM_AUT
		}
	}
}
#Crimea decline ultimatum
country_event = {
	id = ukraine.76
	title = ukraine.76.t
	desc = ukraine.76.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.76.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
#Ultimatum to Crimea from OUN
country_event = {
	id = ukraine.77
	title = ukraine.77.t
	desc = ukraine.77.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.77.a
		ai_chance = {
			factor = 80
			modifier = {
				factor = 0.5
				naval_strength_ratio = {
				    tag = FROM
				    ratio > 1
				}
			}
		}
		FROM = {
			country_event = { id = ukraine.78 days = 1}
		}
		effect_tooltip = {
			FROM = {
				transfer_state = 137
				transfer_state = 986
			}
		}
	}
	option = {
		name = ukraine.77.b
		ai_chance = {
			factor = 20
		}
		FROM = {
			country_event = { id = ukraine.79 days = 1}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = CRM
					expire = 0
					generator = { 137 986 }
				}
			}
		}
	}
}
#Crimea accept ultimatum of OUN
country_event = {
	id = ukraine.78
	title = ukraine.78.t
	desc = ukraine.78.d
	picture = GFX_report_event_generic_peaceful_annexation

	
	is_triggered_only = yes

	option = {
		name = ukraine.78.a
		if = {
			limit = {
				137 = { is_owned_and_controlled_by = CRM }
			}
			transfer_state = 137
		}
		if = {
			limit = {
				986 = { is_owned_and_controlled_by = CRM }
			}
			transfer_state = 986
		}
		add_war_support = 0.05
	}
}
#Crimea decline ultimatum of OUN
country_event = {
	id = ukraine.79
	title = ukraine.79.t
	desc = ukraine.79.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.79.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			expire = 0
			generator = { 137 986 }
		}
		986 = {
			damage_building = { type = bunker province = 3722 damage = 3 }
		}
		FROM = {
			country_event = { id = crimea.68 hours = 4 }
		}
	}
}
#Communists are ruling - go to civil war?
country_event = {
    id = ukraine.80
    hidden = yes
    fire_only_once = yes

    trigger = {
		tag = UKR
		has_government = communism
		has_civil_war = no
    }

   
    immediate = {
        country_event = { id = ukraine.81 days = 300 random_days = 50 }
    }
}
#Yes, civil war is unavoidable
country_event = {
    id = ukraine.81
    hidden = yes

	is_triggered_only = yes

	trigger = {
		NOT = {	has_completed_focus = UKR_natcom_coup }
		has_civil_war = no
	}
   
    option = {
        name = ukraine.81.a
        if = {
			limit = {
				has_government = communism
				NOT = {	has_country_flag = UKR_purge_of_staff }
			}
			set_country_flag = UKR_rebellion_against_communists
		}
    }
}
# Start of civil war					
country_event = {
	id = ukraine.82
	title = ukraine.82.t
	desc = ukraine.82.d
	picture = GFX_report_event_generic_battle

	fire_only_once = yes
	
	trigger = {
		tag = UKR
		has_country_flag = UKR_rebellion_against_communists
		NOT = { has_country_flag = UKR_ready_for_RCW_flag }
		has_character = UKR_yevhen_konovalets
		has_war = no
	}

	mean_time_to_happen = {
		days = 30
	}

	option = {
		name = ukraine.82.a
		start_civil_war = {
			ideology = fascism
			size = 0.4
			states = { 194 198 199 201 }
			#keep_unit_leaders = { 661 662 }
			keep_unit_leaders_trigger = {
				OR = {
					has_id = 662
					has_id = 661
				}
			}
		}
		add_timed_idea = {
			idea = UKR_civil_war_disorganization
			days = 60
		}
		set_country_flag = UKR_purge_effect_is_end
		random_other_country = {
			limit = {
				original_tag = UKR
				has_government = fascism
			}
			ROOT = {
				UKR_yevhen_konovalets = { set_nationality = PREV.PREV }
				UKR_pavlo_shandruk = { set_nationality = PREV.PREV }
			}
			promote_character = UKR_yevhen_konovalets
			load_focus_tree = { tree = ukraine_focus keep_completed = no }
			unlock_national_focus = UKR_political_effort
			complete_national_focus = UKR_revanchism
		}
	}
}
# Crimean intervention to Ukrainian civil war - message for Ukraine
country_event = {
	id = ukraine.83
	title = ukraine.83.t
	desc = ukraine.83.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.83.a
	}
}
# Crimean volunteers for war with Soviets
country_event = {
	id = ukraine.84
	title = ukraine.84.t
	desc = ukraine.84.d
	
	trigger = {
		tag = UKR
		NOT = { has_government = communism } 
		has_war_with = SOV
		CRM = {
			NOT = { has_government = communism } 
			has_war = no
			exists = yes
			is_puppet = no
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		name = ukraine.84.a
		ai_chance = {
			factor = 100
		}
		hidden_effect = { load_oob = UKR_crimean_volunteers }
		custom_effect_tooltip = UKR_nine_infantry_template_tt
	}
	option = {
		name = ukraine.84.b
		ai_chance = {
			factor = 0
		}
	}	
}
# Integration of Crimea
country_event = {
	id = ukraine.85
	title = ukraine.85.t
	desc = { 
		text = ukraine.85.desc.a
		trigger = {
			OR = {
				AND = {
					has_country_flag = UKR_reich_refuse_crimea
					oun_low_power_of_melnyk_trigger = yes
				}
				NOT = { has_country_flag = UKR_russian_as_state_language_flag }
			}
			
		}
	}
	desc = { 
		text = ukraine.85.desc.b
		trigger = {
			oun_low_power_of_melnyk_trigger = yes
			NOT = { has_country_flag = UKR_reich_refuse_crimea }
		}
	}
	desc = { 
		text = ukraine.85.desc.c
		trigger = {
			has_country_flag = UKR_russian_as_state_language_flag 
		}
	}
	picture = GFX_report_event_sevastopol

	is_triggered_only = yes

	option = {
		name = ukraine.85.a
		trigger = {
			NOT = { has_country_flag = UKR_russian_as_state_language_flag  }
		}
		ai_chance = {
			factor = 25
		}
		if = {
			limit = { 
				CRM = { is_puppet = yes } 
			}
			annex_country = { target = CRM }
		}
		add_political_power = -50
		137 = { 
			add_compliance = 15
		}
		986 = { 
			add_compliance = 15
		}
	}
	option = {
		name = ukraine.85.b
		trigger = {
			OR = {
				has_country_flag = UKR_reich_refuse_crimea
				oun_low_power_of_melnyk_trigger = no
			}
		}
		ai_chance = {
			factor = 25
		}
		CRI = {
			add_state_core = 137
			add_state_core = 986
		}
		if = {
			limit = {
				CRM = { is_puppet_of = ROOT }
			}
			CRM = {
				#save manpower for CRI
				delete_unit = { 
					state = 137             
					disband = yes 
				}
				delete_unit = { 
					state = 986             
					disband = yes 
				}
			}
			annex_country = { target = CRM }
		}
		release_puppet = CRI
		CRI = {
			set_politics = { ruling_party = democratic elections_allowed = yes }
			add_popularity = { ideology = democratic popularity = 0.5 }
			set_cosmetic_tag = CRI_AUT
			inherit_technology = CRM
			set_research_slots = 2
		}
		137 = { 
			remove_claim_by = ROOT 
			remove_core_of = CRM 
		}
		986 = { 
			remove_claim_by = ROOT 
			remove_core_of = CRM 
		}
		if = {
			limit = {
				country_exists = TUR
				NOT = { has_war_with = TUR }
			}
			TUR = { add_opinion_modifier = { target = UKR modifier = UKR_support_of_crimean_turks } }
		}
	}
	option = {
		name = ukraine.85.c
		trigger = {
			NOT = { has_country_flag = UKR_russian_as_state_language_flag  }
		}
		ai_chance = {
			factor = 50
		}
		if = {
			limit = { 
				CRM = { exists = no } 
				137 = { is_core_of = CRM }
			}
			release_puppet = CRM
		}
		add_state_core = 137
		remove_state_claim = 137
		add_state_core = 986
		remove_state_claim = 986
		add_stability = -0.02
		CRM = { set_cosmetic_tag = CRM_AUT }
		CRM = { add_ideas = UKR_assimilation_of_crimea }
		if = {
			limit = { 
				has_country_flag = UKR_cossack_republic
				check_variable = { var_ucr_support_of_right_wing < 100 }
			}
			ucr_support_of_right_big = yes
		}
	}
	option = {
		name = ukraine.85.e
		trigger = {
			has_rule = can_create_collaboration_government
			is_available_to_collaboration_government = yes
			NOT = { has_completed_focus = UKR_purge }
			SOV = { 
				exists = yes 
				NOT = { is_in_faction_with = UKR }
				NOT = { has_war_with = UKR }
				is_puppet = no
			}
		}
		ai_chance = {
			factor = 0
		}
		add_political_power = -25
		SOV = {
			add_opinion_modifier = { target = UKR modifier = UKR_creating_collaborants_opinion }
		}
		if = {
			limit = { 
				CRM = { exists = yes } 
			}
			annex_country = { target = CRM }
		}
		custom_effect_tooltip = UKR_prepare_collaborants_in_crimea_tt
		set_country_flag = UKR_prepare_collaborants_in_crimea
	}
	option = { #easy integration for second russian language
		name = ukraine.85.h
		trigger = {
			has_country_flag = UKR_russian_as_state_language_flag 
		}
		ai_chance = {
			factor = 70
		}
		if = {
			limit = {
				CRM = { is_puppet_of = ROOT }
			}
			annex_country = { target = CRM }
		}
		add_state_core = 137
		add_state_core = 986
	}
	option = { #German colony for Melnik path
		name = ukraine.85.i
		trigger = {
			oun_low_power_of_melnyk_trigger = yes
			is_in_faction_with = GER
			NOT = { has_country_flag = UKR_reich_refuse_crimea }
		}
		ai_chance = {
			factor = 70
		}
		effect_tooltip = { 
			GER = {
				transfer_state = 137 
				add_state_core = 137
				transfer_state = 986 
				add_state_core = 986
			}
		} 
		GER = { country_event = { id = ukraine.457 days = 1 } }
	}
}
#Integeration of Crimea for Ukraine (without TfV) - outdated
country_event = {
	id = ukraine.86
	title = ukraine.86.t
	desc = ukraine.86.d
	picture = GFX_report_event_generic_peaceful_annexation
	trigger = {
		CRM = { is_puppet_of = UKR }
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.86.a
		annex_country = { target = CRM }
	}
}
#ukraine.87 - moved to USEC as usec.1
#Rename of Stanislawow
country_event = {
	id = ukraine.88
	title = ukraine.88.t
	desc = ukraine.88.d
	picture = GFX_report_event_ivano_frankovsk

	fire_only_once = yes

	trigger = {
		OR = {
			AND = {
				tag = UKR
				UKR = {
					owns_state = 89
					controls_state = 89
				}
			}
			AND = {
				tag = DKR
				DKR = {
					has_completed_focus = DKR_right_side
					owns_state = 89
					controls_state = 89
				}
			}
		}
	}

	option = { #a great idea!
		name = ukraine.88.a
		ai_chance = {
			base = 100
		}
		89 = { set_state_name = UKR_ivano_frankovsk }
		set_province_name = { id = 11411 name = UKR_ivano_frankovsk }
		hidden_effect = {
			if = {
				limit = { 91 = { is_owned_and_controlled_by = ROOT } }
				91 = { set_state_name = UKR_lviv }
				set_province_name = { id = 11479 name = UKR_lviv }
				set_province_name = { id = 3483 name = UKR_ternopil }
			}
			if = {
				limit = { 93 = { is_owned_and_controlled_by = ROOT } }
				set_province_name = { id = 513 name = UKR_lutsk }
			}
			if = {
				limit = { 987 = { is_owned_and_controlled_by = ROOT } }
				set_province_name = { id = 6435 name = UKR_rivne }
			}
			
		}
	}

	option = { #rather not
		name = ukraine.88.b
		ai_chance = {
			base = 0
		}
	}
}
# Workers protest for nationalists
country_event = {
	id = ukraine.90
	title = ukraine.90.t
	desc = ukraine.90.d
	picture = GFX_report_event_worker_protests
	
	trigger = {
		has_government = fascism
		is_puppet = no
		tag = UKR
		has_civil_war = no
		has_any_power_balance = no
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.90.a
		set_power_balance = {
			id = UKR_power_balance
			left_side = UKR_workers_conditions	
			right_side = UKR_interests_of_industrialists	
			set_default = no
			set_value = 0.95
		}
	}
}
#Proclamation of Carpathian Ukraine
country_event = {
    id = ukraine.91
    hidden = yes

	is_triggered_only = yes
   
    option = {
        name = ukraine.91.a
        CUA = {
        	transfer_state = 73
        	load_oob = CUA_carpathian_sich
        }
	    if = {
        	limit = {
        		UKR = {
        			exists = yes
        			is_puppet = no
        		}
        	}
        	UKR = {
           		country_event = { id = ukraine.92 hours = 1 }
        	}
        }
    }
}
#Help for Carpathian Ukraine
country_event = {
	id = ukraine.92
	title = ukraine.92.t
	desc = ukraine.92.d
	picture = GFX_report_event_proclamation_of_carphatian_ukraine

	is_triggered_only = yes

	option = {
		trigger = { NOT = { has_war_with = GER } }
		name = ukraine.92.a
		ai_chance = {
			factor = 50
		}
		GER = {
			country_event = { id = ukraine.93 hours = 6 }
		}
	}
	option = {
		name = ukraine.92.b
		trigger = { has_war_with = GER } 
		ai_chance = {
			factor = 50
		}
		puppet = CUA
		CUA = { set_politics = { ruling_party = democratic elections_allowed = yes } }
		HUN = {
			country_event = { id = ukraine.94 hours = 6 }
		}
	}
	option = {
		trigger = { 
			NOT = { has_war_with = GER } 
			89 = { is_owned_and_controlled_by = UKR }
		}
		name = ukraine.92.c
		ai_chance = {
			factor = 0
		}
		puppet = CUA
		CUA = { set_politics = { ruling_party = democratic elections_allowed = yes } }
		HUN = {
			country_event = { id = ukraine.94 hours = 6 }
		}
	}
	option = {
		name = ukraine.92.e
		ai_chance = {
			factor = 0
		}
		HUN = {
			country_event = { id = ukraine.95 hours = 6 }
		}
	}
}
#Carpathian Ukraine - solution for Germany
country_event = {
	id = ukraine.93
	title = ukraine.93.t
	desc = ukraine.93.d
	picture = GFX_report_event_proclamation_of_carphatian_ukraine

	is_triggered_only = yes

	option = {
		name = ukraine.93.a
		ai_chance = {
			factor = 50
			modifier = {
				UKR = {
					OR = { 
						has_government = democratic 
						has_government = communism
					}
				}
				factor = 0.1
			}
			modifier = {
				UKR = {
					OR = { 
						has_government = neutrality 
						has_government = fascism
					}
				}
				factor = 1.2
			}
			modifier = {
				UKR = { 
					OR = {
						is_neighbor_of = CUA
						AND = {
							oun_low_power_of_melnyk_trigger = yes
							is_in_faction_with = GER	
						}
					}
				}
				factor = 10
			}
		}
		UKR = {
			puppet = CUA
			CUA = { 
				set_politics = { ruling_party = democratic elections_allowed = yes }
				if = { 
					limit = { UKR = { NOT = { has_government = democratic } } } 
					add_popularity = {
						ideology = democratic
						popularity = 0.50
					}
				}
			}
			country_event = ukraine.99
		}
		set_global_flag = GER_support_for_CUA
		HUN = {
			country_event = { id = ukraine.94 hours = 6 }
		}
	}
	option = {
		name = ukraine.93.b
		ai_chance = {
			factor = 50
		}
		HUN = {
			country_event = { id = ukraine.95 hours = 6 }
		}
		UKR = {
			country_event = ukraine.100
		}
	}
}
#Carpathian Ukraine - solution for Hungary
country_event = {
	id = ukraine.94
	title = ukraine.94.t
	picture = GFX_report_event_proclamation_of_carphatian_ukraine
	desc = { 
		text = ukraine.94.desc.a
		trigger = {
			has_global_flag = GER_support_for_CUA
		}
	}
	desc = { 
		text = ukraine.94.desc.b
		trigger = {
			NOT = { has_global_flag = GER_support_for_CUA }
		}
	}

	is_triggered_only = yes

	option = {
		name = ukraine.94.a
		ai_chance = {
			factor = 60
			modifier = {
				any_other_country = {
					is_major = yes
					is_in_faction_with = UKR
				}
				factor = 1.2
			}
		}
		UKR = { country_event = { id = ukraine.226 hours = 6 } }
	}
	option = {
		name = ukraine.94.b
		ai_chance = {
			factor = 20
			modifier = {
				has_global_flag = GER_support_for_CUA
				factor = 0
			}
		}
		declare_war_on = {
			target = CUA
			type = take_state
			generator = { 73 }
		}
		add_ai_strategy = {
			type = conquer
			id = "CUA"
			value = 1000
		}
	}
}
#Carpathian Ukraine - Hungary declare war
country_event = {
	id = ukraine.95
	title = ukraine.95.t
	desc = ukraine.95.d
	picture = GFX_report_event_hungarian_army

	is_triggered_only = yes

	option = {
		name = ukraine.95.a
		declare_war_on = {
			target = CUA
			type = take_state
			generator = { 73 }
		}
		add_ai_strategy = {
			type = conquer
			id = "CUA"
			value = 1000
		}
	}
}
# Ultimatum to Romania
country_event = {
	id = ukraine.96
	title = ukraine.96.t
	desc = ukraine.96.d
	picture = GFX_report_event_german_troops
	trigger = {
		78 = { is_owned_and_controlled_by = ROM } 
		80 = { is_owned_and_controlled_by = ROM }
		766 = { is_owned_and_controlled_by = ROM }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.96.a
		ai_chance = {
			factor = 50
		}
		UKR = { country_event = { id = ukraine.97 days = 1 } }
		effect_tooltip = {
			UKR = {
				transfer_state = 78
				transfer_state = 80
				transfer_state = 766
			}
		}
	}
	
	option = {
		name = ukraine.96.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				strength_ratio = {
					tag = UKR
					ratio > 0.7
				}
			}
			modifier = {
				factor = 3
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROM
				}
			}
		}
		UKR = { country_event = { id = ukraine.98 days = 1 } 
			if = {
				limit = {
					is_in_faction_with = ROM
					is_faction_leader = yes
				}
				remove_from_faction = ROM
			}
	
		}		

		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = take_state_focus
					target = ROM
					generator = { 78 80 766 }
				}
			}
		}
	}
}
# Romania Cedes Bukovina and Bessarabia
country_event = {
	id = ukraine.97
	title = ukraine.97.t
	desc = ukraine.97.d
	picture = GFX_report_event_war_occupation_of_bukovina_and_bessarabia3

	is_triggered_only = yes
	
	option = {
		name = ukraine.97.a
		transfer_state = 78
		transfer_state = 80
		transfer_state = 766
		add_war_support = 0.05
	}
}
# Romania Refuses to Cede Bukovina and Bessarabia
country_event = {
	id = ukraine.98
	title = ukraine.98.t
	desc = ukraine.98.d
	picture = GFX_report_event_romanian_soldiers

	is_triggered_only = yes
	
	option = {
		name = ukraine.98.a
		add_state_claim = 989
		create_wargoal = {
			type = take_state_focus
			target = ROM
			expire = 0
			generator = { 78 80 766 989 }
		}
	}
}
#Carpathian Ukraine - Germany accept - message foe Ukraine
country_event = {
	id = ukraine.99
	title = ukraine.99.t
	desc = ukraine.99.d

	is_triggered_only = yes

	option = {
		name = ukraine.99.a
	}
}
#Carpathian Ukraine - Germany decline - war with Hungary?
country_event = {
	id = ukraine.100
	title = ukraine.100.t
	desc = ukraine.100.d

	is_triggered_only = yes

	option = {
		name = ukraine.100.a
		ai_chance = {
			factor = 100
		}
	}
	option = {
		name = ukraine.100.b
		trigger = { is_neighbor_of = CUA }
		ai_chance = {
			factor = 0
		}
		puppet = CUA
		CUA = { set_politics = { ruling_party = democratic elections_allowed = yes } }
		
	}
}
#Finnland - alliance with Intermarium against Soviets
country_event = {
    id = ukraine.101
    hidden = yes
    fire_only_once = yes

    trigger = {
		tag = FIN
		is_puppet = no
		is_in_faction = no
		has_war = no
		POL = {
			is_faction_leader = yes
			has_war_with = SOV
		}
		146 = {
			is_owned_and_controlled_by = SOV
		}
    }
   
    option = {
        name = ukraine.101.a
        add_ai_strategy = {
			type = alliance
			id = "POL"
			value = 200
		}
		add_ideas = UKR_ready_for_war
		POL = {
			add_ai_strategy = {
				type = alliance
				id = "FIN"
				value = 200
			}
		}
    }
}
#Adding core for Kuban
country_event = {
	id = ukraine.102
	title = ukraine.102.t
	desc = ukraine.102.d

	is_triggered_only = yes
	
	trigger = {
		234 = {
			is_owned_and_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.102.a
		add_state_core = 234
		set_country_flag = UKR_crimson_ukraine_integrated
	}
}
# Ukraine asked Turkey for pass through Bosfor
country_event = {
	id = ukraine.103
	title = ukraine.103.t
	desc = ukraine.103.d

	is_triggered_only = yes

	option = { 
		name = ukraine.103.a
		ai_chance = {
			factor = 10
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = UKR
				}
			}
			modifier = {
				factor = 2
				naval_strength_ratio = {
				    tag = UKR
				    ratio < 1
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = UKR
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				has_opinion = { target = UKR value > 10 }
			}
		}
		UKR = {
			country_event = { id = ukraine.104 days = 1	}
		}
		every_other_country = { #reaction of ukrainian enemies on this not neutrality action 
			limit = {
				has_war_with = UKR
				OR = {
					is_major = yes
					is_faction_leader = yes
					is_in_faction = no
				}
			}
			country_event = { id = ukraine.277 days = 2	}
		}
		effect_tooltip = {
			diplomatic_relation = {
				country = UKR
				relation = military_access
				active = yes
			}
		}
	}

	option = { 
		name = ukraine.103.b
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0.1
				has_dlc = "La Resistance"
			}
		}
		UKR = {
			country_event = { id = ukraine.105 days = 1	}
		}
	}
}
# Turkey accept
country_event = {
	id = ukraine.104
	title = ukraine.104.t
	desc = ukraine.104.d

	is_triggered_only = yes

	option = {
		name = ukraine.104.a
		diplomatic_relation = {
			country = TUR
			relation = military_access
			active = yes
		}
		every_other_country = {
			limit = { is_in_faction_with = UKR }
			diplomatic_relation = {
				country = TUR
				relation = military_access
				active = yes
			}
		}
		if = { 
			limit = { 340 = { is_demilitarized_zone = yes } } 
			340 = { set_demilitarized_zone = no }  
		}
		if = { 
			limit = { 341 = { is_demilitarized_zone = yes } } 
			341 = { set_demilitarized_zone = no }  
		}
		if = { 
			limit = { 797 = { is_demilitarized_zone = yes } } 
			797 = { set_demilitarized_zone = no }  
		}
	}
}
# Turkey refuse
country_event = {
	id = ukraine.105
	title = ukraine.105.t
	desc = ukraine.105.d

	is_triggered_only = yes

	option = { 
		name = ukraine.105.a
		create_wargoal = {
			type = take_state_focus
			target = TUR
			expire = 0
			generator = { 341 }
		}
	}
}
# Request for transfer of Carpathian Ukraine 
country_event = {
	id = ukraine.106
	title = ukraine.106.t
	desc = ukraine.106.d

	is_triggered_only = yes

	option = { 
		name = ukraine.106.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				73 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				73 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			transfer_state = 73
		}

	}

	option = { 
		name = ukraine.106.b
		ai_chance = {
			factor = 10
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# FROM.GetName accept transfer of state
country_event = {
	id = ukraine.107
	title = ukraine.107.t
	desc = ukraine.107.d

	is_triggered_only = yes

	option = {
		name = ukraine.107.a
	}
}
# FROM.GetName reject transfer of state
country_event = {
	id = ukraine.108
	title = ukraine.108.t
	desc = ukraine.108.d

	is_triggered_only = yes

	option = {
		name = ukraine.108.a
	}
}
# Request for transfer of Bessarabia
country_event = {
	id = ukraine.109
	title = ukraine.109.t
	desc = ukraine.109.d

	is_triggered_only = yes

	option = { 
		name = ukraine.109.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				78 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				78 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			transfer_state = 78
		}

	}

	option = { 
		name = ukraine.109.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_country_flag = ROM_ukrainian_support
			}
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Request for transfer of Bukovina
country_event = {
	id = ukraine.110
	title = ukraine.110.t
	desc = ukraine.110.d

	is_triggered_only = yes

	option = { 
		name = ukraine.110.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				80 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				80 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			transfer_state = 80
		}

	}

	option = { 
		name = ukraine.110.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_country_flag = ROM_ukrainian_support
			}
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Request for transfer of Polesie
country_event = {
	id = ukraine.111
	title = ukraine.111.t
	desc = ukraine.111.d

	is_triggered_only = yes

	option = { 
		name = ukraine.111.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				94 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				94 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			if = {
				limit = {
					94 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 94
			}
		}

	}

	option = { 
		name = ukraine.111.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				is_puppet_of = UKR
			}
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Request for transfer of West Ukraine
country_event = {
	id = ukraine.112
	title = ukraine.112.t
	desc = ukraine.112.d

	is_triggered_only = yes

	option = { 
		name = ukraine.112.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				OR = {
					89 = { is_core_of = ROOT }
					91 = { is_core_of = ROOT }
					93 = { is_core_of = ROOT }
					987 = { is_core_of = ROOT }
				}
				
			}
			modifier = {
				factor = 0.2
				OR = {
					89 = { is_claimed_by = ROOT }
					91 = { is_claimed_by = ROOT }
					93 = { is_claimed_by = ROOT }
					987 = { is_claimed_by = ROOT }
				}
			}
		}
		
		UKR = {
			country_event = ukraine.107
			if = {
				limit = {
					89 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 89
			}
			if = {
				limit = {
					91 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 91
			}
			if = {
				limit = {
					93 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 93
			}
			if = {
				limit = {
					987 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 987
			}
			if = {
				limit = {
					834 = { 
						is_owned_and_controlled_by = ROOT 
						is_claimed_by = UKR
					}
				}
				transfer_state = 834
			}
		}

	}

	option = { 
		name = ukraine.112.b
		ai_chance = {
			factor = 10
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
#Claims on Bessarabia and Bukovina - choice for Germany
country_event = {
	id = ukraine.113
	title = ukraine.113.t
	desc = ukraine.113.d
	trigger = {
		78 = { is_owned_and_controlled_by = ROM } 
		80 = { is_owned_and_controlled_by = ROM }
		766 = { is_owned_and_controlled_by = ROM }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.113.a
		ai_chance = {
			factor = 20
			modifier = {
				UKR = { 
					oun_low_power_of_melnyk_trigger = yes
				}
				factor = 5
			}
		}
		ROM = {
			country_event = ukraine.114
		}
	}
	option = {
		name = ukraine.113.b
		ai_chance = {
			factor = 10
		}

		UKR = {
			country_event = ukraine.115
		}
	}
}
# Ultimatum to Romania (from Germania)
country_event = {
	id = ukraine.114
	title = ukraine.114.t
	desc = ukraine.114.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.114.a
		ai_chance = {
			factor = 85
		}
		UKR = { country_event = { id = ukraine.97 days = 1 } }
		effect_tooltip = {
			UKR = {
				transfer_state = 78
				transfer_state = 80
				transfer_state = 766
			}
		}
	}
	
	option = {
		name = ukraine.114.b
		ai_chance = {
			factor = 15
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					NOT = { tag = GER }
					is_in_faction_with = ROM
				}
			}
		}
		UKR = { country_event = { id = ukraine.98 days = 1 } }		
		GER = {
			if = {
				limit = {
					is_in_faction_with = ROM
					is_faction_leader = yes
				}
				remove_from_faction = ROM
			}
		}
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = take_state_focus
					target = ROM
					expire = 0
					generator = { 78 80 766 }
				}
			}
		}
	}
}
# Germany reject pressure on Romania
country_event = {
	id = ukraine.115
	title = ukraine.115.t
	desc = ukraine.115.d

	is_triggered_only = yes

	option = {
		name = ukraine.115.a
		if = {
			limit = { has_country_flag = UKR_has_OUN_struggle }
			oun_lower_control_small = yes
		}
	}
}
# Warsaw process
country_event = {
	id = ukraine.116
	title = ukraine.116.t
	desc = ukraine.116.d
	picture = GFX_report_event_warsaw_process
	
	trigger = {
		has_government = neutrality 
		NOT = { has_war_with = POL }
		country_exists = POL
		tag = UKR
		date > 1936.2.1
		date < 1936.5.1
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	option = {
		name = ukraine.116.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				OR = {
					has_game_rule = {
						rule = UKR_ai_behavior
						option = COMMUNIST_ALTERNATE
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = DEMOCRATIC
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = INTERMARIUM
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = NEUTRALITY
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = NEUTRALITY_MONARCHY
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = NEUTRALITY_REPUBLIC
					}
				}
			}
		}
		country_event = { id = ukraine.117 days = 1 } #arrest of Bandera
		set_country_flag = UKR_consent_to_arrest_of_bandera
		custom_effect_tooltip = UKR_consent_to_arrest_of_bandera_tt
	}

	option = {
		name = ukraine.116.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				OR = {
					has_game_rule = {
						rule = UKR_ai_behavior
						option = COMMUNIST
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = NATCOM
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST_ALTERNATE
					}
					has_game_rule = {
						rule = UKR_ai_behavior
						option = FASCIST_TRUE
					}
				}
			}
		}
		add_stability = 0.02
		add_popularity = {
			ideology = fascism
			popularity = -0.03
		}
		POL = {
			add_opinion_modifier = { target = UKR modifier = UKR_refusal_to_extradite_of_bandera }
		}
		if = {
			limit = { has_dlc = "La Resistance" }
			set_country_flag = UKR_kyiv_conference_is_available
			custom_effect_tooltip = UKR_additional_operation
			POL = {
				set_variable = { var = ukr_poland_reaction_for_sabotages_var value = 0 }
				set_variable = { var = ukr_poland_caution_for_sabotages_var value = 0 }
			}
		}
	}
}
# Arrest of Bandera
country_event = {
	id = ukraine.117
	title = ukraine.117.t
	desc = ukraine.117.d

	is_triggered_only = yes

	option = {
		name = ukraine.117.a
		add_political_power = -50
		add_popularity = {
			ideology = fascism
			popularity = 0.03
		}	
	}
}
# Kuban annexed by Ukraine
country_event = {
	id = ukraine.118
	title = ukraine.118.t
	desc = ukraine.118.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.118.a
		UKR = { 
			annex_country = { target = KUB }
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
}
# Kuban joined to Ukraine - outdated
country_event = {
	id = ukraine.119
	title = ukraine.119.t
	desc = ukraine.119.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.119.a
		annex_country = { target = KUB }
	}
}
# Carpathian Ukraine annexed by Ukraine
country_event = {
	id = ukraine.120
	title = ukraine.120.t
	desc = ukraine.120.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.120.a
		effect_tooltip = {
			UKR = { annex_country = { target = CUA } }
		}
		UKR = { 
			country_event = ukraine.121
		}
	}

	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.120.b
	}
}
# Carpathian Ukraine joined to Ukraine
country_event = {
	id = ukraine.121
	title = ukraine.121.t
	desc = ukraine.121.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.121.a
		CUA = {
			every_unit_leader = {
				set_nationality = UKR
			}
			if = {
				limit = { has_character = CUA_yulyi_braschaiko }
				CUA_yulyi_braschaiko = { set_nationality = UKR }
			}
		}
		annex_country = { target = CUA transfer_troops = yes }
		if = {
			limit = {
				73 = { is_owned_and_controlled_by = UKR }
			}
			73 = { add_compliance = 35 }
		}
	}
}
# Hetman dies
country_event = {
	id = ukraine.122
	title = ukraine.122.t
	desc = ukraine.122.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.122.a
		add_field_marshal_role = {
			desc = UKR_danylo_skoropadskyi_desc
			character = UKR_danylo_skoropadskyi
			traits = { }
			skill = 1
			attack_skill = 1
			defense_skill = 1
			planning_skill = 1
			logistics_skill = 1
		}
	}
}
# Defense of Kyiv (state) successful
country_event = {
	id = ukraine.123
	title = ukraine.123.t
	desc = ukraine.123.d
	picture = GFX_report_event_generic_military_parade
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.123.a
	}
}

# Defense of Kyiv (state) failed
country_event = {
	id = ukraine.124
	title = ukraine.124.t
	desc = ukraine.124.d
	picture = GFX_report_event_german_troops
	
	is_triggered_only = yes

	immediate = { hidden_effect = { 202 = { CONTROLLER = { save_event_target_as = controller } } } }
	
	option = {
		name = ukraine.124.a
	}
}
# Activisation of working protests
country_event = {
	id = ukraine.126
	title = ukraine.126.t
	desc = ukraine.126.d
	picture = GFX_report_event_generic_strike

	trigger = { 
		tag = UKR
		has_idea = UKR_strikes 
		NOT = { has_idea = UKR_strikes_active }
		NOT = { has_country_flag = UKR_strikes_pause }
		NOT = { has_decision = UKR_bop_martial_law }
	}

	fire_only_once = no
	
	mean_time_to_happen = {	days = 30 }
	
	option = {
		name = ukraine.126.a
		add_stability = -0.01
		add_timed_idea = {
			idea = UKR_strikes_active
			days = 30
		}
	}
}
# Dniester Line builds - outdated
country_event = {
	id = ukraine.127
	title = ukraine.127.t
	desc = { 
		text = ukraine.127.desc.a
		trigger = {
			78 = { is_fully_controlled_by = ROOT }
			766 = { is_fully_controlled_by = ROOT }
		}
	}
	desc = { 
		text = ukraine.127.desc.b
		trigger = {
			OR = {
				NOT = { 78 = { is_fully_controlled_by = ROOT } }
				NOT = { 766 = { is_fully_controlled_by = ROOT } }
			}
		}
	}
	picture = GFX_report_event_bunker_01

	is_triggered_only = yes
	
	option = {
		name = ukraine.127.a
		if = {
			limit = {
				78 = { is_fully_controlled_by = ROOT }
				766 = { is_fully_controlled_by = ROOT }
			}
			78 = {
				add_building_construction = {
					type = bunker
					province = 3577
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 565
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 3707
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 3724
					level = 2
					instant_build = yes
				}
			}
			766 = {
				add_building_construction = {
					type = bunker
					province = 3704
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 3701
					level = 2
					instant_build = yes
				}
			}
		}
		else = {
			192 = {
				add_building_construction = {
					type = bunker
					province = 9576
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 754
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 741
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 11670
					level = 2
					instant_build = yes
				}
			}
			198 = {
				add_building_construction = {
					type = bunker
					province = 6455
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 9423
					level = 2
					instant_build = yes
				}
			}
		}
	}
}
# Non aggression pact with Romania
country_event = {
	id = ukraine.128
	title = ukraine.128.t
	desc = ukraine.128.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 80
		}
		name = ukraine.128.a
		diplomatic_relation = { country = ROM relation = non_aggression_pact }
		ROM = { 
			country_event = ukraine.129
		}
	}

	option = {
		ai_chance = {
			factor = 20
		}
		name = ukraine.128.b
		effect_tooltip = {
			ROM = {
				add_state_claim = 192
				add_state_claim = 198
			}
		}
		ROM = { 
			country_event = ukraine.130
		}
	}
}
# Ukraine accept non aggression pact
country_event = {
	id = ukraine.129
	title = ukraine.129.t
	desc = ukraine.129.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.129.a
	}
}
# Ukraine decline non aggression pact
country_event = {
	id = ukraine.130
	title = ukraine.130.t
	desc = ukraine.130.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.130.a
		add_state_claim = 192
		add_state_claim = 198
	}
}
# Red alert - message for Ukraine
country_event = {
	id = ukraine.131
	title = ukraine.131.t
	desc = ukraine.131.d
	picture = GFX_report_event_stalin_propaganda
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.131.a
	}
}
# Divide of Romania by Hungary
country_event = {
	id = ukraine.132
	title = ukraine.132.t
	desc = ukraine.132.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.132.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 1.2
				has_government = fascism
			}
		}
		if = { 
			limit = { 76 = { NOT = { is_claimed_by = HUN } } } 
			add_state_claim = 76
			add_state_claim = 989
			add_state_claim = 83
			add_state_claim = 84
		}
		create_wargoal = {
			type = take_state_focus
			target = ROM
			expire = 0
			generator = { 76 83 84 }
		}
		add_ai_strategy = {
			type = declare_war
			id = "ROM"
			value = 200
		}
		UKR = { country_event = ukraine.134 }
	}
	
	option = {
		name = ukraine.132.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 1.5
				has_war = yes
			}
		}
		add_war_support = -0.05
	}
}
# Divide of Romania by Bulgary
country_event = {
	id = ukraine.133
	title = ukraine.133.t
	desc = ukraine.133.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.133.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 1.2
				has_government = fascism
			}
		}
		if = { 
			limit = { 77 = { NOT = { is_claimed_by = BUL } } } 
			add_state_claim = 77
		}
		create_wargoal = {
			type = take_state_focus
			target = ROM
			generator = { 77 }
		}
		add_ai_strategy = {
			type = declare_war
			id = "ROM"
			value = 200
		}
		UKR = { country_event = ukraine.134 }
	}
	
	option = {
		name = ukraine.133.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 1.5
				has_war = yes
			}
		}
		add_war_support = -0.05
	}
}
# FROM.GetName accept divide Romania
country_event = {
	id = ukraine.134
	title = ukraine.134.t
	desc = ukraine.134.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.134.a
	}
}
#Rename of Sevastopol
country_event = {
	id = ukraine.135
	title = ukraine.135.t
	desc = ukraine.135.d
	picture = GFX_report_event_sevastopol

	fire_only_once = yes

	trigger = {
		tag = UKR
		UKR = {
			owns_state = 137
			controls_state = 137
		}
	}

	option = { #Chersonesus
		name = ukraine.135.a
		ai_chance = {
			base = 25
		}
		set_province_name = { id = 3686 name = UKR_chersonesus }
	}

	option = { #Korsun
		name = ukraine.135.b
		ai_chance = {
			base = 25
		}
		set_province_name = { id = 3686 name = UKR_korsun }
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = -0.05
			}
		}
	}

	option = { #Aqyar
		name = ukraine.135.c
		ai_chance = {
			base = 25
		}
		set_province_name = { id = 3686 name = UKR_aqyar }
	}

	option = { #rather not
		name = ukraine.135.e
		ai_chance = {
			base = 25
		}
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.05
			}
		}
	}
}
# Accept of Crimean fleet from Red Crimea
country_event = {
	id = ukraine.136
	title = ukraine.136.t
	desc = ukraine.136.d
	picture = GFX_report_event_white_army_departure

	is_triggered_only = yes

	option = {
		name = ukraine.136.a
		ai_chance = {
			factor = 75
		}
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.10
			}
		}
		else = {
			add_stability = -0.03
		}
		add_manpower = 10000
		SOV = {
			add_opinion_modifier = { target = UKR modifier = UKR_receive_white_fleet }
		}
		set_country_flag = UKR_receive_white_fleet_flag
		CRM = {
			transfer_navy = { target = UKR }
			CRM_alexandr_kutepov = { set_nationality = UKR }
			CRM_pavel_shatilov = { set_nationality = UKR }
			CRM_mikhail_kedrov = { set_nationality = UKR }
			country_event = crimea.78
		}
		add_equipment_to_stockpile = {
		    type = convoy
		    amount = 10
		    producer = CRM
		}
	}
	option = {
		name = ukraine.136.b
		ai_chance = {
			factor = 25
		}
		if = {
			limit = {
				211 = { is_controlled_by = BUL }
				BUL = {
					NOT = { has_government = communism }
				}
			}
			BUL = { country_event = { id = ukraine.137 days = 1 } }
		}
	}
}
#Accept of Crimea fleet by Bulgaria
country_event = {
	id = ukraine.137
	title = ukraine.137.t
	desc = ukraine.137.d
	picture = GFX_report_event_white_army_departure

	is_triggered_only = yes

	option = {
		name = ukraine.137.a
		ai_chance = {
			base = 100
		}
		add_manpower = 10000
		add_equipment_to_stockpile = {
		    type = convoy
		    amount = 10
		    producer = CRM
		}
		SOV = {
			add_opinion_modifier = { target = BUL modifier = UKR_receive_white_fleet }
		}
		CRM = {
			transfer_navy = { target = BUL }
			CRM_alexandr_kutepov = { set_nationality = BUL }
			CRM_pavel_shatilov = { set_nationality = BUL }
			CRM_mikhail_kedrov = { set_nationality = BUL }
			country_event = crimea.78
		}
	}
	option = {
		name = ukraine.137.b
		CRM = {
			destroy_ships = {
				type = ship_hull_light
				count = all
			}
			destroy_ships = {
				type = ship_hull_cruiser
				count = all
			}
			destroy_ships = {
				type = ship_hull_heavy
				count = all
			}
			destroy_ships = {
				type = ship_hull_submarine
				count = all
			}
		}
	}
}
#Turkey demand Crimea for ally
country_event = {
	id = ukraine.138
	title = ukraine.138.t
	desc = ukraine.138.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = ukraine.138.a
		ai_chance = {
			factor = 50
		}
		add_to_faction = TUR
		if = {
			limit = { CRM = { is_puppet_of = UKR } }
			annex_country = { target = CRM }
		}
		TUR = {
			if = {
				limit = { 
					137 = { is_owned_and_controlled_by = UKR } 
				}
				CRI = {
					add_state_core = 137
					add_state_core = 986
					inherit_technology = CRM
					set_research_slots = 2
				}
				UKR = { release = CRI }
				TUR = { puppet = CRI }
				CRI = {
					if = {
						limit = {
							NOT = { has_government = neutrality }
							has_completed_focus = CRI_mejlis_of_traditionalists
						}
						set_politics = {
							ruling_party = neutrality
							elections_allowed = no
						}
						add_popularity = {
							ideology = neutrality
							popularity = 0.50
						}
					}
					if = {
						limit = {
							NOT = { has_government = fascism }
							has_completed_focus = CRI_mejlis_of_nationalists
						}
						set_politics = {
							ruling_party = fascism
							elections_allowed = no
						}
						add_popularity = {
							ideology = fascism
							popularity = 0.50
						}
					}
					if = {
						limit = {
							NOT = { has_government = democratic }
							has_completed_focus = CRI_keep_government
						}
						set_politics = {
							ruling_party = democratic
							election_frequency = 48
							elections_allowed = yes
						}
						add_popularity = {
							ideology = democratic
							popularity = 0.50
						}
					}
				}
			}
			else_if = {
				limit = { CRI = { is_puppet_of = UKR } }
				TUR = { puppet = CRI }
				CRI = {
					if = {
						limit = {
							NOT = { has_government = neutrality }
							has_completed_focus = CRI_mejlis_of_traditionalists
						}
						set_politics = {
							ruling_party = neutrality
							elections_allowed = no
						}
						add_popularity = {
							ideology = neutrality
							popularity = 0.50
						}
					}
					if = {
						limit = {
							NOT = { has_government = fascism }
							has_completed_focus = CRI_mejlis_of_nationalists
						}
						set_politics = {
							ruling_party = fascism
							elections_allowed = no
						}
						add_popularity = {
							ideology = fascism
							popularity = 0.50
						}
					}
					if = {
						limit = {
							NOT = { has_government = democratic }
							has_completed_focus = CRI_keep_government
						}
						set_politics = {
							ruling_party = democratic
							election_frequency = 48
							elections_allowed = yes
						}
						add_popularity = {
							ideology = democratic
							popularity = 0.50
						}
					}
				}
			}
			if = {
				limit  = {
					CRI = { is_puppet_of = TUR }
					TUR = { has_completed_focus = TUR_return_of_the_sultan } 
				}
				CRI = { set_cosmetic_tag = CRM_OTT }
			}
			
			add_ai_strategy = {
				type = alliance
				id = "UKR"
				value = 200
			}
			add_ideas = UKR_ready_for_war
		}
		if = {
			limit = {
				country_exists = BUL
				BUL = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			BUL = {	country_event = { id = ukraine.57 days = 1}	}
		}
	}
	option = {
		name = ukraine.138.b
		ai_chance = {
			factor = 50
		}
		if = {
			limit = {
				country_exists = GRE
				GRE = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			GRE = {	
				add_state_claim = 339
				country_event = { id = ukraine.57 days = 1}	
			}
		}
		if = {
			limit = {
				country_exists = BUL
				BUL = { 
					is_in_faction = no 
					is_puppet = no
					NOT = { has_war_with = UKR }
				}
			}
			BUL = {	country_event = { id = ukraine.57 days = 1}	}
		}
	}
}
# Ukraine wants to join allies
country_event = {
	id = ukraine.139
	title = ukraine.139.t
	desc = ukraine.139.d
	picture = GFX_report_event_degaulle_churchill

	is_triggered_only = yes

	immediate = {
		set_temp_variable = { temp1 = UKR.var_ukr_trust_of_london }
		divide_temp_variable = { temp1 = 2 }
		log = "orig: [?UKR.var_ukr_trust_of_london]"
		log = "plus: [?temp1]"
		set_temp_variable = { temp2 = temp1 }
		multiply_temp_variable = { temp2 = -1 }
		log = "minus: [?temp2]"
	}
	
	option = {
		name = ukraine.139.a
		ai_chance = { 
			base = 0 
			modifier = {
				has_government = democratic
				add = temp1
			}
		}
		add_to_faction = FROM
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = "ENG"
				value = 200
			}
		}
		FROM = { country_event = { id = ukraine.2} }
	}
	
	option = {
		name = ukraine.139.b
		ai_chance = { 
			base = 50
			modifier = {
				has_government = democratic
				add = temp2
			} 
		}
		FROM = { 
			country_event = { id = ukraine.3 }
		}
	}
}
# Capture of crimean fleet - Succesfull
country_event = {
	id = ukraine.140
	title = ukraine.140.t
	desc = ukraine.140.d
	picture = GFX_report_event_ukrainian_navy_flag
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.140.a
		CRM = {
			transfer_navy = { target = UKR }
		}
	}
}
# Capture of crimean fleet - Partial success
country_event = {
	id = ukraine.141
	title = ukraine.141.t
	desc = ukraine.141.d
	picture = GFX_report_event_ast_navy
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.141.a

		CRM = {
			#if = {
			#	limit = { has_dlc = "Man the Guns" }
					destroy_ships = { type = ship_hull_light count = 1 }
					destroy_ships = { type = ship_hull_submarine count = 1 }
					destroy_ships = { type = ship_hull_cruiser count = 1 }
					destroy_ships = { type = ship_hull_heavy count = 1 } 
			#	else = {
			#		destroy_ships = { type = destroyer count = 1 }
			#		destroy_ships = { type = submarine count = 1 }
			#		destroy_ships = { type = light_cruiser count = 1 }
			#		destroy_ships = { type = battleship count = 1 } 
			#	}
			#}
			transfer_navy = { target = UKR }
		}
	}
}
# Capture of crimean fleet - Fail
country_event = {
	id = ukraine.142
	title = ukraine.142.t
	desc = ukraine.142.d
	picture = GFX_report_event_ast_navy
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.142.a
		CRM = {
			#if = {
			#	limit = { has_dlc = "Man the Guns" }
					destroy_ships = { type = ship_hull_light count = all }
					destroy_ships = { type = ship_hull_submarine count = all }
					destroy_ships = { type = ship_hull_cruiser count = all }
					destroy_ships = { type = ship_hull_heavy count = all } 
					destroy_ships = { type = ship_hull_carrier count = all }
			#	else = {
			#		destroy_ships = {
			#			type = destroyer
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = light_cruiser
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = heavy_cruiser
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = battleship
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = battle_cruiser
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = carrier
			#			count = all
			#		}
			#		destroy_ships = {
			#			type = submarine
			#			count = all
			#		}
			#	}
			#} 
		}
	}
}
# Succesfull decision of workers protests
country_event = {
	id = ukraine.143
	title = ukraine.143.t
	desc = ukraine.143.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.143.a
	}
}
# Fail arrest of workers leaders
country_event = {
	id = ukraine.144
	title = ukraine.144.t
	desc = ukraine.144.d
	picture = GFX_report_event_american_hunger_march
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.144.a
	}
}
# USSR refuse Ukrainian request join to Comintern
country_event = {
	id = ukraine.145
	title = ukraine.145.t
	desc = ukraine.145.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.145.a
	}
}
#Communists coup in Romania				
country_event = {
	id = ukraine.146
	title = ukraine.146.t
	desc = ukraine.146.d
	picture = GFX_report_event_war_occupation_of_bukovina_and_bessarabia2

	is_triggered_only = yes

	trigger = { NOT = {	has_government = communism	} }

	option = {
		name = ukraine.146.a
		start_civil_war = {
			ideology = communism
			size = 0.4
			states = { 78 79 80 766 }
		}
		hidden_effect = { # in 38 ROM go war for CZE against GER, and join to Allies, and UKR get war with Allies
			diplomatic_relation = {
			    country = CZE
			    relation = guarantee
			    active = no
			}
			diplomatic_relation = {
			    country = GRE
			    relation = guarantee
			    active = no
			}
			diplomatic_relation = {
			    country = TUR
			    relation = guarantee
			    active = no
			}
		}
	}
}
#Fate of Bulgari - Vynnychenko root
country_event = {
    id = ukraine.147
    hidden = yes
    fire_only_once = yes

    is_triggered_only = yes

    immediate = {
    	if = {
    		limit = {
    			YUG = { is_in_faction_with = UKR }
    			BUL = { NOT = { is_in_faction_with = UKR }	}
    			48 = { is_claimed_by = YUG }
    		}
    		YUG = {
    			create_wargoal = {
					type = take_state_focus
					target = BUL
					generator = { 48 211 212 }
				}
    		}
    		else = {
    			if = {
    				limit = {
    					YUG = { is_in_faction_with = UKR }
    					BUL = { NOT = { is_in_faction_with = UKR }	}
    				}
    				BUL = { country_event = { id = ukraine.148 } }
    			}
    		}
    	}
    }
   
    option = {
        name = ukraine.147.a
    }
}
#Socialist Ukraine pressure on Bulgaria - change government and join to faction?
country_event = {
	id = ukraine.148
	title = ukraine.148.t
	desc = ukraine.148.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = { 
		name = ukraine.148.a
		ai_chance = {
			factor = 50
		}
		set_politics = { ruling_party = communism elections_allowed = no }
		add_popularity = {
			ideology = communism
			popularity = 0.2
		}
		UKR = {
			add_to_faction = BUL
			country_event = { id = ukraine.149 }
		}
	}

	option = {
		name = ukraine.148.b
		ai_chance = {
			factor = 50
		}
		UKR = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = BUL
			}
		}
		UKR = {
			country_event = { id = ukraine.150 }
		}
	}
}
#Bulgaria accept demand and joined to soc. Ukraine
country_event = {
	id = ukraine.149
	title = ukraine.149.t
	desc = ukraine.149.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.149.a
	}
}
#Bulgaria reject demand of joined to soc. Ukraine
country_event = {
	id = ukraine.150
	title = ukraine.150.t
	desc = ukraine.150.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	option = {
		name = ukraine.150.a
	}
}
# Depression of planning economy
country_event = {
	id = ukraine.151
	title = ukraine.151.t
	desc = ukraine.151.d
	picture = GFX_report_event_generic_factory
	
	trigger = {
		tag = UKR
		has_completed_focus = UKR_collectivisation
		NOT = { has_completed_focus = UKR_soviet_support }
		has_government = communism
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.151.a
		add_ideas = UKR_outflow_of_capital
	}
}
# Perverse union - USSR does not let go Ukraine
country_event = {
	id = ukraine.152
	title = ukraine.152.t
	desc = ukraine.152.d
	picture = GFX_report_event_stalin_01
	
	trigger = {
		tag = UKR
		has_idea = UKR_perverse_union
		has_civil_war = no
		NOT = { is_in_faction_with = SOV }
		SOV = { 
			is_faction_leader = yes 
			NOT = { has_wargoal_against = UKR }
		}
	}

	fire_only_once = no
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 85
		}
		name = ukraine.152.a
		add_political_power = -100
		SOV = { 
			add_to_faction = UKR 
			country_event = { id = ukraine.171 }
		}
	}
	option = {
		ai_chance = {
			base = 15
		}
		name = ukraine.152.b
		add_political_power = -200
		add_popularity = {
			ideology = communism
			popularity = -0.1
		}
		SOV = {
			create_wargoal = {
				type = puppet_wargoal_focus
				target = UKR
			}
			add_ai_strategy = {
				type = alliance
				id = "UKR"
				value = -200
			}
			country_event = { id = ukraine.172 }
		}
	}
}
# New old allies - Poland alliance need help of Ukrainian faction
country_event = {
	id = ukraine.153
	title = ukraine.153.t
	desc = ukraine.153.d
	picture = GFX_report_event_poland_rejects
	
	trigger = {
		tag = POL
		is_faction_leader = yes
		has_defensive_war = yes
		surrender_progress > 0.3
		NOT = { has_war_with = UKR }
		UKR = {	is_faction_leader = yes }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 85
		}
		name = ukraine.153.a
		UKR = {
			country_event = { id = ukraine.154 }
		}
	}
	option = {
		ai_chance = {
			base = 15
		}
		name = ukraine.153.b
	}
}
# New old allies - polish request for Ukraine
country_event = {
	id = ukraine.154
	title = ukraine.154.t
	desc = ukraine.154.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes

	option = { 
		name = ukraine.154.a
		ai_chance = {
			factor = 85
		}
		POL = {
			dismantle_faction = yes
		}
		add_to_faction = POL
	}

	option = {
		name = ukraine.154.b
		ai_chance = {
			factor = 15
		}
	}
}
# Request for transfer of Belgorod and East Sloboda
country_event = {
	id = ukraine.155
	title = ukraine.155.t
	desc = ukraine.155.d

	is_triggered_only = yes

	option = { 
		name = ukraine.155.a
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = ukraine.107
			transfer_state = 240
			if = {
				limit = {
					988 = { is_owned_and_controlled_by = SOV }
				}
				transfer_state = 988
			}
		}

	}

	option = { 
		name = ukraine.155.b
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Request for transfer of Crimea
country_event = {
	id = ukraine.156
	title = ukraine.156.t
	desc = ukraine.156.d

	is_triggered_only = yes

	option = { 
		name = ukraine.156.a
		ai_chance = {
			factor = 50
		}
		
		UKR = {
			country_event = ukraine.107
			transfer_state = 137
			transfer_state = 986
		}

	}

	option = { 
		name = ukraine.156.b
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Divide of Poland in Ukrainian faction
country_event = {
	id = ukraine.157
	title = ukraine.157.t
	desc = ukraine.157.d
	picture = GFX_report_event_generic_communist_congress

	is_triggered_only = yes

	option = { 
		name = ukraine.157.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { BLR = { exists = no } }
			release_puppet = BLR
		}
		if = {
			limit = { 89 = { is_owned_and_controlled_by = POL } }
			WUA = { add_state_core = 89 }
		}
		if = {
			limit = { 91 = { is_owned_and_controlled_by = POL } }
			WUA = { add_state_core = 91 }
		}
		if = {
			limit = { 93 = { is_owned_and_controlled_by = POL } }
			WUA = { add_state_core = 93 }
		}
		if = {
			limit = { 987 = { is_owned_and_controlled_by = POL } }
			WUA = { add_state_core = 987 }
		}
		if = {
			limit = { WUA = { exists = no } }
			release_puppet = WUA
		}
		UKR = { UKR_kost_levytsky = { set_nationality = WUA } }
		WUA = {
			set_politics = { ruling_party = democratic elections_allowed = yes }
			promote_character = UKR_kost_levytsky
			add_popularity = { ideology = democratic popularity = 0.5 }
			set_cosmetic_tag = WUA_C
			inherit_technology = POL
			set_research_slots = 2
		}
		UKR = {
			country_event = ukraine.158 
		}
	}

	option = { 
		name = ukraine.157.b
		ai_chance = {
			base = 0
		}
		if = {
			limit = { has_idea = POL_ethnic_minorities }
			swap_ideas = {
				add_idea = POL_ethnic_minorities_active
				remove_idea = POL_ethnic_minorities
			}
		}
		
		UKR = {
			country_event = ukraine.159 
		}
	}
}
# Divide of Poland - Poland accept - message for Ukraine
country_event = {
	id = ukraine.158
	title = ukraine.158.t
	desc = ukraine.158.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.158.a
	}
}
# Divide of Poland - Poland reject - message for Ukraine
country_event = {
	id = ukraine.159
	title = ukraine.159.t
	desc = ukraine.159.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.159.a
	}
}
# Political_support of communist Ukraine from USSR
country_event = {
	id = ukraine.160
	title = ukraine.160.t
	desc = ukraine.160.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.160.a
		add_opinion_modifier = { target = SOV modifier = UKR_trade_with_ussr }
		add_political_power = 100
	}
}
# USSR accept Ukrainian request join to Comintern
country_event = {
	id = ukraine.161
	title = ukraine.161.t
	desc = ukraine.161.d
	
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			add_ideas = UKR_perverse_union
			set_rule = {
				can_decline_call_to_war = no
			}
		}
	}
	
	option = {
		name = ukraine.161.a
		if = {
			limit = { 
				has_country_flag = UKR_ready_for_RCW_flag 
				#NOT = { has_war_with = SOV }
			}
			hidden_effect = { country_event = { id = ukraine.433 days = 1 } }
		}
		effect_tooltip = {
			add_ideas = UKR_perverse_union
			set_rule = {
				can_decline_call_to_war = no
			}
		}
	}
}
# Divide of Poland - go WUA puppet of Ukraine
country_event = {
	id = ukraine.162
	title = ukraine.162.t
	desc = ukraine.162.d
	picture = GFX_report_event_generic_communist_congress

	is_triggered_only = yes

	option = { 
		name = ukraine.162.a
		UKR = {
			puppet = WUA
			UKR_kost_levytsky = { set_nationality = WUA }
		}
		WUA = {
			set_politics = { ruling_party = democratic elections_allowed = yes }
			promote_character = UKR_kost_levytsky
			add_popularity = { ideology = democratic popularity = 0.5 }
			set_cosmetic_tag = WUA_C
		}
		
	}
}
# Soviet Ukraine Demands the West Ukraine
country_event = {
	id = ukraine.163
	title = ukraine.163.t
	desc = ukraine.163.d
	picture = GFX_report_event_polish_tanks_01
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.163.a
		ai_chance = { 
			factor = 50 
			modifier = {
				factor = 0.2
				OR = {
					any_other_country = {
						is_major = yes
						OR = {
							is_in_faction_with = POL
							has_guaranteed = POL
						}
					}
					has_idea = anti_soviet_pact
				}
			}
		}
		effect_tooltip = {
			UKR = {
				if = {
					limit = { POL = { owns_state = 987 controls_state = 987 } }
					transfer_state = 987
				}
				if = {
					limit = { POL = { owns_state = 93 controls_state = 93 } }
					transfer_state = 93
				}
				if = {
					limit = { POL = { owns_state = 91 controls_state = 91 } }
					transfer_state = 91
				}
				if = {
					limit = { POL = { owns_state = 89 controls_state = 89 } }
					transfer_state = 89
				}
			}
		}
		UKR = {country_event = { id = ukraine.164} }
	}

	option = {
		name = ukraine.163.b
		ai_chance = { factor = 50 }
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = take_state_focus
					target = POL
					generator = { 93 91 89 987 }
				}
			}
		}
		UKR = { country_event = { id = ukraine.165 } }
	}
}
# Poland Cedes the East
country_event = {
	id = ukraine.164
	title = ukraine.164.t
	desc = ukraine.164.d
	picture = GFX_report_event_polish_tanks_01
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.164.a
		if = {
			limit = { 
				POL = { 
					owns_state = 987
					controls_state = 987 
				}
			}
			transfer_state = 987
		}
		if = {
			limit = { 
				POL = { 
					owns_state = 93
					controls_state = 93 
				}
			}
			transfer_state = 93
		}
		if = {
			limit = { 
				POL = { 
					owns_state = 91
					controls_state = 91 
				}
			}
			transfer_state = 91
		}
		if = {
			limit = { 
				POL = { 
					owns_state = 89
					controls_state = 89 
				}
			}
			transfer_state = 89
		}
	}
}
# Poland Refuses to Cede the East
country_event = {
	id = ukraine.165
	title = ukraine.165.t
	desc = ukraine.165.d
	picture = GFX_report_event_polish_tanks_01
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.165.a
		add_state_claim = 834
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 987 93 91 89 }
		}
	}
}
# Start of socialist competition
country_event = {
	id = ukraine.166
	title = ukraine.166.t
	desc = ukraine.166.d
	picture = GFX_report_event_generic_rally2
	
	trigger = {
		tag = UKR
		has_government = communism
		OR = {
			has_completed_focus = UKR_agrarian_reform
			has_completed_focus = UKR_state_plan
			has_idea = UKR_outflow_of_capital
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7 }

	option = {
		name = ukraine.166.a
		add_political_power = 25
		set_country_flag = UKR_start_of_socialist_competition
		add_dynamic_modifier = {
			modifier = UKR_socialist_competitions_mod
		}
		set_variable = { ukr_sc_local_resources = 0 }
		set_variable = { ukr_sc_production_oil = 0 }
		set_variable = { ukr_sc_capacity_factory = 0 }
		set_variable = { ukr_sc_capacity_dockyard = 0 }
		set_variable = { ukr_sc_production_factory = 0 }
		set_variable = { ukr_sc_stability = 0 }
		set_variable = { ukr_sc_war_support = 0 }
		set_variable = { ukr_sc_number_of_comp = 0 }
	}
}
# Albania request guaranty against Italy
country_event = {
	id = ukraine.167
	title = ukraine.167.t
	desc = ukraine.167.d
	picture = GFX_report_event_generic_communist_congress

	is_triggered_only = yes

	option = { 
		name = ukraine.167.a
		ai_chance = {
			factor = 70
		}
		give_guarantee = ALB
		ITA = {
			country_event = { days = 1 id = ukraine.168 }
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = ALB
					generator = { 44 }
				}
			}
		}
	}

	option = { 
		name = ukraine.167.b
		ai_chance = {
			factor = 30
		}
		ITA = {
			effect_tooltip = {
				create_wargoal = {
					type = take_state_focus
					target = ALB
					generator = { 44 }
				}
			}
			country_event = { days = 1 id = italy.2 }
		}
	}
}
# Zog enlisted the support of Ukraine
country_event = {
	id = ukraine.168
	title = ukraine.168.t
	desc = ukraine.168.d
	picture = GFX_report_event_albanian_partisans
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.168.a
		create_wargoal = {
			type = take_state_focus
			target = ALB
			generator = { 44 }
		}
		hidden_effect = {
			country_event = { days = 1 id = news.23 }
		}
	}
}
# Corn for all
country_event = {
	id = ukraine.169
	title = ukraine.169.t
	desc = ukraine.169.d
	picture = GFX_report_event_corn_for_all

	is_triggered_only = yes
	
	trigger = {
		has_idea = UKR_famine_in_Ukraine
	}

	
	option = {
		name = ukraine.169.a
		add_timed_idea = {
			idea = UKR_queen_of_fields
			days = 1460
		}
		modify_timed_idea = {
			idea = UKR_famine_in_Ukraine
			days = -365
		}
	}
}
# Vynnychenko returns to politic
country_event = {
	id = ukraine.170
	title = ukraine.170.t
	desc = ukraine.170.d
	picture = GFX_report_event_vinnichenko_returns
	
	trigger = {
		tag = UKR
		has_completed_focus = UKR_communism_propaganda
		has_government = neutrality
		communism > 0.2
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.170.a
		add_popularity = {
			ideology = communism
			popularity = 0.03
		}	
	}
}
# Rerverse union - Ukraine accept - message for USSR
country_event = {
	id = ukraine.171
	title = ukraine.171.t
	desc = ukraine.171.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.171.a
	}
}
# Rerverse union - Ukraine decline - message for USSR
country_event = {
	id = ukraine.172
	title = ukraine.172.t
	desc = ukraine.172.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.172.a
	}
}
# Search new democratic allies - majors
country_event = {
	id = ukraine.173
	title = ukraine.173.t
	desc = ukraine.173.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.173.a
		trigger = {
			ENG = {
				exists = yes
				NOT = { has_completed_focus = ENG_a_change_in_course }
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 25 }
		set_variable = { var_ukr_trust_of_london = 0 }
		set_country_flag = UKR_orientation_on_england
		custom_effect_tooltip = UKR_additional_decisions
		if = {
			limit = {
				POL = {
					exists = yes
					has_war = no
					OR = {
						has_government = democratic
						has_government = neutrality
					}
				}
			}
			add_ai_strategy = {
				type = protect
				id = "POL"			
				value = 200
			}
		}
	}
	option = {
		name = ukraine.173.b
		trigger = {
			FRA = {
				exists = yes
				has_government = democratic
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 20 }
		FRA = { country_event = { id = ukraine.174 days = 1 } }
	}
	option = {
		name = ukraine.173.c
		trigger = {
			GER = {
				exists = yes
				has_government = democratic
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 20 }
		GER = { country_event = { id = ukraine.174 days = 1 } }
	}
	option = {
		name = ukraine.173.e
		ai_chance = { factor = 0 }
	}
}
# Ukraine wants to join French or Germany alliance
country_event = {
	id = ukraine.174
	title = ukraine.174.t
	desc = ukraine.174.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.174.a
		ai_chance = { base = 100 }
		add_to_faction = FROM
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		FROM = { country_event = { id = ukraine.2} }
	}
	
	option = {
		name = ukraine.174.b
		ai_chance = { base = 0 }
		FROM = { 
			country_event = { id = ukraine.3 }
		}
	}
}
# Ukraine wants to join minor alliance (little entente of ROM, CZE or HUN) - outdated
country_event = {
	id = ukraine.175
	title = ukraine.175.t
	desc = ukraine.175.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.175.a
		add_to_faction = FROM
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		FROM = { country_event = { id = ukraine.2} }
	}
	
	option = {
		name = ukraine.175.b
		ai_chance = { factor = 0 }
		FROM = { 
			country_event = { id = ukraine.3 }
		}
	}
}
# Search new democratic allies - minors - outdated
country_event = {
	id = ukraine.176
	title = ukraine.176.t
	desc = ukraine.176.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.176.a
		trigger = {
			CZE = {
				exists = yes
				has_completed_focus = CZE_an_entente_of_our_own
				NOT = { has_government = fascism }
				NOT = { has_government = communism }
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 25 }
		CZE = { country_event = { id = ukraine.175 days = 1 } }
	}
	option = {
		name = ukraine.176.b
		trigger = {
			HUN = {
				exists = yes
				has_completed_focus = HUN_elect_a_democratic_king
				NOT = { has_government = fascism }
				NOT = { has_government = communism }
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 25 }
		HUN = { country_event = { id = ukraine.175 days = 1 } }
	}
	option = {
		name = ukraine.176.c
		trigger = {
			ROM = {
				exists = yes
				NOT = { has_government = fascism }
				is_faction_leader = yes
				NOT = { has_war_with = ROOT }
			}
		}
		ai_chance = { factor = 25 }
		ROM = { country_event = { id = ukraine.175 days = 1 } }
	}
	option = {
		name = ukraine.176.e
		ai_chance = { factor = 0 }
		set_rule = { 
			can_create_factions = yes
			can_send_volunteers = yes
		}
	}
	option = {
		name = ukraine.176.h
		ai_chance = { factor = 0 }
		country_event = ukraine.173
	}
}
# Appoint of Bolbochan
unit_leader_event = {
	id = ukraine.177
	title = ukraine.177.t
	desc = ukraine.177.d
	
	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.177.a
		add_command_power = -30
		set_country_flag = bolbochan_goes_from_staff
		hidden_effect = {
			if = { 
				limit = {
					UKR_symon_petliura = {
						is_field_marshal = yes
					}
				}
				country_event = { id = ukraine.319 days = 40 }
			}
		}
	}
	option = {
		name = ukraine.177.b
		ai_chance = {
			base = 50
			modifier = {
				UKR = { has_completed_focus = UKR_Ukraine_first }
				factor = 0
			}
		}
	}
}
#Invite Ukraine to Little Entente
country_event = {
	id = ukraine.178
	title = ukraine.178.t
	desc = czech.25.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = {
		name = czech.1.a #yes
		ai_chance = {
			factor = 90
		}
		CZE = { add_to_faction = ROOT }
		CZE = {
			country_event = { id = ukraine.179 hours = 6 }
		}
	}
	
	option = {
		name = czech.1.b
		ai_chance = {
			factor = 10
			modifier = {
				CZE = {
					surrender_progress > 0
				}
				factor = 15
			}
		}
		CZE = {
			country_event = { id = ukraine.180 hours = 6 }
		}
	}
}
# little entente - UKR says yes
country_event = {
	id = ukraine.179
	title = ukraine.178.t
	desc = czech.25.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = excellent
	}
}
# little entente - UKR says no
country_event = {
	id = ukraine.180
	title = ukraine.3.t
	desc = czech.27.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = unfortunate
	}
}
# Occupation of Poland
country_event = {
	id = ukraine.181
	title = ukraine.181.t
	desc = ukraine.181.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		POL = { exists = no }
		tag = UKR
		NOT = { has_country_flag = UKR_united_with_poland }
		NOT = { has_country_flag = UKR_dual_habsburg_monarchy }
		count_triggers = {
		    amount = 5
		    85 = { is_owned_and_controlled_by = UKR }
		    86 = { is_owned_and_controlled_by = UKR }
		    87 = { is_owned_and_controlled_by = UKR }
		    88 = { is_owned_and_controlled_by = UKR }
		    90 = { is_owned_and_controlled_by = UKR }
		    92 = { is_owned_and_controlled_by = UKR }
		    95 = { is_owned_and_controlled_by = UKR }
		    98 = { is_owned_and_controlled_by = UKR }
		    10 = { is_owned_and_controlled_by = UKR }
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 85
		}
		name = ukraine.181.a
		every_owned_state = {
			limit = {
				is_core_of = UKR
				is_core_of = POL
				is_owned_and_controlled_by = UKR
			}
			remove_core_of = POL
		}
		if = {
			limit = {
				any_state = {
					is_core_of = BLR
					is_core_of = POL
					is_owned_and_controlled_by = UKR
				}
				BLR = { exists = no }
			}
			release_puppet = BLR
		}
		if = {
			limit = {
				GER = {
					exists = yes
					is_puppet = no
					has_capitulated = no
					NOT = { has_war_with = UKR }
				}
				OR = {
					85 = { is_owned_and_controlled_by = UKR }
					86 = { is_owned_and_controlled_by = UKR }
					762 = { is_owned_and_controlled_by = UKR }
					807 = { is_owned_and_controlled_by = UKR }
				}
			}
			GER = { 
				if = {	
					limit = { 85 = { is_owned_and_controlled_by = UKR } }
					transfer_state = 85
				}
				if = {	
					limit = { 86 = { is_owned_and_controlled_by = UKR } }
					transfer_state = 86
				}
				if = {	
					limit = { 762 = { is_owned_and_controlled_by = UKR } }
					transfer_state = 762
				}
				if = {	
					limit = { 807 = { is_owned_and_controlled_by = UKR } }
					transfer_state = 807
				}
				country_event = ukraine.182 
				add_opinion_modifier = { target = UKR modifier = UKR_return_our_lands }
			}
		}
		if = {
			limit = {
				LIT = {
					exists = yes
					is_puppet = no
					has_capitulated = no
					NOT = { has_war_with = UKR }
				}
				784 = { is_owned_and_controlled_by = UKR }
			}
			LIT = { 
				transfer_state = 784
				country_event = ukraine.182 
				add_opinion_modifier = { target = UKR modifier = UKR_return_our_lands }
			}
			else = {
				if = {
					limit = { 
						BLR = { exists = yes } 
						784 = { is_owned_and_controlled_by = UKR }
					}
					BLR = { transfer_state = 784 }
				}
			}
		}
		release_puppet = POL
		if = {
			limit = {
				834 = { is_owned_and_controlled_by = POL }
			}
			hidden_effect = {
				transfer_state = 834
			}
		}
		
	}
	option = {
		ai_chance = {
			base = 15
		}
		name = ukraine.181.b
		add_political_power = -100
		every_owned_state = {
			limit = {
				is_core_of = POL
				NOT = { is_core_of = ROOT }
			}
			add_resistance = 30
		}
	}
}
# Ukraine transfer neighbors disputed polish or romanian lands
country_event = {
	id = ukraine.182
	title = ukraine.182.t
	desc = ukraine.182.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.182.a
	}
}
# Occupation of Romania
country_event = {
	id = ukraine.183
	title = ukraine.183.t
	desc = ukraine.183.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		ROM = { exists = no }
		tag = UKR
		count_triggers = {
		    amount = 4
		    46 = { is_owned_and_controlled_by = UKR }
		    81 = { is_owned_and_controlled_by = UKR }
		    79 = { is_owned_and_controlled_by = UKR }
		    82 = { is_owned_and_controlled_by = UKR }
		    83 = { is_owned_and_controlled_by = UKR }
		    84 = { is_owned_and_controlled_by = UKR }
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 85
		}
		name = ukraine.183.a
		78 = { remove_core_of = ROM }
		80 = { remove_core_of = ROM }
		766 = { remove_core_of = ROM }
		if = {
			limit = {
				OR = {
					73 = { is_controlled_by = UKR }
					89 = { is_controlled_by = UKR }
				}
			}
			989 = { remove_core_of = ROM }
		}
		if = {
			limit = {
				BUL = {
					exists = yes
					is_puppet = no
					has_capitulated = no
					NOT = { has_war_with = UKR }
				}
				77 = { is_owned_and_controlled_by = UKR }
			}
			BUL = { 
				transfer_state = 77
				country_event = ukraine.182 
				add_opinion_modifier = { target = UKR modifier = UKR_return_our_lands }
			}
		}
		if = {
			limit = {
				HUN = {
					exists = yes
					is_puppet = no
					has_capitulated = no
					NOT = { has_war_with = UKR }
				}
				76 = { is_owned_and_controlled_by = UKR }
			}
			HUN = { 
				transfer_state = 76
				country_event = ukraine.182 
				add_opinion_modifier = { target = UKR modifier = UKR_return_our_lands }
			}
		}
		release_puppet = ROM
	}
	option = {
		ai_chance = {
			base = 15
		}
		name = ukraine.183.b
		add_political_power = -100
		every_owned_state = {
			limit = {
				is_core_of = ROM
				NOT = { is_core_of = ROOT }
			}
			add_resistance = 30
		}
	}
}
# Forced annexation of West Ukraine - owner
country_event = {
	id = ukraine.184
	title = ukraine.184.t
	desc = ukraine.184.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = ukraine.184.a
		ai_chance = {
			factor = 65
			modifier = {
				factor = 0.5
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROOT
				}
			}
		}
	}
	
	option = {
		name = ukraine.184.b
		trigger = {
			NOT = { has_war_with = FROM }
			NOT = { is_in_faction_with = FROM }
		}
		ai_chance = {
			factor = 35
			modifier = {
				factor = 3
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
		}
		FROM = { country_event = { id = ukraine.186 } }		
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 89 91 93 987 }
		}
	}
}
#Poland accept plebiscite - outdated
country_event = {
	id = ukraine.185
	title = ukraine.185.t
	desc = ukraine.185.d
	picture = GFX_report_event_poland_rejects
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.185.a
		if = {
			limit = {
				OR = {
					ic_ratio = {
    					tag = POL
    					ratio > 1
					}
					is_major = yes
				}
			}
			random_list = {
				90 = {
					country_event = { id = ukraine.187 days = 3 } #West Ukraine join to Ukraine
				}
				10 = {
					country_event = { id = ukraine.188 days = 3 } #West Ukraine stay as polish
				}
			}
			else = {
				random_list = {
					75 = {
						country_event = { id = ukraine.187 days = 3 } #West Ukraine join to Ukraine
					}
					25 = {
						country_event = { id = ukraine.188 days = 3 } #West Ukraine stay as polish
					}
				}
			}
		}
	}
}
# Previous owner of West Ukraine prepare to war after this annexation - message for Ukraine
country_event = {
	id = ukraine.186
	title = ukraine.186.t
	desc = ukraine.186.d
	picture = GFX_report_event_polish_army
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.186.a
	}
}			
#West Ukraine join to Ukraine - outdated
country_event = {
	id = ukraine.187
	title = ukraine.187.t
	desc = ukraine.187.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.187.a
		if = {	limit = { 89 = { is_owned_and_controlled_by = POL } }
			transfer_state = 89
		}
		if = {	limit = { 91 = { is_owned_and_controlled_by = POL } }
			transfer_state = 91
		}
		if = {	limit = { 93 = { is_owned_and_controlled_by = POL } }
			transfer_state = 93
		}
		if = {	limit = { 987 = { is_owned_and_controlled_by = POL } }
			transfer_state = 987
		}
	}
}
#West Ukraine stay as polish - outdated
country_event = {
	id = ukraine.188
	title = ukraine.188.t
	desc = ukraine.188.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.188.a
	}
}
# Ukraine demands western guarantee - outdated
country_event = {
	id = ukraine.189
	title = ukraine.189.t
	desc = ukraine.189.d
	picture = GFX_report_event_generic_rally
	
	is_triggered_only = yes
	
	option = { #sure
		name = ukraine.189.a
		ai_chance = {
			factor = 80
			modifier = {
				threat > 0.25
				factor = 2
			}
		}
		give_guarantee = UKR
		UKR = { country_event = ukraine.190 }
	}

	option = { #no
		name = ukraine.189.b
		ai_chance = {
			factor = 20
			modifier = {
				UKR = {
					has_added_tension_amount > 0.01
				}
				factor = 1.5
			}
		}
		UKR = { country_event = ukraine.191 }	
	}
}
#western guarantee - country agrees - outdated
country_event = {
	id = ukraine.190 
	title = ukraine.190.t
	desc = ukraine.190.d
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes

	option = { #cool
		name = ukraine.190.a
	}
}
# Western guarantee - country refuses - outdated
country_event = {
	id = ukraine.191
	title = ukraine.191.t
	desc = ukraine.191.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes

	option = { #cool
		name = ukraine.191.a
		add_opinion_modifier = { target = FROM modifier = refused_alliance }
	}
}
# Exchange of population - message for Poland
country_event = {
	id = ukraine.192
	title = ukraine.192.t
	desc = ukraine.192.d
	picture = GFX_report_event_american_hunger_march
	
	is_triggered_only = yes

	option = {
		name = ukraine.192.a
		if = {
			limit = { has_idea = POL_ethnic_minorities }
			remove_ideas = POL_ethnic_minorities
		}
	}
}
# Ukraine proposes Crimea in exchange of security
country_event = {
	id = ukraine.193
	title = ukraine.193.t
	desc = ukraine.193.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { #sure
		name = ukraine.193.a
		ai_chance = {
			factor = 80
			modifier = {
				has_opinion = { target = UKR value > 20 }
				factor = 1.5
			}
		}
		diplomatic_relation = { country = UKR relation = non_aggression_pact }
		set_country_flag = SOV_UKR_big_deal
		transfer_state = 137
		transfer_state = 986
		UKR = { country_event = ukraine.194 }
	}

	option = { #no
		name = ukraine.193.b
		ai_chance = {
			factor = 20
		}
		UKR = { country_event = ukraine.195 }	
	}
}
#USSR agree deal for Crimea
country_event = {
	id = ukraine.194
	title = ukraine.194.t
	desc = ukraine.194.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = { 
		name = ukraine.194.a
		every_other_country = {
			limit = { 
				has_government = democratic
				is_major = yes
			}
			add_opinion_modifier = { 
				target = ROOT
				modifier = UKR_deal_with_soviets
			}
		}
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}
		add_popularity = {
			ideology = neutrality
			popularity = -0.1
		}
	}
}
#USSR decline deal for Crimea
country_event = {
	id = ukraine.195
	title = ukraine.195.t
	desc = ukraine.195.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.195.a
		add_war_support = 0.05
	}
}
#Succesfull receiving of tomos about autocephaly church
country_event = {
	id = ukraine.196
	title = ukraine.196.t
	desc = ukraine.196.d
	picture = GFX_report_event_patriarch_of_constantinople
	
	is_triggered_only = yes

	option = { 
		name = ukraine.196.a
		add_ideas = UKR_united_autocephaly_church
	}
}
#Fail receiving of tomos about autocephaly church
country_event = {
	id = ukraine.197
	title = ukraine.197.t
	desc = ukraine.197.d
	picture = GFX_report_event_patriarch_of_constantinople
	
	is_triggered_only = yes

	option = {
		name = unfortunate
	}
}
# Promise supporting of insurgents in future soviet civil war - outdated
country_event = {
	id = ukraine.198
	title = ukraine.198.t
	desc = ukraine.198.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes

	#fire_only_once = yes
	
	#trigger = {
	#	tag = UKR
	#	NOT = { has_government = communism }
	#	is_historical_focus_on = no
	#	NOT = { 
	#		has_game_rule = {
	#			rule = SOV_ai_behavior
	#			option = ALTERNATE_REBELLION
	#		}
	#	}
	#	has_start_date < 1936.01.02
	#	SOV = {
	#		focus_progress = {
	#			focus = SOV_great_purge
	#			progress > 0.1
	#		}
	#		has_civil_war = no
	#	}
		
	#}

	#mean_time_to_happen = {
	#	days = 1
	#}
	
	option = { #yes
		name = ukraine.198.a
		ai_chance = {
			factor = 90
		}
		SOV = { set_country_flag = SOV_foreign_conspiracy_support }
		add_political_power = -25
	}

	option = { #no
		name = ukraine.198.b
		ai_chance = {
			factor = 10
		}
	}
}
# Intervention in soviet civil war - outdated
country_event = {
	id = ukraine.199
	title = ukraine.199.t
	desc = ukraine.199.d
	picture = GFX_report_event_generic_battle

	is_triggered_only = yes
	
	#fire_only_once = yes

	#trigger = {
	#	original_tag = SOV
	#	NOT = { has_government = communism } 
	#	has_civil_war = yes
	#	any_other_country = {
	#		original_tag = SOV
	#		has_government = communism
	#		has_civil_war = yes
	#	}
	#}
	
	#mean_time_to_happen = {	days = 7 }

	option = {
		name = ukraine.199.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = {
				UKR = {
					exists = yes
					is_puppet = no
					has_war = no
					NOT = { has_government = communism }
				}
			}
			UKR = { country_event = ukraine.201 }
		}
		every_other_country = {
			limit = {
				OR = {
					tag = FIN
					tag = EST
					tag = JAP
					tag = POL
					tag = LAT
				}
				exists = yes
				is_puppet = no
				NOT = { has_war_with = SOV }
				NOT = { has_government = communism }
			}
			country_event = { id = ukraine.200 days = 2 }
		}
		every_other_country = { #volunteers from fascists
			limit = {
				OR = {
					tag = ITA
					tag = GER
				}
				has_government = fascism
				#is_ai = yes
			}
			add_ai_strategy = {
				type = send_volunteers_desire
				id = ROOT
				value = 200
			}
			add_ai_strategy = {
				type = support
				id = ROOT
				value = 200
			} 
		}
		#219 = { owner = { save_event_target_as = second_intervention_in_SCW_target } }
		random_other_country = {
			limit = {
				original_tag = SOV
				has_government = communism
				has_civil_war = yes
			}
			#save_event_target_as = second_intervention_in_SCW_target
			country_event = { id = ukraine.205 days = 11}
		}
		hidden_effect = { add_ideas = RUS_dont_allies }
	}
	option = {
		name = ukraine.199.b
		ai_chance = {
			base = 0
		}
	}	
}
# Intervention in soviet civil war - choice for other countries
country_event = {
	id = ukraine.200
	title = ukraine.200.t
	desc = ukraine.200.d
	picture = GFX_report_event_generic_battle
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.200.a
		ai_chance = {
			factor = 80
			modifier = {
				factor = 0
				has_war = yes
			}
			modifier = {
				factor = 0
				UKR = { NOT = { has_country_flag = participation_in_sov_civ_war } }
			}
		}
		random_list = {
			25 = {
				country_event = { id = ukraine.204 days = 4 }
			}
			25 = {
				country_event = { id = ukraine.204 days = 6 }
			}
			25 = {
				country_event = { id = ukraine.204 days = 8 }
			}
			25 = {
				country_event = { id = ukraine.204 days = 10 }
			}
		}
	}
	option = {
		name = ukraine.200.b
		ai_chance = {
			factor = 20
		}
		if = {
			limit = { tag = JAP }
			UKR = { set_country_flag = UKR_japan_refuse_intervention }
		}
	}
}
# Intervention in soviet civil war - choice for Ukraine
country_event = {
	id = ukraine.201
	title = ukraine.201.t
	desc = ukraine.201.d
	picture = GFX_report_event_generic_battle
	
	is_triggered_only = yes

	fire_only_once = yes
	
	option = {
		name = ukraine.201.a
		ai_chance = {
			factor = 70
		}
		set_country_flag = participation_in_sov_civ_war
		hidden_effect = {
			country_event = { id = ukraine.204 days = 5 }
		}
		FROM = { country_event = { id = ukraine.434 days = 1 } }
	}
	option = {
		name = ukraine.201.b
		trigger = { #Beresowski dont have choice in this situation
			NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
		}
		ai_chance = {
			factor = 30
		}
		add_political_power = -100
		set_country_flag = UKR_limited_intervention
		set_variable = {
    		var = var_hum_convoys
    		value = 0
		}
		FROM = { country_event = { id = ukraine.435 days = 1 } }
	}	
	option = {
		name = ukraine.201.c
		trigger = { #Beresowski dont have choice in this situation
			NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
		}
		ai_chance = {
			factor = 0
		}
		set_country_flag = UKR_dont_intervention
		custom_effect_tooltip = UKR_white_civil_war_tt
		FROM = { country_event = { id = ukraine.436 days = 1 } }
	}
}
# Russia - execution of promises to the interventionists
country_event = {
	id = ukraine.202
	title = ukraine.202.t
	desc = ukraine.202.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	fire_only_once = yes
	
	option = {
		name = ukraine.202.a
		ai_chance = {
			factor = 80
		}
		if = {
			limit = {
				UKR = { 
					has_country_flag = participation_in_sov_civ_war
					exists = yes
					is_puppet = no
					NOT = { has_war_with = ROOT } 
				}
			}
			if = {
				limit = { 137 = { is_owned_and_controlled_by = ROOT } }
				UKR = { transfer_state = 137 }
			}
			if = {
				limit = { 986 = { is_owned_and_controlled_by = ROOT } }
				UKR = { transfer_state = 986 }
			}
			if = {
				limit = { 234 = { is_owned_and_controlled_by = ROOT } }
				release = KUB
				UKR = { puppet = KUB }
				KUB = {
					set_politics = { ruling_party = democratic elections_allowed = yes }
					add_popularity = { ideology = democratic popularity = 0.35 }
				}
			}
			UKR = { 
				clr_country_flag = participation_in_sov_civ_war
				country_event = ukraine.203 
			}
		}
		if = {
			limit = {
				FIN = { 
					has_country_flag = participation_in_sov_civ_war
					exists = yes
					is_puppet = no
					NOT = { has_war_with = ROOT } 
				}
			}
			if = {
				limit = { 213 = { is_owned_and_controlled_by = ROOT } }
				213 = { set_demilitarized_zone = yes }
			}
			if = {
				limit = {
					any_state = {
						is_core_of = KAR
						is_core_of = SOV
						is_owned_and_controlled_by = ROOT
					}
				}
				release = KAR
				set_province_name = { id = 11159 name = UKR_aanislinna }
			}
			FIN = { 
				clr_country_flag = participation_in_sov_civ_war
				country_event = ukraine.203 
			}
		}
		if = {
			limit = {
				EST = { 
					has_country_flag = participation_in_sov_civ_war
					exists = yes
					is_puppet = no
					NOT = { has_war_with = ROOT } 
				}
			}
			if = {
				limit = { 208 = { is_owned_and_controlled_by = ROOT } }
				208 = { set_demilitarized_zone = yes }
			}
			if = {
				limit = { 209 = { is_owned_and_controlled_by = ROOT } }
				209 = { set_demilitarized_zone = yes }
			}
			give_guarantee = EST
			EST = { 
				clr_country_flag = participation_in_sov_civ_war
				country_event = ukraine.203 
			}
		}
		if = {
			limit = {
				LAT = { 
					has_country_flag = participation_in_sov_civ_war
					exists = yes
					is_puppet = no
					NOT = { has_war_with = ROOT } 
				}
			}
			if = {
				limit = { 
					209 = { 
						is_owned_and_controlled_by = ROOT
						is_demilitarized_zone = no
					} 
				}
				209 = { set_demilitarized_zone = yes }
			}
			if = {
				limit = { 210 = { is_owned_and_controlled_by = ROOT } }
				210 = { set_demilitarized_zone = yes }
			}
			give_guarantee = LAT
			LAT = { 
				clr_country_flag = participation_in_sov_civ_war
				country_event = ukraine.203 
			}
		}
		if = {
			limit = {
				POL = { 
					has_country_flag = participation_in_sov_civ_war
					exists = yes
					is_puppet = no
					NOT = { has_war_with = ROOT } 
				}
			}
			if = {
				limit = {
					any_state = {
						is_core_of = BLR
						is_core_of = SOV
						is_owned_and_controlled_by = ROOT
					}
				}
				release = BLR
			}
			POL = { 
				clr_country_flag = participation_in_sov_civ_war
				country_event = ukraine.203 
				puppet = BLR
			}
		}
		#if = {
		#	limit = {
		#		JAP = { 
		#			has_country_flag = participation_in_sov_civ_war
		#			exists = yes
		#			is_puppet = no
		#			NOT = { has_war_with = ROOT } 
		#		}
		#	}
		#	if = {
		#		limit = {
		#			any_state = {
		#				is_core_of = ZKL
		#				is_core_of = SOV
		#				is_owned_and_controlled_by = ROOT
		#			}
		#		}
		#		release = ZKL
		#	}
		#	JAP = { 
		#		country_event = ukraine.203 
		#		puppet = ZKL
		#		ZKL = { set_cosmetic_tag = ZKL_JAP }
		#	}
		#}
		every_state = { #refusal from possible claims of USSR
			limit = { is_claimed_by = THIS }
			remove_claim_by = THIS
		}
	}
	option = {
		name = ukraine.202.b
		ai_chance = {
			factor = 20
		}
		modify_timed_idea = {
		    idea = RUS_postwar_ruins
		    days = 730
		}
		every_other_country = {
			limit = {
				has_country_flag = participation_in_sov_civ_war
			}
			country_event = ukraine.217
		}
	}	
}
# Russia agree execution of promises to the interventionists - message for other countries
country_event = {
	id = ukraine.203 
	title = ukraine.203.t
	desc = ukraine.203.d
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes

	option = { 
		name = ukraine.203.a
	}
}
# Beginning of second intervention
country_event = {
    id = ukraine.204
    hidden = yes

    is_triggered_only = yes

	immediate = { 
		random_other_country = {
			limit = {
				original_tag = SOV
				has_government = communism
				has_civil_war = yes
			}
			ROOT = {
				declare_war_on = {
					target = PREV
					type = puppet_wargoal_focus
				}
			}
		}
		
		add_ideas = UKR_intervention_in_sov_civ_war
		if = {
			limit = { 
				NOT = { has_global_flag = UKR_entente_of_intervention_create } 
				is_in_faction = no
			}
			create_faction = EntenteOfIntervention
			set_global_flag = UKR_entente_of_intervention_create
			set_country_flag = UKR_first_in_intervetion_faction
			else = {
				if = {
					limit = { is_in_faction = no }
					random_other_country = {
						limit = { has_country_flag = UKR_first_in_intervetion_faction }
						add_to_faction = ROOT
					}
				}
			}
		}
		if = {
			limit = { NOT = { tag = UKR } }
			set_country_flag = participation_in_sov_civ_war
		}
    }
}
# Resistance to intervents for USSR
country_event = {
	id = ukraine.205
	title = ukraine.205.t
	desc = ukraine.205.d
	picture = GFX_report_event_generic_sign_treaty1

	trigger = {
		any_other_country = { has_country_flag = participation_in_sov_civ_war }
	}
	
	is_triggered_only = yes

	option = { 
		name = ukraine.205.a
		add_ideas = SOV_resistance_to_intervention
	}
}
# Fail of second intervention - forced white peace and penalty
country_event = {
	id = ukraine.206 
	title = ukraine.206.t
	desc = ukraine.206.d
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes

	option = { 
		name = ukraine.206.a
		if = {
			limit = { has_war_with = SOV }
			white_peace = SOV
			add_political_power = -200
			SOV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = SOV_intervent_in_civil_war
				}
			}
		}
		every_other_country = {
			limit = {
				OR = {
					is_puppet_of = ROOT
					is_subject_of = ROOT
					is_in_faction_with = ROOT
				}
				has_war_with = SOV
			}
			white_peace = SOV
		}
	}
}
# Ukraine proposes friendship and defend from Germany 
country_event = {
	id = ukraine.207
	title = ukraine.207.t
	desc = ukraine.207.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { #sure
		name = ukraine.207.a
		ai_chance = {
			factor = 40
			modifier = {
				has_opinion = { target = UKR value > 30 }
				factor = 3
			}
		}
		diplomatic_relation = { country = UKR relation = non_aggression_pact }
		give_guarantee = UKR
		UKR = { country_event = ukraine.208 }
	}

	option = { #no
		name = ukraine.207.b
		ai_chance = {
			factor = 60
			modifier = {
				UKR = { has_war = yes }
				factor = 0.5
			}
		}
		UKR = { country_event = ukraine.209 }	
	}
}
# Germany accept treaty with neutrality Ukraine
country_event = {
	id = ukraine.208
	title = ukraine.208.t
	desc = ukraine.208.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = { 
		name = excellent
		every_other_country = {
			limit = { 
				has_war_with = GER
			}
			add_opinion_modifier = { 
				target = ROOT
				modifier = UKR_treaty_with_germany
			}
		}
	}
}
# Germany reject treaty with neutrality Ukraine
country_event = {
	id = ukraine.209
	title = ukraine.209.t
	desc = ukraine.209.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = unfortunate
	}
}
# Call Sanitary cordon Members to War (Instigator)
country_event = {
	id = ukraine.210
	title = ukraine.210.t
	desc = ukraine.210.d
	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes

	option = {
		name = ukraine.210.a
		every_other_country = {
			limit = {
				has_idea = member_of_sanitary_cordon
				NOT = { has_war_with = SOV }
				any_other_country = {
					has_idea = member_of_sanitary_cordon
					has_war_with = SOV
				}
			}
			country_event = { id = ukraine.211 days = 1 }
		}
	}
}

# [From.GetName] Calls Sanitary cordon Members to War
country_event = {
	id = ukraine.211
	title = ukraine.211.t
	desc = ukraine.211.d

	picture = GFX_report_event_soviet_tanks

	is_triggered_only = yes
	
	option = {
		name = ukraine.211.a
		ai_chance = {
			factor = 10
		}
		SOV = {
			declare_war_on = {
				target = PREV
				type = annex_everything
			}
		}
	}

	option = {
		name = ukraine.211.b
		trigger = {
			NOT = { original_tag = UKR }
		}
		ai_chance = {
			factor = 0
		}
		remove_ideas = member_of_sanitary_cordon
		FROM = { add_opinion_modifier = { target = ROOT modifier = anti_soviet_pact_call_refused } }
		add_timed_idea = {
			idea = anti_soviet_pact_refused_call
			days = 365 
		}
	}
}
# Reinforce Sanitary cordon
country_event = {
	id = ukraine.212
	title = ukraine.212.t
	desc = ukraine.212.d
	picture = GFX_report_event_japan_europe_pact

	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 8
		}
		name = ukraine.212.a		#join
		add_ideas = member_of_sanitary_cordon
		SOV = {
			remove_opinion_modifier = { target = ROOT modifier = pact_against_us }
			add_opinion_modifier = { target = ROOT modifier = worse_pact_against_us }
		}
		random_list = {
			25 = {
				FROM = { country_event = { id = ukraine.339 hours = 4 } }
			}
			25 = {
				FROM = { country_event = { id = ukraine.339 hours = 6 } }
			}
			25 = {
				FROM = { country_event = { id = ukraine.339 hours = 8 } }
			}
			25 = {
				FROM = { country_event = { id = ukraine.339 hours = 10 } }
			}
		}
	}
	
	option = {
		name = ukraine.212.b		#refuse
		ai_chance = {
			factor = 2
		}
	}
}
# Coming ukrainian convoys for soviet civil war
country_event = {
	id = ukraine.213
	title = ukraine.213.t
	desc = ukraine.213.d
	picture = GFX_report_event_china_ledo_road

	is_triggered_only = yes

	option = {
		name = ukraine.213.a
		add_equipment_to_stockpile = { type = infantry_equipment amount = 1000 producer = UKR }
		add_equipment_to_stockpile = { type = artillery_equipment amount = 50 producer = UKR } 
		add_equipment_to_stockpile = { type = support_equipment amount = 100 producer = UKR } 
		add_manpower = 2000
	}
}
#Start of civil war together with soviet civil war					
country_event = {
	id = ukraine.214
	title = ukraine.214.t
	desc = ukraine.214.d
	picture = GFX_report_event_lithuania_army

	fire_only_once = yes
	
	trigger = {
		has_country_flag = UKR_dont_intervention
		has_war = no
		tag = UKR
		NOT = { has_government = communism }
		SOV = { has_civil_war = yes }
	}

	immediate = {
		hidden_effect = { UKR_oleksander_beresowski = { remove_advisor_role = { slot = army_chief } } }
	}

	mean_time_to_happen = {
		days = 7
	}

	option = {
		name = ukraine.214.a
		set_country_flag = UKR_white_civil_war
		#retire_character = UKR_oleksander_beresowski
		if = {
			limit = { 
				OR = {
					has_government = fascism
					has_government = democratic
				}
			}
			if = {
				limit = { has_stability > 0.5 } #small civil war
				start_civil_war = {
					ideology = neutrality
					size = 0.25
					states = { 192 196 197 }
					#keep_unit_leaders = { 658 668 }
					keep_unit_leaders_trigger = {
						OR = {
							has_id = 658
							has_id = 668
						}
					}
				}
				else = { #big civil war
					start_civil_war = {
						ideology = neutrality
						size = 0.4
						states = { 196 197 192 200 226 227 228 }
						#keep_unit_leaders = { 658 668 }
						keep_unit_leaders_trigger = {
							OR = {
								has_id = 658
								has_id = 668
							}
						}
					}
				}
			}
		
			random_other_country = {
				limit = {
					original_tag = UKR
					has_government = neutrality
				}
				UKR = {
					UKR_oleksander_beresowski = { set_nationality = PREV.PREV }
				}
				add_country_leader_role = {
					character = UKR_oleksander_beresowski
					promote_leader = yes
					country_leader = {
						ideology = despotism
						expire = "1953.3.1"
						traits = { }
						desc = UKR_oleksander_beresowski_desc
					}
				}
				load_focus_tree = { tree = ukraine_focus keep_completed = no }
				unlock_national_focus = UKR_political_effort
				complete_national_focus = UKR_old_course
			}
			else = {
				if = {
					limit = { has_stability > 0.5 } #small civil war
					start_civil_war = {
						ideology = fascism
						size = 0.25
						states = { 192 196 197 }
						#keep_unit_leaders = { 655 }
						keep_unit_leaders_trigger = {
							has_id = 655
						}
					}
					else = { #big civil war
						start_civil_war = {
							ideology = fascism
							size = 0.4
							states = { 196 197 192 200 226 227 228 }
							#keep_unit_leaders = { 655 }
							keep_unit_leaders_trigger = {
								has_id = 655
							}
						}
					}
				}
			
				random_other_country = {
					limit = {
						original_tag = UKR
						has_government = fascism
					}
					UKR = {
						UKR_oleksander_beresowski = { set_nationality = PREV.PREV }
					}
					add_country_leader_role = {
						character = UKR_oleksander_beresowski
						promote_leader = yes
						country_leader = {
							ideology = fascism_ideology
							expire = "1953.3.1"
							traits = { }
							desc = UKR_oleksander_beresowski_desc
						}
					}
					load_focus_tree = { tree = ukraine_focus keep_completed = no }
					unlock_national_focus = UKR_political_effort
					complete_national_focus = UKR_old_course
				}
			}
		}
	}
}
# Military access for defend of Poland by democratic Ukraine
country_event = {
	id = ukraine.215
	title = ukraine.215.t
	desc = ukraine.215.d
	picture = GFX_report_event_poland_rejects
	
	trigger = {
		tag = POL
		is_in_faction = no
		has_war = no
		UKR = {	
			is_puppet = no
			has_completed_focus = UKR_go_to_allies
		}
		GER = {
			focus_progress = {
				focus = GER_danzig_or_war
				progress > 0.25
			}
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.215.a
		UKR = {
			country_event = { id = ukraine.216 }
		}
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.215.b
	}
}
# Military access for defend of Poland - message for Ukraine
country_event = {
	id = ukraine.216
	title = ukraine.216.t
	desc = ukraine.216.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes

	option = {
		name = ukraine.216.a
		ai_chance = {
			factor = 10
		}
		diplomatic_relation = {
			country = POL
			relation = military_access
			active = yes
		}
	}
	option = {
		name = ukraine.216.b
		trigger = {
			NOT = { has_guaranteed = POL }
		}
		ai_chance = {
			factor = 90
		}
		diplomatic_relation = {
			country = POL
			relation = military_access
			active = yes
		}
		give_guarantee = POL
	}
}
# Russia decline execution of promises to the interventionists - message for other countries
country_event = {
	id = ukraine.217 
	title = ukraine.217.t
	desc = ukraine.217.d
	picture = GFX_report_event_generic_sign_treaty1
	
	is_triggered_only = yes

	option = { 
		name = ukraine.217.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}
	}
}
#Nikita Khrushchev is new leader
country_event = {
	id = ukraine.218
	title = ukraine.218.t
	desc = ukraine.218.d
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes

	option = {
		name = ukraine.218.a
		promote_character = UKR_nikita_khrushchev
		add_ai_strategy = {
			type = alliance
			id = "SOV"
			value = 200
		}
	}
}
#Volodymyr Vynnychenko is new leader
country_event = {
	id = ukraine.219
	title = ukraine.219.t
	desc = ukraine.219.d
	picture = GFX_report_event_generic_parliament

	is_triggered_only = yes

	option = {
		name = ukraine.219.a
		add_political_power = 120
		promote_character = UKR_volodymyr_vynnychenko
	}
}
#Miners competitions - Semivolos
country_event = {
	id = ukraine.220
	title = ukraine.220.t
	desc = ukraine.220.d
	picture = GFX_report_event_semivolos

	trigger = {
		226 = { is_owned_and_controlled_by = UKR }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.220.a
		add_stability = 0.01
		set_country_flag = UKR_event_of_semivolos
	}
}
#Farmers competitions - Demchenko
country_event = {
	id = ukraine.221
	title = ukraine.221.t
	desc = ukraine.221.d
	picture = GFX_report_event_demchenko

	is_triggered_only = yes

	option = {
		name = ukraine.221.a
		add_stability = 0.01
		set_country_flag = UKR_event_of_demchenko
	}
}
# Demand Carphatian Ukraine for CZE
country_event = {
	id = ukraine.222
	title = ukraine.222.t
	desc = ukraine.222.d
	picture = GFX_report_event_german_troops

	trigger = {
		OR = {
			73 = { is_owned_and_controlled_by = CZE }
			CUA = { is_puppet_of = CZE }
		}
		NOT = { has_war_with = UKR }
	}

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.222.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 3
				69 = { is_owned_and_controlled_by = GER }
			}
		}
		UKR = { country_event = ukraine.224 }
		effect_tooltip = {
			UKR = {
				transfer_state = 73
			}
			if = {
				limit = {
					834 = { is_owned_and_controlled_by = FROM }
					984 = { is_owned_and_controlled_by = ROOT }
				}
				UKR = { transfer_state = 984 }
			}
		}
	}
	
	option = {
		name = ukraine.222.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				is_in_faction = yes
			}
			modifier = {
				factor = 0.5
				OR = {
					88 = { is_controlled_by = FROM }
					POL = { is_puppet_of = FROM }
					88 = { controller = { is_in_faction_with = FROM } }
				}
			}
		}
		UKR = { country_event = ukraine.225 } 
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					target = CZE
					type = take_state_focus
					generator = { 73 }
				}
			}
		}
	}
}
# Demand Carphatian Ukraine for HUN
country_event = {
	id = ukraine.223
	title = ukraine.223.t
	desc = ukraine.223.d
	picture = GFX_report_event_german_troops

	trigger = {
		OR = {
			73 = { is_owned_and_controlled_by = HUN }
			CUA = { is_puppet_of = HUN }
		}
		73 = { is_owned_and_controlled_by = HUN }
		NOT = { has_war_with = UKR }
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.223.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		UKR = { country_event = ukraine.224 }
		effect_tooltip = {
			UKR = {
				transfer_state = 73
			}
			if = {
				limit = {
					834 = { is_owned_and_controlled_by = FROM }
					984 = { is_owned_and_controlled_by = ROOT }
				}
				UKR = { transfer_state = 984 }
			}
		}
	}
	
	option = {
		name = ukraine.223.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				is_in_faction = yes
			}
		}
		UKR = { country_event = ukraine.225 } 
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					target = HUN
					type = take_state_focus
					generator = { 73 }
				}
			}
		}
	}
}
# FROM Cedes Carphatian Ukraine
country_event = {
	id = ukraine.224
	title = ukraine.224.t
	desc = ukraine.224.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes
	
	option = {
		name = ukraine.224.a
		if = {
			limit = { CUA = { is_puppet_of = FROM } }
			puppet = CUA
			CUA = { set_politics = { ruling_party = democratic elections_allowed = yes } }
			else = { transfer_state = 73 }
		}
		if = { #Presov as extension of Transcurzonia
			limit = {
				834 = { is_owned_and_controlled_by = ROOT }
				984 = { is_owned_and_controlled_by = FROM }
			}
			transfer_state = 984
		}
		add_war_support = 0.03
	}
}
# FROM Refuses to Cede Carphatian Ukraine
country_event = {
	id = ukraine.225
	title = ukraine.225.t
	desc = ukraine.225.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.225.a
		if = {
			limit = { CUA = { is_puppet_of = FROM } }
			create_wargoal = {
				target = CUA
				type = take_state_focus
				generator = { 73 }
			}
			else = { 
				create_wargoal = {
					target = FROM
					type = take_state_focus
					generator = { 73 }
				}
			}
		}
	}
}
# Carphatian crisis - Hungary cede
country_event = {
	id = ukraine.226
	title = ukraine.226.t
	desc = ukraine.226.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes
	
	option = {
		name = ukraine.226.a
	}
}
# Proposition to Crimea of economic support
country_event = {
	id = ukraine.227
	title = ukraine.227.t
	desc = ukraine.227.d
	picture = GFX_report_event_generic_parliament
	
	is_triggered_only = yes

	trigger = {
		CRI = { NOT = { has_country_flag = CRI_north_crimean_canal_is_built } }
	}

	option = {
		name = ukraine.227.a
		ai_chance = {
			factor = 80
		}
		UKR = {
			country_event = { id = ukraine.228 days = 1 }
		}
		transfer_navy = { target = UKR }
		effect_tooltip = {
			UKR = { activate_decision = UKR_build_north_crimean_canal }
		}
	}
	option = {
		name = ukraine.227.b
		ai_chance = {
			factor = 20
			modifier = {
				factor = 3
				naval_strength_ratio = {
				    tag = UKR
				    ratio > 1
				}
			}
		}
		UKR = {
			country_event = { id = ukraine.229 days = 1 }
		}
	}
}
# Crimea accept - message for Ukraine
country_event = {
	id = ukraine.228
	title = ukraine.228.t
	desc = ukraine.228.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.228.a
		activate_decision = UKR_build_north_crimean_canal
	}
}
# Crimea decline - message for Ukraine
country_event = {
	id = ukraine.229
	title = ukraine.229.t
	desc = ukraine.229.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.229.a
	}
}
# Visit of Petliura to London
country_event = {
	id = ukraine.230
	title = ukraine.230.t
	desc = ukraine.230.d
	picture = GFX_report_event_generic_read_write
	
	trigger = {
		tag = UKR
		has_war = no
		has_government = neutrality
		democratic > 0.35
		ENG = { has_government = democratic }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.230.a
		add_popularity = {
			ideology = democratic
			popularity = 0.03
		}
	}
}
# Gdansk or War (Germany)
country_event = {
	id = ukraine.231
	title = ukraine.231.t
	desc = ukraine.231.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = GER }
	}
	
	option = {
		name = ukraine.231.a
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				has_war_with = ENG 
			}
		}
		POL = { country_event = { id = ukraine.232 days = 1 } }
		effect_tooltip = {
			POL = {
				transfer_state = 85
			}
		}
	}
	
	option = {
		name = ukraine.231.b
		ai_chance = {
			factor = 80
			modifier = {
				factor = 3
				strength_ratio = {
					tag = POL
					ratio > 0.7
				}
			}
		}
		POL = { country_event = { id = ukraine.233 days = 1 } }
		
		effect_tooltip = {
			POL = {
				declare_war_on = {
					target = GER
					type = take_state
					generator = { 85 }
				}
			}
		}
	}
}

# Germany Cedes Gdansk (Gdansk or War)
country_event = {
	id = ukraine.232
	title = ukraine.232.t
	desc = ukraine.232.d
	picture = GFX_report_event_german_polish_border

	is_triggered_only = yes
	
	option = {
		name = ukraine.232.a
		transfer_state = 85
	}
}

# Germany Refuses to Cede Gdansk (Gdansk or War)
country_event = {
	id = ukraine.233
	title = ukraine.233.t
	desc = ukraine.233.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.233.a
		create_wargoal = {
			type = take_state
			generator = { 85 }
			target = GER
		}
	}
}
#Canadian riflemans
country_event = {
	id = ukraine.234
	title = ukraine.234.t
	desc = ukraine.234.d
	picture = GFX_report_event_canadian_soldiers
	
	trigger = {
		tag = UKR
		is_in_faction_with = CAN
		has_war_with = GER
		192 = {
			is_owned_and_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	option = {
		name = ukraine.234.a
		country_event = { id = ukraine.267 days = 30 }
	}
}
# Defense plan for war with Germany
country_event = {
	id = ukraine.235
	title = ukraine.235.t
	desc = ukraine.235.d
	picture = GFX_report_event_ukrainian_defence
	
	trigger = {
		tag = UKR
		has_defensive_war_with = GER
		GER = {
			is_neighbor_of = UKR
			is_puppet = no
			surrender_progress < 0.1	
		}
	}

	mean_time_to_happen = { days = 7 }

	fire_only_once = yes

	option = {
		name = ukraine.235.a
		trigger = {
			199 = { is_owned_and_controlled_by = UKR }
		}
		ai_chance = {
			factor = 40
		}
		add_timed_idea = {
			idea = UKR_defense_plan_west1
			days = 90
		}
	}

	option = {
		name = ukraine.235.b
		trigger = {
			192 = { is_owned_and_controlled_by = UKR }
			202 = { is_owned_and_controlled_by = UKR }
			203 = { is_owned_and_controlled_by = UKR }
		}
		ai_chance = {
			factor = 40
		}
		add_timed_idea = {
			idea = UKR_defense_plan_west2
			days = 90
		}
	}

	option = {
		name = ukraine.235.c
		ai_chance = {
			factor = 20
		}
		add_timed_idea = {
			idea = UKR_defense_plan_west3
			days = 90
		}
	}
}
# Fall of Poland/Ukraine - do union with Ukraine/Poland?
country_event = {
	id = ukraine.236
	title = ukraine.236.t
	desc = { 
		text = ukraine.236.desc.a
		trigger = {
			tag = POL
		}
	}
	desc = { 
		text = ukraine.236.desc.b
		trigger = {
			tag = UKR
		}
	}
	picture = GFX_report_event_poland_rejects
	
	is_triggered_only = yes
	
	option = { # accept union
		name = ukraine.236.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 10
				is_faction_leader = yes 
			}
			modifier = {
				factor = 1.2
				UKR = { has_country_flag = UKR_consent_to_arrest_of_bandera }
			}
		}
		FROM = { country_event = ukraine.237 }
		effect_tooltip = {
			every_unit_leader = {
				set_nationality = FROM
			}
			every_navy_leader = {
				set_nationality = FROM
			}
			remove_state_core = 89
			remove_state_core = 91
			remove_state_core = 93
			remove_state_core = 987
			FROM = {
				annex_country = { target = ROOT transfer_troops = yes }
				every_owned_state = {
					limit = { is_core_of = ROOT }
					add_core_of	= FROM
				}
				set_cosmetic_tag = UKR_POL
			}
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = { # decline union
		name = ukraine.236.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				UKR = { has_completed_focus = UKR_alliance_with_Poland } 
			}
		}
		FROM = { country_event = ukraine.238 }
	}
}
# Fall of Poland/Ukraine - FROM accept union
country_event = {
	id = ukraine.237
	title = ukraine.237.t
	desc = ukraine.237.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes

	option = {
		name = ukraine.237.a
		FROM = {
			if = {
				limit = { tag = POL }
				every_unit_leader = { add_unit_leader_trait = UKR_polish_officer }
				every_navy_leader = { add_unit_leader_trait = UKR_polish_officer }
			}
			every_unit_leader = {
				set_nationality = ROOT
			}
			every_navy_leader = {
				set_nationality = ROOT
			}
			if = {
				limit = { has_character = POL_eugeniusz_kwiatkowiski }
				POL_eugeniusz_kwiatkowiski = { set_nationality = ROOT }
			}
			if = {
				limit = { has_character = POL_stanislaw_pawluc }
				POL_stanislaw_pawluc = { set_nationality = ROOT }
			}
			if = {
				limit = { has_character = POL_stanislav_maczek }
				POL_stanislav_maczek = { set_nationality = ROOT }
			}
		}
		if = {
			limit = { WUA = { is_subject_of = FROM } }
    		puppet = WUA
		}
		if = {
			limit = { CUA = { is_subject_of = FROM } }
    		puppet = CUA
		}
		if = {
			limit = { has_idea = POL_ethnic_minorities }
    		remove_ideas = POL_ethnic_minorities
		}
		if = {
			limit = { FROM = { is_faction_leader = yes } }
			set_faction_leader = yes
		}
		annex_country = { target = FROM transfer_troops = yes }
		if = { #crutch for dynamic tags
			limit = { FROM = { original_tag = POL } }
			every_owned_state = {
				limit = { is_core_of = POL }
				add_core_of	= ROOT
			}
		}
		else = {
			every_owned_state = {
				limit = { is_core_of = UKR }
				add_core_of	= ROOT
			}
		}
		
		FROM = {
			remove_state_core = 89
			remove_state_core = 91
			remove_state_core = 93	
			remove_state_core = 987	
		}
		add_stability = -0.05
		add_ideas = UKR_POL_disorganized_economy
		if = {
			limit = { has_country_flag = UKR_project_of_rp }
			complete_national_focus = UKR_consolidation_of_union
			complete_national_focus = UKR_unification_of_communications
		}
		if = {
			limit = { has_country_flag = UKR_project_of_rp_parliament }
			complete_national_focus = UKR_united_parliament_republic
		}
		if = {
			limit = { has_country_flag = UKR_project_of_rp_president }
			complete_national_focus = UKR_united_president_republic
		}
		if = {
			limit = { has_country_flag = UKR_project_of_rp_king }
			complete_national_focus = UKR_united_constitutional_monarchy
		}
		set_country_flag = UKR_united_with_poland
		set_cosmetic_tag = UKR_POL
		hidden_effect = {
			news_event = { hours = 1 id = news.557 }
		}
	}
	
}
# Fall of Poland/Ukraine - FROM reject union
country_event = {
	id = ukraine.238
	title = ukraine.238.t
	desc = ukraine.238.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.238.a
	}
}
# Coup in Poland
country_event = {
	id = ukraine.239
	title = ukraine.239.t
	desc = ukraine.239.d
	picture = GFX_report_event_polish_tanks_02
	
	trigger = {
		tag = POL
		has_idea = POL_new_revanchism
		fascism > 0.3
		has_war = no
		is_puppet = no
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.239.a
		set_politics = { 
			ruling_party = fascism 
			elections_allowed = no 
		}
		add_ai_strategy = {
			type = alliance
			id = "GER"
			value = 200
		}
		add_ai_strategy = {
			type = antagonize
			id = "UKR"
			value = 200
		}
		add_state_claim = 198
		add_state_claim = 199
		add_state_claim = 201
		add_state_claim = 204
		add_state_claim = 206
		add_state_claim = 207
		add_state_claim = 194
		add_state_claim = 241
		add_state_claim = 11
		add_state_claim = 189
	}
	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.239.b
		add_political_power = -200
		add_war_support = -0.1
	}
}
# Accessibility of the Kyiv conference
country_event = {
	id = ukraine.240
	title = ukraine.240.t
	desc = ukraine.240.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes

	immediate = {
		set_country_flag = UKR_kyiv_conference_is_start
	}

	option = {
		name = ukraine.240.a
		custom_effect_tooltip = UKR_additional_decisions
	}
}
# Start of Kyiv conference - choice for Germany
country_event = {
	id = ukraine.241
	title = ukraine.241.t
	desc = ukraine.241.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.241.a #accept
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.5
				any_other_country = {
					is_major = yes
					has_war_with = GER
				} 
			}
		}
		set_country_flag = UKR_invite_for_kyiv_conference
		UKR = {
			country_event = { id = ukraine.246 hours = 2 }
		}
	}

	option = {
		name = ukraine.241.b #decline
		ai_chance = {
			factor = 10
			modifier = {
				factor = 3
				has_government = neutrality 
				NOT = { has_country_flag = UKR_hetmans_relations_with_germany }
			}
			modifier = {
				factor = 5
				has_government = democratic 
			}
		}
		UKR = {
			country_event = { id = ukraine.247 hours = 2 }
		}
	}
}
# Start of Kyiv conference - choice for USSR
country_event = {
	id = ukraine.242
	title = ukraine.242.t
	desc = ukraine.242.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.242.a #accept
		ai_chance = {
			factor = 70
			modifier = {
				factor = 2
				POL = { has_country_flag = anti_comintern_member }
			}
		}
		set_country_flag = UKR_invite_for_kyiv_conference
		UKR = {
			country_event = { id = ukraine.246 hours = 4 }
		}
	}

	option = {
		name = ukraine.242.b #decline
		ai_chance = {
			factor = 30
			modifier = {
				factor = 3
				has_civil_war = yes
			}
		}
		UKR = {
			country_event = { id = ukraine.247 hours = 4 }
		}
	}
}
# Start of Kyiv conference - choice for Lithuania
country_event = {
	id = ukraine.243
	title = ukraine.243.t
	desc = ukraine.243.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.243.a #accept
		ai_chance = {
			factor = 80
			modifier = {
				factor = 2
				has_government = fascism
			}
		}
		set_country_flag = UKR_invite_for_kyiv_conference
		UKR = {
			country_event = { id = ukraine.246 hours = 6 }
		}
	}

	option = {
		name = ukraine.243.b #decline
		ai_chance = {
			factor = 20
			modifier = {
				factor = 5
				POL = { has_guaranteed = LIT }
			}
		}
		UKR = {
			country_event = { id = ukraine.247 hours = 6 }
		}
	}
}
# Start of Kyiv conference - choice for Czechoslovakia
country_event = {
	id = ukraine.244
	title = ukraine.244.t
	desc = ukraine.244.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.244.a #accept
		ai_chance = {
			factor = 30
			modifier = {
				factor = 3
				has_completed_focus = CZE_go_right
			}
		}
		set_country_flag = UKR_invite_for_kyiv_conference
		UKR = {
			country_event = { id = ukraine.246 hours = 8 }
		}
	}

	option = {
		name = ukraine.244.b #decline
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				OR = {
					has_government = fascism
					72 = { is_owned_and_controlled_by = POL }
				}
			}
		}
		UKR = {
			country_event = { id = ukraine.247 hours = 8 }
		}
	}
}
# Start of Kyiv conference - message for Poland
country_event = {
	id = ukraine.245
	title = ukraine.245.t
	desc = ukraine.245.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.245.a
	}
}
# Start of Kyiv conference - FROM.GetName accept
country_event = {
	id = ukraine.246
	title = ukraine.246.t
	desc = ukraine.246.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.246.a
		if = {
			limit = {
				FROM = { 
					has_government = fascism 
					is_major = yes
				}
			}
			add_popularity = { ideology = fascism popularity = 0.1 }
		}
		if = {
			limit = {
				FROM = { 
					has_government = communism 
					is_major = yes
				}
			}
			add_popularity = { ideology = communism popularity = 0.1 }
		}
		add_to_variable = { UKR_participant_of_conference = 1 } 
	}
}
# Start of Kyiv conference - FROM.GetName decline
country_event = {
	id = ukraine.247
	title = ukraine.247.t
	desc = ukraine.247.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.247.a
	}
}
# Start of Kyiv conference - check for participants
country_event = {
	id = ukraine.248
	hidden = yes

	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = { check_variable = { UKR_participant_of_conference > 2 } }
			country_event = ukraine.249
			else = {
				country_event = ukraine.250
			}
		}
	}
}
# Start of Kyiv conference - success
country_event = {
	id = ukraine.249
	title = ukraine.249.t
	desc = ukraine.249.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.249.a
		country_event = { id = ukraine.251 days = 4 }
		if = {
			limit = { GER = { has_country_flag = UKR_invite_for_kyiv_conference } }
			GER = { country_event = { id = ukraine.252 days = 2 } }
		}
		if = {
			limit = { SOV = { has_country_flag = UKR_invite_for_kyiv_conference } }
			SOV = { country_event = { id = ukraine.253 days = 2 } }
		}
		if = {
			limit = { LIT = { has_country_flag = UKR_invite_for_kyiv_conference } }
			LIT = { country_event = { id = ukraine.254 days = 3 } }
		}
		if = {
			limit = { CZE = { has_country_flag = UKR_invite_for_kyiv_conference } }
			CZE = { country_event = { id = ukraine.255 days = 3 } }
		}
		POL = { set_variable = { var_size_of_demands_on_kc = 0 } }
	}
}
# Start of Kyiv conference - fail
country_event = {
	id = ukraine.250
	title = ukraine.250.t
	desc = ukraine.250.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.250.a
		set_country_flag = UKR_kyiv_conference_is_fail
	}
}
# Kyiv conference - demand of Ukraine
country_event = {
	id = ukraine.251
	title = ukraine.251.t
	desc = ukraine.251.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.251.a #min demand
		ai_chance = {
			factor = 30
		}
		set_country_flag = UKR_kyiv_conference_min_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 1 } }
		POL = { country_event = { id = ukraine.256 days = 3 } }
	}

	option = {
		name = ukraine.251.b #max demand
		ai_chance = {
			factor = 70
		}
		set_country_flag = UKR_kyiv_conference_max_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 2 } }
		POL = { country_event = { id = ukraine.256 days = 3 } }
	}
}
# Kyiv conference - demand of Germany
country_event = {
	id = ukraine.252
	title = ukraine.252.t
	desc = ukraine.252.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.252.a #min demand
		ai_chance = {
			factor = 60
		}
		set_country_flag = UKR_kyiv_conference_min_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 1 } }
	}

	option = {
		name = ukraine.252.b #max demand
		ai_chance = {
			factor = 40
		}
		set_country_flag = UKR_kyiv_conference_max_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 2 } }
	}
}
# Kyiv conference - demand of USSR
country_event = {
	id = ukraine.253
	title = ukraine.253.t
	desc = ukraine.253.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.253.a #min demand
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_kyiv_conference_min_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 1 } }
	}

	option = {
		name = ukraine.253.b #max demand
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_kyiv_conference_max_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 2 } }
	}
}
# Kyiv conference - demand of Lithuania
country_event = {
	id = ukraine.254
	title = ukraine.254.t
	desc = ukraine.254.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.254.a #min demand
		set_country_flag = UKR_kyiv_conference_min_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 1 } }
	}
}
# Kyiv conference - demand of Czechoslovakia
country_event = {
	id = ukraine.255
	title = ukraine.255.t
	desc = ukraine.255.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.255.a #min demand
		ai_chance = {
			factor = 70
		}
		set_country_flag = UKR_kyiv_conference_min_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 1 } }
	}

	option = {
		name = ukraine.255.b #max demand
		ai_chance = {
			factor = 30
		}
		set_country_flag = UKR_kyiv_conference_max_demand
		POL = { add_to_variable = { var_size_of_demands_on_kc = 2 } }
	}
}
# Kyiv conference - decision for Poland
country_event = {
	id = ukraine.256
	title = ukraine.256.t
	desc = ukraine.256.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.256.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.5
				OR = {
					is_in_faction = yes
					any_other_country = { has_guaranteed = POL }
				}
			}
			modifier = {
				factor = 0.5
				check_variable = { var_size_of_demands_on_kc > 4 }
			}
		}
		POL = {
			add_timed_idea = {
				idea = POL_new_revanchism
				days = 365
			}
		}
		UKR = {
			if = { 
				limit = { has_country_flag = UKR_kyiv_conference_min_demand }
				transfer_state = 93
				transfer_state = 987
			}
			if = { 
				limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
			}
			country_event = ukraine.257
		}
		GER = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_min_demand }
					transfer_state = 85
					transfer_state = 807
				}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
					transfer_state = 85
					transfer_state = 807
					transfer_state = 86
					transfer_state = 762
				}
				country_event = ukraine.257
			}
		}
		SOV = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_min_demand }
					transfer_state = 94
					transfer_state = 95
					transfer_state = 96
					transfer_state = 784
				}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_max_demand }
					transfer_state = 94
					transfer_state = 95
					transfer_state = 96 
					transfer_state = 97
					transfer_state = 784
				}
				country_event = ukraine.257
			}
		}
		LIT = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				transfer_state = 784
				country_event = ukraine.257
			}
		}
		CZE = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_min_demand }
					88 = { set_demilitarized_zone = yes }
				}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
					transfer_state = 88
				}
				country_event = ukraine.257
			}
		}
	}

	option = {
		name = ukraine.256.b
		ai_chance = {
			factor = 40
		}
		UKR = {
			if = { 
				limit = { has_country_flag = UKR_kyiv_conference_min_demand }
				create_wargoal = {
					type = take_state_focus
					target = POL
					generator = { 93 987 }
				}
			}
			if = { 
				limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
				UKR_create_wargoal_against_poland = yes
			}
			country_event = ukraine.258
		}
		GER = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_min_demand }
					create_wargoal = {
						type = take_state_focus
						target = POL
						generator = { 85 807 }
					}
				}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
					create_wargoal = {
						type = take_state_focus
						target = POL
						generator = { 85 807 86 762}
					}
				}
				country_event = ukraine.258
			}
		}
		SOV = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_min_demand }
					create_wargoal = {
						type = take_state_focus
						target = POL
						generator = { 94 95 96 }
					}
				}
				if = { 
					limit = { has_country_flag = UKR_kyiv_conference_max_demand }
					create_wargoal = {
						type = take_state_focus
						target = POL
						generator = { 94 95 96 97 }
					}
				}
				country_event = ukraine.258
			}
		}
		LIT = {
			if = {
				limit = { has_country_flag = UKR_invite_for_kyiv_conference	}
				create_wargoal = {
					type = take_state_focus
					target = POL
					generator = { 784 }
				}
				country_event = ukraine.258
			}
		}
		CZE = {
			if = { 
				limit = { has_country_flag = UKR_kyiv_conference_max_demand } 
				create_wargoal = {
					type = take_state_focus
					target = POL
					generator = { 88 }
				}
				country_event = ukraine.258
			}
		}
	}
}
# Results of Kyiv conference - Poland agree
country_event = {
	id = ukraine.257
	title = ukraine.257.t
	desc = ukraine.257.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.257.a
	}
}
# Results of Kyiv conference - Poland refuse
country_event = {
	id = ukraine.258
	title = ukraine.258.t
	desc = ukraine.258.d
	picture = GFX_report_event_polish_army
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.258.a
	}
}
# Defense plan for war with USSR
country_event = {
	id = ukraine.259
	title = ukraine.259.t
	desc = ukraine.259.d
	picture = GFX_report_event_ukrainian_defence
	
	trigger = {
		tag = UKR
		SOV = {
			NOT = { has_war_with = UKR }
			NOT = { has_completed_focus = SOV_war_with_ukraine }
			OR = {
				focus_progress = {
					focus = SOV_war_with_ukraine
					progress > 0.25
				}
				is_justifying_wargoal_against = UKR
			}
		}
	}

	mean_time_to_happen = { days = 7 }

	fire_only_once = yes

	option = {
		name = ukraine.259.a
		ai_chance = {
			factor = 50
		}
		add_ideas = UKR_defense_plan_east1
	}

	option = {
		name = ukraine.259.b
		ai_chance = {
			factor = 50
		}
		add_ideas = UKR_defense_plan_east2
	}
}
#Choice start politics for 1939 scenario
country_event = {
	id = ukraine.260
	title = ukraine.260.t
	desc = ukraine.260.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = {
		name = ukraine.260.a
		set_politics = { ruling_party = communism elections_allowed = no }
		add_popularity = { ideology = communism popularity = 0.3 }
		unlock_national_focus = UKR_communism_propaganda
		unlock_national_focus = ukr_industrial_effort
		complete_national_focus = ukr_donbass_industry
		complete_national_focus = ukr_production_effort
		complete_national_focus = ukr_kryvorizhstal
		complete_national_focus = UKR_kyiv_odesa
		complete_national_focus = UKR_industry_innovations
		complete_national_focus = ukr_extra_tech_slot
		complete_national_focus = UKR_road_to_world_revolution
		unlock_national_focus = UKR_collectivisation
		unlock_national_focus = UKR_purge
		set_country_flag = UKR_purge_of_staff
		retire_character = UKR_pavlo_skoropadskyi
		retire_character = UKR_yevhen_konovalets
		retire_character = UKR_pavlo_shandruk
		retire_character = UKR_oleksander_gadd
		add_ideas = UKR_language_question
		add_timed_idea = {
			idea = UKR_famine_in_Ukraine
			days = 1095
		}
		country_event = { id = ukraine.261 }
		hidden_effect = {
			SOV = {
				add_ai_strategy = {
					type = alliance
					id = "UKR"
					value = -200
				}
			}
		}
	}
	option = {
		name = ukraine.260.b
		set_politics = { ruling_party = democratic elections_allowed = yes }
		add_popularity = { ideology = democratic popularity = 0.3 }
		unlock_national_focus = UKR_democratic_reforms
		unlock_national_focus = UKR_lustration
		unlock_national_focus = ukr_industrial_effort
		complete_national_focus = ukr_donbass_industry
		complete_national_focus = ukr_production_effort
		complete_national_focus = ukr_kryvorizhstal
		complete_national_focus = UKR_kyiv_odesa
		complete_national_focus = UKR_industry_innovations
		complete_national_focus = ukr_extra_tech_slot
		complete_national_focus = UKR_peace_politic
		complete_national_focus = UKR_attract_investment
		retire_character = UKR_pavlo_skoropadskyi
		set_country_flag = UKR_shukhevych_is_available
		add_ideas = UKR_language_question
		add_ideas = low_economic_mobilisation
		UKR_parliament_support_add10 = yes
		country_event = { id = ukraine.261 }
	}
	option = {
		name = ukraine.260.c
		add_popularity = { ideology = neutrality popularity = 0.55 }
		complete_national_focus = UKR_old_course
		complete_national_focus = UKR_constitution_reform
		unlock_national_focus = UKR_protection_of_economic
		complete_national_focus = ukr_donbass_industry
		complete_national_focus = UKR_shostka_gunpowder_factory
		complete_national_focus = ukr_production_effort_2
		complete_national_focus = UKR_kyiv_odesa
		complete_national_focus = UKR_agro_protectionism
		complete_national_focus = ukr_extra_tech_slot
		set_country_flag = UKR_shukhevych_is_available
		country_event = { id = ukraine.261 }
	}
	option = {
		name = ukraine.260.e
		set_politics = { ruling_party = fascism elections_allowed = no }
		add_popularity = { ideology = fascism popularity = 0.3 }
		unlock_national_focus = ukr_industrial_effort
		complete_national_focus = ukr_donbass_industry
		complete_national_focus = ukr_production_effort
		complete_national_focus = ukr_kryvorizhstal
		complete_national_focus = UKR_kyiv_odesa
		complete_national_focus = UKR_industry_innovations
		complete_national_focus = ukr_extra_tech_slot
		complete_national_focus = UKR_revanchism
		complete_national_focus = UKR_orientation_on_germany
		complete_national_focus = UKR_corporativism
		complete_national_focus = UKR_fascist_foreign_relations
		unlock_national_focus = UKR_one_leader
		unlock_national_focus = UKR_overcome_party_split
		unlock_national_focus = UKR_prepare_to_war
		unlock_national_focus = UKR_orientation_on_germany
		complete_national_focus = UKR_galician_operations
		retire_character = UKR_pavlo_skoropadskyi
		set_country_flag = UKR_shukhevych_is_available
		set_country_flag = UKR_has_OUN_struggle
		set_variable = { var_oun_status_of_power = 1 }
		set_variable = { var_oun_radicalisation_level = 1 }
		set_variable = { var_oun_authority_of_conovalets = 40 }
		set_variable = { var_oun_control_of_melnyk = 30 }
		set_variable = { var_oun_onslaught_of_bandera = 30 }
		set_power_balance = {
			id = UKR_power_balance
			left_side = UKR_workers_conditions	
			right_side = UKR_interests_of_industrialists	
			set_default = no
			set_value = 0.75
		}
		hidden_effect = {
			country_event = { id = ukraine.661 days = 5 random_days = 3 }
			GER = {
				add_ai_strategy = {
					type = declare_war
					id = "POL"
					value = 500
				}
			}
		}
		country_event = { id = ukraine.261 }
	}
}
#Choice start OOB in 1939
country_event = {
	id = ukraine.261
	title = ukraine.261.t
	desc = ukraine.261.d
	picture = GFX_report_event_polish_tanks_01

	is_triggered_only = yes

	option = {
		name = ukraine.261.a
		ai_chance = {
			base = 0
		}
		set_technology = {
			mobile_warfare = 1
			delay = 1
			elastic_defence = 1
		}
		if = {
			limit = {
				NOT = { has_dlc = "No Step Back" }
			}
			set_technology = {
				improved_light_tank = 1
			}
		}
		if = {
			limit = {
				has_dlc = "No Step Back"
			}
			set_technology = {
				improved_light_tank_chassis = 1
				engine_tech_1 = 1
			}
			create_equipment_variant = {
				name = "TShZh-36"
				type = light_tank_chassis_2
				parent_version = 0
				modules = {
					main_armament_slot = tank_auto_cannon
					turret_type_slot = tank_light_two_man_tank_turret
					suspension_type_slot = tank_christie_suspension
					armor_type_slot = tank_riveted_armor
					engine_type_slot = tank_gasoline_engine
					special_type_slot_1 = tank_radio_1
				}
				upgrades = {
					tank_nsb_engine_upgrade = 2
					tank_nsb_armor_upgrade = 2
				}
				icon = "gfx/interface/technologies/UKR_imp_light_tank.dds"
			}
		}
		hidden_effect = { load_oob = UKR_1939_1 }
	}
	option = {
		name = ukraine.261.b
		ai_chance = {
			base = 0
		}
		set_technology = {
			superior_firepower = 1
			sup_delay = 1
			mobile_defence = 1
			tech_field_hospital = 1
		}
		hidden_effect = { load_oob = UKR_1939_2 }
	}
	option = {
		name = ukraine.261.c
		ai_chance = {
			base = 100
		}
		set_technology = {
			trench_warfare = 1
			grand_battle_plan = 1
			prepared_defense = 1
			interwar_antiair = 1
		}
		hidden_effect = { load_oob = UKR_1939_3 }
	}
	option = {
		name = ukraine.261.e
		ai_chance = {
			base = 0
		}
		set_technology = {
			mass_assault = 1
			pocket_defence = 1
			defence_in_depth = 1
			tech_military_police = 1
		}
		hidden_effect = { load_oob = UKR_1939_4 }
	}
}
# Hetmans visit to neutrality Germany
country_event = {
	id = ukraine.262
	title = ukraine.262.t
	desc = ukraine.262.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.262.a
		UKR = { country_event = { id = ukraine.263 days = 1 } }
		GER = { set_country_flag = UKR_hetmans_relations_with_germany } #support for Kyiv conference
	}
}
# Hetmans visit to neutrality Germany - bonus for Ukraine
country_event = {
	id = ukraine.263
	title = ukraine.263.t
	desc = ukraine.263.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.263.a
		add_ideas = UKR_german_advisors
		add_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		if = {
			limit = { 
				NOT = { has_dlc = "By Blood Alone" }
				NOT = { has_tech = fighter1 } 
			}
			GER = {
				create_production_license = {
				    target = UKR
				    equipment = {
				        type = fighter_equipment_1
				    }
				    cost_factor = 0
				}
			}
		}
		else_if = {
			limit = { 
				has_dlc = "By Blood Alone"
				NOT = { has_tech = basic_small_airframe } 
			}
			GER = {
				create_production_license = {
				    target = UKR
				    equipment = {
				        type = small_plane_airframe_1
				    }
				    cost_factor = 0
				}
			}
		}
		if = {
			limit = { 
				NOT = { has_dlc = "By Blood Alone" }
				NOT = { has_tech = CAS1 } 
			}
			GER = {
				create_production_license = {
				    target = UKR
				    equipment = {
				        type = CAS_equipment_1
				    }
				    cost_factor = 0
				}
			}
		}
		else_if = {
			limit = { 
				has_dlc = "By Blood Alone"
				NOT = { has_tech = basic_small_airframe } 
			}
			GER = {
				create_production_license = {
				    target = UKR
				    equipment = {
				        type = small_plane_cas_airframe_1
				    }
				    cost_factor = 0
				}
			}
		}
		if = {
			limit = { 
				NOT = { has_dlc = "No Step Back" }
				NOT = { has_tech = basic_light_tank } 
			}
			GER = {
				create_production_license = {
				    target = UKR
				    equipment = {
				        type = light_tank_equipment_1
				    }
				    cost_factor = 0
				}
			}
		}
		if = {
			limit = { 
				has_dlc = "No Step Back"
				NOT = { has_tech = basic_light_tank_chassis } 
			}
			GER = {
				create_production_license = {
					target = UKR
					equipment = {
						type = light_tank_chassis_1
					}
					cost_factor = 0
				}
			}
		}
		if = {
			limit = { has_dlc = "Arms Against Tyranny" }
			add_equipment_subsidy = {
				cic = 300
				equipment_type = infantry_equipment
				seller_tags = { GER }
			}
			add_equipment_subsidy = {
				cic = 300
				equipment_type = artillery_equipment
				seller_tags = { GER }
			}
		}
	}
}
# Collapse of Ukrainian-Polish union (for fascists)
country_event = {
	id = ukraine.264
	title = ukraine.264.t
	desc = ukraine.264.d
	picture = GFX_report_event_generic_riot
	
	trigger = {
		has_government = fascism
		tag = UKR
		has_war = no
		has_country_flag = UKR_united_with_poland
		10 = { is_owned_and_controlled_by = ROOT }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.264.a
		release = POL
		if = {
			limit = { has_character = POL_eugeniusz_kwiatkowiski }
			POL_eugeniusz_kwiatkowiski = { set_nationality = POL }
		}
		if = {
			limit = { has_character = POL_stanislaw_pawluc }
			POL_stanislaw_pawluc = { set_nationality = POL }
		}
		if = {
			limit = { has_character = POL_stanislav_maczek }
			POL_stanislav_maczek = { set_nationality = POL }
		}
		clr_country_flag = UKR_united_with_poland
		every_unit_leader = {
			limit = {
				has_trait = UKR_polish_officer
			}
			set_nationality = POL
		}
		every_navy_leader = {
			limit = {
				has_trait = UKR_polish_officer
			}
			set_nationality = POL
		}
		drop_cosmetic_tag = yes
		clr_country_flag = UKR_united_with_poland
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.264.b
		start_civil_war = {
			ideology = democratic
			size = 0.5
		}
		clr_country_flag = UKR_united_with_poland
	}
	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.264.c
		set_politics = { ruling_party = democratic elections_allowed = yes }
		add_popularity = { ideology = democratic popularity = 0.5 }
		add_stability = -0.1
	}
}
# Collapse of Ukrainian-Polish union (for communists)
country_event = {
	id = ukraine.265
	title = ukraine.265.t
	desc = ukraine.265.d
	picture = GFX_report_event_generic_riot
	
	trigger = {
		has_government = communism
		tag = UKR
		has_war = no
		has_country_flag = UKR_united_with_poland
		10 = { is_owned_and_controlled_by = ROOT }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.265.a
		release_puppet = BLR
		release_puppet = POL
		if = {
			limit = { has_character = POL_eugeniusz_kwiatkowiski }
			POL_eugeniusz_kwiatkowiski = { set_nationality = POL }
		}
		if = {
			limit = { has_character = POL_stanislaw_pawluc }
			POL_stanislaw_pawluc = { set_nationality = POL }
		}
		if = {
			limit = { has_character = POL_stanislav_maczek }
			POL_stanislav_maczek = { set_nationality = POL }
		}
		clr_country_flag = UKR_united_with_poland
		every_unit_leader = {
			limit = {
				has_trait = UKR_polish_officer
			}
			set_nationality = POL
		}
		every_navy_leader = {
			limit = {
				has_trait = UKR_polish_officer
			}
			set_nationality = POL
		}
		drop_cosmetic_tag = yes
		clr_country_flag = UKR_united_with_poland
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.265.b
		start_civil_war = {
			ideology = democratic
			size = 0.5
		}
		clr_country_flag = UKR_united_with_poland
	}
	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.264.c
		set_politics = { ruling_party = democratic elections_allowed = yes }
		add_popularity = { ideology = democratic popularity = 0.5 }
		add_stability = -0.1
	}
}
# Variants of constitution reform - monarchy
country_event = {
	id = ukraine.266
	title = ukraine.266.t
	desc = ukraine.266.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes
	# Habsburg
	option = {
		name = ukraine.266.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = NEUTRALITY_ALTMONARCHY
				}
			}
		}
		set_cosmetic_tag = UKR_KING
		set_country_flag = UKR_constitution_monarchy
		set_power_balance = {
			id = UKR_power_balance
			left_side = UKR_hetman_side	
			right_side = UKR_king_side	
			set_default = no
			set_value = -0.90
		}
		set_country_flag = UKR_have_active_bop_decisions
		hidden_effect = {
			remove_trait = {
				character = UKR_pavlo_skoropadskyi
				ideology = despotism
				trait = hetman_of_ukraine
			}
			country_event = { id = ukraine.414 days = 3 random_days = 2 }
		}
	}
	# other
	option = {
		name = ukraine.266.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = NEUTRALITY_MONARCHY
				}
			}
		}
		country_event = { id = ukraine.722 days = 7 }
	}

}
#Canadian riflemans - arrival
country_event = {
	id = ukraine.267
	title = ukraine.267.t
	desc = ukraine.267.d
	picture = GFX_report_event_canadian_soldiers

	is_triggered_only = yes
	
	trigger = {
		is_in_faction_with = CAN
		has_war = yes
		192 = {
			is_owned_and_controlled_by = UKR
		}
	}

	option = {
		name = ukraine.267.a
		hidden_effect = { load_oob = UKR_canadian_riflemans }
		custom_effect_tooltip = UKR_nine_infantry_template_tt
	}
}
# Polish-Ukrainian ultimatum to Lithuania/Belarus
country_event = {
	id = ukraine.268
	title = ukraine.268.t
	desc = ukraine.268.d
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = ukraine.268.a
		ai_chance = {
			base = 10
			modifier = { 
				factor = 0
				OR = { 
					any_other_country = {
						is_major = yes
						has_capitulated = no
						NOT = { tag = FROM }
						OR = {
							is_in_faction_with = PREV
							has_guaranteed = PREV
						}
					}
					UKR = { surrender_progress > 0.5 }
				}
			}
		}

		FROM = {
			country_event = { days = 5 id = ukraine.269 }
		}
		effect_tooltip = {
			every_unit_leader = {
				set_nationality = FROM
			}
			every_navy_leader = {
				set_nationality = FROM
			}
			FROM = {
				annex_country = { target = PREV transfer_troops = yes }
				every_owned_state = {
					limit = { is_core_of = PREV }
					add_core_of	= FROM
				}
			}
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = { # Refuse
		name = ukraine.268.b
		ai_chance = {
			base = 0
			modifier = {
				add = 1
				any_other_country = {
					is_major = yes
					has_capitulated = no
					is_in_faction_with = PREV
				}
			}
			modifier = {
				add = 5
				any_other_country = {
					is_major = yes
					has_capitulated = no
					has_guaranteed = PREV
				}
			}
			modifier = {
				factor = 0
				is_puppet_of = FROM
			}
		}
		effect_tooltip = {
			create_wargoal = {
				type = annex_everything
				target = PREV
			}		
		}

		FROM = {
			country_event = { days = 5 id = ukraine.270 }
		}
	}
}
# Lithuania/Belarus accept demands
country_event = {
	id = ukraine.269
	title = ukraine.269.t
	desc = ukraine.269.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	option = {
		name = ukraine.269.a
		FROM = {
			every_unit_leader = {
				set_nationality = ROOT
			}
			every_navy_leader = {
				set_nationality = ROOT
			}
		}
		annex_country = { target = FROM transfer_troops = yes }
		every_owned_state = {
			limit = { is_core_of = FROM }
			add_core_of	= ROOT
		}
	}
}
# Lithuania/Belarus Refuses demands
country_event = {
	id = ukraine.270
	title = ukraine.270.t
	desc = ukraine.270.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.270.a
		if = {
			limit = {
				is_in_faction_with = FROM
				is_faction_leader = yes
			}
			remove_from_faction = FROM
		}
		create_wargoal = {
			type = annex_everything
			target = FROM
		}
	}
}
# Request for transfer of Budjak
country_event = {
	id = ukraine.271
	title = ukraine.271.t
	desc = ukraine.271.d

	is_triggered_only = yes

	option = { 
		name = ukraine.271.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				766 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				766 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			transfer_state = 766
		}

	}

	option = { 
		name = ukraine.271.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				has_country_flag = ROM_ukrainian_support
			}
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
#Adding core for Budjak
country_event = {
	id = ukraine.272
	title = ukraine.272.t
	desc = ukraine.272.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia2

	is_triggered_only = yes
	
	trigger = {
		766 = {
			is_controlled_by = UKR
		}
	}

	option = {
		name = ukraine.272.a
		UKR = { 
			add_state_core = 766 
		}
		ROM = {
			remove_state_core = 766
		}
		MOL = {
			remove_state_core = 766
		}
	}
}
#Rename of Cetatea Albă
country_event = {
	id = ukraine.273
	title = ukraine.273.t
	desc = ukraine.273.d
	picture = GFX_report_event_bilhorod

	fire_only_once = yes

	trigger = {
		OR = {
			AND = {
				tag = UKR
				UKR = {
					owns_state = 766
					controls_state = 766
				}
			}
			AND = {
				tag = DKR
				DKR = {
					has_completed_focus = DKR_right_side
					owns_state = 766
					controls_state = 766
				}
			}
		}
		
	}

	option = { #Bilhorod
		name = ukraine.273.a
		ai_chance = {
			base = 100
		}
		set_province_name = { id = 6727 name = UKR_bilhorod }
	}

	option = { #Akkerman
		name = ukraine.273.b
		ai_chance = {
			base = 0
		}
		set_province_name = { id = 6727 name = UKR_akkerman }
	}

	option = { #Tyras
		name = ukraine.273.c
		ai_chance = {
			base = 0
		}
		set_province_name = { id = 6727 name = UKR_tyras }
	}

	option = { #rather not
		name = ukraine.273.e
		ai_chance = {
			base = 0
		}
	}
}
#Budjak join to Ukraine
country_event = {
	id = ukraine.274
	title = ukraine.274.t
	desc = ukraine.274.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia2

	is_triggered_only = yes
	
	option = {
		name = ukraine.274.a
		add_state_claim = 766
		transfer_state = 766
		766 = { add_compliance = 50 }
	}
}
#Budjak stay as romanian
country_event = {
	id = ukraine.275
	title = ukraine.275.t
	desc = ukraine.275.d
	picture = GFX_report_event_election_vote

	is_triggered_only = yes
	
	option = {
		name = ukraine.275.a
	}
}
#Separate of Carpatian Ruthenia
country_event = {
	id = ukraine.276
	title = ukraine.276.t
	desc = ukraine.276.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes
	
	option = {
		name = ukraine.276.a
	}
}
#Reaction of ukrainian enemies on Turkey not neutrality action
country_event = {
	id = ukraine.277
	title = ukraine.277.t
	desc = ukraine.277.d

	is_triggered_only = yes

	option = { 
		name = ukraine.277.a
		ai_chance = {
			factor = 25
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < 0 }
			}
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < 0 }
			}
		}
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 341 }
		}
	}

	option = { 
		name = ukraine.277.b
		ai_chance = {
			factor = 50
		}
	}
}
#Rename of Novorossiysk
country_event = {
	id = ukraine.278
	title = ukraine.278.t
	desc = { 
		text = ukraine.278.desc.a
		trigger = {
			tag = UKR
		}
	}
	desc = { 
		text = ukraine.278.desc.b
		trigger = {
			tag = KUB
		}
	}
	picture = GFX_report_event_novorossyisk

	fire_only_once = yes

	trigger = {
		OR = {
			AND = {
				tag = UKR
				234 = { is_owned_and_controlled_by = UKR }
			}
			AND = {
				tag = KUB
				234 = { is_owned_and_controlled_by = KUB }
				OR = {
					has_completed_focus = KUB_unity_with_ukraine
					has_completed_focus = KUB_our_free_nation
				}
			}
		}
		NOT = { has_government = communism }
		NOT = { has_completed_focus = UKR_coronation }
	}

	option = { #Novyikorsun
		name = ukraine.278.a
		ai_chance = {
			base = 40
		}
		set_province_name = { id = 719 name = UKR_novyikorsun }
		country_event = ukraine.311
	}

	option = { #Bata
		name = ukraine.278.b
		ai_chance = {
			base = 30
		}
		set_province_name = { id = 719 name = UKR_bata }
		country_event = ukraine.311
	}

	option = { #Tsemessk
		name = ukraine.278.c
		ai_chance = {
			base = 30
		}
		set_province_name = { id = 719 name = UKR_tsemessk }
		country_event = ukraine.311
	}

	option = { #rather not
		name = ukraine.273.e
		ai_chance = {
			base = 0
			modifier = {
				add = 30
				has_completed_focus = KUB_our_free_nation
			}
		}
		country_event = ukraine.311
	}
}
# Green Ukraine annexed by Ukraine
country_event = {
	id = ukraine.279
	title = ukraine.279.t
	desc = ukraine.279.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes
	
	option = {
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_opinion = { target = UKR value > 10 }
			}
			modifier = {
				factor = 2
				has_completed_focus = ZKL_our_green_ukraine
			}
			modifier = {
				factor = 2
				has_completed_focus = ZKL_union_with_ukraine
			}
		}
		name = ukraine.279.a
		effect_tooltip = {
			UKR = { annex_country = { target = ZKL } }
		}
		UKR = { 
			country_event = ukraine.280
		}
	}

	option = {
		ai_chance = {
			factor = 50
		}
		name = ukraine.279.b
		UKR = { 
			country_event = ukraine.281
		}
	}
}
# Green Ukraine joined to Ukraine
country_event = {
	id = ukraine.280
	title = ukraine.280.t
	desc = ukraine.280.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.280.a
		ZKL = {
			every_unit_leader = {
				set_nationality = UKR
			}
			if = {
				limit = { has_character = ZKL_leonid_slischenko }
				ZKL_leonid_slischenko = { set_nationality = UKR }
			}
		}
		annex_country = { target = ZKL transfer_troops = yes }
	}
}
# Green Ukraine refuses to join Ukraine
country_event = {
	id = ukraine.281
	title = ukraine.281.t
	desc = ukraine.281.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.281.a
	}
}
# Integration of Green Ukraine
country_event = {
	id = ukraine.282
	title = ukraine.282.t
	desc = ukraine.282.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.282.a
	}
}
# Pressure for romanian oil
country_event = {
	id = ukraine.283
	title = ukraine.283.t
	desc = ukraine.283.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	option = {
		name = ukraine.283.a
		ai_chance = {
			factor = 65
			modifier = {
				factor = 0.5
				any_neighbor_country = {
					OR = {
						is_in_faction_with = GER
						tag = GER
					}
				}
			}
		}
		UKR = { country_event = { id = ukraine.284 days = 1 } }
		GER = {
			add_opinion_modifier = { target = ROM modifier = embargo }
			add_opinion_modifier = { target = ROM modifier = sanctions_relations } 
			country_event = { id = ukraine.286 days = 1 }
		}
	}
	
	option = {
		name = ukraine.283.b
		ai_chance = {
			factor = 35
			modifier = {
				factor = 3
				strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
		}
		UKR = { country_event = { id = ukraine.285 days = 1 } }	
		if = {
			limit = {
				FRA = {
					NOT = { has_war_with = UKR }
					has_guaranteed = ROM
				}
			}
			FRA = { country_event = ukraine.366 }
		}	
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROM
				}
			}
		}
	}
}
# Pressure for romanian oil - Romania accept sanctions against Germany
country_event = {
	id = ukraine.284
	title = ukraine.284.t
	desc = ukraine.284.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.284.a
	}
}
# Pressure for romanian oil - Romania refuse sanctions against Germany
country_event = {
	id = ukraine.285
	title = ukraine.285.t
	desc = ukraine.285.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.285.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = ROM
		}
	}
}
# Pressure for romanian oil - Romania accept sanctions against Germany - message for Germany
country_event = {
	id = ukraine.286
	title = ukraine.286.t
	desc = ukraine.286.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.286.a
		add_ai_strategy = {
			type = antagonize
			id = "ROM"
			value = 200
		}
		add_ai_strategy = {
			type = declare_war
			id = "ROM"
			value = 200
		}
	}
}
# Support of France for socialist Ukraine (if in faction)
country_event = {
	id = ukraine.287
	title = ukraine.287.t
	desc = ukraine.287.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.287.a
		ai_chance = {
			base = 100
		}
		army_experience = 25
		add_doctrine_cost_reduction = {
			name = ukraine.289.t
			cost_reduction = 0.5
			uses = 1
			category = land_doctrine
		}
		UKR = {
			country_event = ukraine.289
			army_experience = 25
			add_doctrine_cost_reduction = {
				name = ukraine.289.t
				cost_reduction = 0.5
				uses = 1
				category = land_doctrine
			}
		}
	}
}
# Support of France for socialist Ukraine (without faction)
country_event = {
	id = ukraine.288
	title = ukraine.288.t
	desc = ukraine.288.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.288.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { has_government = communism }
			give_guarantee = FROM
			FROM = { give_guarantee = FRA } 
		}
		FROM = {
			country_event = ukraine.289
			add_relation_modifier = {
				target = FRA
				modifier = UKR_license_foreign_equipment
			}
			if = {
				limit = { NOT = { has_tech = tactical_bomber1 } }
				FRA = {
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = tac_bomber_equipment_1
					    }
					    cost_factor = 0
					}
				}
			}
			if = {
				limit = { NOT = { has_tech = CAS1 } }
				FRA = {
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = CAS_equipment_1
					    }
					    cost_factor = 0
					}
				}
			}
			if = {
				limit = { 
					NOT = { has_dlc = "No Step Back" } 
					NOT = { has_tech = basic_light_tank } 
				}
				FRA = {
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = light_tank_equipment_1
					    }
					    cost_factor = 0
					}
				}
			}
			if = {
				limit = { 
					has_dlc = "No Step Back"
					NOT = { has_tech = basic_light_tank_chassis } 
				}
				FRA = {
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = light_tank_chassis_1
					    }
					    cost_factor = 0
					}
				}
			}
		}
	}

	option = {
		name = ukraine.288.b
		ai_chance = {
			base = 0
			modifier = {
				add = 25
				threat < 0.25
			}
		}
		FROM = {
			country_event = ukraine.290
		}
	}
}
# Support of France for socialist Ukraine - accept
country_event = {
	id = ukraine.289
	title = ukraine.289.t
	desc = ukraine.289.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.289.a
		effect_tooltip = {
			if = {
				limit = { 
					NOT = { is_in_faction_with = FRA } 
				}
				FRA = {
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = tac_bomber_equipment_1
					    }
					    cost_factor = 0
					}
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = CAS_equipment_1
					    }
					    cost_factor = 0
					}
					create_production_license = {
					    target = UKR
					    equipment = {
					        type = light_tank_equipment_1
					    }
					    cost_factor = 0
					}
				}
			}
			else = {
				army_experience = 25
				add_doctrine_cost_reduction = {
					name = ukraine.289.t
					cost_reduction = 0.5
					uses = 1
					category = land_doctrine
				}
			}
		}
		if = {
			limit = {
				has_dlc = "Arms Against Tyranny"
			}
			add_equipment_subsidy = {
				cic = 500
				equipment_type = small_plane_airframe
				seller_tags = { FRA }
			}
			add_equipment_subsidy = {
				cic = 500
				equipment_type = light_tank_chassis
				seller_tags = { FRA }
			}
		}	
	}
}
# Support of France for socialist Ukraine - decline
country_event = {
	id = ukraine.290
	title = ukraine.290.t
	desc = ukraine.290.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.290.a
	}
}
# Defection of Vlasov - message for Ukraine
country_event = {
	id = ukraine.291
	title = ukraine.291.t
	desc = ukraine.291.d
	picture = GFX_report_event_vlasov
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.291.a
	}
}
# Defection of Vlasov - USSR
country_event = {
	id = ukraine.292
	title = ukraine.292.t
	desc = ukraine.292.d
	picture = GFX_report_event_vlasov
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.292.a
		SOV_andrey_vlasov = { set_nationality = FROM }
		add_timed_idea = {
			idea = SOV_traitors_among_high_command
			days = 15
		}
	}
}
# Opposition of orthodox activists
country_event = {
	id = ukraine.293
	title = ukraine.293.t
	desc = ukraine.293.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = UKR
		has_government = communism
		has_completed_focus = UKR_free_high_school
		NOT = { has_idea = UKR_atheistic_society }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		name = ukraine.293.a
		add_ideas = UKR_church_opposition
	}
}
# Anti-religious campaign - church lands
country_event = {
	id = ukraine.294
	title = ukraine.294.t
	desc = ukraine.294.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.294.a
		ai_chance = {
			factor = 100
		}
		add_stability = -0.02
		add_popularity = {
			ideology = communism
			popularity = 0.03
		}
		every_owned_state = {
			limit = {
				state_population > 1400000
			}
			add_extra_state_shared_building_slots = 1
		}
	}

	option = {
		name = ukraine.294.b
		ai_chance = {
			factor = 0
		}
		add_political_power = -50
	}
}
# Anti-religious campaign - anti-religious museum
country_event = {
	id = ukraine.295
	title = ukraine.295.t
	desc = ukraine.295.d
	picture = GFX_report_event_anti_religious_museum

	trigger = {
		202 = { is_owned_and_controlled_by = UKR }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.295.a
		add_political_power = 25
	}
}
# Anti-religious campaign - religious organizations
country_event = {
	id = ukraine.296
	title = ukraine.296.t
	desc = ukraine.296.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = { #allow
		name = ukraine.296.a
		ai_chance = {
			factor = 0
		}
		add_political_power = -50
		add_popularity = {
			ideology = communism
			popularity = -0.03
		}
	}

	option = { #regulate
		name = ukraine.296.b
		ai_chance = {
			factor = 100
		}
		add_political_power = -25
		add_war_support = 0.01
		add_stability = 0.01
	}

	option = { #suppress
		name = ukraine.296.c
		ai_chance = {
			factor = 0
		}
		add_political_power = 75
		add_war_support = -0.01
		add_stability = -0.01
	}
}
# Anti-religious campaign - church property
country_event = {
	id = ukraine.297
	title = ukraine.297.t
	desc = ukraine.297.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.297.a
		ai_chance = {
			factor = 100
		}
		add_timed_idea = {
			idea = UKR_requisitioned_church_property
			days = 365
		}
		add_war_support = -0.02
		add_stability = -0.02
	}

	option = {
		name = ukraine.297.b
		ai_chance = {
			factor = 0
		}
		add_political_power = -25
	}
}
# Kuzma's mother
country_event = {
	id = ukraine.298
	title = ukraine.298.t
	desc = ukraine.298.d
	picture = GFX_report_event_nukes_speach

	trigger = {
		tag = UKR
		has_government = communism
		has_country_leader = { character = UKR_nikita_khrushchev ruling_only = yes }
		has_tech = nukes
		has_war = yes
	}

	fire_only_once = yes

	mean_time_to_happen = {	days = 3	}

	option = {
		name = ukraine.298.a
		add_war_support = 0.05
		add_country_leader_trait = wunderwaffe_lobbyist
	}
}
# Integration of Moldova
country_event = {
	id = ukraine.299
	title = ukraine.299.t
	desc = ukraine.299.d

	is_triggered_only = yes

	option = {
		name = ukraine.299.a #occupation
		ai_chance = {
			factor = 25
		}
		if = {
			limit = { 
				MOL = { is_puppet_of = ROOT } 
			}
			annex_country = { target = MOL }
		}
		add_political_power = -50
		78 = { 
			add_compliance = 15
		}
	}
	option = {
		name = ukraine.299.b #puppet
		ai_chance = {
			factor = 25
		}
		if = { 
			limit = { 766 = { is_owned_and_controlled_by = UKR } }
			MOL = { remove_state_core = 766 }
		}
		if = {
			limit = { 80 = { is_owned_and_controlled_by = MOL } }
			transfer_state = 80
		}
		if = {
			limit = { MOL = { exists = no } }
			release_puppet = MOL
		}
		MOL = {
			set_cosmetic_tag = MOL_AUT
		}
	}
	option = {
		name = ukraine.299.c #integration with population exchange
		trigger = {
			NOT = { has_country_flag = UKR_romania_reject_exchange }
			ROM = {
	 			exists = yes
	 			has_capitulated = no
	 			NOT = { has_war_with = UKR }
	 			controls_state = 79
	 		}
		}
		ai_chance = {
			factor = 50
		}
		ROM = {
			country_event = { id = ukraine.300 days = 1 }
		}
	}
}
# Exchange of moldavian population for Romania
country_event = {
	id = ukraine.300
	title = ukraine.300.t
	desc = ukraine.300.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.300.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 1.5
				is_in_faction_with = UKR
			}
		}
		UKR = { country_event = { id = ukraine.301 } }
		effect_tooltip = {
			78 = {
				add_manpower = -150000
			}
			79 = {
				add_manpower = 150000
			}
		}
	}
	
	option = {
		name = ukraine.300.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
			modifier = {
				factor = 0
				is_puppet = yes
			}
		}
		UKR = { country_event = { id = ukraine.302 } }		
	}
}
# Romania accept exchange of population
country_event = {
	id = ukraine.301
	title = ukraine.301.t
	desc = ukraine.301.d
	picture = GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.301.a
		78 = {
			add_manpower = -150000
		}
		79 = {
			add_manpower = 150000
		}
		hidden_effect = {
			country_event = { id = ukraine.303 days = 180 }
		}
	}
}
# Romania reject exchange of population
country_event = {
	id = ukraine.302
	title = ukraine.302.t
	desc = ukraine.302.d
	picture = GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.302.a
		set_country_flag = UKR_romania_reject_exchange
		country_event = { id = ukraine.299 }
	}
}
# Integration of Moldova after 6 mounts
country_event = {
    id = ukraine.303
    hidden = yes

    is_triggered_only = yes

	immediate = { 
		set_country_flag = UKR_moldavian_integration_is_ready
    }

}
# Request for transfer of Starodub
country_event = {
	id = ukraine.304
	title = ukraine.304.t
	desc = ukraine.304.d

	is_triggered_only = yes

	option = { 
		name = ukraine.304.a
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = ukraine.107
			transfer_state = 983 
		}

	}

	option = { 
		name = ukraine.304.b
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Bulgaria request guaranty against Romania
country_event = {
	id = ukraine.305
	title = ukraine.305.t
	desc = ukraine.305.d
	picture = GFX_report_event_romanian_soldiers

	is_triggered_only = yes

	option = { 
		name = ukraine.305.a #yes
		ai_chance = {
			factor = 70
		}
		give_guarantee = BUL
		ROM = {
			country_event = { days = 1 id = ukraine.306 }
			effect_tooltip = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = BUL
				}
				news_event = { id = news.319 days = 1 }
			}
		}
	}

	option = { 
		name = ukraine.305.b #no
		ai_chance = {
			factor = 30
		}
		BUL = { 
			set_country_flag = UKR_reject_defence_for_bulgaria
			country_event = { id = ukraine.307 }
			country_event = { id = DOD_romania.40 days = 1 }
		}
	}
}
# Bulgaria enlisted the support of Ukraine
country_event = {
	id = ukraine.306
	title = ukraine.306.t
	desc = ukraine.306.d
	picture = GFX_report_event_bulgarian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.306.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = BUL
		}
		news_event = { id = news.319 days = 1 }
	}
}
# Ukraine reject of guaranty - message for Bulgaria
country_event = {
	id = ukraine.307
	title = ukraine.307.t
	desc = ukraine.307.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.307.a
	}
}
# Forming of OSR
country_event = {
	id = ukraine.308
	title = ukraine.308.t
	desc = ukraine.308.d
	picture = GFX_report_event_soviet_japanese_pact

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = SOV }
	}
	
	option = {
		name = ukraine.26.a
		ai_chance = {
			factor = 50
			modifier = {
				#If they have a fighting chance, they should stand their ground
				factor = 0
				strength_ratio = {
					tag = SOV
					ratio > 0.75
				}
			}
		}
		remove_ideas = comintern_influence
		add_war_support = 0.05
		SOV = { 
			country_event = { id = ukraine.309 }
			effect_tooltip = { 
				OSR = {
					transfer_state = 192
					transfer_state = 197
					if = {
						limit = {
							766 = { is_owned_and_controlled_by = UKR }
						}
						transfer_state = 766
					}
				}
				UKR = { transfer_navy = { target = OSR } }
				puppet = OSR
			}
		}
	}
	
	option = {
		name = ukraine.26.b
		ai_chance = {
			factor = 50
		}
		remove_ideas = comintern_influence
		SOV = { 
			country_event = { id = ukraine.28 }
			effect_tooltip = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = UKR
				}
			}
		}
	}
	option = {
		name = ukraine.26.c
		trigger = {
			has_idea = UKR_second_rus_lang
		}
		ai_chance = {
			factor = 100
		}
		OSR = {
			add_state_core = 192
			add_state_core = 197
			if = {
				limit = {
					766 = { is_owned_and_controlled_by = UKR }
				}
				add_state_core = 766
			}
			inherit_technology = UKR
			set_research_slots = 2
		}
		release = OSR
		add_state_core = 192
		add_state_core = 197 
		transfer_navy = { target = OSR }
		puppet = OSR
		SOV = { 
			country_event = { id = ukraine.345 }
		}
	}
}
# Ukraine retread again, OSR now is puppet of USSR
country_event = {
	id = ukraine.309
	title = ukraine.309.t
	desc = ukraine.27.d
	picture = GFX_report_event_soviet_japanese_pact
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.309.a
		OSR = {
				add_state_core = 192
				add_state_core = 197
				if = {
					limit = {
						766 = { is_owned_and_controlled_by = UKR }
					}
					add_state_core = 766
				}
				inherit_technology = UKR
				set_research_slots = 2
		}
		UKR = { 
			release = OSR
			add_state_core = 192
			add_state_core = 197 
			transfer_navy = { target = OSR }
		}
		puppet = OSR
	}
}
# OSR annexed by USSR or Soviet Ukraine
country_event = {
	id = ukraine.310
	title = ukraine.310.t
	desc = ukraine.310.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = OSR
		OR = {
			NOT = {	country_exists = UKR }
			UKR = { is_puppet_of = SOV }
		}
		has_government = communism
		is_puppet_of = SOV 
		country_exists = SOV
		SOV = {
			is_puppet = no
		}
		has_war = no
	}

	fire_only_once = yes
	
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.310.a
		trigger = {
			NOT = {	country_exists = UKR }
		}
		SOV = { 
			country_event = { id = ukraine.30 }
		}
	}
	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.310.b
		trigger = {
			UKR = { is_puppet_of = SOV }
		}
		UKR = { 
			country_event = { id = ukraine.31 }
		}
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.29.c
	}
}
#Rename of Krasnodar
country_event = {
	id = ukraine.311
	title = ukraine.311.t
	desc = { 
		text = ukraine.311.desc.a
		trigger = {
			tag = UKR
		}
	}
	desc = { 
		text = ukraine.311.desc.b
		trigger = {
			tag = KUB
		}
	}	
	picture = GFX_report_event_krasnodar

	is_triggered_only = yes

	trigger = {
		OR = {
			234 = { is_owned_and_controlled_by = UKR }
			234 = { is_owned_and_controlled_by = KUB }
		}
		234 = { NOT = { has_state_flag = KUB_krasnodar_is_renamed } } #for kuban event for liners
		NOT = { has_completed_focus = UKR_coronation }
	}

	option = { #Nova Sich
		name = ukraine.311.a
		ai_chance = {
			base = 30
		}
		set_province_name = { id = 3734 name = UKR_novasich }
		234 = { set_state_flag = KUB_krasnodar_is_renamed }
	}

	option = { #Ryabovil
		name = ukraine.311.b
		ai_chance = {
			base = 40
		}
		set_province_name = { id = 3734 name = UKR_ryabovil }
		234 = { set_state_flag = KUB_krasnodar_is_renamed }
	}

	option = { #Hypanispol
		name = ukraine.311.c
		ai_chance = {
			base = 30
		}
		set_province_name = { id = 3734 name = UKR_hypanispol }
		234 = { set_state_flag = KUB_krasnodar_is_renamed }
	}

	option = { #rather not
		name = ukraine.273.e
		ai_chance = {
			base = 0
		}
	}
}
# Movement of multi-punchers
country_event = {
	id = ukraine.312
	title = ukraine.312.t
	desc = ukraine.312.d
	picture = GFX_report_event_generic_factory
	
	trigger = {
		tag = UKR
		has_government = communism
		has_country_flag = UKR_start_of_socialist_competition
		has_defensive_war = yes
		surrender_progress > 0
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7 }

	option = {
		name = ukraine.312.a
		add_timed_idea = {
			idea = UKR_mnogostanochniks
			days = 365
		}
	}
}
# Ukrainian annexation of our lands 
country_event = {
	id = ukraine.313
	title = ukraine.313.t
	desc = ukraine.313.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.313.a
	}
}
# Invite Poland to Black Sea pact with federalisation
country_event = {
	id = ukraine.314
	title = ukraine.314.t
	desc = ukraine.314.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.314.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_opinion = { target = UKR value > -25 }
			}
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0.2
			}
			modifier = {
				factor = 1.5
				UKR = { has_country_flag = UKR_consent_to_arrest_of_bandera }
			}
		}
		if = {
			limit = {
				is_faction_leader = yes
			}
			dismantle_faction = yes
		}
		UKR = { country_event = { id = ukraine.315 days = 1 } }
		effect_tooltip = {
			release_puppet = BLR
			release_puppet = WUA
			UKR = { add_to_faction = POL }
		}
	}
	
	option = {
		name = ukraine.314.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					OR = {
						is_in_faction_with = POL
						has_guaranteed = POL
					}
				}
			}
		}
		UKR = { country_event = { id = ukraine.316 days = 1 } }

		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = POL
				}
			}
		}
	}
}
# Poland join to Black Sea pact
country_event = {
	id = ukraine.315
	title = ukraine.315.t
	desc = ukraine.315.d
	picture = GFX_report_event_ukr_foreign_ministry

	is_triggered_only = yes
	
	option = {
		name = ukraine.315.a
		add_to_faction = FROM
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		add_political_power = 100
		FROM = {
			if = {
				limit = { 
					NOT = { country_exists = BLR }
					94 = { is_owned_and_controlled_by = PREV } 
				}
				release_puppet = BLR
				BLR = {
					inherit_technology = POL
					set_research_slots = 2
				}
			}
			if = {
				limit = { 
					BLR = { exists = yes }
					784 = { is_owned_and_controlled_by = PREV } 
				}
				BLR = { transfer_state = 784 }
			}
			if = {
				limit = { 
					NOT = { country_exists = WUA }
					91 = { is_owned_and_controlled_by = PREV } 
				}
				89 = { add_core_of = WUA }
				91 = { add_core_of = WUA }
				93 = { add_core_of = WUA }
				987 = { add_core_of = WUA }
				release_puppet = WUA
				UKR = { UKR_kost_levytsky = { set_nationality = WUA } }
				WUA = {
					inherit_technology = POL
					set_research_slots = 2
					set_politics = { ruling_party = democratic elections_allowed = yes }
					promote_character = UKR_kost_levytsky
					add_popularity = { ideology = democratic popularity = 0.5 }
				}
			}
		}
	}
}
# Poland refuses ukrainian proposition
country_event = {
	id = ukraine.316
	title = ukraine.316.t
	desc = ukraine.316.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.316.a
		add_state_claim = 834
		create_wargoal = {
			type = puppet_wargoal_focus
			target = POL
		}
	}
}
# Navy bonus from Ukraine for baltic countries
country_event = {
	id = ukraine.317
	title = ukraine.317.t
	desc = ukraine.317.d
	picture = GFX_report_event_ukrainian_fleet

	is_triggered_only = yes
	
	option = {
		name = ukraine.317.a
		navy_experience = 25
		add_doctrine_cost_reduction = {
			name = ukraine.317.t
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
	}
}
# Visit of Avgustyn Voloshyn
country_event = {
	id = ukraine.318
	title = ukraine.318.t
	desc = ukraine.318.d
	picture = GFX_report_event_avgustyn_voloshyn
	
	trigger = {
		tag = UKR
		73 = { is_owned_and_controlled_by = CZE }
		is_historical_focus_on = no
		is_ai = no
		date > 1936.9.1
		date < 1936.12.1
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 15	}

	option = {
		name = ukraine.318.a
		add_political_power = -25
		set_country_flag = UKR_acceptance_of_voloshyn
	}
	option = {
		name = ukraine.318.b
	}
}
# Conflict of Bolbochan with Petliura
country_event = {
	id = ukraine.319
	title = ukraine.319.t
	desc = ukraine.319.d
	picture = GFX_report_event_petro_bolbochan
	
	is_triggered_only = yes

	option = {
		name = ukraine.319.a #support Bolbochan
		ai_chance = {
			base = 50
		}
		UKR_symon_petliura = {
		 	remove_unit_leader_role = yes
		}
		add_political_power = -50
	}
	option = {
		name = ukraine.319.b #support Petliura
		ai_chance = {
			base = 50
		}
		UKR_petro_bolbochan = {
		 	remove_unit_leader_role = yes
		}
		clr_country_flag = bolbochan_goes_from_staff #Bolbochan again is available in staff
		add_command_power = -50
		army_experience = -25
	}
}
# Preventing communist threat - ukrainian ultimatum
country_event = {
	id = ukraine.320
	title = ukraine.320.t
	desc = ukraine.320.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.320.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio > 0.75
				}
			}
			modifier = {
				factor = 0.1
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROOT
				}
			}
		}
		FROM = { 
			country_event = { id = ukraine.321 days = 1 }
			effect_tooltip = { puppet = ROOT }
		}
	}
	
	option = {
		name = ukraine.320.b
		ai_chance = {
			factor = 50
		}
		FROM = { 
			country_event = { id = ukraine.322 days = 1 }
			effect_tooltip = {
				create_wargoal = {
					target = ROOT
					type = puppet_wargoal_focus
				}
			}
		}
	}
}
# Preventing communist threat - FROM accepts and is puppeted
country_event = {
	id = ukraine.321
	title = ukraine.321.t
	desc = ukraine.321.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.321.a
		puppet = FROM
	}
}
# Preventing communist threat - FROM refuses
country_event = {
	id = ukraine.322
	title = ukraine.322.t
	desc = ukraine.322.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.322.a
		if = {
			limit = { is_in_faction_with = FROM }
			remove_from_faction = FROM
		}
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}
}
# Uprising in Don - ukrainian ultimatum for SOV
country_event = {
	id = ukraine.323
	title = ukraine.323.t
	desc = { 
		text = ukraine.323.desc.a
		trigger = {
			has_government = communism
		}
	}
	desc = { 
		text = ukraine.323.desc.b
		trigger = {
			NOT = { has_government = communism }
		}
	}
	picture = GFX_report_event_cossaks_rebels

	is_triggered_only = yes

	trigger = {
		NOT = { is_in_faction_with = FROM }
		is_puppet = no
		NOT = { has_war_with = FROM }
	}

	option = {
		name = ukraine.323.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				strength_ratio = {
					tag = FROM
					ratio < 1.50
				}
			}
		}
		FROM = { 
			country_event = { id = ukraine.324 hours = 4 }
		}
	}
	
	option = {
		name = ukraine.323.b
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_war = yes
			}
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		declare_war_on = {
			target = DON
			type = annex_everything
		}
		if = {
			limit = {
				UKR = { has_country_flag = UKR_advocacy_in_don }
			}
			DON = { add_ideas = KUB_ZKL_liberation_movement }
		}
		FROM = { 
			country_event = { id = ukraine.325 hours = 4 }
		}
	}
}
# Uprising in USSR - USSR retreats
country_event = {
	id = ukraine.324
	title = ukraine.324.t
	desc = ukraine.324.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.324.a
	}
}
# Uprising in USSR - USSR resist
country_event = {
	id = ukraine.325
	title = ukraine.325.t
	desc = ukraine.325.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.325.a
	}
}
# Trotsky arrives from Mexico or Norway
country_event = {
	id = ukraine.326
	title = ukraine.326.t
	desc = ukraine.326.d
	picture = GFX_report_event_leon_trotsky
	
	is_triggered_only = yes

	option = {
		name = ukraine.326.a # We aren't Stalin's puppets, let him stay
		ai_chance = {
			factor = 1
			modifier = {
				add = 100
				has_game_rule = {
					rule = UKR_ai_behavior
					option = COMMUNIST_ALTERNATE
				}
			}
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = COMMUNIST
				}
			}
		}
		if = {
			limit = {
				SOV = {
					SOV_iosif_stalin = {
						is_country_leader = yes
					}
				}
			}
			SOV = {
				add_opinion_modifier = {
					target = ROOT
					modifier = mexico_trotskyite_wreckers
				}
			}
		}
		set_global_flag = trotsky_came_back_in_ukraine
		add_popularity = {
			ideology = communism
			popularity = 0.03
		}
		hidden_effect = {
			country_event = { id = ukraine.413 days = 15 random_days = 7 }
		}
	}
	
	option = {
		name = ukraine.326.b # Send him back
		ai_chance = {
			factor = 1
			modifier = {
				add = 100
				NOT = { 
					has_game_rule = {
						rule = UKR_ai_behavior
						option = COMMUNIST_ALTERNATE
					}
				}
			}
		}
		if = {
			limit = { # if arrived from Norway
				FROM = { tag = NOR }
			}
			NOR = {
				country_event = {
					id = AAT_norway.8
					days = 1 
				}
			}
			SOU = {
				country_event = {
					id = AAT_norway.8
					days = 1 
				}
			}
		}
		else = { # if arrived from Mexico
			SOV = {
				country_event = {
					id = mexico.21
					days = 1
				}
			}
		}
	}
}
# Uprising in Kuban - ukrainian ultimatum for SOV
country_event = {
	id = ukraine.327
	title = ukraine.327.t
	desc = { 
		text = ukraine.327.desc.a
		trigger = {
			has_government = communism
		}
	}
	desc = { 
		text = ukraine.327.desc.b
		trigger = {
			NOT = { has_government = communism }
		}
	}
	picture = GFX_report_event_cossaks_rebels

	is_triggered_only = yes

	trigger = {
		NOT = { is_in_faction_with = FROM }
		is_puppet = no
		NOT = { has_war_with = FROM }
	}

	option = {
		name = ukraine.323.a
		ai_chance = {
			base = 0
			modifier = {
				add = 10
				strength_ratio = {
					tag = FROM
					ratio < 1.50
				}
			}
		}
		FROM = { 
			country_event = { id = ukraine.324 hours = 4 }
		}
	}
	
	option = {
		name = ukraine.323.b
		ai_chance = {
			base = 100
			modifier = {
				factor = 0.5
				has_war = yes
			}
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		declare_war_on = {
			target = KUB
			type = annex_everything
		}
		if = {
			limit = {
				UKR = { has_country_flag = UKR_advocacy_in_kuban }
			}
			KUB = { add_ideas = KUB_ZKL_liberation_movement }
		}
		FROM = { 
			country_event = { id = ukraine.325 hours = 4 }
		}
	}
}
# Ukrainian treaty with Japan against USSR
country_event = {
	id = ukraine.328
	title = ukraine.328.t
	desc = ukraine.328.d
	picture = GFX_report_event_ukrainian_fleet

	is_triggered_only = yes

	option = {
		name = ukraine.328.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				SOV = { surrender_progress > 0.5 }
			}
		}
		trigger = { 
			NOT = { has_war_with = SOV } 
			NOT = { is_in_faction_with = SOV } 
		}
		diplomatic_relation = {
			country = SOV
			relation = non_aggression_pact
			active = no
		}
		create_wargoal = {
			type = take_state_focus
			target = SOV
			generator = { 408 409 560 655 657 }
		}
		FROM = { 
			country_event = { id = ukraine.329 days = 1 }
		}
	}
	
	option = {
		name = ukraine.328.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		FROM = { 
			country_event = { id = ukraine.330 days = 1 }
		}
	}
	option = {
		name = ukraine.328.c
		ai_chance = {
			factor = 20
			modifier = {
				factor = 3
				surrender_progress > 0.1
			}
			modifier = {
				factor = 0.5
				has_government = neutrality
			}
		}
		FROM = { 
			country_event = { id = ukraine.331 days = 1 }
		}
	}
}
# Ukrainian treaty with Japan against USSR - full treaty
country_event = {
	id = ukraine.329
	title = ukraine.329.t
	desc = ukraine.329.d
	picture = GFX_report_event_japanese_reply

	is_triggered_only = yes
	
	option = {
		name = ukraine.329.a
		navy_experience = 25
		add_doctrine_cost_reduction = {
			name = ukraine.329.t
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
	}
}
# Ukrainian treaty with Japan against USSR - limited treaty
country_event = {
	id = ukraine.330
	title = ukraine.330.t
	desc = ukraine.330.d
	picture = GFX_report_event_japanese_reply

	is_triggered_only = yes
	
	option = {
		name = ukraine.330.a
		navy_experience = 25
		add_doctrine_cost_reduction = {
			name = ukraine.329.t
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
	}
}
# Ukrainian treaty with Japan against USSR - fail
country_event = {
	id = ukraine.331
	title = ukraine.331.t
	desc = ukraine.331.d
	picture = GFX_report_event_japanese_reply

	is_triggered_only = yes
	
	option = {
		name = ukraine.331.a
	}
}
# Oil concession for Persia/Iraq
country_event = {
	id = ukraine.332
	title = ukraine.332.t
	desc = ukraine.332.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.332.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				FROM = {
					has_army_manpower = { size > 549999 }
				}
			}
			modifier = {
				factor = 2
				FROM = {
					has_navy_size = { size > 14 } 
				}
			}
		}
		if = {
			limit = { tag = PER }
			give_resource_rights = { receiver = FROM state = 411 }
			411 = { set_state_flag = UKR_oil_concession }
		}
		else = {
			give_resource_rights = { receiver = FROM state = 676 }
			676 = { set_state_flag = UKR_oil_concession }
		}
		FROM = { 
			country_event = { id = ukraine.333 }
		}
	}
	
	option = {
		name = ukraine.332.b
		ai_chance = {
			factor = 50
		}
		FROM = { 
			country_event = { id = ukraine.334 days = 1 }
		}
	}
}
# Oil concession for Persia/Iraq - accept, message for Ukraine
country_event = {
	id = ukraine.333
	title = ukraine.333.t
	desc = ukraine.333.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.333.a
		send_equipment = {
			target = FROM
			type = infantry_equipment
			amount = 2000
		} 
		send_equipment = {
			target = FROM
			type = artillery_equipment
			amount = 200
		} 
		send_equipment = {
			target = FROM
			type = support_equipment
			amount = 300
		} 
		if = {
			limit = { NOT = { has_country_flag = UKR_research_for_concession } }
			add_tech_bonus = {
				name = ukraine.333.t
				bonus = 1.0
				uses = 1
				category = excavation_tech
			}
			set_country_flag = UKR_research_for_concession
		}
	}
}
# Oil concession for Persia/Iraq - decline, message for Ukraine
country_event = {
	id = ukraine.334
	title = ukraine.334.t
	desc = ukraine.334.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.334.a
	}
}
# Purchase of Kuwait - choice for GB
country_event = {
	id = ukraine.335
	title = ukraine.335.t
	desc = ukraine.335.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.335.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		add_offsite_building = { type = industrial_complex level = 8 }
		FROM = {
			effect_tooltip = {
				transfer_state = 656
			}
			country_event = { id = ukraine.336 }
		}
	}
	
	option = {
		name = ukraine.335.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < -10 }
			}
		}
		FROM = { 
			country_event = { id = ukraine.337 }
		}
	}
}
# Purchase of Kuwait - accept, message for Ukraine
country_event = {
	id = ukraine.336
	title = ukraine.336.t
	desc = ukraine.336.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.336.a
		transfer_state = 656
		set_country_flag = UKR_purchase_of_kuwait_accepted
		activate_decision = UKR_tax_for_kuwait
	}
}
# Purchase of Kuwait - decline, message for Ukraine
country_event = {
	id = ukraine.337
	title = ukraine.337.t
	desc = ukraine.337.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.337.a
	}
}
# Uprising in Belarus - ukrainian ultimatum for SOV
country_event = {
	id = ukraine.338
	title = ukraine.338.t
	desc = { 
		text = ukraine.338.desc.a
		trigger = {
			has_government = communism
		}
	}
	desc = { 
		text = ukraine.338.desc.b
		trigger = {
			NOT = { has_government = communism }
		}
	}
	picture = GFX_report_event_generic_battle

	is_triggered_only = yes

	trigger = {
		NOT = { is_in_faction_with = FROM }
		is_puppet = no
		NOT = { has_war_with = FROM }
	}

	option = {
		name = ukraine.338.a
		ai_chance = {
			base = 10
			modifier = {
				add = 10
				strength_ratio = {
					tag = FROM
					ratio < 1.50
				}
			}
		}
		FROM = { 
			country_event = { id = ukraine.324 hours = 4 }
		}
	}
	
	option = {
		name = ukraine.338.b
		ai_chance = {
			base = 90
			modifier = {
				factor = 0.5
				has_war = yes
			}
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		declare_war_on = {
			target = BLR
			type = annex_everything
		}
		if = {
			limit = {
				UKR = { has_country_flag = UKR_advocacy_in_blr }
			}
			BLR = { add_ideas = KUB_ZKL_liberation_movement }
		}
		FROM = { 
			country_event = { id = ukraine.325 hours = 4 }
		}
	}
}
# Reinforce sanitary cordon - FROM accept treaty, message for Ukraine
country_event = {
	id = ukraine.339
	title = ukraine.339.t
	desc = ukraine.339.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes

	option = {
		name = ukraine.339.a
	}
}
# The Black Sea strategy - description
country_event = {
	id = ukraine.340
	title = ukraine.340.t
	desc = ukraine.340.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	option = {
		name = ukraine.340.a
	}
}
# Promote Kristina Sushko as general
unit_leader_event = {
	id = ukraine.341
	title = ukraine.341.t
	desc = ukraine.341.d

	is_triggered_only = yes

	option = {
		name = ukraine.341.a
		ai_chance = {
			base = 100
		}
		set_country_flag = UKR_kristina_promoted
		add_command_power = -15
	}
	option = {
		name = ukraine.341.b
		ai_chance = {
			base = 0
		}
	}
}
# First election for democratic
country_event = {
	id = ukraine.342
	title = ukraine.342.t
	desc = ukraine.342.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	trigger = {
		original_tag = UKR
		has_government = democratic
		date > 1939.1.1
		date < 1940.1.1
	}

	option = { 	
		name = ukraine.342.a #current leader
		ai_chance = {
			factor = 75
		}		
	}

	option = { 
		name = ukraine.342.b #Mazepa
		ai_chance = {
			factor = 25
		}		
		add_political_power = 120
		promote_character = {
			character = UKR_isaak_mazepa
			ideology = socialism
		}
	}
}
# Regular elections for socialist
country_event = {
	id = ukraine.343
	title = ukraine.343.t
	desc = ukraine.343.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	trigger = {
		original_tag = UKR
		has_government = communism
		has_completed_focus = UKR_humane_communism
	}

	option = { 	
		name = ukraine.343.a #Vynnychenko
		trigger = {
			UKR_volodymyr_vynnychenko = {
				is_country_leader = no 
			}
		}
		ai_chance = {
			factor = 50
		}
		add_political_power = 120
		promote_character = UKR_volodymyr_vynnychenko
	}

	option = { 
		name = ukraine.343.b #Mazepa
		trigger = {
			UKR_isaak_mazepa = {
				is_country_leader = no 
			}
		}
		ai_chance = {
			factor = 25
		}
		add_political_power = 120
		promote_character = {
			character = UKR_isaak_mazepa
			ideology = marxism
		}
	}

	option = { 
		name = ukraine.343.c #Shumskyi
		trigger = {
			UKR_oleksander_shumskyi = {
				is_country_leader = no 
			}
		}
		ai_chance = {
			factor = 25
		}
		add_political_power = 120
		promote_character = UKR_oleksander_shumskyi
	}

	option = { 
		name = ukraine.343.e #Trotsky
		trigger = { 
			has_global_flag = trotsky_came_back_in_ukraine 
			has_character = UKR_lev_trotsky
			SOV = { SOV_lev_trotsky = { is_country_leader = no } } 
			MEX = { MEX_leon_trotsky = { is_country_leader = no } } 
			UKR_lev_trotsky = {	is_country_leader = no	}

		}
		ai_chance = {
			factor = 0
		}	
		add_political_power = 120
		promote_character = UKR_lev_trotsky
		if = {
			limit = {
				SOV = {
					has_completed_focus = SOV_the_centre
					has_government = communism
				}
			}
			SOV = {
				add_ai_strategy = {
					type = antagonize
					id = UKR
					value = 200
				}
				add_ai_strategy = {
					type = declare_war
					id = UKR
					value = 200
				}
			}	
		}
	}
}
# Language reform
country_event = {
	id = ukraine.344
	title = ukraine.344.t
	desc = ukraine.344.d
	picture = GFX_report_event_worker_protests
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.344.a
		ai_chance = {
			base = 25
		}
		add_timed_idea = {
			idea = UKR_forced_ukrainization
			days = 1825
		}
		add_stability = 0.05
		add_war_support = 0.05
		remove_ideas = UKR_language_question
		if = { limit = { has_government = democratic } 
			UKR_rada_small_opposition = yes
		}
	}
	option = {
		name = ukraine.344.b
		ai_chance = {
			base = 50
		}
		add_political_power = -50
		remove_ideas = UKR_language_question
	}
	option = {
		name = ukraine.344.c
		ai_chance = {
			base = 0
			modifier = {
				add = 25
				SOV = {
					has_country_leader = { character = SOV_iosif_stalin ruling_only = yes }
				}
			}
		}
		add_political_power = -100
		add_ideas = UKR_second_rus_lang
		set_country_flag = UKR_russian_as_state_language_flag
		remove_ideas = UKR_language_question
		SOV = { add_opinion_modifier = { target = UKR modifier = UKR_status_of_russian_language } }
		if = { limit = { has_government = democratic } 
			UKR_rada_big_opposition = yes
		}
		custom_effect_tooltip = UKR_bonuses_from_second_language
	}
}
# Ukraine agreed with the rebels (with second language law) - message for USSR
country_event = {
	id = ukraine.345
	title = ukraine.345.t
	desc = ukraine.345.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.345.a
	}
}
#Rename of Stalingrad
country_event = {
	id = ukraine.346
	title = ukraine.346.t
	desc = ukraine.346.d
	picture = GFX_report_event_stalingrad

	fire_only_once = yes

	trigger = {
		tag = UKR
		217 = { NOT = { has_state_flag = UKR_stalingrad_is_renamed } }
		NOT = { has_completed_focus = UKR_coronation }
		UKR = {
			owns_state = 217
			controls_state = 217
		}
	}

	option = { #Tsaritsyn
		name = ukraine.346.a
		ai_chance = {
			base = 30
		}
		217 = { set_state_name = UKR_tsaritsyn }
		set_province_name = { id = 3529 name = UKR_tsaritsyn }
	}

	option = { #Volgograd
		name = ukraine.346.b
		ai_chance = {
			base = 40
		}
		217 = { set_state_name = UKR_volgograd }
		set_province_name = { id = 3529 name = UKR_volgograd }
	}

	option = { #Skoropadsk
		name = ukraine.346.c
		ai_chance = {
			base = 30
		}
		217 = { set_state_name = UKR_skoropadsk }
		set_province_name = { id = 3529 name = UKR_skoropadsk }
	}

	option = { #rather not
		name = ukraine.88.b
		ai_chance = {
			base = 0
		}
	}
}
# Experince bonus for WUA and BLR with Black sea strategy decisions
country_event = {
	id = ukraine.347
	title = ukraine.347.t
	desc = ukraine.347.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.347.a
		army_experience = 25
		add_doctrine_cost_reduction = {
			name = ukraine.347.t
			cost_reduction = 0.5
			uses = 1
			category = land_doctrine
		}
	}
}
# True split of Bukovina and Bessarabia - decision for Romania
country_event = {
	id = ukraine.348
	title = ukraine.348.t
	desc = ukraine.348.d
	picture = GFX_report_event_generic_conference

	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = UKR }
	}
	
	option = {
		name = ukraine.348.a
		ai_chance = {
			factor = 65
		}
		UKR = { country_event = { id = ukraine.349 days = 1 } }
	}
	
	option = {
		name = ukraine.348.b
		ai_chance = {
			factor = 35
			modifier = {
				factor = 3
				strength_ratio = {
					tag = UKR
					ratio > 1
				}
			}
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		UKR = { country_event = { id = ukraine.350 days = 1 } }		
		effect_tooltip = {
			UKR = {
				add_state_claim = 80
				add_state_claim = 766
				create_wargoal = {
					type = take_state_focus
					target = ROM
					generator = { 80 766 }
				}
			}
		}
	}
}
#Romania accept split
country_event = {
	id = ukraine.349
	title = ukraine.349.t
	desc = ukraine.349.d
	picture = GFX_report_event_war_occupation_of_bukovina_and_bessarabia1
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.349.a
		give_guarantee = ROM
		transfer_state = 80
		transfer_state = 766
	}
}
#Romania reject split
country_event = {
	id = ukraine.350
	title = ukraine.350.t
	desc = ukraine.350.d
	picture = GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.350.a
		ai_chance = {
			factor = 40
		}
		custom_effect_tooltip = UKR_additional_decisions
		set_country_flag = UKR_moldavian_project_enable
		hidden_effect = {
			78 = {
				set_state_flag = {
					flag = UKR_discovered_infiltration
					value = 0
				}
			}
			79 = {
				set_state_flag = {
					flag = UKR_discovered_infiltration
					value = 0
				}
			}
			80 = {
				set_state_flag = {
					flag = UKR_discovered_infiltration
					value = 0
				}
			}
			766 = {
				set_state_flag = {
					flag = UKR_discovered_infiltration
					value = 0
				}
			}
		}
	}
	option = {
		name = ukraine.350.b
		ai_chance = {
			factor = 60
		}
		trigger = {
			HUN = { 
				exists = yes
				is_puppet = no
				NOT = { is_in_faction_with = ROM } 
				NOT = { is_in_faction_with = UKR } 
				NOT = { has_war_with = ROM }
			}
			76 = {
				is_owned_and_controlled_by = ROM
			}
		}
		HUN = { country_event = { id = ukraine.132 days = 1 } }
		if = {
			limit = {
				BUL = { 
					exists = yes
					is_puppet = no
					NOT = { is_in_faction_with = ROM } 
					NOT = { is_in_faction_with = UKR } 
					NOT = { has_war_with = ROM }
				}
				77 = {
					is_owned_and_controlled_by = ROM
				}
			}
			BUL = { country_event = { id = ukraine.133 days = 2 } }	
		}
		if = {
			limit = {
				FRA = {
					NOT = { has_war_with = UKR }
					has_guaranteed = ROM
				}
			}
			FRA = { country_event = ukraine.366 }
		}
		add_state_claim = 80
		add_state_claim = 766
		create_wargoal = {
			type = take_state_focus
			target = ROM
			generator = { 80 766 }
		}
	}
}
#Puppeting ally for internationalism - stage 1
country_event = {
	id = ukraine.351
	title = ukraine.351.t
	desc = ukraine.351.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.351.a
		ai_chance = {
			factor = 90
		}
		set_rule = { can_not_declare_war = yes }
		set_country_flag = UKR_puppeting_stage1
		FROM = { country_event = ukraine.352 }
	}
	option = {
		name = ukraine.351.b
		ai_chance = {
			factor = 10
		}
		FROM = { country_event = ukraine.353 }
	}
}
#Puppeting ally for internationalism - FROM accept this stage
country_event = {
	id = ukraine.352
	title = ukraine.352.t
	desc = ukraine.352.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.352.a
	}
}
#Puppeting ally for internationalism - FROM decline this stage
country_event = {
	id = ukraine.353
	title = ukraine.353.t
	desc = ukraine.353.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.353.a
	}
}
#Puppeting ally for internationalism - stage 2
country_event = {
	id = ukraine.354
	title = ukraine.354.t
	desc = ukraine.354.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.354.a
		ai_chance = {
			factor = 90
		}
		set_rule = { can_decline_call_to_war = no }
		set_country_flag = UKR_puppeting_stage2
		FROM = { country_event = ukraine.352 }
	}
	option = {
		name = ukraine.354.b
		ai_chance = {
			factor = 10
		}
		FROM = { country_event = ukraine.353 }
	}
}
#Puppeting ally for internationalism - stage 3, final
country_event = {
	id = ukraine.355
	title = ukraine.355.t
	desc = ukraine.355.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.355.a
		ai_chance = {
			factor = 90
		}
		set_country_flag = UKR_puppeting_stage3
		FROM = { country_event = ukraine.356 }
	}
	option = {
		name = ukraine.355.b
		ai_chance = {
			factor = 10
		}
		FROM = { country_event = ukraine.353 }
	}
}
#Puppeting ally for internationalism - final stage for Ukraine
country_event = {
	id = ukraine.356
	title = ukraine.356.t
	desc = ukraine.356.d
	picture	= GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.356.a
		puppet = FROM
		hidden_effect = {
			set_autonomy = {
				target = FROM
				autonomous_state = autonomy_dominion
				freedom_level = 0.5
			}
		}
	}
}
#Romania declare war Moldavian rebels and Ukraine
country_event = {
	id = ukraine.357
	title = ukraine.357.t
	desc = ukraine.357.d
	picture	= GFX_report_event_romanian_soldiers
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.357.a
		declare_war_on = {
			target = MOL
			type = take_state
			generator = { 78 79 80 766 }
		}
	}
}
# dispatcher event for Rada
country_event = {
	id = ukraine.358
	hidden = yes
	is_triggered_only = yes
	trigger = {
		tag = UKR
		has_government = democratic
		NOT = { has_country_flag = UKR_altdem_army_victory }
	}

	immediate = {
		random_list = {
			45 = { 
				modifier = {
					NOT = { rada_medium_support_trigger = yes }
					factor = 1.25
				}
				modifier = {
					NOT = { rada_low_support_trigger = yes }
					factor = 2
				}
				country_event = { id = ukraine.359 days = 15 random_days = 6 } #small support
			} 
			55 = { 
				country_event = { id = ukraine.360 days = 20 random_days = 6 } #small opposition 
			} 
		}
	}
}
#small support event in Rada
country_event = {
	id = ukraine.359
	title = ukraine.359.t
	desc = ukraine.359.d
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes
	trigger = {
		tag = UKR
		has_government = democratic
	}

	option = {
		name = ukraine.359.a
		UKR_rada_small_support = yes
		hidden_effect = {
			country_event = { id = ukraine.358 days = 80 random_days = 10 }
		}
	}

}
#small opposition event in Rada
country_event = {
	id = ukraine.360
	title = ukraine.360.t
	desc = ukraine.360.d
	picture = GFX_report_event_journalists_speech

	is_triggered_only = yes
	
	trigger = {
		tag = UKR
		has_government = democratic
	}

	option = {
		name = ukraine.360.a
		UKR_rada_small_opposition = yes
		hidden_effect = {
			country_event = { id = ukraine.358 days = 80 random_days = 10 }
		}
	}

}
#Crimea annexed after win in border conflict
country_event = {
	id = ukraine.361
	title = ukraine.361.t
	desc = ukraine.361.d
	picture = GFX_report_event_generic_peaceful_annexation

	
	is_triggered_only = yes

	option = {
		name = ukraine.361.a
		annex_country = { target = CRM }
	}
}
#Lose of border conflict with Crimea
country_event = {
	id = ukraine.362
	title = ukraine.362.t
	desc = ukraine.362.d
	picture = GFX_report_event_001
	
	is_triggered_only = yes

	option = {
		name = ukraine.362.a
		army_experience = 25
	}
}
#Border conflict with Crimea - alert for CRM
country_event = {
	id = ukraine.363
	title = ukraine.363.t
	desc = ukraine.363.d
	picture = GFX_report_event_bunker_01
	
	is_triggered_only = yes

	option = {
		name = ukraine.363.a
	}
}
# Pay for credits
country_event = {
	id = ukraine.364
	title = ukraine.364.t
	desc = ukraine.364.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes

	option = {
		name = ukraine.364.a
		ai_chance = {
			base = 100
		}
		activate_decision = UKR_pay_credits
	}
	option = {
		name = ukraine.364.b
		ai_chance = {
			base = 0
		}
		activate_decision = UKR_forced_pay_credits
	}
	option = {
		name = ukraine.364.c
		ai_chance = {
			base = 0
		}
		add_political_power = -25
		add_stability = -0.01
		country_event = { id = ukraine.364 days = 90 }
	}
}
# Project of Rzeczpospolita - choice of form of government
country_event = {
	id = ukraine.365
	title = ukraine.365.t
	desc = ukraine.365.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes

	option = {
		name = ukraine.365.a
		ai_chance = {
			base = 33
		}
		set_country_flag = UKR_project_of_rp_parliament
	}
	option = {
		name = ukraine.365.b
		ai_chance = {
			base = 33
		}
		set_country_flag = UKR_project_of_rp_president
	}
	option = {
		name = ukraine.365.c
		ai_chance = {
			base = 33
		}
		set_country_flag = UKR_project_of_rp_king
	}
}
# Still FRA guarantees for ROM in future conflict with UKR
country_event = {
	id = ukraine.366
	title = ukraine.366.t
	desc = ukraine.366.d
	picture = GFX_report_event_romania_parliament
	
	is_triggered_only = yes

	option = {
		name = ukraine.366.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				threat > 0.25
			}
		}
		if = {
			limit = {
				country_exists = DKR
				DKR = { 
					has_government = neutrality 
					has_completed_focus = DKR_go_across_prut
				}
			}
			DKR = { country_event = { id = ukraine.367 hours = 4 } }
		}
		else = {
			UKR = { country_event = { id = ukraine.367 hours = 4 } }
		}
		
		ROM = { country_event = { id = ukraine.367 hours = 4 } }
	}
	option = {
		name = ukraine.366.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				surrender_progress > 0 
			}
			modifier = {
				factor = 1.5
				has_stability < 0.25
			}
			modifier = {
				factor = 1.5
				has_war_support < 0.25
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = UKR
				}
			}
		}
		diplomatic_relation = {
			country = ROM
			relation = guarantee
			active = no
		}
		if = {
			limit = {
				country_exists = DKR
				DKR = { 
					has_government = neutrality 
					has_completed_focus = DKR_go_across_prut
				}
			}
			DKR = { country_event = { id = ukraine.368 hours = 4 } }
		}
		else = {
			UKR = { country_event = { id = ukraine.368 hours = 4 } }
		}
		ROM = { country_event = { id = ukraine.368 hours = 4 } }
	}
}
# France confirms its guarantees
country_event = {
	id = ukraine.367
	title = ukraine.367.t
	desc = ukraine.367.d
	picture = GFX_report_event_pierre_laval
	
	is_triggered_only = yes

	option = {
		trigger = { 
			OR = {
				tag = UKR 
				tag = DKR
			}
		}
		name = ukraine.367.a
	}
	option = {
		trigger = { tag = ROM }
		name = ukraine.367.b
	}
}
# France refuses from guarantees
country_event = {
	id = ukraine.368
	title = ukraine.368.t
	desc = ukraine.368.d
	picture = GFX_report_event_pierre_laval
	
	is_triggered_only = yes

	option = {
		trigger = { 
			OR = {
				tag = UKR 
				tag = DKR
			}
		}
		name = ukraine.368.a
	}
	option = {
		trigger = { tag = ROM }
		name = ukraine.368.b
	}
}
# Second election for democratic
country_event = {
	id = ukraine.369
	title = ukraine.369.t
	desc = ukraine.369.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	trigger = {
		original_tag = UKR
		has_government = democratic
		date > 1944.1.1
		date < 1945.1.1
	}

	option = { 	
		name = ukraine.369.a #stay current
		ai_chance = {
			factor = 75
		}		
	}

	option = { 
		name = ukraine.369.b #Prokopovich
		ai_chance = {
			factor = 25
		}		
		add_political_power = 120
		promote_character = UKR_vyacheslav_prokopovych
	}
}
# Parliament majority (feat Roanok)
country_event = {
	id = ukraine.370
	title = ukraine.370.t
	desc = ukraine.370.d
	picture = GFX_report_event_ukrainian_state_rada
	
	trigger = {
		tag = UKR
		has_government = democratic
		has_completed_focus = UKR_lustration
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.370.a # socialistic bloc
		UKR_rada_small_support = yes
		add_stability = 0.05
		add_popularity = {
			ideology = communism
			popularity = 0.05
		}		
	}
	option = {
		name = ukraine.370.b # nationalistic bloc
		UKR_rada_small_support = yes
		add_war_support = 0.05
		add_popularity = {
			ideology = fascism
			popularity = 0.05
		}		
	}
	option = {
		name = ukraine.370.c # unity of democrats
		add_political_power = 50
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}		
	}
}
# Pressure on Crimea for democrats
country_event = {
	id = ukraine.371
	title = ukraine.371.t
	desc = ukraine.371.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.371.a
		ai_chance = {
			base = 100
		}
		add_stability = 0.05
		UKR = { country_event = { id = ukraine.372 hours = 4 } }
	}
	option = {
		name = ukraine.371.b
		ai_chance = {
			base = 0
		}
		add_political_power = -150
		UKR = { country_event = { id = ukraine.373 hours = 4 } }
	}
}
# Pressure on Crimea for democrats - Crimea accept
country_event = {
	id = ukraine.372
	title = ukraine.372.t
	desc = ukraine.372.d
	picture = GFX_report_event_crimea_leaders
	
	is_triggered_only = yes

	option = {
		name = ukraine.372.a
		puppet = CRM
		hidden_effect = {
			set_autonomy = {
				target = CRM
				autonomous_state = autonomy_dominion
				freedom_level = 0.5
			}
		}
	}
}
# Pressure on Crimea for democrats - Crimea reject, only guarantees
country_event = {
	id = ukraine.373
	title = ukraine.373.t
	desc = ukraine.373.d
	picture = GFX_report_event_crimea_leaders
	
	is_triggered_only = yes

	option = {
		name = ukraine.373.a
		give_guarantee = CRM
	}
}
# Armed resistance in Malopolska Wschodnia
country_event = {
	id = ukraine.374
	title = ukraine.374.t
	desc = ukraine.374.d
	picture = GFX_report_event_dead_soldiers
	
	is_triggered_only = yes

	option = {
		name = ukraine.374.a #hard reaction
		ai_chance = {
			factor = 55
		}
		add_manpower = -25
		random_list = {
			33 = {
				89 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			34 = {
				91 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			33 = {
				93 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
		}
		add_to_variable = { ukr_poland_reaction_for_sabotages_var = 1 }
		if = {
			limit = { 
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
				threat < 0.25 
				UKR = { NOT = { has_country_flag = UKR_kyiv_conference_is_start } }
			}
			UKR = { country_event = ukraine.240 }
		}
		else_if = {
			limit = {
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
			}
			UKR = { set_country_flag = UKR_kyiv_conference_is_start }
		}
	}
	option = {
		name = ukraine.374.b #regular reaction
		ai_chance = {
			factor = 45
		}
		add_manpower = -25
		random_list = {
			33 = {
				89 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			34 = {
				91 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
			33 = {
				93 = {
					damage_building = {
						type = infrastructure
						damage = 1
					}
				}
			}
		}
		add_to_variable = { ukr_poland_caution_for_sabotages_var = 1 }
		if = {
			limit = { check_variable = { ukr_poland_caution_for_sabotages_var > 3 } }
			POL = { country_event = { id = ukraine.378 hours = 8 } }
			UKR = { country_event = { id = ukraine.377 hours = 12 } }
		}
	}
}
# Ukrainian propaganda in Malopolska Wschodnia
country_event = {
	id = ukraine.375
	title = ukraine.375.t
	desc = ukraine.375.d
	picture = GFX_report_event_worker_protests
	
	is_triggered_only = yes

	option = {
		name = ukraine.375.a #hard reaction
		ai_chance = {
			factor = 55
		}
		add_political_power = -10
		add_to_variable = { ukr_poland_reaction_for_sabotages_var = 1 }
		if = {
			limit = { 
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
				threat < 0.25 
				UKR = { NOT = { has_country_flag = UKR_kyiv_conference_is_start } }
			}
			UKR = { country_event = ukraine.240 }
		}
		else_if = {
			limit = {
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
			}
			UKR = { set_country_flag = UKR_kyiv_conference_is_start }
		}
	}

	option = {
		name = ukraine.375.b #regular reaction
		ai_chance = {
			factor = 45
		}
		add_political_power = -10
		add_to_variable = { ukr_poland_caution_for_sabotages_var = 1 }
		if = {
			limit = { check_variable = { ukr_poland_caution_for_sabotages_var > 3 } }
			POL = { country_event = { id = ukraine.378 hours = 8 } }
			UKR = { country_event = { id = ukraine.377 hours = 12 } }
		}
	}
}
# Political assassination in Poland
country_event = {
	id = ukraine.376
	title = ukraine.376.t
	desc = ukraine.376.d
	picture = GFX_report_event_spr_anarchist_uprising2
	
	is_triggered_only = yes

	option = {
		name = ukraine.376.a #hard reaction
		ai_chance = {
			factor = 55
		}
		add_stability = -0.01
		add_war_support = 0.01
		add_to_variable = { ukr_poland_reaction_for_sabotages_var = 1 }
		if = {
			limit = { 
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
				threat < 0.25 
				UKR = { NOT = { has_country_flag = UKR_kyiv_conference_is_start } }
			}
			UKR = {	country_event = ukraine.240	}
		}
		else_if = {
			limit = {
				check_variable = { ukr_poland_reaction_for_sabotages_var > 3 }
			}
			UKR = { set_country_flag = UKR_kyiv_conference_is_start }
		}
	}

	option = {
		name = ukraine.376.b #regular reaction
		ai_chance = {
			factor = 45
		}
		add_stability = -0.01
		add_war_support = 0.01
		add_to_variable = { ukr_poland_caution_for_sabotages_var = 1 }
		if = {
			limit = { check_variable = { ukr_poland_caution_for_sabotages_var > 3 } }
			POL = { country_event = { id = ukraine.378 hours = 8 } }
			UKR = { country_event = { id = ukraine.377 hours = 12 } }
		}
	}
}
# Resistance in West Ukraine at the peak - message for Ukraine
country_event = {
	id = ukraine.377
	title = ukraine.377.t
	desc = ukraine.377.d
	picture = GFX_report_event_west_ukrainian_rebels

	trigger = {
		NOT = { has_country_flag = UKR_resistance_in_wua_is_active }
	}
		
	is_triggered_only = yes


	option = {
		name = ukraine.377.a
		custom_effect_tooltip = UKR_resistance_in_wua_is_active_tt
		set_country_flag = UKR_resistance_in_wua_is_active
	}
}
# Resistance in West Ukraine at the peak - message for Poland
country_event = {
	id = ukraine.378
	title = ukraine.378.t
	desc = ukraine.378.d
	picture = GFX_report_event_west_ukrainian_rebels

	trigger = {
		NOT = { has_country_flag = UKR_resistance_in_wua_is_active }
	}
		
	is_triggered_only = yes

	option = {
		name = ukraine.378.a 
		if = {
			limit = { has_idea = POL_ethnic_minorities }
			swap_ideas = {
    			add_idea = POL_ethnic_minorities_active
    			remove_idea = POL_ethnic_minorities
			}
		}
		WUA = {
			add_state_core = 89
			add_state_core = 91
			add_state_core = 93
			add_state_core = 987
		}
		every_owned_state = {
			limit = { is_core_of = WUA }
			force_enable_resistance = {
				occupier = POL
				occupied = WUA
			}
			start_resistance = WUA
		}
	}
}
# Separate peace with nazi Germany
country_event = {
	id = ukraine.379
	title = ukraine.379.t
	desc = ukraine.379.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = UKR
		NOT = { has_government = fascism }
		has_war_with = GER
		GER = {
			has_government = fascism
			is_faction_leader = yes
		}
		has_unit_leader = 658
		surrender_progress > 0.5
		has_capitulated = no
		202 = {
			OR = {
				is_controlled_by = GER
				is_controlled_by = ROM
			}
		}
		all_neighbor_country = { 
			OR = {
				NOT = { is_in_faction_with = UKR }
				has_capitulated = yes
			}
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.379.a
		
		effect_tooltip = {
			GER = {
				puppet = UKR
			}
			white_peace = GER
			every_other_country = {
				limit = { has_war_with = UKR }
				white_peace = UKR
			}
		}
		GER = { country_event = ukraine.380 }
	}
	option = {
		ai_chance = {
			base = 50
		}
		name = ukraine.379.b
		retire_character = UKR_yevhen_konovalets
		add_command_power = -15
	}
}
# Separate peace with nazi Germany - agree of Germany
country_event = {
	id = ukraine.380
	title = ukraine.380.t
	desc = ukraine.380.d
	
	is_triggered_only = yes

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.380.a
		white_peace = UKR
		every_other_country = {
			limit = { has_war_with = UKR }
			white_peace = UKR
		}
		puppet = UKR
		if = {
			limit = {
				192 = { is_owned_and_controlled_by = UKR }
				ROM = { 
					is_in_faction_with = GER 
					is_puppet = no
				}
			}
			ROM = { transfer_state = 192 }
		}
		if = {
			limit = {
				196 = { is_owned_and_controlled_by = UKR }
				CRM = { 
					is_in_faction_with = GER 
					is_puppet = no
				}
			}
			CRM = { transfer_state = 196 }
		}
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.380.b
	}
}
# Create russian collaboration government in Crimea
country_event = {
	id = ukraine.381
	title = ukraine.381.t
	desc = ukraine.381.d
	picture = GFX_report_event_crimea_leaders
	
	trigger = {
		tag = UKR
		has_country_flag = UKR_prepare_collaborants_in_crimea
		has_war_with = SOV
		137 = { is_owned_and_controlled_by = UKR }
		has_rule = can_create_collaboration_government
		is_available_to_collaboration_government = yes
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		name = ukraine.381.a
		create_dynamic_country = {
			original_tag = SOV

			set_variable = { collaboration_formed_by = PREV }
			set_temp_variable = { new_country = THIS }
				
			PREV = {
				every_controlled_state = {
					limit = { occupied_country_tag = SOV }
						
					var:new_country = {
						transfer_state = PREV
					}
				}

				if = {
					limit = {
						137 = { is_owned_and_controlled_by = ROOT }
					}
					var:new_country = {
						transfer_state = 137
					}
				}
		
				puppet = new_country
				
				set_autonomy = {
					target = new_country
					autonomy_state = autonomy_collaboration_government
					freedom_level = 0.5
				}
			}
		}
	}
	option = {
		name = ukraine.381.b
	}
}
# Special operation in Turkey - partial success
country_event = {
	id = ukraine.382
	title = ukraine.382.t
	desc = ukraine.382.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.382.a
		TUR = {
			add_popularity = {
				ideology = PREV
				popularity = 0.05
			}
		}
	}
}
# Special operation in Romania - partial success
country_event = {
	id = ukraine.383
	title = ukraine.383.t
	desc = ukraine.383.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.383.a
		ROM = {
			add_popularity = {
				ideology = PREV
				popularity = 0.05
			}
		}
	}
}
# War with USSR for democrats - options (feat Roanok)
country_event = {
	id = ukraine.384
	title = ukraine.384.t
	desc = ukraine.384.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = UKR
		has_government = democratic
		has_defensive_war_with = SOV
		SOV = { has_government = communism }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		name = ukraine.384.a
		add_timed_idea = {
			idea = UKR_war_with_ussr_our_defence
			days = 60
		}
		add_political_power = -100
		add_popularity = {
			ideology = democratic
			popularity = 0.05
		}	
	}
	option = {
		name = ukraine.384.b
		add_timed_idea = {
			idea = UKR_war_with_ussr_support_of_nationalists
			days = 60
		}
		add_popularity = {
			ideology = fascism
			popularity = 0.10
		}
		UKR_rada_small_support = yes	
	}
	option = {
		name = ukraine.384.c
		add_political_power = 200
		add_stability = 0.05
		add_popularity = {
			ideology = communism
			popularity = -1
		}
		UKR_rada_small_opposition = yes	
	}
}
# Potential plot of generals for nationalists
country_event = {
	id = ukraine.385
	title = ukraine.385.t
	desc = ukraine.385.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi
	
	is_triggered_only = yes

	option = {
		name = ukraine.385.a
		ai_chance = {
			factor = 0
		}
		add_political_power = -25
		swap_ideas = {
			add_idea = UKR_generals_plot_hold_over
    		remove_idea = UKR_generals_plot
		}
		if = {
			limit = { has_country_flag = UKR_has_OUN_struggle }
			oun_increase_authority_small = yes
		}
	}
	option = {
		name = ukraine.385.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 10
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST
				}
			}
		}
		every_unit_leader = {
			limit = {
				has_id = 661
			}
			demote_leader = yes
			add_unit_leader_trait = UKR_discredited_commander
		}
		add_command_power = -30
		remove_ideas = UKR_generals_plot
		add_timed_idea = {
			idea = UKR_generals_plot
			days = 90
		}
		if = {
			limit = { has_country_flag = UKR_has_OUN_struggle }
			oun_increase_control_small = yes
		}
		
	}
	option = {
		name = ukraine.385.c
		ai_chance = {
			factor = 50
			modifier = {
				factor = 10
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST_ALTERNATE
				}
			}
		}
		add_political_power = 50
		retire_character = UKR_oleksander_osetsky
		retire_character = UKR_mykola_shapoval
		retire_character = UKR_volodymyr_oskilko
		remove_ideas = UKR_generals_plot
		if = {
			limit = { has_country_flag = UKR_has_OUN_struggle }
			oun_increase_onslaught_small = yes
		}
	}
}
# Plot of generals after loss of territories
country_event = {
	id = ukraine.386
	title = ukraine.386.t
	desc = ukraine.386.d
	picture = GFX_report_event_lithuania_army
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_offensive_war = yes
		has_unit_leader = 661
		surrender_progress > 0.1
		OR = {
			has_idea = UKR_generals_plot
			has_idea = UKR_generals_plot_hold_over
		}
	}

	immediate = {
		hidden_effect = {
			start_civil_war = {
				ideology = neutrality
				size = 0.35
				#keep_unit_leaders = { 657 658 }
				keep_unit_leaders_trigger = {
					OR = {
						has_id = 657
						has_id = 658
						has_id = 661
					}
				}
			}
			#retire_character = UKR_oleksander_osetsky
			random_other_country = {
				limit = {
					original_tag = UKR
					has_government = neutrality
				}
				UKR = { UKR_oleksander_osetsky = { set_nationality = PREV.PREV } }
				add_country_leader_role = {
					character = UKR_oleksander_osetsky
					promote_leader = yes
					country_leader = {
						ideology = despotism
						expire = "1953.3.1"
						traits = { }
					}
				}
				load_focus_tree = { tree = ukraine_focus keep_completed = no }
				unlock_national_focus = UKR_political_effort
				complete_national_focus = UKR_old_course
			}
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		name = ukraine.386.a
	}
}
# Party purge for nationalists - Bandera
country_event = {
	id = ukraine.387
	title = ukraine.387.t
	desc = ukraine.387.d
	picture = GFX_report_event_oun_council
	
	is_triggered_only = yes

	option = {
		name = ukraine.387.a
		ai_chance = {
			base = 100
		}
		add_political_power = -100
		#hidden_effect = {
		#	country_event = { id = ukraine.389 days = 90 random_days = 10 }
		#}
	}
	option = {
		name = ukraine.387.b
		ai_chance = {
			base = 0
		}
		add_political_power = 100
		add_stability = 0.05
		add_popularity = {
			ideology = fascism
			popularity = -0.10
		}
		set_country_flag = UKR_purge_of_melnykites
		set_country_flag = UKR_purge_of_melnykites_fem
		if = {
			limit = { has_character = UKR_omelyan_senik }
			retire_character = UKR_omelyan_senik
		}
		if = {
			limit = { has_character = UKR_mykola_velychkivsky }
			retire_character = UKR_mykola_velychkivsky
		}
		if = {
			limit = { has_character = UKR_mykola_stsiborskyi }
			retire_character = UKR_mykola_stsiborskyi
		}
		if = {
			limit = { has_character = UKR_olena_teliha }
			retire_character = UKR_olena_teliha
		}
	}
}
# Party purge for nationalists - Melnyk
country_event = {
	id = ukraine.388
	title = ukraine.388.t
	desc = ukraine.388.d
	picture = GFX_report_event_oun_council
	
	is_triggered_only = yes

	option = {
		name = ukraine.388.a
		ai_chance = {
			base = 100
		}
		add_political_power = -100
		#hidden_effect = {
		#	country_event = { id = ukraine.390 days = 90 random_days = 10 }
		#}
	}
	option = {
		name = ukraine.388.b
		ai_chance = {
			base = 0
		}
		add_political_power = 100
		add_stability = 0.05
		add_manpower = -1000
		add_popularity = {
			ideology = fascism
			popularity = -0.10
		}
		set_country_flag = UKR_purge_of_banderites
		if = {
			limit = { has_character = UKR_lev_rebet }
			retire_character = UKR_lev_rebet
		}
		if = {
			limit = { has_character = UKR_mykola_lebid }
			retire_character = UKR_mykola_lebid
		}
		if = {
			limit = { has_character = UKR_yaroslav_stetsko }
			retire_character = UKR_yaroslav_stetsko
		}
		if = {
			limit = { has_character = UKR_mykola_arsenich_beresowski }
			retire_character = UKR_mykola_arsenich_beresowski
		}
	}
}
# Party compromise by OUN - demands of melnykites - outdated
country_event = {
	id = ukraine.389
	title = ukraine.389.t
	desc = ukraine.389.d
	picture = GFX_report_event_oun_council
	trigger = { 
		NOT = { is_in_faction_with = GER } 
		NOT = { has_war_with = GER }
		GER = { 
			exists = yes
			has_government = fascism 
		}
	}

	is_triggered_only = yes

	option = {
		name = ukraine.389.a
		ai_chance = {
			factor = 50
		}
		GER = {
			add_ai_strategy = {
				type = alliance
				id = "UKR"
				value = 25
			}
		}
		add_war_support = -0.10
		every_other_country = {
			limit = { 
				has_government = democratic
				is_major = yes
			}
			add_opinion_modifier = { 
				target = ROOT
				modifier = UKR_deal_with_nazi_germany
			}
		}
	}
	option = {
		name = ukraine.389.b
		ai_chance = {
			factor = 50
		}
		add_political_power = -25
		hidden_effect = {
			country_event = { id = ukraine.389 days = 90 random_days = 10 }
		}
	}
}
# Party compromise by OUN - demands of banderites - outdated
country_event = {
	id = ukraine.390
	title = ukraine.390.t
	desc = ukraine.390.d
	picture = GFX_report_event_oun_council
	trigger = { 
		NOT = { is_in_faction_with = POL } 
		NOT = { has_war_with = POL }
		91 = { is_owned_and_controlled_by = POL }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.389.a
		ai_chance = {
			factor = 50
		}
		swap_ruler_traits = { 
			remove = decisive_invader
			add = decisive_invader_extra
		}
		add_stability = -0.05
	}
	option = {
		name = ukraine.389.b
		ai_chance = {
			factor = 50
		}
		add_political_power = -25
		hidden_effect = {
			country_event = { id = ukraine.390 days = 90 random_days = 10 }
		}
	}
}
# Return capital to Kyiv
country_event = {
	id = ukraine.391
	title = ukraine.391.t
	desc = ukraine.391.d
	picture = GFX_report_event_usa_election_generic
	
	trigger = {
		tag = UKR
		has_full_control_of_state = 202
		has_full_control_of_state = 201
		has_full_control_of_state = 203
		has_country_flag = UKR_capital_in_kharkiv
		221 = { 
			is_capital = yes 
			is_owned_and_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.391.a
		add_political_power = 25
		set_capital = { state = 202 }
		202 = { add_manpower = 150000 }
		221 = { add_manpower = -150000 }
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.391.b
	}
}
#Partner Ukraine for Turkey Hidden Event
country_event = {
	id = ukraine.392
	
	hidden = yes

	is_triggered_only = yes

	immediate = {
		hidden_effect = { UKR = { country_event = generic.5 } }
	}
}
# Turkey demand Crimea - choice for Crimea
country_event = {
	id = ukraine.393
	title = ukraine.393.t
	desc = ukraine.393.d
	picture = GFX_report_event_tur_sultan_and_pashas
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = ukraine.393.a
		ai_chance = {
			base = 10
			modifier = { 
				factor = 0.5
				any_other_country = {
					is_major = yes
					has_capitulated = no
					NOT = { tag = FROM }
					OR = {
						is_in_faction_with = PREV
						has_guaranteed = PREV
					}
				}
			}
		}

		FROM = {
			country_event = { days = 1 id = ukraine.395 }
		}
		effect_tooltip = {
			CRI = {
				add_state_core = 137
				add_state_core = 986
				annex_country = { target = CRM }
				set_cosmetic_tag = CRM_OTT 
			}
			TUR = { puppet = CRI }
		}
	}
	option = { # Refuse
		name = ukraine.393.b
		ai_chance = {
			base = 3
		}
		effect_tooltip = {
			create_wargoal = {
				type = annex_everything
				target = PREV
			}		
		}

		FROM = {
			country_event = { days = 1 id = ukraine.396 }
		}
	}
}
# Turkey demand Crimea - choice for controller or overlord
country_event = {
	id =  ukraine.394
	title = ukraine.394.t
	desc = ukraine.394.d
	picture = GFX_report_event_tur_sultan_and_pashas
	
	is_triggered_only = yes
	
	option = { # Accept demands
		name = ukraine.394.a
		ai_chance = {
			base = 10
			modifier = { 
				factor = 0.5
				OR = { 
					strength_ratio = {
						tag = FROM
						ratio > 1
					}
					naval_strength_ratio = {
						tag = FROM
						ratio > 1
					}
				}
			}
		}

		FROM = {
			country_event = { days = 1 id = ukraine.395 }
		}
		effect_tooltip = {
			CRI = { 
				transfer_state = 137 
				transfer_state = 986 
			}
		}
	}
	option = { # Refuse
		name = ukraine.394.b
		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				is_major = yes
			}
		}
		effect_tooltip = {
			create_wargoal = {
				type = take_state_focus
				target = THIS
				generator = { 137 986 }
			}		
		}

		FROM = {
			country_event = { days = 1 id = ukraine.396 }
		}
	}
}
# Accept demand - transfer Crimea to Turkey
country_event = {
	id = ukraine.395
	title = ukraine.395.t
	desc = ukraine.395.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	option = {
		name = ukraine.395.a
		CRI = {	
			add_state_core = 137
			add_state_core = 986
			inherit_technology = CRM
			set_research_slots = 2
		}
		if = { limit = { country_exists = CRI }
			puppet = CRI
		}
		else_if = {
			limit = {
				137 = { is_owned_and_controlled_by = CRM }
			}
			CRM = {
				#save manpower for CRI
				delete_unit = { 
					state = 137             
					disband = yes 
				}
				delete_unit = { 
					state = 986             
					disband = yes 
				}
			}
			CRI = {	
				annex_country = { target = CRM } 
			}
		}
		else = {
			FROM = {
				release = CRI
			}
			puppet = CRI
		}
		CRI = { set_cosmetic_tag = CRM_OTT }
	}
}
# Refuse demand - turkish wargoal for Crimea
country_event = {
	id = ukraine.396
	title = ukraine.396.t
	desc = ukraine.396.d
	picture = GFX_report_event_tur_military_affair
	is_triggered_only = yes
	
	option = {
		name = ukraine.396.a
		if = { limit = { country_exists = CRM }  
			create_wargoal = {
				type = puppet_wargoal_focus
				target = CRM
				generator = { 137 986 }
			}	
		}
		else = {
			create_wargoal = {
				type = take_state_focus
				target = FROM
				generator = { 137 986 }
			}	
		}
	}
}
#Workers competitions - Mazay
country_event = {
	id = ukraine.397
	title = ukraine.397.t
	desc = ukraine.397.d
	picture = GFX_report_event_mazay

	trigger = { 
		227 = { is_owned_and_controlled_by = UKR } 
	}

	is_triggered_only = yes

	option = {
		name = ukraine.397.a
		227 = {
			add_resource = {
				type = steel
				amount = 2
			}
		}
		set_country_flag = UKR_event_of_mazay
	}
}
#Recovery after purge for communists
country_event = {
	id = ukraine.398
	title = ukraine.398.t
	desc = ukraine.398.d
	picture = GFX_report_event_soviet_tank_parade

	is_triggered_only = yes

	option = {
		name = ukraine.398.a
		set_country_flag = UKR_purge_effect_is_end
		add_doctrine_cost_reduction = {
			name = ukraine.398.t
			cost_reduction = 0.33
			uses = 1
			category = land_doctrine
		}
		add_doctrine_cost_reduction = {
			name = ukraine.398.t
			cost_reduction = 0.33
			uses = 1
			category = air_doctrine
		}
		add_doctrine_cost_reduction = {
			name = ukraine.398.t
			cost_reduction = 0.33
			uses = 1
			category = naval_doctrine
		}
	}
}
#Adding core for Transcurzonia
country_event = {
	id = ukraine.399
	title = ukraine.399.t
	desc = ukraine.399.d
	picture = GFX_report_event_kholmshchyna

	is_triggered_only = yes
	
	trigger = {
		tag = UKR
		834 = {
			is_owned_and_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.399.a
		UKR = { 
			add_state_core = 834
		}
	}
}
#Rename of Przemyśl
country_event = {
	id = ukraine.400
	title = ukraine.400.t
	desc = ukraine.400.d
	picture = GFX_report_event_peremyshl

	fire_only_once = yes

	trigger = {
		tag = UKR
		NOT = { has_country_flag = UKR_united_with_poland } #it is polish part
		NOT = { has_country_flag = UKR_dual_habsburg_monarchy } #it is polish part
		UKR = {
			owns_state = 834
			controls_state = 834
		}
		834 = {
			OR = {
				is_claimed_by = UKR
				is_core_of = UKR
			}
		}
	}

	option = { #a great idea!
		name = ukraine.88.a
		ai_chance = {
			base = 100
		}
		834 = { set_state_name = UKR_peremyshl }
		set_province_name = { id = 9494 name = UKR_peremyshl }
	}

	option = { #rather not
		name = ukraine.88.b
		ai_chance = {
			base = 0
		}
	}
}
#Ally across sea with Bulgaria
country_event = {
	id = ukraine.401
	title = ukraine.401.t
	desc = ukraine.401.d
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes

	option = {
		name = ukraine.401.a
		ai_chance = {
			base = 100
		}
		BUL = { country_event = { id = ukraine.402 hours = 3 } }
		if = {
			limit = { is_in_faction = no }
			create_faction = BlackSeaPact
		}
		add_to_faction = BUL
		add_ai_strategy = {
			type = alliance
			id = BUL
			value = 200
		}
	}
	
	option = {
		name = ukraine.401.b
		ai_chance = {
			base = 0
		}
	}
}
#Ally across sea - Ukraine accept
country_event = {
	id = ukraine.402
	title = ukraine.402.t
	desc = ukraine.402.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.402.a
		add_ai_strategy = {
			type = alliance
			id = UKR
			value = 200
		}
	}
}
#Ally across sea - invite Hungary
country_event = {
	id = ukraine.403
	title = ukraine.403.t
	desc = ukraine.403.d
	picture = GFX_report_event_bul_military_parade_vidin

	is_triggered_only = yes

	option = {
		name = ukraine.403.a
		ai_chance = {
			base = 100
		}
		random_country = {
			limit = {
				is_in_faction_with = BUL
				is_faction_leader = yes
			}
			country_event = ukraine.404
		}
	}
	
	option = {
		name = ukraine.403.b
		ai_chance = {
			base = 0
		}
	}
}
#Invite Hungary with Bulgaria Hidden Event
country_event = {
	id = ukraine.404
	
	hidden = yes

	is_triggered_only = yes

	immediate = {
		hidden_effect = { HUN = { country_event = { id = generic.5 days = 1 } } }
	}
}
#Assert claims of Bulgaria - asks to core controlled historical claims and bring back any Bulgarian initial state controlled by an ally
country_event = {
	id = ukraine.405
	title = ukraine.405.t
	desc = ukraine.405.d
	picture = GFX_report_event_bul_boris_with_muraviev

	is_triggered_only = yes

	option = { #Accept
		name = ukraine.405.a

		ai_chance = {
			base = 10
			modifier = {
				factor = 4
				BUL = { 
					any_war_score > 5
				}
			}
			modifier = {
				factor = 4
				BUL = { 
					any_war_score > 15
				}
			}
			modifier = {
				factor = 10
				BUL = { 
					any_war_score > 30
				}
			}
			modifier = {
				factor = 5
				BUL = { 
					casualties > 10000
				}
			}
			modifier = {
				factor = 10
				BUL = { 
					casualties > 100000
				}
			}
		}

		effect_tooltip = {
			custom_effect_tooltip = bftb_bulgaria_democratic_international_policies.4_tt
			every_state = {
				limit = {
					has_state_flag = BUL_initial_bulgarian_state_flag
					NOT = { is_controlled_by = BUL }
					controller = {
						is_in_faction_with = BUL
						has_full_control_of_state = PREV
					}
				}
				controller = {
					add_opinion_modifier = {
						target = UKR
						modifier = BUL_territorial_arbitration_negative
					}
				}
			}
			BUL = {
				add_opinion_modifier = {
					target = UKR
					modifier = BUL_territorial_arbitration
				}
			}
		}
	}

	option = { #Refuse
		name = ukraine.405.b

		ai_chance = {
			base = 10
			modifier = {
				factor = 2
				BUL = { 
					any_war_score < 5
				}
			}
			modifier = {
				factor = 300
				BUL = { 
					any_war_score < 1
				}
			}
			modifier = {
				factor = 100
				BUL = { 
					casualties < 1000
				}
			}
		}

		BUL = {
			add_opinion_modifier = {
				target = ROOT
				modifier = BUL_bulgarian_claims_not_recognized
			}
		}
	}
}
# Ultimatum to Romania for bulgarian Dobruja
country_event = {
	id = ukraine.406
	title = ukraine.406.t
	desc = ukraine.406.d

	is_triggered_only = yes

	option = {
		name = ukraine.406.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0
			}
		}
		FROM = { country_event = { id = ukraine.407 hours = 8 } }
		effect_tooltip = {
			FROM = {
				transfer_state = 77
			}
		}
	}
	
	option = {
		name = ukraine.406.b
		ai_chance = {
			factor = 60
			modifier = {
				factor = 2
				strength_ratio = {
					tag = UKR
					ratio > 0.75
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROM
				}
			}
		}
		UKR = { country_event = { id = ukraine.408 hours = 8 } }
	}
}
# Romania cedes Dobruja
country_event = {
	id = ukraine.407
	title = ukraine.407.t
	desc = ukraine.407.d

	is_triggered_only = yes

	option = {
		name = ukraine.407.a
		transfer_state = 77
	}
}
# Ultimatum to Romania for bulgarian Dobruja - ROM refuse - decision of UKR
country_event = {
	id = ukraine.408
	title = ukraine.408.t
	desc = ukraine.408.d
	picture = GFX_report_event_romanian_soldiers

	is_triggered_only = yes

	trigger = { NOT = { is_in_faction_with = FROM } }

	option = {
		name = ukraine.408.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 1.5
				OR = {
					78 = { is_owned_and_controlled_by = ROM }
					80 = { is_owned_and_controlled_by = ROM }
					766 = { is_owned_and_controlled_by = ROM }
				}
			}
		}
		BUL = { 
			create_wargoal = {
				type = take_state_focus
				target = ROM
				generator = { 77 }
			}
		}
		if = {
			limit = {
				76 = { is_owned_and_controlled_by = ROM }
				is_in_faction_with = HUN
			}
			HUN = { 
				create_wargoal = {
					type = take_state_focus
					target = ROM
					generator = { 76 }
				}
			}
		}
	}
	
	option = {
		name = ukraine.408.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROM
				}
			}
		}
		BUL = { country_event = { id = ukraine.409 hours = 4 } }
	}
}
# Ukraine refuses to support bulgarian claims
country_event = {
	id = ukraine.409
	title = ukraine.409.t
	desc = ukraine.409.d

	is_triggered_only = yes

	option = {
		name = ukraine.409.a
		add_ai_strategy = {
			type = alliance
			id = UKR
			value = -100
		}
	}
}
# Dispute for Dobruja - Bulgaria and allied ROM - decision for UKR
country_event = {
	id = ukraine.410
	title = ukraine.410.t
	desc = ukraine.410.d
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	option = {
		name = ukraine.410.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				OR = {
					78 = { is_owned_and_controlled_by = UKR }
					80 = { is_owned_and_controlled_by = UKR }
					766 = { is_owned_and_controlled_by = UKR }
				}
			}
		}
		ROM = { country_event = { id = ukraine.411 hours = 4 } }
	}
	
	option = {
		name = ukraine.410.b
		ai_chance = {
			factor = 50
		}
		BUL = { country_event = { id = ukraine.409 hours = 8 } }
	}
}
# Dispute for Dobruja - Bulgaria and allied ROM - decision for ROM
country_event = {
	id = ukraine.411
	title = ukraine.411.t
	desc = ukraine.411.d
	picture = GFX_report_event_bul_troops_dobrudja

	is_triggered_only = yes

	option = {
		name = ukraine.411.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				OR = {
					NOT = { 78 = { owner = { original_tag = ROM } } }
					NOT = { 80 = { owner = { original_tag = ROM } } }
					NOT = { 76 = { owner = { original_tag = ROM } } }
					NOT = { 766 = { owner = { original_tag = ROM } } }
				}
			}
		}
		effect_tooltip = {
			BUL = {
				transfer_state = 77
			}
		}
		BUL = { country_event = { id = ukraine.407 hours = 4 } }
	}
	
	option = {
		name = ukraine.411.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				any_other_country = {
					NOT = { is_in_faction_with = ROM }
					has_guaranteed = ROM
				}
			}
		}
		leave_faction = yes
		add_ai_strategy = {
			type = alliance
			id = UKR
			value = -200
		}
		effect_tooltip = {
			BUL = { 
				create_wargoal = {
					type = take_state_focus
					target = ROM
					generator = { 77 }
				}
			}
		}
		UKR = { country_event = { id = ukraine.412 hours = 4 } }
	}
}
# Romania refuse cedes Dobruja
country_event = {
	id = ukraine.412
	title = ukraine.412.t
	desc = ukraine.412.d
	picture = GFX_report_event_romania_parliament

	is_triggered_only = yes

	option = {
		name = ukraine.412.a
		BUL = { 
			create_wargoal = {
				type = take_state_focus
				target = ROM
				generator = { 77 }
			}
		}
		if = {
			limit = {
				76 = { is_owned_and_controlled_by = ROM }
				is_in_faction_with = HUN
			}
			HUN = { 
				create_wargoal = {
					type = take_state_focus
					target = ROM
					generator = { 76 }
				}
			}
		}
	}
}
# Arrival of Yakov Blyumkin
country_event = {
	id = ukraine.413
	title = ukraine.413.t
	desc = ukraine.413.d
	picture = GFX_report_event_yakov_blyumkin

	trigger = {
		has_dlc = "La Resistance"
		192 = { is_owned_and_controlled_by = ROOT }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.413.a
		ai_chance = {
			factor = 90
		}
		custom_effect_tooltip = UKR_arrival_of_yakov_blyumkin_tt
		set_country_flag = UKR_arrival_of_yakov_blyumkin_flag
		if = {
			limit = {
				OR = {
					has_completed_focus = UKR_lustration
					has_completed_focus = UKR_revanchism
					has_completed_focus = UKR_old_course
					has_completed_focus = UKR_democratic_reforms
				}
			}
			UKR_recruting_of_yakov_blyumkin = yes
		}
	}
	
	option = {
		name = ukraine.413.b
		ai_chance = {
			factor = 10
		}
	}
}
# Question of coronation
country_event = {
	id = ukraine.414
	title = ukraine.414.t
	desc = ukraine.414.d
	picture = GFX_report_event_usa_election_generic

	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	option = {
		name = ukraine.414.a
		ai_chance = {
			factor = 80
		}
		set_country_flag = UKR_prepare_pompous_coronation
		activate_decision = UKR_prepare_coronation 
	}
	
	option = {
		name = ukraine.414.b
		ai_chance = {
			factor = 20
		}
		country_event = { id = ukraine.416 days = 30 random_days = 15 }
	}
}
# Pompous coronation
country_event = {
	id = ukraine.415
	title = ukraine.415.t
	desc = ukraine.415.d
	picture = GFX_report_event_europe_funeral

	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	option = {
		name = ukraine.415.a
		promote_character = UKR_wilhelm_von_habsburg
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.30
		}
		clr_country_flag = UKR_have_active_bop_decisions
		custom_effect_tooltip = UKR_additional_decisions_for_bop
		hidden_effect = {
			country_event = { id = ukraine.417 days = 15 random_days = 10 }
		}
	}
}
# Frugal coronation
country_event = {
	id = ukraine.416
	title = ukraine.416.t
	desc = ukraine.416.d
	picture = GFX_report_event_generic_funeral

	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	option = {
		name = ukraine.416.a
		promote_character = UKR_wilhelm_von_habsburg
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.15
		}
		clr_country_flag = UKR_have_active_bop_decisions
		custom_effect_tooltip = UKR_additional_decisions_for_bop
		hidden_effect = {
			country_event = { id = ukraine.417 days = 15 random_days = 10 }
		}
	}
}
# Question of royal marriage
country_event = {
	id = ukraine.417
	title = ukraine.417.t
	desc = ukraine.417.d
	picture = GFX_report_event_usa_election_generic

	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	option = {
		name = ukraine.417.a
		activate_mission = UKR_search_for_queen_mission
		custom_effect_tooltip = UKR_additional_decisions_for_bop
		hidden_effect = {
			country_event = { id = ukraine.614 days = 30 random_days = 10 }
		}
	}
}
# Marriage with Elizabeth Skoropadska - always success
country_event = {
	id = ukraine.418
	title = ukraine.418.t
	desc = ukraine.418.d
	picture = GFX_report_event_elizabeth_skoropadska

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_stability = 0.05
		add_political_power = 75
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
	}
}
# Marriage with Irene of Greece - success
country_event = {
	id = ukraine.419
	title = ukraine.419.t
	desc = ukraine.419.d
	picture = GFX_report_event_irene_of_greece

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = GRE
				GRE = { NOT = { has_government = communism } } 
			}
			GRE = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_greece
	}
}
# Marriage with princess - fail
country_event = {
	id = ukraine.420
	title = ukraine.420.t
	desc = ukraine.420.d

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.420.a
		clr_country_flag = UKR_offer_to_princess_is_active
	}
}
# Marriage with Maria Cristina of Spain - success
country_event = {
	id = ukraine.421
	title = ukraine.421.t
	desc = ukraine.421.d
	picture = GFX_report_event_maria_cristina_of_spain

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_spain
	}
}
# Marriage with Adelheid of Austria - success
country_event = {
	id = ukraine.422
	title = ukraine.422.t
	desc = ukraine.422.d
	picture = GFX_report_event_adelheid_of_austria

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = HUN
				HUN = { has_completed_focus = HUN_invite_the_habsburg_prince } 
			}
			HUN = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_austria
	}
}
# Marriage with Maria Francesca of Savoy - success
country_event = {
	id = ukraine.423
	title = ukraine.423.t
	desc = ukraine.423.d
	picture = GFX_report_event_maria_francesca_of_savoya

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = ITA
				ITA = { NOT = { has_government = communism }  } 
			}
			ITA = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_italy
	}
}
# Marriage with Eudoxia of Bulgaria - success 
country_event = {
	id = ukraine.424
	title = ukraine.424.t
	desc = ukraine.424.d
	picture = GFX_report_event_eudoxia_of_bulgaria

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = BUL
				BUL = { NOT = { has_government = communism }  } 
			}
			BUL = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_bulgaria
	}
}
# Marriage with Marie Clotilde Bonaparte - success 
country_event = {
	id = ukraine.425
	title = ukraine.425.t
	desc = ukraine.425.d
	picture = GFX_report_event_marie_clotilde_bonaparte

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = FRA
				FRA = { NOT = { has_government = communism }  } 
			}
			FRA = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_france
	}
}
# Marriage with Kira Kirillovna of Russia - success 
country_event = {
	id = ukraine.426
	title = ukraine.426.t
	desc = ukraine.426.d
	picture = GFX_report_event_kira_kirillovna_of_russia

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = CRM
				CRM = { NOT = { has_government = communism }  } 
			}
			CRM = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_russia
	}
}
# Marriage with Cecilie of Prussia - success 
country_event = {
	id = ukraine.427
	title = ukraine.427.t
	desc = ukraine.427.d
	picture = GFX_report_event_cecilie_of_prussia

	trigger = {
		has_government = neutrality
		NOT = { has_country_flag = UKR_the_king_is_married }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.418.a
		add_political_power = 25
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = symbol_of_unity_adv }
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = { 
				country_exists = GER
				GER = { NOT = { has_government = communism }  } 
			}
			GER = {
				add_opinion_modifier = { target = UKR modifier = UKR_dynastic_ties }
			}
		}
		clr_country_flag = UKR_offer_to_princess_is_active
		set_country_flag = UKR_the_king_is_married
		set_country_flag = UKR_queen_from_germany
	}
}
# Issue of catholic king
country_event = {
	id = ukraine.428
	title = ukraine.428.t
	desc = ukraine.428.d

	is_triggered_only = yes

	trigger = {
		has_government = neutrality
	}

	option = {
		name = ukraine.428.a
		ai_chance = {
			factor = 80
		}
		if = {
			limit = {
				OR = {
					has_country_flag = UKR_queen_from_greece
					has_country_flag = UKR_queen_from_bulgaria
					has_country_flag = UKR_queen_from_russia
				}
			}
			add_political_power	= -75
		}
		else = {
			add_political_power	= -150
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
	}
	
	option = {
		name = ukraine.428.b
		ai_chance = {
			factor = 20
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.10
		}
		set_country_flag = UKR_king_is_catholic
		custom_effect_tooltip = UKR_king_is_catholic_tt
	}
}
# Royal visit to motherland of ukrainian queen
country_event = {
	id = ukraine.429
	title = ukraine.429.t
	desc = ukraine.429.d

	is_triggered_only = yes

	option = {
		name = ukraine.429.a
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.05
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		FROM = {
			add_ai_strategy = {
				type = alliance
				id = PREV
				value = 200
			}
		}
	}
}
# Makhnovists leaders for red army
country_event = {
	id = ukraine.430
	title = ukraine.430.t
	desc = ukraine.430.d
	picture = GFX_report_event_makhnovists

	is_triggered_only = yes

	option = {
		name = ukraine.430.a
		add_command_power = -30
		DKR = {
			DKR_panteley_bilochub = { set_nationality = ROOT }
			DKR_trofim_vdovichenko = { set_nationality = ROOT }
			DKR_vasily_sharovskyi = { set_nationality = ROOT }
		}
		add_corps_commander_role = {
			character = DKR_vasily_sharovskyi
			traits = { UKR_makhnovist_insurgent bearer_of_artillery }
			skill = 2
			attack_skill = 2
			defense_skill = 2
			planning_skill = 1
			logistics_skill = 2
		}
	}
	option = {
		name = ukraine.430.b
	}
}
# Ivan Kozhedub is ace
country_event = {
	id = ukraine.431
	title = ukraine.431.t
	desc = { 
		text = ukraine.431.desc.a
		trigger = {
			tag = UKR
		}
	}
	desc = { 
		text = ukraine.431.desc.b
		trigger = {
			tag = DKR
		}
	}
	picture = GFX_report_event_kozhedub

	trigger = {
		OR = {
			tag = UKR
			AND = {
				tag = DKR
				has_government = neutrality
			}
		}
		date > 1940.01.01
		has_war = yes
		has_air_experience > 125
		has_deployed_air_force_size = {
		    size > 299
		    type = fighter
		}
	}

	mean_time_to_happen = { days = 60 }

	fire_only_once = yes
	
	option = {
		name = ukraine.431.a
		trigger = { tag = UKR }
		add_ace = {
			name = "Ivan"
			surname = "Kozhedub"
			callsign = "Bat'ko"
			type = fighter_genius
		}
	}
	option = {
		name = ukraine.431.b
		trigger = { tag = DKR }
		add_ace = {
			name = "Ivan"
			surname = "Kozhedub"
			callsign = "Bat'ko"
			type = fighter_genius
		}
	}
}
# Collapse of Nazi Germany - Melnyk stays alone
country_event = {
	id = ukraine.432
	title = ukraine.432.t
	desc = ukraine.432.d
		
	trigger = {
		tag = UKR
		has_government = fascism
		NOT = { has_country_flag = UKR_melnyk_without_daddy }
		date < 1938.01.01
		OR = {
			NOT = { country_exists = GER }
			AND = {
				GER = { NOT = { has_government = fascism } }
				GER = { has_civil_war = no }
			}
		}
	}

	mean_time_to_happen = { days = 7 }

	fire_only_once = yes
	
	option = {
		name = ukraine.432.a
		set_country_flag = UKR_melnyk_without_daddy
	}
}
# Civil war and join in sovier ciwil war for prosoviet path
country_event = {
	id = ukraine.433
	title = ukraine.433.t
	desc = ukraine.433.d
	picture = GFX_report_event_generic_battle

	is_triggered_only = yes

	trigger = {
		has_country_flag = UKR_ready_for_RCW_flag
		#all_country_with_original_tag = {
	    #	original_tag_to_check = SOV
	    #	NOT = { has_war_with = ROOT }
	    #}
	    SOV = { 
	    	NOT = { has_government = communism } 
	    	has_civil_war = yes
	    }
	}

	option = {
		name = ukraine.433.a
		start_civil_war = {
			ideology = fascism
			size = 0.3
			states = { 194 198 199 201 }
			keep_unit_leaders_trigger = {
				OR = {
					has_id = 662
					has_id = 661
				}
			}
		}
		add_timed_idea = {
			idea = UKR_civil_war_disorganization
			days = 60
		}
		set_country_flag = UKR_purge_effect_is_end
		set_country_flag = UKR_purge_of_staff
		random_other_country = {
			limit = {
				original_tag = UKR
				has_government = fascism
			}
			ROOT = {
				UKR_pavlo_shandruk = { set_nationality = PREV.PREV }
			}
			set_rule = { can_join_factions = no }
			load_focus_tree = { tree = ukraine_focus keep_completed = no }
			unlock_national_focus = UKR_political_effort
			complete_national_focus = UKR_revanchism
		}
		if = {
			limit = { NOT = { has_war_with = SOV } }
			random_other_country = {
				limit = {
					original_tag = SOV
					has_government = communism
					is_in_faction_with = ROOT
				}
				UKR = { add_to_war = { targeted_alliance = PREV enemy = SOV } }
			}
		}
	}
}
# Intervention in soviet civil war - Ukraine agree
country_event = {
	id = ukraine.434
	title = ukraine.434.t
	desc = ukraine.434.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.434.a
		if = {
			limit = {
				OR = {
					408 = { is_owned_and_controlled_by = ROOT }
					409 = { is_owned_and_controlled_by = ROOT }
				}
			}
			release_puppet_on_controlled = ZKL
			SOS = {
				declare_war_on = {
					target = ZKL
					type = annex_everything
				}
			}
			ZKL = {
				hidden_effect = { 
					load_oob = ZKL_rebels
					set_politics = { ruling_party = democratic elections_allowed = yes }
					add_popularity = {
						ideology = democratic
						popularity = 0.4
					}	
				}
				custom_effect_tooltip = ZKL_rebels_tt
				add_timed_idea = {
					idea = KUB_ZKL_liberation_movement
					days = 365
				}
			}
		}
	}
}
# Intervention in soviet civil war - Ukraine will provide limited support
country_event = {
	id = ukraine.435
	title = ukraine.435.t
	desc = ukraine.435.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.435.a
	}
}
# Intervention in soviet civil war - Ukraine completely refuses
country_event = {
	id = ukraine.436
	title = ukraine.436.t
	desc = ukraine.436.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.436.a
	}
}
# Party coup in USSR during civil war
country_event = {
	id = ukraine.437
	title = ukraine.437.t
	desc = ukraine.437.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	trigger = { 
		has_civil_war = yes 
		SOV_iosif_stalin = { is_country_leader = yes }
	}

	option = {
		name = ukraine.437.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0
				NOT = { has_character = SOV_lev_trotsky }
			}
		}
		FROM = { 
			if = { 
				limit = {
					has_country_leader = { character = UKR_lev_trotsky ruling_only = yes }
				} 
				country_event = { id = ukraine.343 days = 1 }
			}
			hidden_effect = { retire_character = UKR_lev_trotsky }
			country_event = { id = ukraine.438 days = 1 } 
		}
		SOV_lev_trotsky = {
			add_country_leader_role = {
				country_leader = {
					ideology = marxism
					traits = { permanent_revolutionary  }
					expire = "1965.1.1.1"
				}
				promote_leader = yes 
			}
		}
		retire_character = SOV_iosif_stalin
	}

	option = {
		name = ukraine.437.b
		ai_chance = {
			factor = 40
			modifier = {
				add = -20
				surrender_progress > 0.5
			}
			modifier = {
				add = -20
				surrender_progress > 0.75
			}
		}
		#SOV_paranoia_high_increase_effect = yes
		FROM = { country_event = { id = ukraine.439 days = 1 } }
		effect_tooltip = {
			declare_war_on = {
				target = UKR
				type = annex_everything
			}
		}
	}
}
# Party coup in USSR - success, Trotsky is our puppet
country_event = {
	id = ukraine.438
	title = ukraine.438.t
	desc = ukraine.438.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	option = {
		name = ukraine.438.a
		puppet = FROM
		set_autonomy = {
			target = FROM
			autonomous_state = autonomy_dominion
			freedom_level = 0.5
		}
		declare_war_on = {
			target = SOV
			type = annex_everything
		}
		FROM = {
			remove_dynamic_modifier = { modifier = SOV_opposition_popular_support }
			declare_war_on = {
				target = SOV
				type = civil_war
			}
		}
		hidden_effect = {
			news_event = { hours = 6 id = news.564 }
		}
	}
}
# Party coup in USSR - fail, Stalin is angry
country_event = {
	id = ukraine.439
	title = ukraine.439.t
	desc = ukraine.439.d
	picture = GFX_report_event_stalin_01

	is_triggered_only = yes

	option = {
		name = ukraine.439.a
		declare_war_on = {
			target = SOV
			type = puppet_wargoal_focus
		}
		FROM = {
			declare_war_on = {
				target = ROOT
				type = annex_everything
			}
		}
		if = {
			limit = { 
				240 = { is_owned_and_controlled_by = FROM }
				221 = { is_owned_and_controlled_by = ROOT }
			}
			transfer_state = 240
		}
		if = {
			limit = { 
				983 = { is_owned_and_controlled_by = FROM }
				193 = { is_owned_and_controlled_by = ROOT }
			}
			transfer_state = 983 
		}
		if = {
			limit = { 
				986 = { is_owned_and_controlled_by = FROM }
				196 = { is_owned_and_controlled_by = ROOT }
			}
			transfer_state = 986
		}
	}
}
# Poland has_war - is  WUR ready to liberation?
country_event = {
    id = ukraine.440
    hidden = yes
    fire_only_once = yes

    mean_time_to_happen = {	days = 30 }

    trigger = {
		original_tag = POL
		has_war = yes
		NOT = { has_war_with = UKR }
		NOT = { is_in_faction_with = UKR }
		UKR = { 
			exists = yes
			has_civil_war = no
			NOT = { has_completed_focus = UKR_alliance_with_Poland }
			NOT = { has_government = communism }
			has_country_flag = UKR_kyiv_conference_is_available
		}
		89 = {
			owner = { original_tag = POL }
		}
		91 = {
			owner = { original_tag = POL }
		}
		93 = {
			owner = { original_tag = POL }
		}
		987 = {
			owner = { original_tag = POL }
		}
    }
   
    immediate = {
    	log = "ukraine.440"
    	random_list = {
    		10 = {
    			modifier = {
					factor = 10
					POL = { has_civil_war = yes }
				}
    			modifier = {
					factor = 2
					check_variable = { POL.ukr_poland_caution_for_sabotages_var = 1 } 
				}
				modifier = {
					factor = 5
					check_variable = { POL.ukr_poland_caution_for_sabotages_var = 2 } 
				}
				modifier = {
					factor = 10
					check_variable = { POL.ukr_poland_caution_for_sabotages_var = 3 } 
				}
    			POL = {
    				set_country_flag = POL_rebellion_of_ukrainians
    				country_event = { id = ukraine.441 days = 2 }
	   			}
    		}
    		90 = {
    			modifier = {
					factor = 0
					check_variable = { POL.ukr_poland_caution_for_sabotages_var > 3 } 
				}
    			#nothing
    		}
    	}
    }
}
# Ukrainian rebellion in poland war - choice for main POL
country_event = {
	id = ukraine.441
	title = ukraine.441.t
	desc = ukraine.441.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			WUA = {
				add_state_core = 89
				add_state_core = 91
				add_state_core = 93
				add_state_core = 987
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
				inherit_technology = POL
				set_research_slots = 2
				if = {
					limit = { has_global_flag = DKR_intervention_in_poland_cw }
					set_politics = { ruling_party = neutrality elections_allowed = no }
					add_popularity = { ideology = neutrality popularity = 0.5 }
					add_country_leader_role = {
						character = WUA_anarchist_commune
						promote_leader = yes
						country_leader = {
							ideology = anarchism
							expire = "1953.3.1"
							traits = { }
						}
					}
					set_party_name = { ideology = neutrality name = WUA_anarchy_party_short long_name = WUA_anarchy_party_long }
					set_cosmetic_tag = WUA_ANARCHY
				}
				else = {
					set_politics = { ruling_party = fascism elections_allowed = no }
					add_popularity = { ideology = fascism popularity = 0.5 }
				}
				load_oob = WUA_rebellion_in_PCW
				set_country_flag = WUA_rebellion_in_polish_cw
				set_rule = {
					can_join_factions = no
				}
			}
			every_other_country = {
				limit = {
					original_tag = POL
					has_war_with = ROOT
				}
				country_event = { id = ukraine.442 hours = 4  }
			}
		}
		log = "ukraine.441"
	}

	option = {
		name = ukraine.441.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		declare_war_on = {
			target = WUA
			type = annex_everything
		}
		if = {
			limit = { has_global_flag = DKR_intervention_in_poland_cw }
			DKR = { country_event = { id = makhno.63 days = 1 } }
		}
		else = {
			UKR = { country_event = { id = ukraine.443 days = 1 } }
		}
	}
	option = {
		name = ukraine.441.b
		ai_chance = {
			factor = 30
		}
		if = {
			limit = { has_civil_war = no }
			UKR = { country_event = { id = ukraine.565 days = 1 } }
		}
		remove_state_core = 89
		remove_state_core = 91
		remove_state_core = 93
		remove_state_core = 987
	}
}
# Ukrainian rebellion in poland civil war - choice for other sides in civil war
country_event = {
	id = ukraine.442
	title = ukraine.441.t
	desc = ukraine.441.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	immediate = {
		log = "ukraine.442"
	}

	option = {
		name = ukraine.441.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		declare_war_on = {
			target = WUA
			type = annex_everything
		}
		if = {
			limit = {
				NOT = { has_global_flag = DKR_intervention_in_poland_cw }
				any_enemy_country = {
					original_tag = POL
					NOT = { has_war_with = WUA }
				}
			}
			UKR = { country_event = { id = ukraine.443 days = 1 } }
		}
		if = {
			limit = {
				has_global_flag = DKR_intervention_in_poland_cw
				any_enemy_country = {
					original_tag = POL
					NOT = { has_war_with = WUA }
				}
			}
			DKR = { country_event = { id = makhno.63 days = 1 } }
		}
	}
	option = {
		name = ukraine.441.b
		ai_chance = {
			factor = 30
		}
		WUA = {
			clr_country_flag = WUA_rebellion_in_polish_cw
			set_rule = {
				can_join_factions = yes
			}
		}
		remove_state_core = 89
		remove_state_core = 91
		remove_state_core = 93
		remove_state_core = 987
	}
}
# Ukrainian rebellion in poland war - choice for Ukraine - support for rebels
country_event = {
	id = ukraine.443
	title = ukraine.443.t
	desc = ukraine.443.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	trigger = {
		exists = yes
		NOT = { has_completed_focus = UKR_alliance_with_Poland }
	}

	option = {
		name = ukraine.443.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { NOT = { has_idea = UKR_help_for_wua_rebels } }
			add_ideas = UKR_help_for_wua_rebels
		}
		add_ai_strategy = {
			type = diplo_action_acceptance
			id = WUA
			value = 200
			target = send_volunteers
		}
		WUA = { 
			add_timed_idea = {
				idea = WUA_stand_before_support
				days = 15
			} 
			add_opinion_modifier = { target = UKR modifier = UKR_great_motherland_opinion }
			add_ai_strategy = {
				type = befriend
				id = UKR			
				value = 200
			}
			add_ai_strategy = {
				type = diplo_action_acceptance
				id = UKR
				value = 200
				target = send_volunteers
			}
		}
		hidden_effect = {
			every_other_country = {
				limit = {
					original_tag = POL
					has_war_with = WUA
				}
				country_event = { id = ukraine.444 days = 75 }
			}
			WUA = { country_event = { id = ukraine.445 days = 76 } }
		}
		add_ai_strategy = {
			type = send_volunteers_desire
			id = WUA
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = WUA
			value = 200
		}
	}
	option = {
		name = ukraine.443.b
		ai_chance = {
			base = 0
		}
	}
}
# WUA survived after two month of war - Poland must retreat
country_event = {
	id = ukraine.444
	title = ukraine.444.t
	desc = ukraine.444.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	trigger = {
		country_exists = WUA
		WUA = { 
			has_country_flag = WUA_rebellion_in_polish_cw
			has_capitulated = no 
			is_in_faction = no
		}
		has_war_with = WUA
	}

	option = {
		name = ukraine.444.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { 834 = { is_fully_controlled_by = WUA } }
			WUA = { 
				transfer_state = 834 
				add_state_core = 834
			}
		}
		white_peace = WUA
	}
	option = {
		name = ukraine.444.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.10
		add_political_power = -150
	}
}
# White peace with WUA - message for WUA
country_event = {
	id = ukraine.445
	title = ukraine.445.t
	desc = ukraine.445.d

	is_triggered_only = yes

	trigger = {
		has_war = no
	}

	option = {
		name = ukraine.445.a
		clr_country_flag = WUA_rebellion_in_polish_cw
		set_rule = {
			can_join_factions = yes
		}
	}
}
#Poland or Hungary asks Ukrainian kingdom to join Habsburg faction
country_event = {
	id = ukraine.446
	title = POL_habsburg_events.2.t
	desc = POL_habsburg_events.2.desc
	picture = GFX_report_event_royal_parade
	
	is_triggered_only = yes

	fire_only_once = yes

	immediate = {
		hidden_effect = {
			save_event_target_as = alliance_applicant
			FROM = {
				save_event_target_as = alliance_inviter
			}
		}
	}

	option = { #Ukraine agrees
		name = POL_habsburg_events.2.a
		ai_chance = {
			base = 10
		}
		FROM = {
			add_to_faction = PREV
			country_event = { id = generic.6 hours = 6 }
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
		}
	}

	option = { #Ukraine refuses
		name = POL_habsburg_events.2.b
		ai_chance = {
			base = 0
		}
	}
}
# New union treaty with USSR
country_event = {
	id = ukraine.447
	title = ukraine.447.t
	desc = ukraine.447.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	option = { #USSR agrees
		name = ukraine.447.a
		ai_chance = {
			base = 100
		}
		effect_tooltip = {
			FROM = { annex_country = { target = FROM transfer_troops = yes } }
		}
		FROM = {
			country_event = { id = ukraine.448 days = 1 }
		}
		custom_effect_tooltip = GAME_OVER_TT
	}

	option = { #USSR refuses
		name = ukraine.447.b
		ai_chance = {
			base = 0
		}
		FROM = {
			country_event = { id = ukraine.449 days = 1 }
		}
	}
}
# New union treaty with USSR - agree
country_event = {
	id = ukraine.448
	title = ukraine.448.t
	desc = ukraine.448.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	option = {
		name = ukraine.448.a
		FROM = {
			every_unit_leader = {
				set_nationality = ROOT
			}
			every_navy_leader = {
				set_nationality = ROOT
			}
		}
		if = {
			limit = { has_completed_focus = UKR_humane_communism }
			every_state = {
				limit = {
					is_core_of = SOV
				}
				add_core_of = ROOT
				remove_core_of = FROM
			}
			every_country = {
				limit = {
					has_country_flag = SOV_breakaway_country_flag
					NOT = { is_in_faction_with = ROOT }
					NOT = { has_war_with = ROOT }
					is_puppet = no
				}
				country_event = { id = ukraine.452 days = 2 random_days = 2 }
			}
		}
		else = {
			every_state = {
				limit = {
					is_core_of = SOV
				}
				add_core_of = ROOT
			}
		}
		if = { 
			limit = {
				has_completed_focus = UKR_purge
				FROM = { has_character = SOV_iosif_stalin }
			}
			FROM = {
				SOV_iosif_stalin = { set_nationality = ROOT }
				if = {
					limit = { has_character = SOV_mikhail_kalinin }
					SOV_mikhail_kalinin = { set_nationality = ROOT }
				}
				if = {
					limit = { has_character = SOV_nikolay_voznesensky }
					SOV_nikolay_voznesensky = { set_nationality = ROOT }
				}
				if = {
					limit = { has_character = SOV_maksim_litvinov }
					SOV_maksim_litvinov = { set_nationality = ROOT }
				}
				if = {
					limit = { has_character = SOV_vyacheslav_molotov }
					SOV_vyacheslav_molotov = { set_nationality = ROOT }
				}
			}
			add_advisor_role = {
				character = "SOV_iosif_stalin"
				advisor = {
					slot = political_advisor
					idea_token = SOV_iosif_stalin
					#allowed = {
					#	original_tag = UKR
					#	has_government = communism
					#}
					traits = {
						old_figurehead
					}
				}
				activate = yes
			}
		}
		if = {
			limit = {
				has_completed_focus = UKR_purge
				NOT = { has_completed_focus = UKR_soviet_technologies }
			}
			complete_national_focus = UKR_soviet_technologies
		}
		if = {
			limit = {
				has_completed_focus = UKR_purge
				NOT = { has_completed_focus = UKR_soviet_advisors }
			}
			complete_national_focus = UKR_soviet_advisors
		}
		annex_country = { target = FROM transfer_troops = yes }
		set_cosmetic_tag = UKR_NEWUSSR
		set_country_flag = UKR_form_new_ussr
		add_state_core = 92
		add_state_core = 95
		add_state_core = 96
	}
}
# New union treaty with USSR - refuse
country_event = {
	id = ukraine.449
	title = ukraine.449.t
	desc = ukraine.449.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	option = {
		name = ukraine.449.a
	}
}
# New union treaty with USSR - proposal for Ukraine
country_event = {
	id = ukraine.450
	title = ukraine.450.t
	desc = ukraine.450.d
	picture = GFX_report_event_stalin_propaganda

	is_triggered_only = yes

	option = { #accept
		name = ukraine.450.a
		ai_chance = {
			base = 100
		}
		random_other_country = {
			limit = {
				original_tag = SOV
				has_government = communism
				has_war = yes
				is_in_faction_with = ROOT
			}
			country_event = { id = ukraine.447 }
		}
	}

	option = { #decline
		name = ukraine.450.b
		ai_chance = {
			base = 0
		}
	}
}
# Capitulation of russian rebels in Siberia
country_event = {
	id = ukraine.451
	title = ukraine.451.t
	desc = ukraine.451.d

	trigger = {
		tag = SOV
		NOT = { has_government = communism }
		has_completed_focus = SOV_beaten_but_not_defeated
		has_civil_war = yes
		surrender_progress > 0.5
		any_other_country = {
			original_tag = SOV
			has_government = communism
			has_war_with = SOV
			surrender_progress < 0.25
			OR = {
				is_in_faction_with = UKR
				is_subject_of = UKR
				is_puppet_of = UKR
			}
		}
	}
	
	fire_only_once = yes
	mean_time_to_happen = { days = 7 }

	option = {
		name = ukraine.451.a
		ai_chance = {
			base = 100
		}
		add_ideas = RUS_defeatism
	}
	option = {
		name = ukraine.451.b
		ai_chance = {
			base = 0
		}
	}
}
# New union treaty - ultimatum to independent states after civil war
country_event = {
	id = ukraine.452
	title = ukraine.452.t
	desc = ukraine.452.d

	is_triggered_only = yes

	option = { #accept
		name = ukraine.452.a
		ai_chance = {
			factor = 70
		}
		effect_tooltip = { FROM = { add_to_faction = ROOT } } 
		FROM = { country_event = { id = ukraine.453 } }
	}

	option = { #decline
		name = ukraine.452.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				tag = BLR
			}
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_core_state 
					target = ROOT
				}
			}
		}
		FROM = { country_event = { id = ukraine.454 } }
	}
}
# New union treaty - country join to new union
country_event = {
	id = ukraine.453
	title = ukraine.453.t
	desc = ukraine.453.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	option = {
		name = ukraine.453.a
		if = { 
			limit = { 
				is_in_faction = no 
			} 
			create_faction = NewComintern
		}
		add_to_faction = FROM
	}
}
# New union treaty - country  refuse, create wargoal
country_event = {
	id = ukraine.454
	title = ukraine.454.t
	desc = ukraine.454.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	option = {
		name = ukraine.454.a
		create_wargoal = {
			type = take_core_state 
			target = FROM
		}
	}
}
# Chorna Rada movie
country_event = {
	id = ukraine.455
	title = ukraine.455.t
	desc = ukraine.455.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi
	
	is_triggered_only = yes

	option = {
		name = ukraine.455.a
		add_political_power = 15
	}
}
# Declare war from Band.Ukraine on other side in polish civil war  
country_event = {
	id = ukraine.456
	title = ukraine.456.t
	desc = ukraine.456.d
	picture = GFX_report_event_soviet_tanks_snow
	
	is_triggered_only = yes

	option = {
		name = ukraine.456.a
		UKR = {
			declare_war_on = {
				target = ROOT
				type = annex_everything
			}
		}
	}
}
# Ukraine propose Crimea for Germany in exchange for additional support
country_event = {
	id = ukraine.457
	title = ukraine.457.t
	desc = ukraine.457.d

	is_triggered_only = yes

	option = { #accept
		name = ukraine.457.a
		ai_chance = {
			base = 100
		}
		effect_tooltip = { 
			transfer_state = 137 
			add_state_core = 137
			transfer_state = 986 
			add_state_core = 986
		} 
		add_political_power = -75
		FROM = { country_event = { id = ukraine.458 } }
	}

	option = { #decline
		name = ukraine.457.b
		ai_chance = {
			base = 0
		}
		FROM = { country_event = { id = ukraine.459 } }
	}
}
# Ukraine propose Crimea - Germany accept
country_event = {
	id = ukraine.458
	title = ukraine.458.t
	desc = ukraine.458.d
	picture = GFX_report_event_hitler_handshake
	
	is_triggered_only = yes

	option = {
		name = ukraine.458.a
		if = {
			limit = { 192 = { is_owned_and_controlled_by = ROOT } }
			192 = { add_manpower = -60000 }
		}
		if = {
			limit = { 200 = { is_owned_and_controlled_by = ROOT } }
			200 = { add_manpower = -40000 }
		}
		if = {
			limit = { 201 = { is_owned_and_controlled_by = ROOT } }
			201 = { add_manpower = -35000 }
		}
		army_experience = 50
		add_doctrine_cost_reduction = {
			name = ukraine.457.t
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
		add_tech_bonus = {
			name = ukraine.457.t
			bonus = 1.0
			uses = 1
			category = air_equipment
		}
		hidden_effect = {
			country_event = { id = ukraine.460 days = 60 }
		}
		FROM = {
			transfer_state = 137 
			add_state_core = 137
			transfer_state = 986 
			add_state_core = 986
		}
		137 = {
			remove_claim_by = ROOT
			set_state_name = GER_gotenland
			set_province_name = { id = 3686 name = GER_theoderichshafen }
		}
		986 = {
			remove_claim_by = ROOT
			set_state_name = GER_gotenland_north
		}
	}
}
# Ukraine propose Crimea - Germany refuse
country_event = {
	id = ukraine.459
	title = ukraine.459.t
	desc = ukraine.459.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.459.a
		set_country_flag = UKR_reich_refuse_crimea
		country_event = ukraine.85
	}
}
# Ukraine propose Crimea - new factories and infrastructure
country_event = {
	id = ukraine.460
	title = ukraine.460.t
	desc = ukraine.460.d
	
	is_triggered_only = yes

	trigger = {
		OR = {
			192 = { is_owned_and_controlled_by = UKR }
			200 = { is_owned_and_controlled_by = UKR }
			201 = { is_owned_and_controlled_by = UKR }
		}
	}

	option = {
		name = ukraine.460.a
		if = {
			limit = { 
				192 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				} 
			}
			192 = { 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				200 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				} 
			}
			200 = { 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				201 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = industrial_complex
						size > 0
						include_locked = yes
					}
				} 
			}
			201 = { 
				add_extra_state_shared_building_slots = 1
				add_building_construction = {
					type = industrial_complex
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				196 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				} 
			}
			196 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				197 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				} 
			}
			197 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				198 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				} 
			}
			198 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				199 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				} 
			}
			199 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
		if = {
			limit = { 
				91 = { 
					is_owned_and_controlled_by = ROOT 
					free_building_slots = {
						building = infrastructure
						size > 0
					}
				} 
			}
			91 = { 
				add_building_construction = {
					type = infrastructure
					level = 1
					instant_build = yes
				}
			}
		}
	}
}
# Request for help from russian rebels - variant with russian queen of Ukraine
country_event = {
	id = ukraine.461
	title = ukraine.461.t
	desc = ukraine.461.d
	picture = GFX_report_event_kira_kirillovna_of_russia

	is_triggered_only = yes

	option = {
		name = ukraine.461.a
		ai_chance = {
			base = 100
		}
		effect_tooltip = {
			ROOT = {
				set_autonomy = {
					target = FROM
					autonomy_state = autonomy_personal_union
				}
			}
		}
		FROM = { country_event = { id = ukraine.462 days = 3 } }
	}

	option = {
		name = ukraine.461.b
		ai_chance = {
			base = 0
		}
	}
}
# Request for help from russian rebels - variant with russian queen of Ukraine - confirmation for rebels
country_event = {
	id = ukraine.462
	title = ukraine.462.t
	desc = ukraine.462.d

	is_triggered_only = yes

	option = {
		name = ukraine.462.a
		ai_chance = {
			base = 100
		}
		hidden_effect = { drop_cosmetic_tag = yes }
		FROM = {
			add_to_war = { targeted_alliance = ROOT enemy = SOS }
			set_autonomy = {
				target = ROOT
				autonomy_state = autonomy_personal_union
			}
		}
	}

	option = {
		name = ukraine.462.b
		ai_chance = {
			base = 0
		}
		FROM = { country_event = { id = ukraine.463 } }
	}
}
# Request for help from russian rebels - variant with russian queen of Ukraine - rebels does not agree to the terms
country_event = {
	id = ukraine.463
	title = ukraine.463.t
	desc = ukraine.463.d

	is_triggered_only = yes

	option = {
		name = ukraine.463.a
	}
}
# Hetmans yearly elections - victory of unionists
country_event = {
	id = ukraine.464
	title = ukraine.464.t
	desc = ukraine.464.d
	picture = GFX_report_event_hetmans_kleinods
	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	immediate = {
		hidden_effect = { activate_mission = UKR_hetmans_yearly_elections }
	}

	option = {
		name = ukraine.464.a
		if = {
			limit = {
				has_country_leader = { character = UKR_danylo_skoropadskyi ruling_only = yes }
			}
			add_political_power = 100
		}
		else = {
			promote_character = UKR_danylo_skoropadskyi
		}
		if = { 
			limit = { has_country_leader_with_trait = inexperienced_hetmanych }
			swap_ruler_traits = { remove = inexperienced_hetmanych add = shadow_of_hetman }
		}
		if = {
			limit = {
				has_country_flag = UKR_unionists_is_rulers
				check_variable = { var_ucr_promised_positions > 0 }
			}
			ucr_calculate_promised_posts = yes
		}
		ucr_reelect_posts = yes
		set_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_support_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_opposition_of_black_full = yes
	}
}
# Hetmans yearly elections - victory of guards of order
country_event = {
	id = ukraine.465
	title = ukraine.465.t
	desc = ukraine.465.d
	picture = GFX_report_event_hetmans_kleinods
	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	immediate = {
		hidden_effect = { activate_mission = UKR_hetmans_yearly_elections }
	}

	option = {
		name = ukraine.465.a
		if = {
			limit = {
				has_country_leader = { character = UKR_oleksander_beresowski ruling_only = yes }
			}
			add_political_power = 100
		}
		else = {
			promote_character = UKR_oleksander_beresowski
		}
		if = {
			limit = {
				has_country_flag = UKR_guards_of_order_is_rulers
				check_variable = { var_ucr_promised_positions > 0 }
			}
			ucr_calculate_promised_posts = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = UKR_beresowski_is_marshal }
			}
			add_field_marshal_role = {
				desc = UKR_oleksander_beresowski_desc
				character = UKR_oleksander_beresowski
				traits = { old_guard infantry_leader unyielding_defender }
				skill = 3
				attack_skill = 2
				defense_skill = 3
				planning_skill = 3
				logistics_skill = 2
			}
			set_country_flag = UKR_beresowski_is_marshal
		}
		ucr_reelect_posts = yes
		set_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_opposition_of_unionists_full = yes
		ucr_support_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_opposition_of_black_full = yes
	}
	option = { #veto
		name = ukraine.465.b
		trigger = { has_character = UKR_pavlo_skoropadskyi }
		promote_character = UKR_danylo_skoropadskyi
		add_stability = -0.10
		add_war_support = -0.10
		add_political_power = -120
		if = { 
			limit = { has_country_leader_with_trait = inexperienced_hetmanych }
			swap_ruler_traits = { remove = inexperienced_hetmanych add = shadow_of_hetman }
		}
		set_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_support_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_opposition_of_black_full = yes
		set_variable = { ucr_loyality_of_osavul = 1 }
		set_variable = { ucr_loyality_of_pisar = 1 }
		set_variable = { ucr_loyality_of_judge = 1 }
		set_variable = { ucr_loyality_of_wagonmaster = 1 }
		set_variable = { ucr_loyality_of_khorunzhy = 1 }
		ucr_reelect_posts = yes
	}
}
# Hetmans yearly elections - victory of right wing
country_event = {
	id = ukraine.466
	title = ukraine.466.t
	desc = ukraine.466.d
	picture = GFX_report_event_hetmans_kleinods
	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	immediate = {
		hidden_effect = { activate_mission = UKR_hetmans_yearly_elections }
	}

	option = {
		name = ukraine.466.a
		if = {
			limit = {
				has_country_leader = { character = UKR_petro_bolbochan ruling_only = yes }
			}
			add_political_power = 100
		}
		else = {
			promote_character = UKR_petro_bolbochan
		}
		if = {
			limit = {
				has_country_flag = UKR_right_wing_is_rulers
				check_variable = { var_ucr_promised_positions > 0 }
			}
			ucr_calculate_promised_posts = yes
		}
		if = {
			limit = {
				has_country_flag = bolbochan_goes_from_staff
				UKR_petro_bolbochan = {
					is_field_marshal = no
				}
			}
			UKR_petro_bolbochan = {
				promote_leader = yes
			}
		}
		else_if = {
			limit = {
				NOT = { has_country_flag = bolbochan_goes_from_staff }
				NOT = { has_country_flag = UKR_bolbochan_is_marshal }
			}
			set_country_flag = UKR_bolbochan_is_marshal
			UKR_petro_bolbochan = {
				promote_leader = yes
			}
		}
		ucr_reelect_posts = yes
		set_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_opposition_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_support_of_right_full = yes
		ucr_opposition_of_black_full = yes
	}
	option = { #veto
		name = ukraine.465.b
		trigger = { has_character = UKR_pavlo_skoropadskyi }
		promote_character = UKR_danylo_skoropadskyi
		add_stability = -0.10
		add_war_support = -0.10
		add_political_power = -120
		if = { 
			limit = { has_country_leader_with_trait = inexperienced_hetmanych }
			swap_ruler_traits = { remove = inexperienced_hetmanych add = shadow_of_hetman }
		}
		set_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_support_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_opposition_of_black_full = yes
		set_variable = { ucr_loyality_of_osavul = 1 }
		set_variable = { ucr_loyality_of_pisar = 1 }
		set_variable = { ucr_loyality_of_judge = 1 }
		set_variable = { ucr_loyality_of_wagonmaster = 1 }
		set_variable = { ucr_loyality_of_khorunzhy = 1 }
		ucr_reelect_posts = yes
	}
}
# Hetmans yearly elections - victory of black rada
country_event = {
	id = ukraine.467
	title = ukraine.467.t
	desc = ukraine.467.d
	picture = GFX_report_event_hetmans_kleinods
	trigger = {
		has_government = neutrality
	}

	is_triggered_only = yes

	immediate = {
		hidden_effect = { activate_mission = UKR_hetmans_yearly_elections }
	}

	option = {
		name = ukraine.467.a
		if = {
			limit = {
				has_country_leader = { character = UKR_panas_lyubchenko ruling_only = yes }
			}
			add_political_power = 100
		}
		else = {
			promote_character = UKR_panas_lyubchenko
		}
		if = {
			limit = {
				has_country_flag = UKR_black_rada_is_rulers
				check_variable = { var_ucr_promised_positions > 0 }
			}
			ucr_calculate_promised_posts = yes
		}
		if = {
			limit = {
				NOT = { has_country_flag = UKR_lyubchenko_is_marshal }
			}
			add_field_marshal_role = {
				character = UKR_panas_lyubchenko
				traits = { }
				skill = 1
				attack_skill = 1
				defense_skill = 1
				planning_skill = 1
				logistics_skill = 1
			}
			set_country_flag = UKR_lyubchenko_is_marshal
		}
		ucr_reelect_posts = yes
		set_country_flag = UKR_black_rada_is_rulers
		clr_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		ucr_opposition_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_support_of_black_full = yes
	}
	option = { #veto
		name = ukraine.465.b
		trigger = { has_character = UKR_pavlo_skoropadskyi }
		promote_character = UKR_danylo_skoropadskyi
		add_stability = -0.10
		add_war_support = -0.10
		add_political_power = -120
		if = { 
			limit = { has_country_leader_with_trait = inexperienced_hetmanych }
			swap_ruler_traits = { remove = inexperienced_hetmanych add = shadow_of_hetman }
		}
		set_country_flag = UKR_unionists_is_rulers
		clr_country_flag = UKR_guards_of_order_is_rulers
		clr_country_flag = UKR_right_wing_is_rulers
		clr_country_flag = UKR_black_rada_is_rulers
		ucr_support_of_unionists_full = yes
		ucr_opposition_of_guards_full = yes
		ucr_opposition_of_right_full = yes
		ucr_opposition_of_black_full = yes
		set_variable = { ucr_loyality_of_osavul = 1 }
		set_variable = { ucr_loyality_of_pisar = 1 }
		set_variable = { ucr_loyality_of_judge = 1 }
		set_variable = { ucr_loyality_of_wagonmaster = 1 }
		set_variable = { ucr_loyality_of_khorunzhy = 1 }
		ucr_reelect_posts = yes
	}
}
# Skoropadskyi dies - hidden trigger event
country_event = {
	id = ukraine.468
	hidden = yes

	fire_only_once = yes
	
	trigger = {
		tag = UKR
		has_government = neutrality
		has_character = UKR_pavlo_skoropadskyi
		date > 1945.4.1
	}	

	mean_time_to_happen = {
		days = 30
	}

	immediate = {
		if = {
			limit = { UKR_pavlo_skoropadskyi = { is_country_leader = yes } }
			country_event = { id = ukraine.122 hours = 4 }
		}
		else = {
			country_event = { id = ukraine.469 hours = 4 }
		}
		if = { 
			limit = { has_country_leader_with_trait = shadow_of_hetman }
			swap_ruler_traits = { remove = shadow_of_hetman add = hetman_danylo }
		}
		retire_character = UKR_pavlo_skoropadskyi
	}
}
# Hetman dies - he is not leader of country
country_event = {
	id = ukraine.469
	title = ukraine.469.t
	desc = ukraine.469.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi

	is_triggered_only = yes

	option = {
		name = ukraine.469.a
	}
}
# Hetmans yearly elections - results
country_event = {
	id = ukraine.470
	hidden = yes

	is_triggered_only = yes

	immediate = {
		country_event = { id = ukraine.485 days = 60 random_days = 40 }
		#special conditions for some factions
		if = {
			limit = { 
				NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
				any_other_country = {
					original_tag = SOV
					has_government = communism
					has_war_with = UKR
				} 
				UKR = { surrender_progress < 0.1 }
			}
			ucr_support_of_guards_full = yes
		}
		if = {
			limit = { 
				NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
				any_other_country = {
					original_tag = SOV
					NOT = { has_government = communism }
					is_in_faction_with = UKR
				} 
				UKR = { is_puppet = no }
			}
			ucr_support_of_guards_full = yes
		}
		if = {
			limit = {
				89 = { is_controlled_by = UKR }
				91 = { is_controlled_by = UKR }
				93 = { is_controlled_by = UKR }
				80 = { is_controlled_by = UKR }
				766 = { is_controlled_by = UKR }
				986 = { is_controlled_by = UKR }
				137 = { is_controlled_by = UKR }
				73 = { is_controlled_by = UKR }
			}
			ucr_support_of_right_full = yes
		}
		set_temp_variable = { temp_stab = stability }
		if = {
			limit = {
				check_variable = { temp_stab > 0.95 }
			}
			ucr_support_of_black_full = yes
		}
		else_if = {
			limit = {
				check_variable = { temp_stab > 0.8 }
			}
			ucr_support_of_black_big = yes
		}
		else_if = {
			limit = {
				check_variable = { temp_stab > 0.65 }
			}
			ucr_support_of_black_small = yes
		}
		#simplification for AI
		if = {
			limit = {
				is_ai = yes
				has_country_flag = UKR_unionists_is_rulers
			}
			ucr_support_of_guards_full = yes
			ucr_support_of_right_full = yes
			ucr_support_of_black_full = yes
		}
		# preliminary election of cossacks starshina
		if = {
			limit = {
				check_variable = { var_ucr_support_of_unionists > 79 }
				check_variable = { var_ucr_support_of_guards_of_order > 79 }
				check_variable = { var_ucr_support_of_right_wing > 79 }
				check_variable = { var_ucr_support_of_black_rada > 79 }
			}
			set_variable = { ucr_loyality_of_osavul = 1 }
			set_variable = { ucr_loyality_of_pisar = 1 }
			set_variable = { ucr_loyality_of_judge = 1 }
			set_variable = { ucr_loyality_of_wagonmaster = 1 }
			set_variable = { ucr_loyality_of_khorunzhy = 1 }
		}
		else = {
			random_list = {
				50 = { set_variable = { ucr_loyality_of_osavul = 1 } }
				25 = { set_variable = { ucr_loyality_of_osavul = 0 } }
				25 = { set_variable = { ucr_loyality_of_osavul = -1 } }
			}
			random_list = {
				50 = { set_variable = { ucr_loyality_of_pisar = 1 } }
				25 = { set_variable = { ucr_loyality_of_pisar = 0 } }
				25 = { set_variable = { ucr_loyality_of_pisar = -1 } }
			}
			random_list = {
				50 = { set_variable = { ucr_loyality_of_judge = 1 } }
				25 = { set_variable = { ucr_loyality_of_judge = 0 } }
				25 = { set_variable = { ucr_loyality_of_judge = -1 } }
			}
			random_list = {
				50 = { set_variable = { ucr_loyality_of_wagonmaster = 1 } }
				25 = { set_variable = { ucr_loyality_of_wagonmaster = 0 } }
				25 = { set_variable = { ucr_loyality_of_wagonmaster = -1 } }
			}
			random_list = {
				50 = { set_variable = { ucr_loyality_of_khorunzhy = 1 } }
				25 = { set_variable = { ucr_loyality_of_khorunzhy = 0 } }
				25 = { set_variable = { ucr_loyality_of_khorunzhy = -1 } }
			}
		}
		log = "unionists: [?var_ucr_support_of_unionists]"
		log = "guards: [?var_ucr_support_of_guards_of_order]"
		log = "right wing: [?var_ucr_support_of_right_wing]"
		log = "black rada: [?var_ucr_support_of_black_rada]"
		#if have support of two and more opposition factions - current hetman save post
		if = {
			limit = {
				has_country_flag = UKR_unionists_is_rulers
				count_triggers = {
					amount = 2
					check_variable = { var_ucr_support_of_guards_of_order > 79 }
					check_variable = { var_ucr_support_of_right_wing > 79 }
					check_variable = { var_ucr_support_of_black_rada > 79 }
				}
			}
			ucr_bonus_post = yes
			country_event = ukraine.464
		}
		else_if = {
			limit = {
				has_country_flag = UKR_guards_of_order_is_rulers
				count_triggers = {
				    amount = 2
				    check_variable = { var_ucr_support_of_unionists > 79 }
				    check_variable = { var_ucr_support_of_right_wing > 79 }
				    check_variable = { var_ucr_support_of_black_rada > 79 }
				}
			}
			ucr_bonus_post = yes
			country_event = ukraine.465
		}
		else_if = {
			limit = {
				has_country_flag = UKR_right_wing_is_rulers
				count_triggers = {
				    amount = 2
				    check_variable = { var_ucr_support_of_unionists > 79 }
				    check_variable = { var_ucr_support_of_guards_of_order > 79 }
				    check_variable = { var_ucr_support_of_black_rada > 79 }
				}
			}
			ucr_bonus_post = yes
			country_event = ukraine.466
		}
		else_if = {
			limit = {
				has_country_flag = UKR_black_rada_is_rulers
				count_triggers = {
				    amount = 2
				    check_variable = { var_ucr_support_of_unionists > 79 }
				    check_variable = { var_ucr_support_of_guards_of_order > 79 }
				    check_variable = { var_ucr_support_of_right_wing > 79 }
				}
			}
			ucr_bonus_post = yes
			country_event = ukraine.467
		}
		else = { # if current ruling faction not have support of other
			random_list = {
				20 = {
					modifier = {
						NOT = { has_country_flag = UKR_unionists_is_rulers }
						check_variable = { var_ucr_support_of_unionists > 79 }
						factor = 10
					}
					modifier = {
						has_stability < 0.25
						factor = 2
					}
					country_event = ukraine.464
				}
				20 = {
					modifier = {
						NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
						check_variable = { var_ucr_support_of_guards_of_order > 79 }
						factor = 10
					}
					modifier = {
						has_war_with = SOV
						SOV = { has_government = communism }
						factor = 2
					}
					country_event = ukraine.465
				}
				20 = {
					modifier = {
						NOT = { has_country_flag = UKR_right_wing_is_rulers }
						check_variable = { var_ucr_support_of_right_wing > 79 }
						factor = 10
					}
					modifier = {
						has_defensive_war = yes
						factor = 2
					}
					country_event = ukraine.466
				}
				40 = {
					modifier = {
						NOT = { has_country_flag = UKR_black_rada_is_rulers }
						check_variable = { var_ucr_support_of_black_rada > 79 }
						factor = 10
					}
					modifier = {
						has_war_support < 0.25
						factor = 2
					}
					country_event = ukraine.467
				}
			}
		}
	}
}
# Promise positions in government for opposition in UCR
country_event = {
	id = ukraine.471
	title = ukraine.471.t
	desc = ukraine.471.d
	picture = GFX_report_event_hetman_with_generals

	is_triggered_only = yes

	option = {
		name = ukraine.471.a
		trigger = { NOT = { has_country_flag = UKR_unionists_is_rulers } }
		add_to_variable = { var_ucr_promised_positions = 1 }
		ucr_support_of_unionists_big = yes
	}
	option = {
		name = ukraine.471.b
		trigger = { NOT = { has_country_flag = UKR_guards_of_order_is_rulers } }
		add_to_variable = { var_ucr_promised_positions = 1 }
		ucr_support_of_guards_big = yes
	}
	option = {
		name = ukraine.471.c
		trigger = { NOT = { has_country_flag = UKR_right_wing_is_rulers } }
		add_to_variable = { var_ucr_promised_positions = 1 }
		ucr_support_of_right_big = yes
	}
	option = {
		name = ukraine.471.e
		trigger = { NOT = { has_country_flag = UKR_black_rada_is_rulers } }
		add_to_variable = { var_ucr_promised_positions = 1 }
		ucr_support_of_black_big = yes
	}
	option = {
		name = ukraine.471.f
		add_political_power = 50
	}
}
# First assembly of Ukrainian cossacks rada
country_event = {
	id = ukraine.472
	title = ukraine.472.t
	desc = ukraine.472.d
	picture = GFX_report_event_hetman_with_ambassadors

	is_triggered_only = yes

	trigger = {
		has_character = UKR_pavlo_skoropadskyi
	}
	
	option = {
		name = ukraine.472.a
		set_country_flag = UKR_cossack_republic
		set_country_flag = UKR_unionists_is_rulers
		set_variable = { ucr_modifier_polit_power = 0 }
		set_variable = { ucr_unionists_polit_power = 0 }
		set_variable = { ucr_guards_polit_power = 0 }
		set_variable = { ucr_right_polit_power = 0 }
		set_variable = { ucr_black_polit_power = 0 }
		set_variable = { ucr_modifier_wargoal = 0 }
		set_variable = { ucr_unionists_dipl_bonus = 0 }
		set_variable = { ucr_guards_dipl_bonus = 0 }
		set_variable = { ucr_right_dipl_bonus = 0 }
		set_variable = { ucr_black_dipl_bonus = 0 }
		set_variable = { ucr_loyality_of_osavul = 1 }
		set_variable = { ucr_loyality_of_pisar = 1 }
		set_variable = { ucr_loyality_of_judge = 1 }
		set_variable = { ucr_loyality_of_wagonmaster = 1 }
		set_variable = { ucr_loyality_of_khorunzhy = 1 }
		set_variable = { var_ucr_promised_positions = 0 }
		hidden_effect = {
			add_ideas = {
				ucr_loyal_osavul
				ucr_loyal_pisar
				ucr_loyal_judge
				ucr_loyal_wagonmaster
				ucr_loyal_khorunzhy
			}
			add_dynamic_modifier = {
				modifier = UKR_bonuses_for_ucr_mod
			}
			ucr_support_of_unionists_full = yes
			ucr_opposition_of_guards_full = yes
			ucr_opposition_of_right_full = yes
			ucr_opposition_of_black_full = yes
			add_country_leader_role = {
				character = UKR_oleksander_beresowski
				promote_leader = no
				country_leader = {
					ideology = despotism
					expire = "1953.3.1"
					traits = { persistent_reactionist }
					desc = UKR_oleksander_beresowski_desc
				}
			}
			add_country_leader_role = {
				character = UKR_petro_bolbochan
				promote_leader = no
				country_leader = {
					ideology = despotism
					expire = "1953.3.1"
					traits = { nationalist_symbol }
					desc = UKR_petro_bolbochan_desc
				}
			}
			add_country_leader_role = {
				character = UKR_panas_lyubchenko
				promote_leader = no
				country_leader = {
					ideology = moderatism
					expire = "1953.3.1"
					traits = { irresponsible_populist }
				}
			}
		}
		promote_character = UKR_danylo_skoropadskyi
		add_field_marshal_role = {
			desc = UKR_danylo_skoropadskyi_desc
			character = UKR_danylo_skoropadskyi
			traits = { }
			skill = 1
			attack_skill = 1
			defense_skill = 1
			planning_skill = 1
			logistics_skill = 1
		}
		activate_mission = UKR_hetmans_yearly_elections
		hidden_effect = { country_event = { id = ukraine.473 days = 3 random_days = 2 } }
	}
}
# Choice cosmetic tag UCR
country_event = {
	id = ukraine.473
	title = ukraine.473.t
	desc = ukraine.473.d
	picture = GFX_report_event_ukrainian_defence

	is_triggered_only = yes

	option = {
		name = ukraine.473.a
		set_cosmetic_tag = UKR_UCR
	}
	option = {
		name = ukraine.473.b
	}
}
# Manual for UCR
country_event = {
	id = ukraine.474
	title = ukraine.474.t
	desc = ukraine.474.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.474.a
	}
	option = {
		name = ukraine.474.b
		set_country_flag = UKR_dont_need_manual_for_UCR
	}
}
# New Pereiaslav Agreement with Russia - choice for Russia
country_event = {
	id = ukraine.475
	title = ukraine.475.t
	desc = ukraine.475.d
	picture = GFX_report_event_pereiaslav_agreement
	
	is_triggered_only = yes

	option = {
		name = ukraine.475.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 1.5
				FROM = { has_government = ROOT }
			}
			modifier = {
				factor = 1.2
				has_war = yes
			}
		}
		if = {
			limit = { 
				OR = {
					is_in_faction = no
					is_faction_leader = no
				}
				OR = {
					FROM = {
						is_in_faction = no
						is_faction_leader = no
					}
				}
			}
			create_faction = PereiaslavPact
			add_to_faction = FROM
		}
		else_if = {
			limit = {
				FROM = { is_faction_leader = yes }
			}
			FROM = {
				add_to_faction = ROOT
			}
		}
		else_if = {
			limit = {
				is_faction_leader = yes 
			}
			add_to_faction = FROM
		}
		FROM = { country_event = ukraine.476 }
	}
	option = {
		name = ukraine.475.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 1.5
				has_government = fascism
			}
			modifier = {
				factor = 1.5
				137 = { is_owned_and_controlled_by = FROM }
			}
		}
		FROM = { country_event = ukraine.477 }
	}
}
# New Pereiaslav Agreement with Russia - Russia agree
country_event = {
	id = ukraine.476
	title = ukraine.476.t
	desc = ukraine.476.d
	picture = GFX_report_event_pereiaslav_agreement
	
	is_triggered_only = yes

	option = {
		name = ukraine.476.a
		if = {
			limit = { 202 = { is_owned_and_controlled_by = ROOT } }
			set_province_name = { id = 9543 name = UKR_pereiaslav_khmelnytskyi }
		}
	}
}
# New Pereiaslav Agreement with Russia - Russia refuse
country_event = {
	id = ukraine.477
	title = ukraine.477.t
	desc = ukraine.477.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.477.a
		ucr_opposition_of_unionists_big = yes
	}
}
# Don annexed by Ukrainian Cossaks republic
country_event = {
	id = ukraine.478
	title = ukraine.478.t
	desc = ukraine.478.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.478.a
		UKR = { 
			annex_country = { target = DON }
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
}
# Integration of Don cossacks
country_event = {
	id = ukraine.479
	title = ukraine.479.t
	desc = ukraine.479.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes

	trigger = {
		218 = { is_owned_and_controlled_by = UKR }
	}
	
	option = {
		name = ukraine.479.a
		add_state_core = 218
		add_state_core = 238
		add_state_core = 245
	}
}
# Conflict with Bolbochan and Konovalets
country_event = {
	id = ukraine.480
	title = ukraine.480.t
	desc = ukraine.480.d
	picture = GFX_report_event_oun_council
	
	trigger = {
		tag = UKR
		has_country_flag = UKR_cossack_republic
		has_country_flag = UKR_right_wing_is_rulers
		has_government = neutrality 
		has_war = no
		has_character = UKR_yevhen_konovalets
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 45 }

	option = {
		name = ukraine.480.a
		ai_chance = {
			factor = 100
		}
		retire_character = UKR_yevhen_konovalets
		add_political_power = -100
	}
	option = {
		name = ukraine.480.b
		trigger = {
			UKR_yevhen_konovalets = {
				is_field_marshal = no
			}
		}
		ai_chance = {
			factor = 100
		}
		add_command_power = -30
		UKR_yevhen_konovalets = {
			promote_leader = yes
		}
	}
	option = {
		name = ukraine.480.c
		ai_chance = {
			factor = 0
		}
		add_timed_idea = {
			idea = UKR_oun_opposition_bolbochan
			days = 180
		}
	}	
}
# Intervention in Crimean politic if Guards is rulers and Mejlis suppress russians
country_event = {
	id = ukraine.481
	title = ukraine.481.t
	desc = ukraine.481.d
	picture = GFX_report_event_bakhchisaray_palace
	
	trigger = {
		original_tag = UKR
		has_country_flag = UKR_cossack_republic
		has_country_flag = UKR_guards_of_order_is_rulers
		CRI = {
			is_subject_of = UKR
			has_completed_focus = CRI_change_government
			NOT = { has_government = democratic }
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 45 }

	option = {
		name = ukraine.481.a
		ai_chance = {
			factor = 0
		}
		CRI = { country_event = { id = ukraine.482 days = 1 } }
	}
	option = {
		name = ukraine.481.b
		ai_chance = {
			factor = 100
		}
	}
}
# Ukrainian government press on our domestic politic
country_event = {
	id = ukraine.482
	title = ukraine.482.t
	desc = ukraine.482.d
	picture = GFX_report_event_hetman_with_ambassadors
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.482.a
		ai_chance = {
			factor = 70
		}
		complete_national_focus = CRI_keep_government
		FROM = { country_event = ukraine.483 }
	}
	option = {
		name = ukraine.482.a
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				has_government = communism
			}
		}
		FROM = { 
			end_puppet = ROOT
			country_event = ukraine.484
		}
		effect_tooltip = {
			FROM = {
				declare_war_on = {
					target = ROOT
					type = puppet_wargoal_focus
				}
			}
		}
	}
}
# Mejlis submits and retires
country_event = {
	id = ukraine.483
	title = ukraine.483.t
	desc = ukraine.483.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.483.a
	}
}
# Mejlis resists - go to war operation
country_event = {
	id = ukraine.484
	title = ukraine.484.t
	desc = ukraine.484.d
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.484.a
		declare_war_on = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}
}
# Opposition faction demand of appointment candidate in military command
country_event = {
    id = ukraine.485
    hidden = yes
    is_triggered_only = yes

  	immediate = {
  		random_list = {
  			25 = {
  				modifier = {
  					OR = {
  						has_country_flag = UKR_unionists_is_rulers
						has_idea = UKR_vyacheslav_klochkovskyi
  					}
					factor = 0
				}
				country_event = ukraine.486
  			}
  			25 = {
  				modifier = {
  					OR = {
						has_country_flag = UKR_guards_of_order_is_rulers
						has_idea = UKR_vasily_biskupsky
					}
					factor = 0
				}
				country_event = ukraine.487
  			}
  			25 = {
  				modifier = {
  					OR = {
						has_country_flag = UKR_right_wing_is_rulers
						has_idea = UKR_volodymyr_kubiyovych
					}
					factor = 0
				}
				country_event = ukraine.488
  			}
  			25 = {
  				modifier = {
  					OR = {
						has_country_flag = UKR_black_rada_is_rulers
						has_idea = UKR_volodymyr_kedrowsky
					}
					factor = 0
				}
				country_event = ukraine.489
  			}
  		}
  	}
 }
 # Unionists demand appoint of Klochkovskyi
country_event = {
	id = ukraine.486
	title = ukraine.486.t
	desc = ukraine.486.d
	picture = GFX_report_event_hetman_with_ambassadors
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_country_flag = UKR_unionists_is_rulers }
		NOT = { has_idea = UKR_vyacheslav_klochkovskyi }
	}
	
	option = {
		name = ukraine.486.a
		ai_chance = {
			base = 0
		}
		activate_mission = UKR_appointment_of_klochkovskyi_mission
	}

	option = {
		name = ukraine.486.b
		ai_chance = {
			base = 100
		}
		if = {
			limit = { check_variable = { var_ucr_support_of_unionists > 0 } }
			ucr_opposition_of_unionists_small = yes
		}
	}
}
# Guards demand appoint of Biskupsky
country_event = {
	id = ukraine.487
	title = ukraine.487.t
	desc = ukraine.487.d
	picture = GFX_report_event_hetman_with_ambassadors
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_country_flag = UKR_guards_of_order_is_rulers }
		NOT = { has_idea = UKR_vasily_biskupsky }
	}
	
	option = {
		name = ukraine.486.a
		ai_chance = {
			base = 0
		}
		activate_mission = UKR_appointment_of_biskupsky_mission
	}

	option = {
		name = ukraine.486.b
		ai_chance = {
			base = 100
		}
		if = {
			limit = { check_variable = { var_ucr_support_of_guards_of_order > 0 } }
			ucr_opposition_of_guards_small = yes
		}
	}
}
# Rights demand appoint of Kubiyovych
country_event = {
	id = ukraine.488
	title = ukraine.488.t
	desc = ukraine.488.d
	picture = GFX_report_event_hetman_with_ambassadors
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_country_flag = UKR_right_wing_is_rulers }
		NOT = { has_idea = UKR_volodymyr_kubiyovych }
	}
	
	option = {
		name = ukraine.486.a
		ai_chance = {
			base = 0
		}
		activate_mission = UKR_appointment_of_kubiyovych_mission
	}

	option = {
		name = ukraine.486.b
		ai_chance = {
			base = 100
		}
		if = {
			limit = { check_variable = { var_ucr_support_of_right_wing > 0 } }
			ucr_opposition_of_right_small = yes
		}
	}
}
# Black rada demand appoint of Kedrowsky
country_event = {
	id = ukraine.489
	title = ukraine.489.t
	desc = ukraine.489.d
	picture = GFX_report_event_hetman_with_ambassadors
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_country_flag = UKR_black_rada_is_rulers }
		NOT = { has_idea = UKR_volodymyr_kedrowsky }
	}
	
	option = {
		name = ukraine.486.a
		ai_chance = {
			base = 0
		}
		activate_mission = UKR_appointment_of_kedrowsky_mission
	}

	option = {
		name = ukraine.486.b
		ai_chance = {
			base = 100
		}
		if = {
			limit = { check_variable = { var_ucr_support_of_black_rada > 0 } }
			ucr_opposition_of_black_small = yes
		}
	}
}
# Osavul propose new reforms in army - increase his loyality
country_event = {
	id = ukraine.490
	title = ukraine.490.t
	desc = ukraine.490.d
	picture = GFX_report_event_hetman_with_generals
	
	trigger = {
		original_tag = UKR
		has_country_flag = UKR_cossack_republic
		check_variable = { ucr_loyality_of_osavul < 1 }
		has_army_experience > 15
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30 }

	option = {
		name = ukraine.490.a
		army_experience = -15
		custom_effect_tooltip = add_loyality_of_osavul_tt
		add_to_variable = { ucr_loyality_of_osavul = 1 }
		if = {
			limit = { has_idea = ucr_disloyal_osavul }
			remove_ideas = ucr_disloyal_osavul
		}
		else = {
			add_ideas = ucr_loyal_osavul
		}
	}
	option = {
		name = ukraine.490.b
	}
}
# events of new book or movie
country_event = {
	id = ukraine.491
	hidden = yes

	trigger = {
		has_government = neutrality 
		tag = UKR
		date > 1936.3.1
		date < 1936.6.1
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	immediate = {
		random_list = {
			50 = {
				country_event = { id = ukraine.455 days = 5 }
			}
			50 = {
				country_event = { id = ukraine.492 days = 5 }
			}			
		}
	}
}
# Cost of life book
country_event = {
	id = ukraine.492
	title = ukraine.492.t
	desc = ukraine.492.d
	picture = GFX_report_event_ukrainian_propaganda
	
	is_triggered_only = yes

	option = {
		name = ukraine.492.a
		add_stability = 0.01
		add_war_support = -0.01
	}
}
# Inefficiency of collectivization
country_event = {
	id = ukraine.493
	title = ukraine.493.t
	desc = ukraine.493.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.493.a
		add_timed_idea = {
			idea = UKR_famine_in_Ukraine
			days = 1825
		}
		hidden_effect = { country_event = { id = ukraine.497 days = 60 random_days = 30 } }
	}
}
# Propose alliance with Poland
country_event = {
	id = ukraine.494
	title = ukraine.494.t
	desc = ukraine.494.d

	is_triggered_only = yes

	trigger = {
		NOT = { is_in_faction_with = UKR }
	}
	
	option = {
		name = ukraine.494.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { is_faction_leader = yes }
			add_to_faction = FROM
		}
		else = {
			create_faction = miedzymorze_faction
			add_to_faction = FROM
		}
		FROM = { 
			country_event = { id = ukraine.495 } 
			effect_tooltip = {
				remove_state_core = 89
				remove_state_core = 91
				remove_state_core = 93
				remove_state_core = 987
			}
		}
		
	}
	
	option = {
		name = ukraine.494.b
		ai_chance = {
			base = 0
		}
		FROM = { country_event = { id = ukraine.496 } }
	}
}
# Poland and Ukraine join to faction
country_event = {
	id = ukraine.495
	title = ukraine.495.t
	desc = ukraine.495.d
	picture = GFX_report_event_ukr_foreign_ministry

	is_triggered_only = yes
	
	option = {
		name = ukraine.495.a
		remove_state_core = 89
		remove_state_core = 91
		remove_state_core = 93
		remove_state_core = 987
		89 = { add_core_of = WUA }
		91 = { add_core_of = WUA }
		93 = { add_core_of = WUA }
		987 = { add_core_of = WUA }
	}
}
# Poland refuses ukrainian proposition
country_event = {
	id = ukraine.496
	title = ukraine.496.t
	desc = ukraine.496.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.496.a
		if = { 
			limit = { has_government = democratic }
			complete_national_focus = UKR_peace_politic
		}
		else_if = {
			limit = { has_government = neutrality }
			complete_national_focus = UKR_Ukraine_first
		}
	}
}
# Food crisis discussion
country_event = {
	id = ukraine.497
	title = ukraine.497.t
	desc = ukraine.497.d
	picture = GFX_report_event_generic_communist_congress
	
	is_triggered_only = yes

	trigger = {
		has_idea = UKR_famine_in_Ukraine
	}

	option = {
		name = ukraine.497.a
		ai_chance = {
			factor = 80
		}
		country_event = { id = ukraine.169 days = 2 }
	}

	option = {
		name = ukraine.497.b
		ai_chance = {
			factor = 20
		}
		remove_ideas = UKR_famine_in_Ukraine
		add_timed_idea = {
			idea = UKR_food_purchases
			days = 1825
		}
	}

	option = {
		name = ukraine.497.c
		ai_chance = {
			factor = 0
		}
	}
}
# Khrushchev believed in his own strength
country_event = {
	id = ukraine.498
	title = ukraine.498.t
	desc = ukraine.498.d
	picture = GFX_report_event_nukes_speach

	trigger = {
		original_tag = UKR
		has_government = communism
		has_country_leader_with_trait = active_worker
		has_completed_focus = UKR_demand_western_ukraine
		91 = { is_controlled_by = UKR }
	}

	mean_time_to_happen = { days = 20 }
	fire_only_once = yes

	option = {
		name = ukraine.498.a
		swap_ruler_traits = { remove = active_worker add = haughty_voluntarist }
	}
}
# Negotiations with Lithuania
country_event = {
	id = ukraine.499
	title = ukraine.499.t
	desc = ukraine.499.d
	picture = GFX_report_event_foreign_affairs_of_skoropadskyi
	
	is_triggered_only = yes

	option = {
		name = ukraine.499.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				has_completed_focus = LIT_peace_with_poland
			}
			modifier = {
				factor = 2
				POL = {
					OR = {
						has_government = fascism
						has_completed_focus = POL_polish_revanchism
						has_completed_focus = POL_cossack_king
					}
					
				}
			}
		}
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 784 }
		}
		add_state_claim = 94
		add_state_claim = 95
		add_state_claim = 96
		add_state_claim = 97
		add_ai_strategy = {
	    	type = conquer
	    	id = POL
	    	value = 200
	    }
	    if = {
	    	limit = {
				has_guaranteed = POL
	    	}
	    	diplomatic_relation = {
				country = POL
				relation = guarantee
				active = no
			}
	    }
		FROM = { country_event = ukraine.500 }
	}

	option = {
		name = ukraine.499.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				has_government = fascism
			}
		}
		FROM = { country_event = ukraine.501 }
	}
}
# Negotiations with Lithuania - agree
country_event = {
	id = ukraine.500
	title = ukraine.500.t
	desc = ukraine.500.d
	picture = GFX_report_event_lithuanian_ultimatum
	
	is_triggered_only = yes

	option = {
		name = ukraine.500.a
	}
}
# Negotiations with Lithuania - refuse
country_event = {
	id = ukraine.501
	title = ukraine.501.t
	desc = ukraine.501.d
	picture = GFX_report_event_lithuanian_ultimatum
	
	is_triggered_only = yes

	option = {
		name = ukraine.501.a
	}
}
# Corruption of wagonmaster - increase his loyality
country_event = {
	id = ukraine.502
	title = ukraine.502.t
	desc = ukraine.502.d
	picture = GFX_report_event_hetman_with_generals
	
	trigger = {
		original_tag = UKR
		has_country_flag = UKR_cossack_republic
		check_variable = { ucr_loyality_of_osavul = 1 }
		check_variable = { ucr_loyality_of_wagonmaster < 1 }
		has_political_power	> 25
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30 }

	option = {
		name = ukraine.502.a
		add_political_power = -25
		custom_effect_tooltip = add_loyality_of_wagonmaster_tt
		add_to_variable = { ucr_loyality_of_wagonmaster = 1 }
		if = {
			limit = { has_idea = ucr_disloyal_wagonmaster }
			remove_ideas = ucr_disloyal_wagonmaster
		}
		else = {
			add_ideas = ucr_loyal_wagonmaster
		}
	}
	option = {
		name = ukraine.502.b
	}
}
# Ukraine separate West Ukraine from Polish puppet - message for Poland
country_event = {
	id = ukraine.503
	title = ukraine.503.t
	desc = ukraine.503.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.503.a
	}
}
# Congress of Captive Nations
country_event = {
	id = ukraine.504
	title = ukraine.504.t
	desc = ukraine.504.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes

	option = {
		name = ukraine.504.a
	}
}
# Invitation to ukrainian defence initiative
country_event = {
	id = ukraine.505
	title = ukraine.505.t
	desc = ukraine.505.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.505.a
		ai_chance = { 
			factor = 50
			modifier = {
				factor = 1.5
				has_opinion = { target = FROM value > 25 } 
			}
			modifier = {
				factor = 2
				has_government = democratic
			}
			modifier = {
				factor = 0
				is_justifying_wargoal_against = FROM
			}
		}
		FROM = { country_event = ukraine.506 }
		add_ideas = UKR_member_of_defence_initiative
	}

	option = {
		name = ukraine.505.b
		ai_chance = { 
			factor = 50 
		}
		FROM = { country_event = ukraine.507 }
	}
}
# [Country] Accepts
country_event = {
	id = ukraine.506
	title = ukraine.506.t
	desc = ukraine.506.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.506.a
		if = {
			limit = {
				NOT = { has_idea = UKR_member_of_defence_initiative }
			}
			add_ideas = UKR_member_of_defence_initiative
		}
	}
}
# [Country] Refuses
country_event = {
	id = ukraine.507
	title = ukraine.507.t
	desc = ukraine.507.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.507.a
	}
}
# Call to war for defense attacked member of ukrainian initiative
country_event = {
	id = ukraine.508
	title = ukraine.508.t
	desc = ukraine.508.d
	picture = GFX_report_event_generic_battle
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.508.a
		ai_chance = { 
			factor = 80
			modifier = {
				factor = 0.5
				has_war = yes
				surrender_progress > 0.1
			}
			modifier = {
				factor = 0.5
				num_divisions < 10
			}
			modifier = {
				factor = 0.5
				threat < 0.25
			}
			modifier = {
				factor = 0.5
				has_stability < 0.5
			}
		}
		add_war_support = 0.05
		swap_ideas = {
			add_idea = UKR_member_of_defence_initiative_adv
			remove_idea = UKR_member_of_defence_initiative
		}
		event_target:ukraine_victim_of_warmonger = { 
			ROOT = {
				add_to_war = {
					targeted_alliance = PREV
					enemy = FROM
					hostility_reason = asked_to_join
				}
			}
		}
	}

	option = {
		name = ukraine.508.b
		ai_chance = { 
			factor = 20 
			modifier = {
				factor = 0
				tag = UKR
			}
		}
		remove_ideas = UKR_member_of_defence_initiative
		add_war_support = -0.05
	}
}
# Defense committee of Rada gives a mission for strengthening of land defense
country_event = {
	id = ukraine.509
	title = ukraine.509.t
	desc = ukraine.509.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.509.a
		set_country_flag = UKR_defense_committee_army_mission
	}
}
# Defense committee of Rada gives a mission for strengthening of air forces
country_event = {
	id = ukraine.510
	title = ukraine.510.t
	desc = ukraine.510.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.509.a
		set_country_flag = UKR_defense_committee_air_mission
	}
}
# Defense committee of Rada gives a mission for strengthening of navy
country_event = {
	id = ukraine.511
	title = ukraine.511.t
	desc = ukraine.511.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.509.a
		set_country_flag = UKR_defense_committee_naval_mission
	}
}
# Defense committee of Rada - check a mission for land defense
country_event = {
	id = ukraine.512
	title = ukraine.512.t
	desc = ukraine.512.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = { #success
		trigger = { has_army_manpower = { size > 349999 } }
		name = ukraine.512.a
		add_doctrine_cost_reduction = {
			name = ukraine.512.t
			cost_reduction = 0.25
			uses = 1
			category = land_doctrine
		}
		army_experience = 10
	}

	option = { #fail
		trigger = { has_army_manpower = { size < 350000 } }
		name = ukraine.512.b
		UKR_rada_big_opposition = yes
	}
}
# Defense committee of Rada - check a mission for air forces
country_event = {
	id = ukraine.513
	title = ukraine.513.t
	desc = ukraine.513.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = { #success
		trigger = { has_deployed_air_force_size = { size > 299 } }
		name = ukraine.512.a
		add_doctrine_cost_reduction = {
			name = ukraine.513.t
			cost_reduction = 0.25
			uses = 1
			category = air_doctrine
		}
		air_experience = 10
	}

	option = { #fail
		trigger = { has_deployed_air_force_size = { size < 300 } }
		name = ukraine.512.b
		UKR_rada_big_opposition = yes
	}
}
# Defense committee of Rada - check a mission for navy
country_event = {
	id = ukraine.514
	title = ukraine.514.t
	desc = ukraine.514.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes
	
	option = { #success
		trigger = { has_navy_size = { size > 9 } }
		name = ukraine.512.a
		add_doctrine_cost_reduction = {
			name = ukraine.514.t
			cost_reduction = 0.25
			uses = 1
			category = naval_doctrine
		}
		navy_experience = 10
	}

	option = { #fail
		trigger = { has_deployed_air_force_size = { size < 10 } }
		name = ukraine.512.b
		UKR_rada_big_opposition = yes
	}
}
# Forced autonomy of West Ukraine - create WUPR - message for Poland
country_event = {
	id = ukraine.515
	title = ukraine.515.t
	desc = ukraine.515.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	option = {
		name = ukraine.515.a
	}
}
# Forced autonomy of West Ukraine - fail, ukrainian army retreat from West Ukraine
country_event = {
	id = ukraine.516
	title = ukraine.516.t
	desc = ukraine.516.d

	is_triggered_only = yes

	option = {
		name = ukraine.516.a
	}
}
# Forced annexation of West Ukraine - success, WUPR created
country_event = {
	id = ukraine.517
	title = ukraine.517.t
	desc = ukraine.517.d

	is_triggered_only = yes

	option = {
		name = ukraine.517.a
	}
}
#Ultimatum for Crimea from OUN to Crimean Overlord
country_event = {
	id = ukraine.518
	title = ukraine.518.t
	desc = ukraine.518.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.518.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				naval_strength_ratio = {
				    tag = UKR
				    ratio > 1
				}
			}
		}
		UKR = {
			country_event = { id = ukraine.519 days = 1}
		}
		effect_tooltip = {
			UKR = {
				transfer_state = 137
				transfer_state = 986
			}
		}
	}
	option = {
		name = ukraine.518.b
		ai_chance = {
			factor = 50
		}
		UKR = {
			country_event = { id = ukraine.520 days = 1}
		}
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					type = take_state_focus
					target = CRM
					expire = 0
					generator = { 137 986 }
				}
			}
		}
	}
}
#Crimean overlord accept ultimatum of OUN
country_event = {
	id = ukraine.519
	title = ukraine.519.t
	desc = ukraine.519.d
	picture = GFX_report_event_generic_peaceful_annexation

	
	is_triggered_only = yes

	option = {
		name = ukraine.519.a
		if = {
			limit = {
				137 = { is_owned_and_controlled_by = CRM }
			}
			transfer_state = 137
		}
		if = {
			limit = {
				986 = { is_owned_and_controlled_by = CRM }
			}
			transfer_state = 986
		}
		add_war_support = 0.05
	}
}
#Crimean overlord decline ultimatum of OUN
country_event = {
	id = ukraine.520
	title = ukraine.520.t
	desc = ukraine.520.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.520.a
		create_wargoal = {
			type = take_state_focus
			target = CRM
			expire = 0
			generator = { 137 986 }
		}
	}
}
# Roman Shukhevych is available
country_event = {
	id = ukraine.521
	hidden = yes
	
	trigger = {
		tag = UKR
		date > 1938.01.01
		command_power > 30
		NOT = { has_government = communism }
		NOT = { has_country_flag = UKR_shukhevych_is_available }
		OR = {	
			has_completed_focus = UKR_revanchism
			has_completed_focus = UKR_Ukraine_first
			has_completed_focus = UKR_peace_politic
		}
	}

	mean_time_to_happen = { days = 30 }

	fire_only_once = yes

	immediate = {
		UKR_roman_shukhevych = {
			unit_leader_event = ukraine.522
		}
	}
}
# Roman Shukhevych is available - unit leader event
unit_leader_event = {
	id = ukraine.522
	title = ukraine.522.t
	desc = ukraine.522.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.522.a
		ai_chance = {
			base = 100
		}
		add_command_power = -30
		set_country_flag = UKR_shukhevych_is_available
	}
	option = {
		name = ukraine.522.b
		ai_chance = {
			base = 0
		}
	}
}
# Cancel of prometheism
country_event = {
	id = ukraine.523
	title = ukraine.523.t
	desc = ukraine.523.d
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_country_flag = UKR_prometheus_club_is_closed }
	}

	option = {
		name = ukraine.523.a
		set_country_flag = UKR_prometheus_club_is_closed
		retire_character = UKR_roman_smal_stocki
		SOV = {
			remove_opinion_modifier = { target = ROOT modifier = UKR_prometheus_opinion }
		}
	}
	option = {
		name = ukraine.523.b

	}
}
# Appoint of Bolbochan - trigger event
country_event = {
	id = ukraine.524
	hidden = yes
	
	trigger = {
		tag = UKR
		NOT = { has_completed_focus = UKR_end_of_reform }
		NOT = { has_completed_focus = UKR_pressure_on_the_opposition }
		focus_progress = {
			focus = UKR_end_of_reform
			progress > 0.25
		}
		UKR = { 
			has_character = UKR_petro_bolbochan 
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 1	}

	immediate = {
		UKR_petro_bolbochan = {
			unit_leader_event = ukraine.177
		}
	}
}
# Khrushchev wants to lead the army - trigger event
country_event = {
	id = ukraine.525
	hidden = yes
	
	trigger = {
		tag = UKR
		has_government = communism
		has_country_leader = { character = UKR_nikita_khrushchev ruling_only = yes }
		has_army_manpower = { size > 999999 }
		command_power > 30
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 15	}

	immediate = {
		UKR_nikita_khrushchev = {
			unit_leader_event = ukraine.526
		}
	}
}
# Khrushchev wants to lead the army - unit leader event
unit_leader_event = {
	id = ukraine.526
	title = ukraine.526.t
	desc = ukraine.526.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.526.a
		ai_chance = {
			base = 50
		}
		add_command_power = -30
		set_country_flag = UKR_khrushchev_is_marshal
	}
	option = {
		name = ukraine.526.b
		ai_chance = {
			base = 50
		}
	}
}
# Rename Donetsk in Khrushchevsk
country_event = {
	id = ukraine.527
	title = ukraine.527.t
	desc = ukraine.527.d
	picture = GFX_report_event_donetsk_fontan
	
	trigger = {
		tag = UKR
		has_government = communism
		has_country_leader = { character = UKR_nikita_khrushchev ruling_only = yes }
		227 = {
			free_building_slots = {
				building = industrial_complex
				size < 1
				include_locked = no
			}
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30 }

	option = {
		name = ukraine.527.a
		227 = { set_state_name = UKR_khrushchevsk }
		set_province_name = { id = 6474 name = UKR_khrushchevsk }
	}
	option = {
		name = ukraine.527.b
	}
}
# Nationalists demand referendum - change government
country_event = {
	id = ukraine.528
	title = ukraine.528.t
	desc = ukraine.528.d
	picture = GFX_report_event_fascist_gathering

	trigger = {
		fascism > 0.5
		NOT = { has_government = fascism }
		has_completed_focus = UKR_revanchism
		is_puppet = no
		has_civil_war = no
	}

	mean_time_to_happen = {	days = 7 }

	fire_only_once = no

	immediate = {
		hidden_effect = {
			set_country_flag = UKR_government_is_changed
		}
	}

	option = {
		name = ukraine.528.a
		add_stability = -0.05
		add_political_power = -100
		if = {
			limit = { NOT = { has_government = fascism } }
			set_politics = {
				ruling_party = fascism
				elections_allowed = no
			}
		}
	}
}
# Democrats demand referendum - change government
country_event = {
	id = ukraine.529
	title = ukraine.529.t
	desc = ukraine.529.d
	picture = GFX_report_event_journalists_speech

	trigger = {
		democratic > 0.5
		NOT = { has_government = democratic }
		has_completed_focus = UKR_democratic_reforms
		is_puppet = no
		has_civil_war = no
	}

	mean_time_to_happen = {	days = 7 }

	fire_only_once = no

	immediate = {
		hidden_effect = {
			set_country_flag = UKR_government_is_changed
		}
	}

	option = {
		name = ukraine.529.a
		add_stability = -0.05
		add_political_power = -100
		if = {
			limit = { NOT = { has_government = democratic } }
			set_politics = {
				ruling_party = democratic
				elections_allowed = yes
			}
		}
	}
}
# Communists demand referendum - change government
country_event = {
	id = ukraine.530
	title = ukraine.530.t
	desc = ukraine.530.d
	picture = GFX_report_event_worker_protests

	trigger = {
		communism > 0.5
		NOT = { has_government = communism }
		has_completed_focus = UKR_communism_propaganda
		is_puppet = no
		has_civil_war = no
	}

	mean_time_to_happen = {	days = 7 }

	fire_only_once = no

	immediate = {
		hidden_effect = {
			set_country_flag = UKR_government_is_changed
		}
	}

	option = {
		name = ukraine.530.a
		add_stability = -0.05
		add_political_power = -100
		if = {
			limit = { NOT = { has_government = communism } }
			set_politics = {
				ruling_party = communism
				elections_allowed = no
			}
		}
	}
}
# Coup of Mazlakh
country_event = {
	id = ukraine.531
	title = ukraine.531.t
	desc = ukraine.531.d
	picture = GFX_report_event_khrushchev_with_comrades

	is_triggered_only = yes

	option = {
		name = ukraine.531.a
		promote_character = UKR_serhiy_mazlakh
		retire_character = UKR_nikita_khrushchev
		set_cosmetic_tag = UKR_NC
		add_ideas = {
			UKR_shattered_army
			UKR_isolationism_idea
		}
		hidden_effect = {
			if = {
				limit = {
					any_other_country = {
						original_tag = SOV
						has_government = communism
						exists = yes
						NOT = { has_war_with = ROOT }
						NOT = { is_in_faction_with = ROOT }
					}
				}
				country_event = { id = ukraine.532 days = 5 }
			}
			else = {
				country_event = { id = ukraine.538 days = 5 }
			}
		}
	}
}
# Separatism of DKSR against Mazlakh
country_event = {
	id = ukraine.532
	title = ukraine.532.t
	desc = ukraine.532.d
	picture = GFX_report_event_dksr_leaders

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			DKR = {
				add_state_core = 196
				add_state_core = 200
				add_state_core = 226
				add_state_core = 227
				add_state_core = 228
			}
			release = DKR 
			add_state_core = 196
			add_state_core = 200
			add_state_core = 226
			add_state_core = 227
			add_state_core = 228
			UKR_lazar_kaganovich = { set_nationality = DKR }
			UKR_grigory_petrovsky = { set_nationality = DKR }
			UKR_demyan_korotchenko = { set_nationality = DKR }
			UKR_serhiy_savchenko = { set_nationality = DKR }
			UKR_ivan_duboviy = { set_nationality = DKR }
			transfer_units_fraction = {
				target = DKR
				stockpile_ratio = 0.2
				army_ratio = 0.25
				navy_ratio = 0
				air_ratio = 0.25
				keep_unit_leaders_trigger = {
					OR = {
						has_id = 655
						has_id = 661
						has_id = 657
						has_id = 658
						has_id = 668
						has_id = 673
						has_id = 683
					}
				}
			}
			DKR = {
				set_rule = {
					can_create_factions = no
					can_join_factions = no
				}
				set_politics = { ruling_party = communism }
				add_popularity = {
					ideology = communism
					popularity = 0.35
				}
				load_focus_tree = generic_focus
				inherit_technology = UKR
				set_research_slots = 3
				if = {
					limit = { SOV = { has_government = communism } }
					add_ai_strategy = {
						type = alliance
						id = "SOV"
						value = 200
					}
				}
			}
		}
	}

	option = {
		name = ukraine.532.a
		add_popularity = {
			ideology = communism
			popularity = -0.10
		}	
		activate_mission = UKR_dealing_with_DKSR
	}
}
# DKSR are now soviet puppet
country_event = {
	id = ukraine.533
	title = ukraine.533.t
	desc = ukraine.533.d

	is_triggered_only = yes

	option = {
		name = ukraine.533.a
		puppet = DKR
		if = {
			limit = {
				FROM = { 
					NOT = { has_completed_focus = UKR_war_answer_for_dksr }
				}
			}
			FROM = { country_event = { id = ukraine.534 days = 1 } }
		}
	}
}
# DKSR are now soviet puppet - message for Ukraine
country_event = {
	id = ukraine.534
	title = ukraine.534.t
	desc = ukraine.534.d
	picture = GFX_report_event_stalin_propaganda		

	is_triggered_only = yes

	option = {
		name = ukraine.534.a
		add_political_power = -100
	}
}
# Peoples militia in DKSR before war operation
country_event = {
	id = ukraine.535
	title = ukraine.535.t
	desc = ukraine.535.d
	picture = GFX_report_event_spr_poum_militia

	is_triggered_only = yes

	option = {
		name = ukraine.535.a
		add_timed_idea = {
			idea = DKR_peoples_militia
			days = 90
		}
		if = {
			limit = { has_country_leader = { character = DKR_leonid_brezhnev ruling_only = yes } }
			add_field_marshal_role = {
				character = DKR_leonid_brezhnev
				traits = { organizer }
				skill = 1
				attack_skill = 1
				defense_skill = 1
				planning_skill = 1
				logistics_skill = 1
			}
		}
		# Create additional divisions
		division_template = {
			name = "Narodnoe opolchenie"
			template_counter = 0
			priority = 1
			regiments = {
				militia = { x = 0 y = 0 }
				militia = { x = 0 y = 1 }
				militia = { x = 0 y = 2 }
				militia = { x = 0 y = 3 }
			}
		}
		every_owned_state = {
			create_unit = {
				division = "division_template = \"Narodnoe opolchenie\" start_experience_factor = 0 start_equipment_factor = 0.50" 
				owner = DKR
			}
		}
	}
}
# White peace with DKSR
country_event = {
	id = ukraine.536
	title = ukraine.536.t
	desc = ukraine.536.d

	is_triggered_only = yes

	option = {
		name = ukraine.536.a
		add_political_power = -100
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.30
		}
	}
}
# Dispatcher event for natcom State Plan
country_event = {
	id = ukraine.537
	hidden = yes
	is_triggered_only = yes
	trigger = {
		has_decision = UKR_four_year_plan
		has_government = communism
	}

	immediate = {
		clear_global_event_target = UKR_state_for_natcom_plan
		random_list = {
			25 = { 
				random_owned_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = no
						}
					}
					set_state_flag = UKR_natcom_build_factory
					set_variable = { factory_goal = industrial_complex_level }
					save_global_event_target_as = UKR_state_for_natcom_plan
				}
				activate_mission = UKR_build_factory_for_plan
			} 
			35 = { 
				modifier = {
					has_war = yes
					factor = 1.5
				}
				random_owned_state = {
					limit = {
						is_controlled_by = ROOT
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = no
						}
					}
					set_state_flag = UKR_natcom_build_arms_factory
					set_variable = { factory_goal = arms_factory_level }
					save_global_event_target_as = UKR_state_for_natcom_plan
				}
				activate_mission = UKR_build_arms_factory_for_plan
			} 
			20 = { 
				modifier = {
					NOT = {
						any_controlled_state = {
							free_building_slots = {
								building = dockyard
								size > 0
								include_locked = yes
							}
						}
					}
					factor = 0
				}
				random_controlled_state = {
					limit = {
						is_controlled_by = ROOT
						is_coastal = yes
						free_building_slots = {
							building = arms_factory
							size > 0
							include_locked = no
						}
					}
					set_state_flag = UKR_natcom_build_dockyard
					set_variable = { factory_goal = building_level@dockyard }
					save_global_event_target_as = UKR_state_for_natcom_plan
				}
				activate_mission = UKR_build_dockyard_for_plan
			} 
			20 = {
				modifier = {
					NOT = {
						any_owned_state = {
							is_controlled_by = ROOT
							free_building_slots = {
								building = infrastructure
								size > 0
							}
						}
					}
					factor = 0
				}
				random_owned_state = {
					limit = {
						free_building_slots = {
							building = infrastructure
							size > 0
						} 
					}
					set_state_flag = UKR_natcom_build_infrastructure
					set_variable = { factory_goal = infrastructure_level }
					save_global_event_target_as = UKR_state_for_natcom_plan
				}
				activate_mission = UKR_build_infrastructure_for_plan
			} 
		}
	}
}
# Separatism of DKSR - SOV not exist - crisis pass
country_event = {
	id = ukraine.538
	title = ukraine.538.t
	desc = ukraine.538.d

	is_triggered_only = yes

	option = {
		name = ukraine.538.a
		unlock_national_focus = UKR_negotiations_with_opposition
		add_political_power = -100
		retire_character = UKR_lazar_kaganovich
		retire_character = UKR_grigory_petrovsky
		retire_character = UKR_demyan_korotchenko
		retire_character = UKR_serhiy_savchenko
	}
}
# DKSR are now soviet puppet and SOV declare war Ukraine
country_event = {
	id = ukraine.539
	title = ukraine.539.t
	desc = ukraine.539.d

	is_triggered_only = yes

	option = {
		name = ukraine.539.a
		FROM = {
			every_state = {
				limit = {
					is_controlled_by = FROM
					is_owned_by = DKR
				}
				set_state_owner_to = FROM
			}
		}
		declare_war_on = {
			target = FROM
			type = puppet_wargoal_focus
		}
		puppet = DKR
		FROM = { country_event = { id = ukraine.540 } }
		
	}
}
# DKSR are now soviet puppet and Ukraine have new war - meassage for Ukraine
country_event = {
	id = ukraine.540
	title = ukraine.540.t
	desc = ukraine.540.d

	is_triggered_only = yes

	option = {
		name = ukraine.540.a
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.30
		}
	}
}
# Ukraine propose alliance for oppositional USSR
country_event = {
	id = ukraine.541
	title = ukraine.541.t
	desc = ukraine.541.d

	is_triggered_only = yes

	immediate = {
		set_temp_variable = { temp1 = UKR.var_ukr_relations_with_new_ussr }
		multiply_temp_variable = { temp1 = 10 }
		set_temp_variable = { temp2 = temp1 }
		multiply_temp_variable = { temp2 = -1 }
	}

	option = {
		name = ukraine.541.a
		ai_chance = {
			base = 50
			modifier = {
				has_government = communism
				add = temp1
			}
		}
 		if = {
			limit = {
				is_faction_leader = yes
			}
			dismantle_faction = yes
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		FROM = {
			country_event = ukraine.542
		}
	}
	option = {
		name = ukraine.541.b
		ai_chance = {
			base = 50
			modifier = {
				has_government = communism
				add = temp2
			} 
		}
		FROM = {
			country_event = ukraine.543
		}
	}
}
# USSR agree alliance
country_event = {
	id = ukraine.542
	title = ukraine.542.t
	desc = ukraine.542.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	option = {
		name = ukraine.542.a
		add_to_faction = FROM
	}
}
# USSR refuse alliance
country_event = {
	id = ukraine.543
	title = ukraine.543.t
	desc = ukraine.543.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	option = {
		name = ukraine.543.a
	}
}
# White peace with Romania for Natcom Ukraine - choice for Ukraine
country_event = {
	id = ukraine.544
	title = ukraine.544.t
	desc = ukraine.544.d
	picture = GFX_report_event_soviet_tanks_snow
	
	trigger = {
		tag = UKR
		has_completed_focus = UKR_natcom_bessarabia
		has_idea = UKR_red_blitzkrieg
		has_war_with = ROM
		has_civil_war = no
		OR = {
			is_in_faction = no
			is_faction_leader = yes
		}
		78 = { is_controlled_by = UKR }
		79 = { is_controlled_by = UKR }
	}

	mean_time_to_happen = { days = 20 }

	fire_only_once = yes

	#Propose white peace
	option = {
		name = ukraine.544.a
		ai_chance = {
			base = 100
		}
		ROM = {
			country_event = { id = ukraine.545 }
		}
		effect_tooltip = {
			ROM = { 
				white_peace = {
					tag = UKR 
				} 
			}
			transfer_state = 78
			transfer_state = 80
			transfer_state = 766
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.10
		}
	}

	#No, war to the end
	option = {
		name = ukraine.544.b
		ai_chance = {
			base = 0
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
	}
}
# White peace with Romania for Natcom Ukraine - answer of Romania
country_event = {
	id = ukraine.545
	title = ukraine.545.t
	desc = ukraine.545.d
	
	is_triggered_only = yes

	#Accept surrender
	option = {
		name = ukraine.545.a
		ai_chance = {
			base = 80
		}
		add_to_array = { white_peace_countries_array = FROM }
		UKR_white_peace_with_alliances = yes
		if = {
			limit = { is_in_faction = yes }
			leave_faction = yes
		}
		FROM = { 
			transfer_state = 78
			transfer_state = 80
			transfer_state = 766
			country_event = { id = ukraine.546 } 
		}
	}

	option = {
		name = ukraine.545.b
		ai_chance = {
			base = 20
		}
		FROM = { country_event = { id = ukraine.547 } }
	}
}
# Romania agree for white peace
country_event = {
	id = ukraine.546
	title = ukraine.546.t
	desc = ukraine.546.d
	picture = GFX_report_event_war_occupation_of_bukovina_and_bessarabia2
	
	is_triggered_only = yes

	option = {
		name = ukraine.546.a
	}
}
# Romania says no!
country_event = {
	id = ukraine.547
	title = ukraine.547.t
	desc = ukraine.547.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	option = {
		name = ukraine.547.a
		add_state_claim = 989
	}
}
# Starting event with warning for historical mode
country_event = {
	id = ukraine.548
	title = ukraine.548.t
	desc = ukraine.548.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.548.a
	}
}
# Return Volokh in army
unit_leader_event = {
	id = ukraine.549
	title = ukraine.549.t
	desc = ukraine.549.d

	is_triggered_only = yes

	option = {
		name = ukraine.549.a
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_omelyan_volokh_recruit
		add_command_power = -15
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.05
		}
	}
	option = {
		name = ukraine.549.b
		ai_chance = {
			factor = 50
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.05
		}
	}
}
# Ukrainian natcom rebellion in Poland
country_event = {
	id = ukraine.550
	title = ukraine.550.t
	desc = ukraine.550.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			WUA = {
				add_state_core = 89
				add_state_core = 91
				add_state_core = 93
				add_state_core = 987
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
				inherit_technology = POL
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				promote_character = WUA_josyp_krilyk
				load_oob = WUA_rebellion_in_PCW
				set_rule = {
					can_join_factions = no
				}
				UKR = {
					UKR_kost_levytsky = { set_nationality = WUA }
				}
			}
			if = {
				limit = {
					NOT = { country_exists = BLR }
					94 = { is_owned_and_controlled_by = POL }
					95 = { is_owned_and_controlled_by = POL }
					96 = { is_owned_and_controlled_by = POL }
					784 = { is_owned_and_controlled_by = POL }
				}
				BLR = {
					transfer_state = 94
					transfer_state = 95
					transfer_state = 96
					transfer_state = 784
					inherit_technology = POL
					set_research_slots = 2
					set_country_flag = UKR_masons_rebellion
					set_politics = { ruling_party = communism elections_allowed = no }
					add_popularity = { ideology = communism popularity = 0.5 }
					load_oob = BLR_west_rebellion
					set_rule = {
						can_join_factions = no
					}
				}
			}
		}
	}

	option = {
		name = ukraine.550.a
		declare_war_on = {
			target = WUA
			type = annex_everything
		}
		hidden_effect = {
			country_event = { id = ukraine.552 days = 120 }
		}
		if = {
			limit = {
				country_exists = BLR
				BLR = { has_country_flag = UKR_masons_rebellion }
			}
			declare_war_on = {
				target = BLR
				type = annex_everything
			}
		}
		UKR = { country_event = { id = ukraine.551 hours = 3 } }
	}
}
# Support of WUA for natcom Ukraine
country_event = {
	id = ukraine.551
	title = ukraine.551.t
	desc = ukraine.551.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	option = {
		name = ukraine.551.a
		add_ideas = UKR_help_for_wua_rebels
		WUA = { 
			add_timed_idea = {
				idea = WUA_stand_before_support
				days = 15
			} 
			add_opinion_modifier = { target = UKR modifier = UKR_great_motherland_opinion }
		}
		add_ai_strategy = {
			type = send_volunteers_desire
			id = WUA
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = WUA
			value = 200
		}
	}
}
# WUA survived after 4 months of war - Poland must retreat
country_event = {
	id = ukraine.552
	title = ukraine.552.t
	desc = ukraine.552.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes

	trigger = {
		country_exists = POL
		country_exists = WUA
		WUA = { 
			has_capitulated = no 
			is_in_faction = no
		}
		has_war_with = WUA
	}

	option = {
		name = ukraine.552.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { 834 = { is_fully_controlled_by = WUA } }
			WUA = { 
				transfer_state = 834 
				add_state_core = 834
			}
		}
		white_peace = WUA
		WUA = { country_event = { id = ukraine.445 } }
		UKR = { country_event = { id = ukraine.553 } }
		if = {
			limit = { has_war_with = BLR }
			white_peace = BLR
		}
	}
	option = {
		name = ukraine.552.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.10
		add_political_power = -150
	}
}
# POL agree on white peace - message for UKR
country_event = {
	id = ukraine.553
	title = ukraine.553.t
	desc = ukraine.553.d
	picture = GFX_report_event_soviet_army_greeted

	is_triggered_only = yes

	option = {
		name = ukraine.553.a
	}
}
# Rebellion of WUA in other country
country_event = {
	id = ukraine.554
	title = ukraine.554.t
	desc = ukraine.554.d

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			WUA = {
				add_state_core = 89
				add_state_core = 91
				add_state_core = 93
				add_state_core = 987
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
				inherit_technology = POL
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				promote_character = WUA_josyp_krilyk
				load_oob = WUA_rebellion_in_PCW
			}
			UKR = {
				puppet = WUA
				UKR_kost_levytsky = { set_nationality = WUA }
			}
		}
	}

	option = {
		name = ukraine.554.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		declare_war_on = {
			target = WUA
			type = take_state
			generator = { 91 }
		}
		UKR = { country_event = ukraine.555 }	
	}
	option = {
		name = ukraine.554.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				91 = { NOT = { is_core_of = ROOT } }
			}
		}
		UKR = { country_event = ukraine.556 }
	}
}
# FROM attack our rebels, start of war - message for Ukraine
country_event = {
	id = ukraine.555
	title = ukraine.555.t
	desc = ukraine.555.d

	is_triggered_only = yes

	option = {
		name = ukraine.555.a
	}
}
# FROM cede rebellion land - message for Ukraine
country_event = {
	id = ukraine.556
	title = ukraine.556.t
	desc = ukraine.556.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	option = {
		name = ukraine.556.a
	}
}
# WUA rebellion in polish civil war for communists
country_event = {
	id = ukraine.557
	title = ukraine.557.t
	desc = ukraine.557.d
	picture = GFX_report_event_west_ukrainian_rebels
	
	trigger = {
		tag = POL
		has_government = communism
		has_civil_war = yes
		is_in_faction = no
		91 = { is_owned_and_controlled_by = POL }
		UKR = { 
			exists = yes
			has_government = communism 
		}
		NOT = { country_exists = WUA }
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	immediate = {
		hidden_effect = {
			WUA = {
				add_state_core = 89
				add_state_core = 91
				add_state_core = 93
				add_state_core = 987
				transfer_state = 91
				if = {
					limit = { 89 = { is_owned_and_controlled_by = POL } }
					transfer_state = 89
				}
				if = {
					limit = { 93 = { is_owned_and_controlled_by = POL } }
					transfer_state = 93
				}
				if = {
					limit = { 987 = { is_owned_and_controlled_by = POL } }
					transfer_state = 987
				}
				inherit_technology = POL
				set_research_slots = 2
				set_rule = { can_join_factions = no }
				if = {
					limit = {
						OR = {
							check_variable = { POL.ukr_poland_caution_for_sabotages_var > 3 } 
						}
					}
					load_oob = WUA_rebellion_in_PCW
				}
				else = {
					load_oob = WUA_battalions
				}
				if = { limit = { UKR = { has_completed_focus = UKR_natcom_coup } } promote_character = WUA_josyp_krilyk }
			}
			puppet = WUA
			WUA = {
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
			}
		}
	}

	option = {
		name = ukraine.557.a
		ai_chance = {
			factor = 60
		}
		add_political_power = -100
	}
	option = {
		name = ukraine.557.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5
				surrender_progress > 0.2
			}
		}
		UKR = { country_event = { id = ukraine.558 hours = 8 } }
	}
}
# Communist Ukraine choice - defending WUA
country_event = {
	id = ukraine.558
	title = ukraine.558.t
	desc = ukraine.558.d
	picture = GFX_report_event_west_ukrainian_rebels
	
	is_triggered_only = yes

	option = {
		name = ukraine.558.a
		ai_chance = {
			factor = 80
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		puppet = WUA
		FROM = {
			declare_war_on = {
				target = WUA
				type = annex_everything
			}
		}
	}
	option = {
		name = ukraine.558.b
		ai_chance = {
			factor = 20
		}
		add_war_support = -0.05
		FROM = {
			declare_war_on = {
				target = WUA
				type = annex_everything
			}
		}
	}
}
# Ukrainian natcom rebellion in Romania
country_event = {
	id = ukraine.559
	title = ukraine.559.t
	desc = ukraine.559.d
	picture = GFX_report_event_bessarabian_rebels

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			MOL = {
				transfer_state = 78
				transfer_state = 80
				transfer_state = 766
				inherit_technology = ROM
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				UKR = { UKR_symon_galytskyi = { set_nationality = MOL } }
				promote_character = UKR_symon_galytskyi
				load_oob = MOL_big_rebellion
				set_rule = {
					can_join_factions = no
				}
			}
			if = {
				limit = {
					NOT = { country_exists = TRA }
					76 = { is_owned_and_controlled_by = ROM }
					83 = { is_owned_and_controlled_by = ROM }
					84 = { is_owned_and_controlled_by = ROM }
				}
				TRA = {
					transfer_state = 76
					transfer_state = 83
					transfer_state = 84
					inherit_technology = ROM
					set_research_slots = 2
					set_country_flag = UKR_masons_rebellion
					set_politics = { ruling_party = communism elections_allowed = no }
					add_popularity = { ideology = communism popularity = 0.5 }
					ROM = {
						transfer_units_fraction = {
							target = TRA
							stockpile_ratio = 0.2
							army_ratio = 0.3
							navy_ratio = 0
							air_ratio = 0.3
						}
					}
					set_rule = {
						can_join_factions = no
					}
				}
			}
		}
	}

	option = {
		name = ukraine.559.a
		declare_war_on = {
			target = MOL
			type = annex_everything
		}
		hidden_effect = {
			country_event = { id = ukraine.561 days = 120 }
		}
		if = {
			limit = {
				country_exists = TRA
				TRA = { has_country_flag = UKR_masons_rebellion }
			}
			declare_war_on = {
				target = TRA
				type = annex_everything
			}
		}
		UKR = { country_event = { id = ukraine.560 hours = 3 } }
	}
}
# Support of MOL for natcom Ukraine
country_event = {
	id = ukraine.560
	title = ukraine.560.t
	desc = ukraine.560.d
	picture = GFX_report_event_bessarabian_rebels

	is_triggered_only = yes

	option = {
		name = ukraine.560.a
		if = {
			limit = { NOT = { has_idea = UKR_help_for_natcom_rebels } }
			add_timed_idea = {
				idea = UKR_help_for_natcom_rebels
				days = 120
			}
		}
		add_ai_strategy = {
			type = send_volunteers_desire
			id = MOL
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = MOL
			value = 200
		}
	}
}
# MOL survived after 4 months of war - Romania must retreat
country_event = {
	id = ukraine.561
	title = ukraine.561.t
	desc = ukraine.561.d
	picture = GFX_report_event_bessarabian_rebels

	is_triggered_only = yes

	trigger = {
		country_exists = ROM
		country_exists = MOL
		MOL = { 
			has_capitulated = no 
			is_in_faction = no
		}
		has_war_with = MOL
	}

	option = {
		name = ukraine.561.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { 79 = { is_fully_controlled_by = MOL } }
			MOL = { transfer_state = 79 }
		}
		white_peace = MOL
		UKR = { country_event = { id = ukraine.564 } }
		if = {
			limit = { has_war_with = TRA }
			white_peace = TRA
		}
	}
	option = {
		name = ukraine.561.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.10
		add_political_power = -150
	}
}
# Rebellion of MOL in other country
country_event = {
	id = ukraine.562
	title = ukraine.562.t
	desc = ukraine.562.d
	picture = GFX_report_event_bessarabian_rebels

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			MOL = {
				transfer_state = 78
				transfer_state = 80
				transfer_state = 766
				inherit_technology = ROM
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				UKR = { UKR_symon_galytskyi = { set_nationality = MOL } }
				promote_character = UKR_symon_galytskyi
				load_oob = MOL_big_rebellion
				set_rule = {
					can_join_factions = no
				}
			}
			UKR = {
				puppet = MOL
			}
		}
	}

	option = {
		name = ukraine.562.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		declare_war_on = {
			target = MOL
			type = take_state
			generator = { 78 }
		}
		UKR = { country_event = ukraine.555 }	
	}
	option = {
		name = ukraine.562.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				78 = { NOT = { is_core_of = ROOT } }
			}
		}
		UKR = { country_event = ukraine.556 }
	}
}
# Return Bailo in army
unit_leader_event = {
	id = ukraine.563
	title = ukraine.563.t
	desc = ukraine.563.d

	is_triggered_only = yes

	option = {
		name = ukraine.563.a
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_serhiy_bailo_recruit
		add_command_power = -15
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.05
		}
	}
	option = {
		name = ukraine.563.b
		ai_chance = {
			factor = 50
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.05
		}
	}
}
# ROM agree on white peace - MOL is puppet of UKR
country_event = {
	id = ukraine.564
	title = ukraine.564.t
	desc = ukraine.564.d
	picture = GFX_report_event_soviet_army_greeted

	is_triggered_only = yes

	option = {
		name = ukraine.564.a
		puppet = MOL
	}
}
# Rebellion of WUA - Poland doesn't want to fight - message foe Ukraine
country_event = {
	id = ukraine.565
	title = ukraine.565.t
	desc = ukraine.565.d

	is_triggered_only = yes

	trigger = {
		has_war = no
	}

	option = {
		name = ukraine.565.a
		clr_country_flag = WUA_rebellion_in_polish_cw
		set_rule = {
			can_join_factions = yes
		}
	}
}
# Speech of Mazlakh
country_event = {
	id = ukraine.566
	title = ukraine.566.t
	desc = ukraine.566.d
	picture = GFX_report_event_generic_communist_congress

	is_triggered_only = yes

	option = {
		name = ukraine.566.a
	}
}
# Pact with natcom Ukraine and Germany
country_event = {
	id = ukraine.567
	title = ukraine.567.t
	desc = ukraine.567.d

	is_triggered_only = yes

	option = {
		name = ukraine.567.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				SOV = { NOT = { has_government = communism } }
			}
			modifier = {
				factor = 2
				FROM = { has_army_manpower = { size > 499999 } }
			}
		}
		diplomatic_relation = { country = FROM relation = non_aggression_pact }
		add_ideas = { UKR_GER_natcom_pact }
		FROM = { 
			country_event = ukraine.568
		}
		if = {
			limit = {
				807 = { is_owned_and_controlled_by = POL }
				NOT = { has_war_with = POL }
				NOT = { is_in_faction_with = POL }
				NOT = { has_completed_focus = GER_danzig_or_war }
				FROM = { NOT = { is_in_faction_with = POL } }
			}
			add_state_claim = 807
			add_state_claim = 85
			create_wargoal = {
				type = take_state_focus
				target = POL
				generator = { 807 }
			}
		}
	}
	option = {
		name = ukraine.567.b
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				OR = {
					has_government = democratic
					has_government = neutrality
				}
			}
		}
		diplomatic_relation = { country = FROM relation = non_aggression_pact }
		FROM = { 
			country_event = ukraine.569
		}
	}
	option = {
		name = ukraine.567.b
		ai_chance = {
			factor = 10
		}
		FROM = { 
			country_event = ukraine.570
		}
	}
}
# Pact with natcom Ukraine and Germany - agree
country_event = {
	id = ukraine.568
	title = ukraine.568.t
	desc = ukraine.568.d

	is_triggered_only = yes

	option = {
		name = ukraine.568.a
		add_ideas = UKR_GER_natcom_pact  
	}
}
# Pact with natcom Ukraine and Germany - only non-aggression pact
country_event = {
	id = ukraine.569
	title = ukraine.569.t
	desc = ukraine.569.d

	is_triggered_only = yes

	option = {
		name = ukraine.569.a
	}
}
# Pact with natcom Ukraine and Germany - refuse
country_event = {
	id = ukraine.570
	title = ukraine.570.t
	desc = ukraine.570.d

	is_triggered_only = yes

	option = {
		name = ukraine.570.a
	}
}
# Call to war for defense attacked member of Ukrainian-German pact
country_event = {
	id = ukraine.571
	title = ukraine.571.t
	desc = ukraine.571.d
	picture = GFX_report_event_generic_battle
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.571.a
		ai_chance = { 
			base = 100
		}
		SOV = {
			declare_war_on = {
				target = ROOT
				type = puppet_wargoal_focus
			}
		}
	}

	option = {
		name = ukraine.571.b
		ai_chance = { 
			base = 0 
		}
		remove_ideas = UKR_GER_natcom_pact
		every_other_country = {
			limit = {
				has_idea = UKR_GER_natcom_pact
			}
			remove_ideas = UKR_GER_natcom_pact
		}
	}
}
# Ukrainian natcom rebellion in Czechoslovakia
country_event = {
	id = ukraine.572
	title = ukraine.572.t
	desc = ukraine.572.d
	picture = GFX_report_event_proclamation_of_carphatian_ukraine

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CUA = {
				transfer_state = 73
				inherit_technology = CZE
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				load_oob = CUA_natcom_rebellion
				set_rule = {
					can_join_factions = no
				}
			}
			if = {
				limit = {
					NOT = { country_exists = SLO }
					70 = { is_owned_and_controlled_by = CZE }
					71 = { is_owned_and_controlled_by = CZE }
					664 = { is_owned_and_controlled_by = CZE }
					984 = { is_owned_and_controlled_by = CZE }
				}
				SLO = {
					transfer_state = 70
					transfer_state = 71
					transfer_state = 664
					transfer_state = 984
					inherit_technology = CZE
					set_research_slots = 2
					set_country_flag = UKR_masons_rebellion
					set_politics = { ruling_party = communism elections_allowed = no }
					add_popularity = { ideology = communism popularity = 0.5 }
					CZE = {
						transfer_units_fraction = {
							target = SLO
							stockpile_ratio = 0.2
							army_ratio = 0.3
							navy_ratio = 0
							air_ratio = 0.3
						}
					}
					set_rule = {
						can_join_factions = no
					}
				}
			}
		}
	}

	option = {
		name = ukraine.572.a
		declare_war_on = {
			target = CUA
			type = annex_everything
		}
		hidden_effect = {
			country_event = { id = ukraine.574 days = 120 }
		}
		if = {
			limit = {
				country_exists = SLO
				SLO = { has_country_flag = UKR_masons_rebellion }
			}
			declare_war_on = {
				target = SLO
				type = annex_everything
			}
		}
		UKR = { country_event = { id = ukraine.573 hours = 3 } }
	}
}
# Support of CUA for natcom Ukraine
country_event = {
	id = ukraine.573
	title = ukraine.573.t
	desc = ukraine.573.d
	picture = GFX_report_event_carpathian_soldiers

	is_triggered_only = yes

	option = {
		name = ukraine.573.a
		if = {
			limit = { NOT = { has_idea = UKR_help_for_natcom_rebels } }
			add_timed_idea = {
				idea = UKR_help_for_natcom_rebels
				days = 120
			}
		}
		add_ai_strategy = {
			type = send_volunteers_desire
			id = CUA
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = CUA
			value = 200
		}
	}
}
# CUA survived after 4 months of war - CZE must retreat
country_event = {
	id = ukraine.574
	title = ukraine.574.t
	desc = ukraine.574.d
	picture = GFX_report_event_carpathian_soldiers

	is_triggered_only = yes

	trigger = {
		country_exists = CZE
		country_exists = CUA
		CUA = { 
			has_capitulated = no 
			is_in_faction = no
		}
		has_war_with = CUA
	}

	option = {
		name = ukraine.574.a
		ai_chance = {
			base = 100
		}
		if = {
			limit = { 984 = { is_fully_controlled_by = CUA } }
			CUA = { transfer_state = 984 }
		}
		white_peace = CUA
		UKR = { country_event = { id = ukraine.576 } }
		if = {
			limit = { has_war_with = SLO }
			white_peace = SLO
		}
	}
	option = {
		name = ukraine.574.b
		ai_chance = {
			base = 0
		}
		add_stability = -0.10
		add_political_power = -150
	}
}
# Rebellion of CUA in other country
country_event = {
	id = ukraine.575
	title = ukraine.575.t
	desc = ukraine.575.d
	picture = GFX_report_event_proclamation_of_carphatian_ukraine

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			CUA = {
				transfer_state = 73
				inherit_technology = CZE
				set_research_slots = 2
				set_country_flag = UKR_masons_rebellion
				set_politics = { ruling_party = communism elections_allowed = no }
				add_popularity = { ideology = communism popularity = 0.5 }
				load_oob = CUA_natcom_rebellion
				set_rule = {
					can_join_factions = no
				}
			}
			UKR = {
				puppet = CUA
			}
		}
	}

	option = {
		name = ukraine.575.a
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.5
				has_war = yes
			}
		}
		declare_war_on = {
			target = CUA
			type = take_state
			generator = { 73 }
		}
		UKR = { country_event = ukraine.555 }	
	}
	option = {
		name = ukraine.575.b
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				73 = { NOT = { is_core_of = ROOT } }
			}
		}
		UKR = { country_event = ukraine.556 }
	}
}
# CZE agree on white peace - CUA is puppet of UKR
country_event = {
	id = ukraine.576
	title = ukraine.576.t
	desc = ukraine.576.d
	picture = GFX_report_event_soviet_army_greeted

	is_triggered_only = yes

	option = {
		name = ukraine.576.a
		puppet = CUA
	}
}
# Ultimatum to LAT and EST from CoTN
country_event = {
	id = ukraine.577
	title = ukraine.577.t
	desc = ukraine.577.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.577.a
		ai_chance = {
			factor = 90
		}
		FROM = {
			country_event = { id = ukraine.578 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				puppet = ROOT
			}
		}
	}
	option = {
		name = ukraine.577.b
		ai_chance = {
			factor = 10
			modifier = {
				has_army_manpower = { size > 150000 }
				factor = 5
			}
		}
		FROM = {
			country_event = { id = ukraine.579 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Baltic state accept ultimatum
country_event = {
	id = ukraine.578
	title = ukraine.578.t
	desc = ukraine.578.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.578.a
		puppet = FROM
	}
}
# Baltic state decline ultimatum
country_event = {
	id = ukraine.579
	title = ukraine.579.t
	desc = ukraine.579.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.579.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
# Integration of Gray Ukraine
country_event = {
	id = ukraine.580
	title = ukraine.580.t
	desc = ukraine.580.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.580.a
	}
}
# Pact with natcom Ukraine and USSR
country_event = {
	id = ukraine.581
	title = ukraine.581.t
	desc = ukraine.581.d

	is_triggered_only = yes

	option = {
		name = ukraine.581.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 0.5
				has_opinion = { target = FROM value < 0 }
			}
		}
		give_guarantee = FROM
		if = {
			limit = {
				89 = { is_controlled_by = ROOT }
			}
			FROM = { transfer_state = 89 }
		}
		if = {
			limit = {
				91 = { is_controlled_by = ROOT }
			}
			FROM = { transfer_state = 91 }
		}
		if = {
			limit = {
				93 = { is_controlled_by = ROOT }
			}
			FROM = { transfer_state = 93 }
		}
		if = {
			limit = {
				987 = { is_controlled_by = ROOT }
			}
			FROM = { transfer_state = 987 }
		}
		if = {
			limit = {
				94 = { is_controlled_by = FROM }
			}
			ROOT = { transfer_state = 94 }
		}
		if = {
			limit = {
				95 = { is_controlled_by = FROM }
			}
			ROOT = { transfer_state = 95 }
		}
		if = {
			limit = {
				96 = { is_controlled_by = FROM }
			}
			ROOT = { transfer_state = 96 }
		}
		if = {
			limit = {
				97 = { is_controlled_by = FROM }
			}
			ROOT = { transfer_state = 97 }
		}
		if = {
			limit = {
				784 = { is_controlled_by = FROM }
			}
			ROOT = { transfer_state = 784 }
		}
		diplomatic_relation = { country = FROM relation = non_aggression_pact }
		FROM = { 
			country_event = ukraine.582
		}
	}
	option = {
		name = ukraine.581.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 0.5
				has_war_with = GER
			}
		}
		FROM = { 
			country_event = ukraine.583
		}
	}
}
# Pact with natcom Ukraine and USSR - agree
country_event = {
	id = ukraine.582
	title = ukraine.582.t
	desc = ukraine.582.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	option = {
		name = ukraine.582.a
		give_guarantee = FROM
	}
}
# Pact with natcom Ukraine and USSR - refuse
country_event = {
	id = ukraine.583
	title = ukraine.583.t
	desc = ukraine.583.d
	picture = GFX_report_event_soviet_purge_politicians

	is_triggered_only = yes

	option = {
		name = ukraine.583.a
	}
}
# Trotsky question for natcom party
country_event = {
	id = ukraine.584
	title = ukraine.584.t
	desc = ukraine.584.d
	picture = GFX_report_event_leon_trotsky

	is_triggered_only = yes

	option = {
		name = ukraine.584.a
		ai_chance = {
			factor = 0
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.10
		}
		retire_character = UKR_lev_trotsky
		add_popularity = { ideology = communism popularity = -0.05 }
		add_political_power = 100
		if = {
			limit = {
				country_exists = SOV
				SOV = { has_government = communism }
			}
			remove_opinion_modifier = { target = SOV modifier = mexico_trotskyite_wreckers }
		}
	}
	option = {
		name = ukraine.584.b
		ai_chance = {
			factor = 70
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		if = {
			limit = {
				UKR = { UKR_lev_trotsky = { is_hired_as_advisor = no } }
			}
			activate_advisor = UKR_lev_trotsky
		}
		if = {
			limit = {
				has_dlc = "La Resistance"
			}
			add_ideas = UKR_trotsky_agents
		}
	}
	option = {
		name = ukraine.584.c
		ai_chance = {
			factor = 30
		}
	}
}
# Tannu-Tuva volunteers
country_event = {
	id = ukraine.585
	title = ukraine.585.t
	desc = ukraine.585.d
	picture = GFX_report_event_tuva_army
	
	fire_only_once = yes
	
	trigger = {
		tag = UKR
		has_government = communism
		has_capitulated = no
		is_in_faction_with = SOV
		is_in_faction_with = TAN
		any_other_country = {
			is_major = yes
			has_war_with = UKR
		}
	}
	
	mean_time_to_happen = {
		days = 30 
	}

	option = {
		name = ukraine.585.a 
		division_template = {
			name = "Tuva Cavalry"					
			regiments = {
				cavalry = { x = 0 y = 0 }
				cavalry = { x = 0 y = 1 }
				cavalry = { x = 0 y = 2 }
			}
		}
		capital_scope = {
			create_unit = {
				division = "name = \"Tuvinskyi dobrovolcheskyi kavaleryiskyi polk\" division_template = \"Tuva Cavalry\" start_experience_factor = 0.3 start_equipment_factor = 1"
				owner = ROOT
			}
		}
		add_war_support = 0.01
	}
}
# Four year plan for three years - check for achievement
country_event = {
	id = ukraine.586
	hidden = yes

	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = { check_variable = { UKR_natcom_successful_missions > 11 } }
			set_country_flag = cua_two_plus_two_is_three_flag
		}
		if = {
			limit = { 
				check_variable = { UKR_natcom_successful_missions > 14 } 
				202 = { is_owned_and_controlled_by = UKR }
			}
			country_event = { id = ukraine.590 days = 2 }
		}
	}
}
# Crush DKR for two weeks - check for achievement
country_event = {
	id = ukraine.587
	hidden = yes

	is_triggered_only = yes
	
	immediate = {
		if = {
			limit = { NOT = { country_exists = DKR } }
			set_country_flag = cua_help_did_not_come_flag
		}
	}
}
# Report about four year plan - successfull stage
country_event = {
	id = ukraine.588
	title = ukraine.588.t
	desc = ukraine.588.d
	picture = GFX_report_event_SOV_young_builders_of_communism

	trigger = {
		NOT = { has_country_flag = UKR_natcom_plan_dont_report }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.588.a
		ai_chance = {
			base = 0
		}
	}
	option = {
		name = ukraine.588.b
		ai_chance = {
			base = 100
		}
		set_country_flag = UKR_natcom_plan_dont_report
	}
}
# Report about four year plan - failed stage
country_event = {
	id = ukraine.589
	title = ukraine.589.t
	desc = ukraine.589.d
	picture = GFX_report_event_SOV_young_builders_of_communism

	trigger = {
		NOT = { has_country_flag = UKR_natcom_plan_dont_report }
	}

	is_triggered_only = yes

	option = {
		name = ukraine.589.a
		ai_chance = {
			base = 0
		}
	}
	option = {
		name = ukraine.588.b
		ai_chance = {
			base = 100
		}
		set_country_flag = UKR_natcom_plan_dont_report
	}
}
# Big success of Mazlak's plan
country_event = {
	id = ukraine.590
	title = ukraine.590.t
	desc = ukraine.590.d
	picture = GFX_report_event_tank_factory

	is_triggered_only = yes

	option = {
		name = ukraine.590.a
		add_stability = 0.01
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.05
		}
		if = {
			limit = {
				202 = {
					free_building_slots = {
						building = arms_factory
						size > 0
						include_locked = no
					}
				}
			}
			202 = {
				add_building_construction = {
					type = arms_factory
					level = 1
					instant_build = yes
				}
			}
		}
	}
}
# Last stand of DKSR
country_event = {
	id = ukraine.591
	title = ukraine.591.t
	desc = ukraine.591.d
	
	fire_only_once = yes
	
	trigger = {
		tag = DKR
		has_government = communism
		has_war_with = UKR
		UKR = {
			has_completed_focus = UKR_war_answer_for_dksr
		}
		227 = { is_owned_and_controlled_by = DKR }
		226 = { is_controlled_by = UKR }
	}
	
	mean_time_to_happen = {
		days = 7 
	}

	option = {
		name = ukraine.591.a 
		227 = {
			create_unit = {
				division = "division_template = \"Narodnoe opolchenie\" start_experience_factor = 0 start_equipment_factor = 0.50" 
				owner = DKR
				prioritize_location = 6474
			}
			add_building_construction = {
				type = bunker
				province = 6474
				level = 2
				instant_build = yes
			}
		}
		if = {
			limit = {
				228 = { is_owned_and_controlled_by = ROOT }
			}
			228 = {
				create_unit = {
					division = "division_template = \"Narodnoe opolchenie\" start_experience_factor = 0 start_equipment_factor = 0.50" 
					owner = DKR
					prioritize_location = 9461
				}
				add_building_construction = {
					type = bunker
					province = 9461
					level = 2
					instant_build = yes
				}
				add_building_construction = {
					type = bunker
					province = 6505
					level = 2
					instant_build = yes
				}
			}
		}
	}
}
# UKR annex DKR as subject - bonus for the Party way
country_event = {
	id = ukraine.592
	title = ukraine.592.t
	desc = ukraine.592.d
	picture = GFX_report_event_generic_communist_congress
	is_triggered_only = yes

	option = {
		name = ukraine.592.a
		add_stability = 0.05
		add_political_power = 100
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.10
		}
		every_owned_state = {
			limit = {
				is_core_of = DKR
			}
			remove_core_of = DKR
		}
	}
}
# Fast rebellion of Kazakhstan - opportunity for SKL
country_event = {
	id = ukraine.593
	hidden = yes

	trigger = {
		tag = SOV
		has_government = neutrality
		has_civil_war = yes
		has_global_flag = SOV_soviet_civil_war
		40 = { is_controlled_by = SOV }
		570 = { is_controlled_by = SOV }
		NOT = { 882 = { is_controlled_by = SOV } }
		NOT = { has_country_flag = kaz_uprising_flag }
		UKR = { NOT = { has_completed_focus = UKR_purge } }
		KAZ = { exists = no }
	}

	fire_only_once = yes
	mean_time_to_happen = { days = 7 }
	
	immediate = {
		SOV = { 
			set_variable = { SOV_nationalist_country = KAZ }
			set_country_flag = kaz_uprising_flag
			country_event = NSB_soviet_nationalist.001 
		}
	}
}
# Habsburg Ukraine invite to faction Poland or Hungaria
country_event = {
	id = ukraine.594
	title = ukraine.594.t
	desc = ukraine.594.d
	picture = GFX_report_event_royal_parade
	
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			save_event_target_as = alliance_applicant
			FROM = {
				save_event_target_as = alliance_inviter
			}
		}
	}

	option = { 
		name = ukraine.594.a
		ai_chance = {
			base = 10
		}
		FROM = {
			add_to_faction = PREV
			country_event = { id = generic.6 hours = 6 }
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.05
			}
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		hidden_effect = {
			set_country_flag = alliance_applicant@ROOT
			FROM = { set_country_flag = alliance_inviter@ROOT }
		}
	}

	option = { 
		name = ukraine.594.b
		ai_chance = {
			base = 0
		}
		FROM = { country_event = { id = ukraine.595 hours = 6 } }
	}
}
# Poland/Hungary refuse habsburg ally - message for Ukraine
country_event = {
	id = ukraine.595
	title = ukraine.595.t
	desc = ukraine.595.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.595.a
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.05
		}
	}
}
# Alliance with nazi Germany
country_event = {
	id = ukraine.596
	title = ukraine.596.t
	desc = ukraine.596.d
	picture = GFX_report_event_hitler_handshake
	
	is_triggered_only = yes

	option = { 
		name = ukraine.596.a
		ai_chance = {
			base = 100
		}
		add_to_faction = FROM
		FROM = {
			country_event = ukraine.597
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
	}

	option = { 
		name = ukraine.596.b
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				FROM = { oun_low_power_of_melnyk_trigger = no }
			}
		}
		FROM = { country_event = ukraine.598 }
	}
}
# Reich agree
country_event = {
	id = ukraine.597
	title = ukraine.597.t
	desc = ukraine.597.d
	picture = GFX_report_event_hitler_handshake
	
	is_triggered_only = yes

	option = {
		name = ukraine.597.a
		oun_lower_onslaught_small = yes
	}
}
# Reich refuse
country_event = {
	id = ukraine.598
	title = ukraine.598.t
	desc = ukraine.598.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.598.a
		set_country_flag = UKR_melnyk_without_daddy
		oun_increase_onslaught_small = yes
	}
}
# Choice initial side in OUN party split
country_event = {
	id = ukraine.599
	title = ukraine.599.t
	desc = ukraine.599.d
	picture = GFX_report_event_oun_council
	
	is_triggered_only = yes

	option = { 
		name = ukraine.599.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST_ALTERNATE
				}
			}
		}
		set_variable = { var_oun_status_of_power = 3 }
		set_variable = { var_oun_authority_of_conovalets = 20 }
		set_variable = { var_oun_control_of_melnyk = 55 }
		set_variable = { var_oun_onslaught_of_bandera = 25 }
		set_variable = { var_oun_final_winner = 1 }
		hidden_effect = {
			add_ideas = {
				oun_melnyk_max_power
				oun_fallen_leader
				oun_bandera_opposition
			}
		}
	}

	option = { 
		name = ukraine.599.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST
				}
			}
		}
		set_variable = { var_oun_status_of_power = 5 }
		set_variable = { var_oun_authority_of_conovalets = 20 }
		set_variable = { var_oun_control_of_melnyk = 25 }
		set_variable = { var_oun_onslaught_of_bandera = 55 }
		set_variable = { var_oun_final_winner = 2 }
		hidden_effect = {
			add_ideas = {
				oun_bandera_max_power
				oun_melnyk_opposition
				oun_fallen_leader
			}
		}
	}
}
# Event for Konovalets path
country_event = {
	id = ukraine.600
	title = ukraine.600.t
	desc = ukraine.600.d
	picture = GFX_report_event_oun_council
	
	is_triggered_only = yes

	option = { 
		name = ukraine.600.a
	}
}
# Request for transfer of Gomel
country_event = {
	id = ukraine.601
	title = ukraine.601.t
	desc = ukraine.601.d

	is_triggered_only = yes

	option = { 
		name = ukraine.601.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				94 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.2
				94 = { is_claimed_by = ROOT }
			}
		}
		
		UKR = {
			country_event = ukraine.107
			if = {
				limit = {
					204 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 204
			}
		}

	}

	option = { 
		name = ukraine.601.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 0
				is_puppet_of = UKR
			}
		}
		UKR = {
			country_event = ukraine.108 
		}
	}
}
# Adding core for Gomel
country_event = {
	id = ukraine.602
	title = ukraine.602.t
	desc = ukraine.602.d

	is_triggered_only = yes
	
	trigger = {
		204 = {
			is_owned_and_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	option = {
		name = ukraine.602.a
		add_state_core = 204
		204 = { set_state_name = UKR_dregovichchina }
	}
}
# Civil war among OUN
country_event = {
	id = ukraine.603
	title = ukraine.603.t
	desc = ukraine.603.d
	
	fire_only_once = yes
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_war = no
		has_country_flag = UKR_has_OUN_struggle
		NOT = { has_decision = UKR_decrease_radicalisation_decision }
		check_variable = { var_oun_radicalisation_level > 4 }
	}
	
	mean_time_to_happen = {
		days = 30 
	}

	immediate = {
		retire_character = UKR_yevhen_konovalets
		clr_country_flag = UKR_has_OUN_struggle
		set_variable = { var_oun_radicalisation_level = 1 }
	}

	option = {
		name = ukraine.603.a # Melnyk
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST_ALTERNATE
				}
			}
		}
		set_variable = { var_oun_status_of_power = 4 } 
		if = {
			limit = { NOT = { has_country_leader = { character = UKR_andriy_melnyk ruling_only = yes } } }
			promote_character = UKR_andriy_melnyk
		}
		set_cosmetic_tag = UKR_M
		create_dynamic_country = {
			original_tag = UKR
			set_variable = { UKR.oun_civil_var_opposite = THIS }
			set_cosmetic_tag = UKR_B
			if = {
				limit = { 200 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 200
			}
			if = {
				limit = { 221 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 221
				set_capital = { state = 221 }
			}
			if = {
				limit = { 225 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 225
			}
			if = {
				limit = { 226 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 226
			}
			if = {
				limit = { 227 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 227
			}
			if = {
				limit = { 228 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 228
			}
			if = {
				limit = { 259 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 259
			}
			declare_war_on = {
				target = PREV
				type = civil_war
			}
		}
		transfer_units_fraction = {
			target = UKR.oun_civil_var_opposite
			stockpile_ratio = 0.4
			army_ratio = 0.5
			navy_ratio = 0.5
			air_ratio = 0.5
		}
		UKR_stepan_bandera = { set_nationality = UKR.oun_civil_var_opposite }
		random_other_country = {
			limit = {
				original_tag = UKR
				has_war_with = ROOT
			}
			set_politics = { ruling_party = fascism elections_allowed = no }
			promote_character = UKR_stepan_bandera
		}
	}

	option = {
		name = ukraine.603.b # Bandera
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_game_rule = {
					rule = UKR_ai_behavior
					option = FASCIST
				}
			}
		}
		set_variable = { var_oun_status_of_power = 6 } 
		if = {
			limit = { NOT = { has_country_leader = { character = UKR_stepan_bandera ruling_only = yes } } }
			promote_character = UKR_stepan_bandera
		}
		set_cosmetic_tag = UKR_B
		create_dynamic_country = {
			original_tag = UKR
			set_variable = { UKR.oun_civil_var_opposite = THIS }
			set_cosmetic_tag = UKR_M
			if = {
				limit = { 200 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 200
			}
			if = {
				limit = { 221 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 221
				set_capital = { state = 221 }
			}
			if = {
				limit = { 225 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 225
			}
			if = {
				limit = { 226 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 226
			}
			if = {
				limit = { 227 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 227
			}
			if = {
				limit = { 228 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 228
			}
			if = {
				limit = { 259 = { is_owned_and_controlled_by = ROOT } }
				transfer_state = 259
			}
			declare_war_on = {
				target = PREV
				type = civil_war
			}
		}
		transfer_units_fraction = {
			target = UKR.oun_civil_var_opposite
			stockpile_ratio = 0.4
			army_ratio = 0.5
			navy_ratio = 0.5
			air_ratio = 0.5
		}
		UKR_andriy_melnyk = { set_nationality = UKR.oun_civil_var_opposite }
		random_other_country = {
			limit = {
				original_tag = UKR
				has_war_with = ROOT
			}
			set_politics = { ruling_party = fascism elections_allowed = no }
			promote_character = UKR_andriy_melnyk
		}
	}
}
# History makers - proposition for Hungary
country_event = {
	id = ukraine.604
	title = ukraine.604.t
	desc = ukraine.604.d

	is_triggered_only = yes

	option = { 
		name = ukraine.604.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.5
				has_completed_focus = HUN_trade_deal_with_germany
			}
		}
		FROM = {
			country_event = ukraine.605
			if = {
				limit = {
					664 = { is_owned_and_controlled_by = CZE }
				}
				CZE = { set_country_flag = UKR_hm_hungary_agree }
			}
			if = {
				limit = {
					76 = { is_owned_and_controlled_by = ROM }
				}
				ROM = { set_country_flag = UKR_hm_hungary_agree }
				add_state_claim = 76
				add_state_claim = 82
				add_state_claim = 83
				add_state_claim = 84
			}
		}

	}

	option = { 
		name = ukraine.604.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 5
				has_war = yes
			}
		}
		FROM = {
			country_event = ukraine.606 
		}
	}
}
# History makers - Hungary agree
country_event = {
	id = ukraine.605
	title = ukraine.605.t
	desc = ukraine.605.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.605.a
	}
}
# History makers - FROM refuse
country_event = {
	id = ukraine.606
	title = ukraine.606.t
	desc = ukraine.606.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.606.a
	}
}
# History makers - proposition for Bulgaria
country_event = {
	id = ukraine.607
	title = ukraine.607.t
	desc = ukraine.607.d

	is_triggered_only = yes

	option = { 
		name = ukraine.607.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.5
				has_completed_focus = BUL_approach_germany
			}
		}
		FROM = {
			country_event = ukraine.608
			ROM = { set_country_flag = UKR_hm_bulgaria_agree }
		}

	}

	option = { 
		name = ukraine.607.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 5
				has_war = yes
			}
		}
		FROM = {
			country_event = ukraine.606 
		}
	}
}
# History makers - Bulgaria agree
country_event = {
	id = ukraine.608
	title = ukraine.608.t
	desc = ukraine.608.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.608.a
	}
}
# History makers - proposition for Lithuania
country_event = {
	id = ukraine.609
	title = ukraine.609.t
	desc = ukraine.609.d

	is_triggered_only = yes

	option = { 
		name = ukraine.609.a
		ai_chance = {
			factor = 90
			modifier = {
				factor = 0.1
				has_completed_focus = LIT_peace_with_poland
			}
		}
		FROM = {
			country_event = ukraine.610
			POL = { set_country_flag = UKR_hm_lithuania_agree }
		}

	}

	option = { 
		name = ukraine.609.b
		ai_chance = {
			factor = 10
			modifier = {
				factor = 5
				has_war = yes
			}
		}
		FROM = {
			country_event = ukraine.606 
		}
	}
}
# History makers - Lithuania agree
country_event = {
	id = ukraine.610
	title = ukraine.610.t
	desc = ukraine.610.d
	picture = GFX_report_event_generic_sign_treaty2

	is_triggered_only = yes
	
	option = {
		name = ukraine.610.a
	}
}
# History makers - call to war with Romania
country_event = {
	id = ukraine.611
	title = ukraine.611.t
	desc = ukraine.611.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.611.a
		if = {
			limit = { tag = HUN }
			create_wargoal = {
				type = take_state_focus
				target = ROM
				generator = { 76 82 83 84 }
			}
		}
		else = { # for Bulgaria
			create_wargoal = {
				type = take_state_focus
				target = ROM
				generator = { 77 }
			}
		}
	}
}
# History makers - call to war with Czechoslovakia
country_event = {
	id = ukraine.612
	title = ukraine.612.t
	desc = ukraine.612.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.612.a
		create_wargoal = {
			type = take_state_focus
			target = CZE
			generator = { 664 }
		}
	}
}
# History makers - call to war with Poland
country_event = {
	id = ukraine.613
	title = ukraine.613.t
	desc = ukraine.613.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.613.a
		create_wargoal = {
			type = take_state_focus
			target = POL
			generator = { 784 }
		}
	}
}
# Disputes over Mariinskyi Palace
country_event = {
	id = ukraine.614
	title = ukraine.614.t
	desc = ukraine.614.d
	picture = GFX_report_event_mariinskyi_palace

	is_triggered_only = yes

	trigger = {
		has_government = neutrality
		202 = { is_owned_and_controlled_by = UKR }
	}

	option = {
		name = ukraine.614.a
		ai_chance = {
			base = 100
		}
		add_political_power = -25
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
	}
	
	option = {
		name = ukraine.614.b
		ai_chance = {
			base = 0
		}
		add_political_power = 25
		add_power_balance_value = {
			id = UKR_power_balance
			value = -0.10
		}
	}
}
# Birth of heir to the throne
country_event = {
	id = ukraine.615
	title = ukraine.615.t
	desc = ukraine.615.d

	is_triggered_only = yes

	trigger = {
		has_government = neutrality
	}

	option = {
		name = ukraine.615.a
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.05
		}
	}
}
# Alliance with Italia
country_event = {
	id = ukraine.616
	title = ukraine.616.t
	desc = ukraine.616.d
	picture = GFX_report_event_generic_italian_fascists
	
	is_triggered_only = yes

	option = { 
		name = ukraine.616.a
		ai_chance = {
			base = 50
		}
		add_to_faction = FROM
		FROM = {
			country_event = ukraine.617
			add_ai_strategy = {
				type = alliance
				id = ROOT
				value = 200
			}
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
	}

	option = { 
		name = ukraine.616.b
		ai_chance = {
			base = 0
			modifier = {
				add = 50
				NOT = { has_government = FROM }
			}
		}
		FROM = { country_event = ukraine.618 }
	}
}
# Italia agree
country_event = {
	id = ukraine.617
	title = ukraine.617.t
	desc = ukraine.617.d
	picture = GFX_report_event_generic_italian_fascists
	
	is_triggered_only = yes

	option = {
		name = ukraine.617.a
		oun_lower_onslaught_small = yes
	}
}
# Italia refuse
country_event = {
	id = ukraine.618
	title = ukraine.618.t
	desc = ukraine.618.d
	picture = GFX_report_event_generic_italian_fascists
	
	is_triggered_only = yes

	option = {
		name = ukraine.618.a
		oun_increase_onslaught_small = yes
	}
}
# Ukraine wants a research agreement with ITA - event for ITA
country_event = {
	id = ukraine.619
	title = ukraine.619.t
	desc = ukraine.619.desc
	picture = GFX_report_event_german_troops 

	is_triggered_only = yes

	option = { #Accept
		name = ukraine.619.a

		ai_chance = {
			base = 5
			modifier = {
				factor = 10
				is_in_faction_with = ROOT
			}
			modifier = {
				factor = 10
				has_government = FROM
			}
		}
		add_to_tech_sharing_group = UKR_italian_research
		FROM = { add_to_tech_sharing_group = UKR_italian_research }
		add_political_power = 50
	}

	option = { #Refuse
		name = ukraine.619.b

		ai_chance = {
			base = 5
		}
	}
}
# White peace with CZE for carpathian war - choice for CZE
country_event = {
	id = ukraine.620
	title = ukraine.620.t
	desc = ukraine.620.d
	
	trigger = {
		tag = CZE
		has_war_with = UKR
		casualties_inflicted_by = {
			opponent = UKR
			thousands > 30
		}
		UKR = {
			surrender_progress < 0.1
			OR = {
				is_in_faction = no
				is_faction_leader = yes
			}
			OR = {
				has_completed_focus = UKR_carpathian_ukraine_claims
				has_completed_focus = UKR_natcom_transcarpathia
			}
		}
		OR = {
			is_in_faction = no
			is_faction_leader = yes
		}
		73 = { is_controlled_by = UKR }
		73 = { is_owned_by = CZE }
	}

	mean_time_to_happen = { days = 30 }

	fire_only_once = yes

	#Surrender and offer territory
	option = {
		name = ukraine.620.a
		ai_chance = {
			base = 80
			modifier = {
				factor = 0.5
				is_in_faction = yes
			}
		}
		UKR = {
			country_event = { id = ukraine.621 }
		}
		effect_tooltip = {
			UKR = { 
				white_peace = CZE 
			}
			transfer_state = 73
		}
	}

	#Never give up!
	option = {
		name = ukraine.620.b
		UKR = { add_state_claim = 834 }
		ai_chance = {
			base = 20
			modifier = {
				factor = 0
				has_civil_war = yes
			}
		}
	}
}
# Ukraine response to CZE surrender
country_event = {
	id = ukraine.621
	title = ukraine.621.t
	desc = ukraine.621.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	#Accept surrender
	option = {
		name = ukraine.621.a
		ai_chance = {
			base = 90
		}
		add_to_array = { white_peace_countries_array = FROM }
		UKR_white_peace_with_alliances = yes
		if = { #guaranties of FRA
			limit = {
				threat < 1
				FRA = {
					is_in_faction = no
					has_war_with = UKR
				}
			}
			white_peace = UKR
		}
		transfer_state = 73
		if = { #Presov as additional state
			limit = {
				834 = { is_owned_and_controlled_by = ROOT }
				984 = { is_owned_and_controlled_by = FROM }
			}
			UKR = { transfer_state = 984 }
		}
	}

	#Take it all
	option = {
		name = ukraine.621.b
		ai_chance = {
			base = 10
		}
		add_state_claim = 984
		FROM = { country_event = { id = ukraine.622 } }
	}
}
# Ukraine says no!
country_event = {
	id = ukraine.622
	title = ukraine.622.t
	desc = ukraine.622.d
	picture = GFX_report_event_german_volunteers
	
	is_triggered_only = yes

	option = {
		name = ukraine.622.a
	}
}
# Military command renewal
country_event = {
	id = ukraine.623
	title = ukraine.623.t
	desc = ukraine.623.d
	picture = GFX_report_event_hetman_with_generals
	
	is_triggered_only = yes

	option = {
		name = ukraine.623.a
		ai_chance = {
			base = 50
		}
		retire_character = UKR_borys_paliy_neyilo
		retire_character = UKR_marko_bezruchko
		retire_character = UKR_volodymyr_sikevych
		if = {
			limit = {
				has_character = UKR_mykhailo_veselkin
			}
			retire_character = UKR_mykhailo_veselkin
		}
		retire_character = UKR_olexandr_pilkevich
		add_doctrine_cost_reduction = {
			name = UKR_new_doctrine
			cost_reduction = 0.5
			uses = 1
			category = land_doctrine
		}
		add_doctrine_cost_reduction = {
			name = UKR_new_doctrine
			cost_reduction = 0.5
			uses = 1
			category = naval_doctrine
		}
		add_doctrine_cost_reduction = {
			name = UKR_new_doctrine
			cost_reduction = 0.5
			uses = 1
			category = air_doctrine
		}
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = -0.10
			}
		}
	}

	option = {
		name = ukraine.623.b
		ai_chance = {
			base = 50
		}
		add_command_power = 50
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.10
			}
		}
	}
}
# Coup in Transcarpathia
country_event = {
	id = ukraine.624
	title = ukraine.624.t
	desc = ukraine.624.d
	
	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_politics = { ruling_party = fascism elections_allowed = no }
			add_popularity = {
				ideology = fascism
				popularity = 0.30
			}
			set_party_name = { ideology = fascism name = CUA_oun_party_short long_name = CUA_oun_party_long } 
			add_country_leader_role = {
				character = UKR_roman_shukhevych
				promote_leader = yes
				country_leader = {
					ideology = ukr_int_nationalism
					expire = "1953.3.1"
					traits = { }
				}
			}
		}
	}

	option = {
		name = ukraine.624.a
		if = {
			limit = { 
				is_in_faction_with = UKR 
				is_puppet = yes
			}
			OVERLORD = { country_event = { id = carpathian.29 hours = 8 } }
		}
		else = {
			OVERLORD = {
				country_event = { id = carpathian.20 hours = 12 }
			}
			UKR = {
				puppet = CUA
			}
		}
	}
}
# New Habsburg dual monarchy - choice for Poland
country_event = {
	id = ukraine.625
	title = ukraine.625.t
	desc = ukraine.625.d
	picture = GFX_report_event_poland_rejects
	
	is_triggered_only = yes
	
	option = { # accept union
		name = ukraine.625.a
		ai_chance = {
			factor = 80
		}
		FROM = { country_event = ukraine.626 }
		effect_tooltip = {
			every_unit_leader = {
				set_nationality = FROM
			}
			every_navy_leader = {
				set_nationality = FROM
			}
			remove_state_core = 89
			remove_state_core = 91
			remove_state_core = 93
			remove_state_core = 987
			FROM = {
				annex_country = { target = ROOT transfer_troops = yes }
				every_owned_state = {
					limit = { is_core_of = ROOT }
					add_core_of	= FROM
				}
				set_cosmetic_tag = UKR_POL_HABSBURG
			}
		}
		custom_effect_tooltip = GAME_OVER_TT
	}
	option = { # decline union
		name = ukraine.236.b
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0
				FROM = { has_country_flag = UKR_consent_to_arrest_of_bandera }
			}
		}
		FROM = { country_event = ukraine.627 }
	}
}
# New Habsburg dual monarchy - Poland accept union
country_event = {
	id = ukraine.626
	title = ukraine.626.t
	desc = ukraine.626.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	option = {
		name = ukraine.626.a
		FROM = {
			every_unit_leader = {
				set_nationality = ROOT
			}
			every_navy_leader = {
				set_nationality = ROOT
			}
			if = {
				limit = { has_character = POL_eugeniusz_kwiatkowiski }
				POL_eugeniusz_kwiatkowiski = { set_nationality = ROOT }
			}
			if = {
				limit = { has_character = POL_stanislaw_pawluc }
				POL_stanislaw_pawluc = { set_nationality = ROOT }
			}
			if = {
				limit = { has_character = POL_stanislav_maczek }
				POL_stanislav_maczek = { set_nationality = ROOT }
			}
		}
		if = {
			limit = { WUA = { is_subject_of = FROM } }
    		puppet = WUA
		}
		if = {
			limit = { CUA = { is_subject_of = FROM } }
    		puppet = CUA
		}
		if = {
			limit = { FROM = { is_faction_leader = yes } }
			set_faction_leader = yes
		}
		annex_country = { target = FROM transfer_troops = yes }
		every_owned_state = {
			limit = { is_core_of = POL }
			add_core_of	= ROOT
		}
		FROM = {
			remove_state_core = 89
			remove_state_core = 91
			remove_state_core = 93	
			remove_state_core = 987	
		}
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity }
			swap_ruler_traits = { remove = symbol_of_unity add = king_of_both_nations }
		}
		if = { 
			limit = { has_country_leader_with_trait = symbol_of_unity_adv }
			swap_ruler_traits = { remove = symbol_of_unity_adv add = king_of_both_nations }
		}
		set_country_flag = UKR_dual_habsburg_monarchy
		set_cosmetic_tag = UKR_POL_HABSBURG
		hidden_effect = {
			#news_event = { hours = 1 id = news... }
		}
	}
	
}
# New Habsburg dual monarchy - Poland reject union
country_event = {
	id = ukraine.627
	title = ukraine.627.t
	desc = ukraine.627.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.627.a
	}
}
# Choice of metropolitan
country_event = {
	id = ukraine.628
	title = ukraine.628.t
	desc = ukraine.628.d

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			WUA = { 
				WUA_andrey_sheptytsky = { set_nationality = ROOT }
			}
		}
	}

	option = {
		name = ukraine.628.a
		ai_chance = {
			base = 50
		}
		retire_character = WUA_andrey_sheptytsky
	}
	
	option = {
		name = ukraine.628.b
		ai_chance = {
			base = 50
		}
		retire_character = UKR_metropolitan_vasyl
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = WUA_andrey_sheptytsky
	}
}
# Karol II after the overthrow - refuge in Ukraine 
country_event = {
	id = ukraine.629
	title = ukraine.629.t
	desc = ukraine.629.d
	picture = GFX_report_event_ROM_mistress

	is_triggered_only = yes

	option = {
		name = ukraine.629.a
		ai_chance = {
			base = 100
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		set_country_flag = UKR_karol2_got_refuge
		custom_effect_tooltip = UKR_additional_decisions_for_bop
	}
	
	option = {
		name = ukraine.629.b
		ai_chance = {
			base = 0
		}
	}
}
# Karol II have support of Ukrainian king - ultimatum to Romania
country_event = {
	id = ukraine.630
	title = ukraine.630.t
	desc = ukraine.630.d
	picture = GFX_report_event_ROM_mistress

	is_triggered_only = yes

	option = {
		name = ukraine.630.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				has_war = yes
			}
		}
		if = {
			limit = { NOT = { has_government = neutrality } }
			set_politics = { ruling_party = neutrality elections_allowed = no }
		}
		create_country_leader = {
			name = "Carol II"
			desc = "POLITICS_CAROL_II_DESC"
			picture = GFX_Portrait_romania_Carol_II				
			expire = "1965.1.1"
			ideology = despotism
			traits = {
				hedonist
			}
			id = 550
		}
		FROM = {
			country_event = ukraine.631
			effect_tooltip = {
				puppet = ROOT
			}
		}
	}
	
	option = {
		name = ukraine.630.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				is_in_faction = yes
			}
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
		}
		FROM = {
			country_event = ukraine.632
			effect_tooltip = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Fugitive king have support of Ukrainian king - FROM accept
country_event = {
	id = ukraine.631
	title = ukraine.631.t
	desc = ukraine.631.d
	picture = GFX_report_event_royal_parade

	is_triggered_only = yes
	
	option = {
		name = ukraine.631.a
		puppet = FROM
		set_autonomy = {
			target = FROM
			autonomy_state = autonomy_dominion
			freedom_level = 0.5
		}
	}
}
# Fugitive king have support of Ukrainian king - FROM reject
country_event = {
	id = ukraine.632
	title = ukraine.632.t
	desc = ukraine.632.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.632.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
# Boris III after the overthrow - refuge in Ukraine 
country_event = {
	id = ukraine.633
	title = ukraine.633.t
	desc = ukraine.633.d
	picture = GFX_report_event_bul_boris_death

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 30	}

	trigger = {
		tag = UKR
		has_government = neutrality
		has_country_flag = UKR_constitution_monarchy
		BUL = {
			exists = yes
			is_puppet = no
			NOT = { has_war_with = ROOT }
			has_civil_war = no
			NOT = { is_in_faction_with = ROOT }
			OR = {
				has_completed_focus = BUL_overthrow_the_tsar
				has_completed_focus = BUL_abolish_the_monarchy
			}
		}
	}

	option = {
		name = ukraine.633.a
		ai_chance = {
			base = 100
		}
		add_power_balance_value = {
			id = UKR_power_balance
			value = 0.10
		}
		set_country_flag = UKR_boris3_got_refuge
		custom_effect_tooltip = UKR_additional_decisions_for_bop
	}
	
	option = {
		name = ukraine.633.b
		ai_chance = {
			base = 0
		}
	}
}
# Boris III have support of Ukrainian king - ultimatum to Bulgaria
country_event = {
	id = ukraine.634
	title = ukraine.634.t
	desc = ukraine.634.d
	picture = GFX_report_event_bul_boris_death

	is_triggered_only = yes

	option = {
		name = ukraine.634.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				has_war = yes
			}
		}
		set_politics = { ruling_party = neutrality elections_allowed = no }
		create_country_leader = {
			name = "Boris III"
			picture = GFX_portrait_BUL_boris_iii				
			expire = "1965.1.1"
			ideology = despotism
			traits = {
			}
		}
		FROM = {
			country_event = ukraine.631
			effect_tooltip = {
				puppet = ROOT
			}
		}
	}
	
	option = {
		name = ukraine.634.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				is_in_faction = yes
			}
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
		}
		FROM = {
			country_event = ukraine.632
			effect_tooltip = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Regular elections for nationalists
country_event = {
	id = ukraine.635
	title = ukraine.635.t
	desc = ukraine.635.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes

	trigger = {
		original_tag = UKR
		has_government = fascism
		has_completed_focus = UKR_national_liberalisation
	}

	option = { 	
		name = ukraine.635.a #Bandera
		trigger = {
			check_variable = { var_oun_final_winner = 2 }
		}
		ai_chance = {
			factor = 50
		}
		if = {
			limit = {
				UKR_stepan_bandera = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = UKR_stepan_bandera
		}		
	}

	option = { 	
		name = ukraine.635.b #Melnyk
		trigger = {
			check_variable = { var_oun_final_winner = 1 }
		}
		ai_chance = {
			factor = 50
		}
		if = {
			limit = {
				UKR_andriy_melnyk = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = UKR_andriy_melnyk
		}		
	}

	option = { 	
		name = ukraine.635.c #Konovalets
		trigger = {
			check_variable = { var_oun_final_winner = 0 }
		}
		ai_chance = {
			factor = 50
		}
		if = {
			limit = {
				UKR_yevhen_konovalets = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = UKR_yevhen_konovalets
		}		
	}

	option = { 
		name = ukraine.635.e #Matla
		ai_chance = {
			factor = 25
		}		
		if = {
			limit = {
				UKR_zenon_matla = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = {
				character = UKR_zenon_matla
			}
		}
	}

	option = { 
		name = ukraine.635.f #Olzhych
		ai_chance = {
			factor = 25
		}
		if = {
			limit = {
				UKR_oleh_olzhych = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = UKR_oleh_olzhych
		}		
	}
	option = { 
		name = ukraine.635.g #Stepanyak
		ai_chance = {
			factor = 25
		}
		if = {
			limit = {
				UKR_mykhailo_stepanyak = {
					is_country_leader = yes 
				}
			}
			add_stability = -0.05
		}
		else = {
			add_political_power = 75
			add_popularity = {
				ideology = democratic
				popularity = 0.10
			}
			promote_character = UKR_mykhailo_stepanyak
		}		
	}
}
# Burst of violence in OUN - Senik
country_event = {
	id = ukraine.636
	title = ukraine.636.t
	desc = ukraine.636.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.636.a
		retire_character = UKR_omelyan_senik
	}
}
# Burst of violence in OUN - Teliha
country_event = {
	id = ukraine.637
	title = ukraine.637.t
	desc = ukraine.637.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.637.a
		retire_character = UKR_olena_teliha
	}
}
# Burst of violence in OUN - Stsiborskyi
country_event = {
	id = ukraine.638
	title = ukraine.638.t
	desc = ukraine.638.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.638.a
		retire_character = UKR_mykola_stsiborskyi
	}
}
# Burst of violence in OUN - Lebid
country_event = {
	id = ukraine.639
	title = ukraine.639.t
	desc = ukraine.639.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.639.a
		retire_character = UKR_mykola_lebid
	}
}
# Burst of violence in OUN - Stetsko
country_event = {
	id = ukraine.640
	title = ukraine.640.t
	desc = ukraine.640.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.640.a
		retire_character = UKR_yaroslav_stetsko
	}
}
# Burst of violence in OUN - Rebet
country_event = {
	id = ukraine.641
	title = ukraine.641.t
	desc = ukraine.641.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.641.a
		retire_character = UKR_lev_rebet
	}
}
# Burst of violence in OUN - Kubiyovych
country_event = {
	id = ukraine.642
	title = ukraine.642.t
	desc = ukraine.642.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.642.a
		retire_character = UKR_volodymyr_kubiyovych
	}
}
# Burst of violence in OUN - Petriv
country_event = {
	id = ukraine.643
	title = ukraine.643.t
	desc = ukraine.643.d

	trigger = {
		has_country_flag = UKR_has_OUN_struggle
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.643.a
		retire_character = UKR_vsevolod_petriv
	}
}
# Integration of Yellow Ukraine
country_event = {
	id = ukraine.644
	title = ukraine.644.t
	desc = ukraine.644.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.644.a
	}
}
# Abolishment of hetmans post - monarchy now is absolute
country_event = {
	id = ukraine.645
	title = ukraine.645.t
	desc = ukraine.645.d
	picture = GFX_report_event_hetman_with_generals

	is_triggered_only = yes
	
	option = {
		name = ukraine.645.a
		add_stability = 0.05
		add_political_power = 75
	}
}
# Mission of Lyahovich - isolation of Poland
country_event = {
	id = ukraine.646
	title = ukraine.646.t
	desc = ukraine.646.d

	trigger = {
		NOT = { has_war_with = POL }
	}

	is_triggered_only = yes
	
	option = {
		name = ukraine.646.a
		add_opinion_modifier = { 
			target = POL
			modifier = western_betrayal
		}
		if = {
			limit = {
				is_faction_leader = yes
				is_in_faction_with = POL
			}
			remove_from_faction = POL
		}
		else_if = {
			limit = {
				has_guaranteed = POL
			}
			diplomatic_relation = {
				country = POL
				relation = guarantee
				active = no
			}
		}
	}
}
# Mission of Lyahovich - isolation of Poland and demand cede Western Ukraine
country_event = {
	id = ukraine.647
	title = ukraine.647.t
	desc = ukraine.647.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.647.a
		add_opinion_modifier = { 
			target = POL
			modifier = western_betrayal
		}
		if = {
			limit = {
				is_faction_leader = yes
				is_in_faction_with = POL
			}
			remove_from_faction = POL
		}
		else_if = {
			limit = {
				has_guaranteed = POL
			}
			diplomatic_relation = {
				country = POL
				relation = guarantee
				active = no
			}
		}
		if = {
			limit = {
				UKR = { has_war = no }
			}
			give_guarantee = UKR
		}
		POL = { country_event = { id = ukraine.648 days = 1 } }
	}
}
# Britain demand from Poland revision of borders for Curzon Line
country_event = {
	id = ukraine.648
	title = ukraine.648.t
	desc = ukraine.648.d

	is_triggered_only = yes

	trigger = {
		89 = { is_owned_and_controlled_by = ROOT }
		91 = { is_owned_and_controlled_by = ROOT }
		93 = { is_owned_and_controlled_by = ROOT }
		987 = { is_owned_and_controlled_by = ROOT }
		NOT = { has_war_with = UKR }
		is_subject = no
	}

	option = {
		name = ukraine.648.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				has_war = yes
			}
		}
		effect_tooltip = {
			UKR = {
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
			}
		}
		UKR = { country_event = ukraine.649 }
	}
	
	option = {
		name = ukraine.648.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 1.5
				is_in_faction = yes
			}
			modifier = {
				factor = 0.5
				strength_ratio = {
					tag = UKR
					ratio < 1
				}
			}
		}
		effect_tooltip = {
			UKR = {
				UKR_create_wargoal_against_poland = yes
			}
		}
		FROM = { country_event = ukraine.650 }
		UKR = { country_event = ukraine.651 }
	}
}
# Mission of Lyahovich - Poland cede Western Ukraine
country_event = {
	id = ukraine.649
	title = ukraine.649.t
	desc = ukraine.649.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.649.a
		transfer_state = 89
		transfer_state = 91
		transfer_state = 93
		transfer_state = 987
	}
}
# Mission of Lyahovich - Poland refuse, message for ENG
country_event = {
	id = ukraine.650
	title = ukraine.650.t
	desc = ukraine.650.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.650.a
	}
}
# Mission of Lyahovich - Poland refuse, legal wargoal for Ukraine
country_event = {
	id = ukraine.651
	title = ukraine.651.t
	desc = ukraine.651.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.651.a
		UKR_create_wargoal_against_poland = yes
		add_state_claim = 834 #Transcurzonia
	}
}
# Melnyk propose support from Reich for war with Poland
country_event = {
	id = ukraine.652
	title = ukraine.652.t
	desc = ukraine.652.d

	is_triggered_only = yes

	trigger = {
		has_war_with = POL
		has_government = fascism
		has_country_flag = UKR_has_OUN_struggle
		country_exists = GER
		NOT = { has_war_with = GER }
		NOT = { is_in_faction_with = GER }
		GER = {
			has_government = fascism
		}
		oun_low_power_of_bandera_trigger = yes
	}

	option = {
		name = ukraine.652.a
		ai_chance = {
			factor = 90
		}
		add_equipment_to_stockpile = { type = infantry_equipment amount = 1000 producer = GER }
		add_equipment_to_stockpile = { type = support_equipment amount = 200 producer = GER }
		oun_increase_control_small = yes
	}
	
	option = {
		name = ukraine.652.b
		ai_chance = {
			factor = 10
		}
		oun_increase_radicalisation = yes
	}
}
# Bandera propose limit technological cooperation with the Germans
country_event = {
	id = ukraine.653
	title = ukraine.653.t
	desc = ukraine.653.d
	picture = GFX_report_event_generic_factory
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_country_flag = UKR_has_OUN_struggle
		has_completed_focus = UKR_germany_support
		is_in_faction_with = GER
		oun_low_power_of_bandera_trigger = yes
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.653.a
		remove_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		add_tech_bonus = {
			name = UKR_mechanization_army
			bonus = 1.0
			uses = 1
			category = armor
		}
		oun_increase_radicalisation = yes
	}

	option = {
		name = ukraine.653.b
		ai_chance = {
			factor = 10
		}
		oun_increase_control_small = yes
	}
}
# Balkan knot - demand to change faction
country_event = {
	id = ukraine.654
	title = ukraine.654.t
	desc = ukraine.654.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.654.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 1.5
				FROM = { is_faction_leader = yes }
			}
		}
		if = {
			limit = { FROM = { is_faction_leader = yes } }
			effect_tooltip = {
				FROM = { add_to_faction = ROOT }
			}
		}
		else = {
			effect_tooltip = {
				FROM = { puppet = ROOT }
			}
		}
		FROM = { country_event = ukraine.657 }
	}

	option = {
		name = ukraine.654.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
		}
		effect_tooltip = {
			FROM = { 
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}
		FROM = { country_event = ukraine.658 }
	}
}
# Balkan knot - invite in our faction (or puppeting)
country_event = {
	id = ukraine.655
	title = ukraine.655.t
	desc = ukraine.655.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.655.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 1.5
				FROM = { is_faction_leader = yes }
			}
		}
		if = {
			limit = { FROM = { is_faction_leader = yes } }
			effect_tooltip = {
				FROM = { add_to_faction = ROOT }
			}
		}
		else = {
			effect_tooltip = {
				FROM = { puppet = ROOT }
			}
		}
		FROM = { country_event = ukraine.657 }
	}

	option = {
		name = ukraine.655.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
		}
		effect_tooltip = {
			FROM = { 
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}
		FROM = { country_event = ukraine.658 }
	}
}
# Balkan knot - demand to change overlord
country_event = {
	id = ukraine.656
	title = ukraine.656.t
	desc = ukraine.656.d
	
	is_triggered_only = yes

	trigger = {
		NOT = { has_war_with = FROM }
		NOT = { is_in_faction_with = FROM }
	}

	option = {
		name = ukraine.656.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		if = {
			limit = {
				has_subject = BUL
			}
			FROM = { puppet = BUL }
		}
		if = {
			limit = {
				has_subject = YUG
			}
			FROM = { puppet = YUG }
		}
		if = {
			limit = {
				has_subject = GRE
			}
			FROM = { puppet = GRE }
		}
		FROM = { country_event = ukraine.659 }
	}

	option = {
		name = ukraine.656.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 1
				}
			}
			modifier = {
				factor = 1.5
				is_major = yes
			}
		}
		effect_tooltip = {
			FROM = { 
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
				}
			}
		}
		FROM = { country_event = ukraine.660 }
	}
}
# Balkan knot - tag admits our demand
country_event = {
	id = ukraine.657
	title = ukraine.657.t
	desc = ukraine.657.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.657.a
		if = {
			limit = { FROM = { is_faction_leader = yes } }
			add_to_faction = FROM
			FROM = {
				add_ai_strategy = {
					type = alliance
					id = ROOT
					value = 200
				}
			}
		}
		else = {
			puppet = FROM
		}
	}
}
# Balkan knot - tag refuse our demand
country_event = {
	id = ukraine.658
	title = ukraine.658.t
	desc = ukraine.658.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes

	option = {
		name = ukraine.658.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}
	}
}
# Balkan knot - OVERLORD cede own balkan puppets
country_event = {
	id = ukraine.659
	title = ukraine.659.t
	desc = ukraine.659.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.659.a
	}
}
# Balkan knot - OVERLORD don`t accept ultimatum
country_event = {
	id = ukraine.660
	title = ukraine.660.t
	desc = ukraine.660.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes

	option = {
		name = ukraine.660.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
		}
	}
}
# Choice for nationalists in 1939s start - wargoal on Poland 
country_event = {
	id = ukraine.661
	title = ukraine.661.t
	desc = ukraine.661.d

	is_triggered_only = yes

	option = { 
		name = ukraine.661.a
		ai_chance = {
			base = 100
		}
		UKR_create_wargoal_against_poland = yes
		add_stability = -0.05
	}

	option = { 
		name = ukraine.661.b
		ai_chance = {
			base = 0
		}
		add_stability = 0.05
	}
}
# New order in Russia - DON
country_event = {
	id = ukraine.662
	title = ukraine.662.t
	desc = ukraine.662.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = DON }
		218 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		DON = {
			transfer_state = 218
		}
		every_state = {
			limit = {
				is_core_of = DON
				is_controlled_by = ROOT
			}
			transfer_state_to = DON
		}
		puppet = DON
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Mountain Republic
country_event = {
	id = ukraine.663
	title = ukraine.663.t
	desc = ukraine.663.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = DAG }
		232 = {
			is_controlled_by = UKR
		}
		821 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		DAG = {
			transfer_state = 232
			transfer_state = 821
			set_cosmetic_tag = mountainous_republics_unified
		}
		821 = { add_core_of = DAG }
		826 = { add_core_of = DAG }
		827 = { add_core_of = DAG }
		828 = { add_core_of = DAG }
		every_state = {
			limit = {
				is_core_of = DAG
				is_controlled_by = ROOT
			}
			transfer_state_to = DAG
		}
		puppet = DAG
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Transcaucasia
country_event = {
	id = ukraine.664
	title = ukraine.664.t
	desc = ukraine.664.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = GEO }
		OR = {
			229 = {
				is_controlled_by = UKR
			}
			230 = {
				is_controlled_by = UKR
			}
			231 = {
				is_controlled_by = UKR
			}
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		GEO = {
			if = {
				limit = { 229 = { is_controlled_by = ROOT } }
				transfer_state = 229
			}
			if = {
				limit = { 230 = { is_controlled_by = ROOT } }
				transfer_state = 230
			}
			if = {
				limit = { 231 = { is_controlled_by = ROOT } }
				transfer_state = 231
			}
			set_cosmetic_tag = transcaucasia_unified
		}
		229 = { add_core_of = GEO }
		230 = { add_core_of = GEO }
		every_state = {
			limit = {
				is_core_of = GEO
				is_controlled_by = ROOT
			}
			transfer_state_to = GEO
		}
		puppet = GEO
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Idel Ural
country_event = {
	id = ukraine.665
	title = ukraine.665.t
	desc = ukraine.665.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = TAT }
		249 = {
			is_controlled_by = UKR
		}
		651 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		TAT = {
			transfer_state = 249
			transfer_state = 651
			set_cosmetic_tag = idel_ural
		}
		256 = { add_core_of = TAT }
		399 = { add_core_of = TAT }
		833 = { add_core_of = TAT }
		every_state = {
			limit = {
				is_core_of = TAT
				is_controlled_by = ROOT
			}
			transfer_state_to = TAT
		}
		puppet = TAT
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Belarus
country_event = {
	id = ukraine.666
	title = ukraine.666.t
	desc = ukraine.666.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = BLR }
		216 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		BLR = {
			transfer_state = 216
		}
		every_state = {
			limit = {
				is_core_of = BLR
				is_controlled_by = ROOT
			}
			transfer_state_to = BLR
		}
		puppet = BLR
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Kalmykia
country_event = {
	id = ukraine.667
	title = ukraine.667.t
	desc = ukraine.667.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = KAL }
		237 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		KAL = {
			transfer_state = 237
		}
		puppet = KAL
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# New order in Russia - Kuban
country_event = {
	id = ukraine.668
	title = ukraine.668.t
	desc = ukraine.668.d
	picture = GFX_report_event_cossaks_rebels
	
	trigger = {
		tag = UKR
		has_government = fascism
		has_completed_focus = UKR_order_on_russia
		NOT = { country_exists = KUB }
		234 = {
			is_controlled_by = UKR
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 7	}

	option = {
		ai_chance = {
			base = 100
		}
		name = ukraine.662.a
		add_political_power = 25
		add_to_variable = { var_ffn_defence = 0.02 }
		add_to_variable = { var_ffn_manpower = 0.02 }
		custom_effect_tooltip = UKR_new_order_free_state_tt
		KUB = {
			transfer_state = 234
			if = {
				limit = { 233 = { is_controlled_by = ROOT } }
				transfer_state = 233
			}
			if = {
				limit = { 985 = { is_controlled_by = ROOT } }
				transfer_state = 985
			}
			if = {
				limit = { 235 = { is_controlled_by = ROOT } }
				transfer_state = 235
			}
		}
		235 = { add_core_of = KUB }
		puppet = KUB
	}
	option = {
		ai_chance = {
			base = 0
		}
		name = ukraine.662.b
		add_political_power = -25
		add_war_support = -0.01
	}
}
# Russian-Ukraine war - white peace for SOV
country_event = {
	id = ukraine.669
	title = ukraine.669.t
	desc = ukraine.669.d
	picture = GFX_report_event_ukrainian_defence
	
	trigger = {
		tag = SOV
		has_offensive_war_with = UKR
		surrender_progress > 0.1
		casualties_inflicted_by = {
			opponent = UKR
			thousands > 200
		}
		UKR = {
			OR = {
				is_faction_leader = yes
				is_in_faction = no
			}
			surrender_progress < 0.01
		}
		OR = {
			204 = { is_controlled_by = UKR }
			218 = { is_controlled_by = UKR }
			240 = { is_controlled_by = UKR }
		}
	}

	fire_only_once = yes
	
	mean_time_to_happen = {	days = 20	}

	option = {
		name = ukraine.669.a
		ai_chance = {
			factor = 80
		}
		set_country_flag = {
			flag = SOV_UKR_big_deal
			days = 1825
		}
		UKR = { country_event = { id = ukraine.670 days = 1 } }
	}
	option = {
		name = ukraine.669.b
		ai_chance = {
			factor = 20
			modifier = {
				factor = 0.5
				surrender_progress > 0.5
			}
			modifier = {
				factor = 0.5
				has_war_with = GER
			}
		}
		add_war_support = 0.05
	}
}
# Propose of white peace with SOV for Ukraine
country_event = {
	id = ukraine.670
	title = ukraine.670.t
	desc = ukraine.670.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes

	option = {
		name = ukraine.670.a
		ai_chance = {
			factor = 80
			modifier = {
				factor = 0.5
				has_completed_focus = UKR_leaderism
			}
		}
		FROM = { country_event = ukraine.671 }
		add_to_array = { white_peace_countries_array = FROM }
		UKR_white_peace_with_alliances = yes
		effect_tooltip = {
			transfer_state = 204
			transfer_state = 988
			transfer_state = 983 
			transfer_state = 234
			transfer_state = 240
			transfer_state = 137
			transfer_state = 986
		}
	}
	option = {
		name = ukraine.670.b
		ai_chance = {
			factor = 20
		}
		FROM = { country_event = ukraine.672 }
	}
}
# Ukraine agree white peace - surrend russian territories
country_event = {
	id = ukraine.671
	title = ukraine.671.t
	desc = ukraine.671.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.671.a
		if = {
			limit = { 204 = { is_owned_and_controlled_by = ROOT } }
			204 = {	transfer_state_to = FROM }
		}
		if = {
			limit = { 988 = { is_owned_and_controlled_by = ROOT } }
			988 = {	transfer_state_to = FROM }
		}
		if = {
			limit = { 983 = { is_owned_and_controlled_by = ROOT } }
			983 = {	transfer_state_to = FROM }
		}
		if = {
			limit = { 234 = { is_owned_and_controlled_by = ROOT } }
			234 = {	transfer_state_to = FROM }
		}
		if = {
			limit = { 240 = { is_owned_and_controlled_by = ROOT } }
			240 = { transfer_state_to = FROM }
		}
		if = {
			limit = { 137 = { is_owned_and_controlled_by = ROOT } }
			137 = { transfer_state_to = FROM }
		}
		if = {
			limit = { 986 = { is_owned_and_controlled_by = ROOT } }
			986 = { transfer_state_to = FROM }
		}
		if = {
			limit = { CRM = { is_subject_of = ROOT } }
			FROM = { puppet = CRM }
		}
	}
}
# Ukraine refuse white peace
country_event = {
	id = ukraine.672
	title = ukraine.672.t
	desc = ukraine.672.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.672.a
		add_war_support = 0.05
	}
}
# Melnyk propose look towards Germany for ally in war
country_event = {
	id = ukraine.673
	title = ukraine.673.t
	desc = ukraine.673.d

	trigger = {
		tag = UKR
		has_government = fascism
		has_country_flag = UKR_has_OUN_struggle
		NOT = {
			has_completed_focus = UKR_orientation_on_germany
		}
		has_war = yes
		surrender_progress > 0.2
		NOT = { has_war_with = GER }
		NOT = { is_in_faction_with = GER }
		GER = { 
			exists = yes
			has_government = fascism 
			is_faction_leader = yes
			has_capitulated = no
		}
		OR = {
			oun_low_power_of_bandera_trigger = yes
			oun_low_power_of_konovalets_trigger = yes
		}		
	}

	fire_only_once = yes

	mean_time_to_happen = { days = 7 }

	option = {
		name = ukraine.673.a
		ai_chance = {
			factor = 50
		}
		oun_increase_control_big = yes
		oun_lower_onslaught_big = yes
		oun_lower_authority_big = yes
		unlock_national_focus = UKR_orientation_on_germany
	}
	
	option = {
		name = ukraine.673.b
		ai_chance = {
			factor = 50
		}
		oun_increase_radicalisation = yes
	}
}
# Lisovskyi propose provide support for Finland in Winter war
country_event = {
	id = ukraine.674
	title = ukraine.674.t
	desc = ukraine.674.d
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	option = {
		name = ukraine.674.a
		custom_effect_tooltip = UKR_additional_decisions
		set_country_flag = UKR_get_help_for_finns
	}
}
# Volunteers for Finland - message for FIN
country_event = {
	id = ukraine.675
	title = ukraine.675.t
	desc = ukraine.675.d
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	option = {
		name = ukraine.675.a
		add_ideas = UKR_lisovskyi_team
		add_manpower = 3000
	}
}
# Lisovskyi return from Finland
unit_leader_event = {
	id = ukraine.676
	title = ukraine.676.t
	desc = ukraine.676.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.676.a
		set_country_flag = UKR_yurii_lisovskyi_recruit
		army_experience = 30
		custom_effect_tooltip = FIN_winter_warfare_battalion_tt
		hidden_effect = {
			set_technology = {
				winter_logistics_support_tech = 1
				popup = no
			}
		}
	}
}
# Capitulation of Ukraine - start fight in exile and load focus tree for this
country_event = {
	id = ukraine.677
	title = ukraine.677.t
	desc = ukraine.677.d
	picture = GFX_report_event_west_ukrainian_rebels

	is_triggered_only = yes
	
	option = {
		name = ukraine.677.a
		custom_effect_tooltip = UKR_capitulation_tree_is_available_tt
		set_country_flag = UKR_capitulation_tree_is_available
		mark_focus_tree_layout_dirty = yes
		if = {
			limit = { 
				OR = {
					has_government = democratic 
					has_government = fascism 
				}
			}
			set_cosmetic_tag = UKR_EXILE
		}
	}
}
# Invest in alternate democratic Ukraine for majors
country_event = { 
	id = ukraine.678
	title = ukraine.678.t
	desc = ukraine.678.d

	picture = report_event_generic_construction_site

	is_triggered_only = yes

	option = { # Sure why not
		name = ukraine.678.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_government = democratic
				FROM = { NOT = { has_completed_focus = UKR_appeal_to_nationalists } }
			}
			modifier = {
				factor = 2
				has_government = neutrality
				FROM = { has_completed_focus = UKR_appeal_to_conservatives }
			}
		}
		add_political_power = -50
		event_option_tooltip = ukraine.679.a
		FROM = { country_event = { id = ukraine.679 days = 1 } }
	}

	option = { # Not worth the effort
		name = ukraine.678.b
		ai_chance = {
			factor = 50
		}
		FROM = { country_event = { id = ukraine.680 days = 2 } }
	}
}
# They accepted
country_event = { 
	id = ukraine.679
	title = ukraine.679.t
	desc = ukraine.679.d

	picture = GFX_report_event_generic_sign_treaty2	

	is_triggered_only = yes

	option = {
		name = ukraine.679.a
		add_offsite_building = {
			type = industrial_complex
			level = 2
		}
		add_opinion_modifier = {
			target = FROM
			modifier = NOR_invested_in_our_country
		}
	}
}
# They rejected us
country_event = { 
	id = ukraine.680
	title = ukraine.680.t
	desc = ukraine.680.d

	picture = GFX_report_event_SWI_parliament_members

	is_triggered_only = yes

	option = { 
		name = ukraine.680.a
	}
}
# End of civil war - victory of Kyiv democratic government
country_event = { 
	id = ukraine.681
	title = ukraine.681.t
	desc = ukraine.681.d

	picture = GFX_report_event_generic_battle

	is_triggered_only = yes

	option = { 
		name = ukraine.681.a
		add_ideas = UKR_otamanshchina
		UKR_rada_big_opposition = yes
	}
}
# National self-defence in ukrainian civil war for Poltava
country_event = {
	id = ukraine.682
	title = ukraine.682.t
	desc = ukraine.682.d

	trigger = {
		tag = UKR
		has_country_flag = UKR_altdem_branch_is_available
		has_war_with = DKR
		259 = { is_owned_and_controlled_by = UKR }
	}

	fire_only_once = yes

	mean_time_to_happen = { days = 30 }

	option = {
		name = ukraine.682.a
		add_war_support = 0.01
		if = {
			limit = { NOT = { has_template = "Nacionalna samooborona" } }
			division_template = {
				name = "Nacionalna samooborona" 
				template_counter = 0
				is_locked = yes		
				regiments = {
					militia = { x = 0 y = 0 }
					militia = { x = 0 y = 1 }
					militia = { x = 1 y = 0 }
					militia = { x = 1 y = 1 }
				}
			}
		}
		259 = {
			create_unit = {
				division = "name = \"Poltavski dobrovoltsi\" division_template = \"Nacionalna samooborona\" start_experience_factor = 0.1 start_equipment_factor = 0.5"
				owner = ROOT
			}
		}
	}
}
# Kherson volunteers in ukrainian civil war against anarchists
country_event = { 
	id = ukraine.683
	title = ukraine.683.t
	desc = ukraine.683.d

	picture = GFX_report_event_makhnovist_infantry

	is_triggered_only = yes

	trigger = {
		has_war = yes
	}

	option = { 
		name = ukraine.683.a
		add_war_support = 0.01
	}
}
# Kharkiv volunteers in ukrainian civil war against anarchists
country_event = { 
	id = ukraine.684
	title = ukraine.684.t
	desc = ukraine.684.d

	picture = GFX_report_event_makhnovist_infantry

	is_triggered_only = yes

	trigger = {
		has_war = yes
	}

	option = { 
		name = ukraine.684.a
		add_war_support = 0.01
	}
}
# Support of Germany in civil war against anarchists
country_event = {
	id = ukraine.685
	title = ukraine.685.t
	desc = ukraine.685.d
	picture = GFX_report_event_german_volunteers

	is_triggered_only = yes

	option = {
		name = ukraine.685.a
		add_ai_strategy = {
			type = send_volunteers_desire
			id = FROM
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = FROM
			value = 200
		}
		if = {
			limit = {
				NOT = { has_government = fascism }
			}
			add_ideas = UKR_war_support_for_alt_ukraine
		}
	}
}
# Support of Poland in civil war against anarchists
country_event = {
	id = ukraine.686
	title = ukraine.686.t
	desc = ukraine.686.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes

	option = {
		name = ukraine.686.a
		add_ai_strategy = {
			type = send_volunteers_desire
			id = FROM
			value = 200
		}
		add_ai_strategy = {
			type = support
			id = FROM
			value = 200
		}
		add_ideas = UKR_war_support_for_alt_ukraine
	}
}
# Emergency situation - story of BoP
country_event = {
	id = ukraine.687
	title = ukraine.687.t
	desc = ukraine.687.d
	picture = GFX_report_event_ukrainian_state_rada

	is_triggered_only = yes

	option = {
		name = ukraine.687.a
		UKR_rada_big_opposition = yes
	}
}
# Invite in altdem alliance
country_event = {
	id = ukraine.688
	title = ukraine.688.t
	desc = ukraine.688.d
	picture = GFX_report_event_generic_read_write
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.688.a
		ai_chance = { 
			factor = 40
			modifier = {
				factor = 0.5
				tag = POL
				NOT = { GER = { has_government = fascism } }
			}
			modifier = {
				factor = 0
				tag = POL
				FROM = { has_completed_focus = UKR_peace_with_germany }
			}
			modifier = {
				factor = 0
				tag = ROM
				FROM = { has_completed_focus = UKR_propose_for_romania }
			}
			modifier = {
				factor = 2
				ic_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				FROM = { has_guaranteed = ROOT }
			}
			modifier = {
				factor = 2
				any_country = {
					OR = {
						tag = UKR
						is_in_faction_with = UKR 
					}
					is_neighbor_of = ROOT
				}
			}
		}
		FROM = {
			country_event = ukraine.689
			add_to_faction = ROOT
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		add_to_tech_sharing_group = UKR_ally_research
		if = {
			limit = {
				is_major = no
				NOT = { has_idea = UKR_pillars_of_europe }
				FROM = {
					has_idea = UKR_pillars_of_europe
				}
			}
			add_ideas = UKR_pillars_of_europe
		}
	}

	option = {
		name = ukraine.688.b
		ai_chance = { 
			factor = 60 
			modifier = {
				factor = 2
				has_opinion = { target = FROM value < 0 }
			}
			modifier = {
				factor = 0.5
				has_opinion = { target = FROM value > 49 }
			}
		}
		UKR = { country_event = ukraine.690 }
	}
}
# [Country] Accepts
country_event = {
	id = ukraine.689
	title = ukraine.689.t
	desc = ukraine.689.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.689.a
		effect_tooltip = {
			add_to_faction = FROM
		}
	}
}
# [Country] Refuses
country_event = {
	id = ukraine.690
	title = ukraine.690.t
	desc = ukraine.690.d
	picture = GFX_report_event_generic_conference
	
	is_triggered_only = yes
	
	option = {
		name = ukraine.690.a
	}
}
# Ultimatum of altdem Ukraine
country_event = {
	id = ukraine.691
	title = ukraine.691.t
	desc = ukraine.691.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.691.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				ic_ratio = {
					tag = FROM
					ratio < 1
				}
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1.5
				}
			}
		}
		set_politics = { ruling_party = democratic elections_allowed = yes }
		add_popularity = {
			ideology = democratic
			popularity = 0.10
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		FROM = {
			country_event = { id = ukraine.692 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				add_to_faction = ROOT
			}
		}
	}
	option = {
		name = ukraine.691.b
		ai_chance = {
			factor = 50
		}
		add_popularity = {
			ideology = democratic
			popularity = -0.20
		}
		FROM = {
			country_event = { id = ukraine.693 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = topple_government
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Ultimatum of altdem Ukraine - FROM accept ultimatum
country_event = {
	id = ukraine.692
	title = ukraine.692.t
	desc = ukraine.692.d
	picture = GFX_report_event_peasant_revolt
	
	is_triggered_only = yes

	option = {
		name = ukraine.692.a
		add_to_faction = FROM
	}
}
# Ultimatum of altdem Ukraine - FROM decline ultimatum
country_event = {
	id = ukraine.693
	title = ukraine.693.t
	desc = ukraine.693.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.693.a
		create_wargoal = {
			type = topple_government
			target = FROM
			expire = 0
		}
	}
}
# Tyutyunnyk as army chief?
country_event = {
	id = ukraine.694
	title = ukraine.694.t
	desc = ukraine.694.d
	picture = GFX_report_event_ukrainian_state_rada
	
	is_triggered_only = yes

	option = {
		name = ukraine.694.a
		ai_chance = {
			factor = 10
		}
		set_country_flag = UKR_tyutyunnyk_is_army_chief
		activate_advisor = UKR_yuriy_tyutyunnyk
	}
	option = {
		name = ukraine.694.b
		ai_chance = {
			factor = 90
		}
		add_command_power = 15
	}
}
# Ultimatum to Romania for altdem
country_event = {
	id = ukraine.695
	title = ukraine.695.t
	desc = ukraine.695.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.695.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0
			}
			modifier = {
				factor = 0.5
				76 = { NOT = { is_owned_and_controlled_by = ROOT } }
			}
		}
		FROM = { country_event = { id = ukraine.696 hours = 6 } }
		effect_tooltip = {
			FROM = {
				transfer_state = 80
				transfer_state = 766
				give_guarantee = ROM
			}
			add_timed_idea = {
				idea = DKR_profit_for_cedes_lands
				days = 365
			}
		}
	}
	
	option = {
		name = ukraine.695.b
		ai_chance = {
			factor = 60
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 0.75
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROM
				}
			}
		}
		FROM = { country_event = { id = ukraine.697 hours = 6 } }
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					target = ROM
					type = take_state_focus
					generator = { 80 766 }
				}
			}
		}
	}
}
# Romania Cedes Bucovina and Bujak
country_event = {
	id = ukraine.696
	title = ukraine.696.t
	desc = ukraine.696.d
	picture = GFX_report_event_annexation_of_bukovina_and_bessarabia1

	is_triggered_only = yes
	
	option = {
		name = ukraine.696.a
		if = {
			limit = { 80 = { is_owned_and_controlled_by = ROM } }
			transfer_state = 80
			80 = { add_compliance = 30 }
		}
		if = {
			limit = { 766 = { is_owned_and_controlled_by = ROM } }
			transfer_state = 766
			766 = { add_compliance = 30 }
		}
		add_timed_idea = {
			idea = DKR_pay_for_cedes_lands
			days = 365
		}
		give_guarantee = FROM
		FROM = {
			add_timed_idea = {
				idea = DKR_profit_for_cedes_lands
				days = 365
			}
		}
	}
}
# Romania Refuses to Cede Bukovina and Bujak
country_event = {
	id = ukraine.697
	title = ukraine.697.t
	desc = ukraine.697.d
	picture = GFX_report_event_romanian_soldiers

	is_triggered_only = yes
	
	option = {
		name = ukraine.697.a
		create_wargoal = {
			target = ROM
			type = take_state_focus
			generator = { 78 80 766 }
		}
	}
}
# Treaty with Germany for altdem
country_event = {
	id = ukraine.698
	title = ukraine.698.t
	desc = ukraine.698.d

	is_triggered_only = yes
	
	option = {
		trigger = {
			is_faction_leader = yes
			FROM = { is_in_faction = no }
		}
		name = ukraine.698.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 0.5
				has_government = fascism
			}
			modifier = {
				factor = 2
				FROM = { has_army_manpower = { size > 349999 } }
			}
		}
		FROM = { country_event = { id = ukraine.699 hours = 6 } }
		add_to_faction = FROM
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		if = {
			limit = {
				OR = {
					controls_state = 89
					any_other_country = {
						is_in_faction_with = GER
						controls_state = 89
					}
				}
			}
			FROM = { transfer_state = 89 }
		}
		if = {
			limit = {
				OR = {
					controls_state = 91
					any_other_country = {
						is_in_faction_with = GER
						controls_state = 91
					}
				}
			}
			FROM = { transfer_state = 91 }
		}
		if = {
			limit = {
				OR = {
					controls_state = 93
					any_other_country = {
						is_in_faction_with = GER
						controls_state = 93
					}
				}
			}
			FROM = { transfer_state = 93 }
		}
		if = {
			limit = {
				OR = {
					controls_state = 987
					any_other_country = {
						is_in_faction_with = GER
						controls_state = 987
					}
				}
			}
			FROM = { transfer_state = 987 }
		}
	}
	
	option = {
		name = ukraine.698.b
		ai_chance = {
			factor = 40
		}
		FROM = { country_event = { id = ukraine.700 hours = 6 } }
		diplomatic_relation = { country = FROM relation = non_aggression_pact }
		if = {
			limit = {
				OR = {
					controls_state = 89
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						controls_state = 89
					}
				}
			}
			FROM = { transfer_state = 89 }
		}
		if = {
			limit = {
				OR = {
					controls_state = 91
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						controls_state = 91
					}
				}
			}
			FROM = { transfer_state = 91 }
		}
		if = {
			limit = {
				OR = {
					controls_state = 93
					any_other_country = {
						is_in_faction_with = GER
						GER = {
							is_faction_leader = yes
						}
						controls_state = 93
					}
				}
			}
			FROM = { transfer_state = 93 }
		}
	}

	option = {
		name = ukraine.698.c
		ai_chance = {
			factor = 20
			modifier = {
				factor = 2
				FROM = { is_in_faction_with = POL }
			}
		}
		FROM = { country_event = { id = ukraine.701 hours = 6 } }
	}
}
# Treaty with Germany - invite in faction
country_event = {
	id = ukraine.699
	title = ukraine.699.t
	desc = ukraine.699.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	option = {
		name = ukraine.699.a
		trigger = {
			91 = { is_owned_and_controlled_by = POL }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		add_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		add_tech_bonus = {
			name = UKR_peace_with_germany
			bonus = 1.0
			uses = 1
			category = armor
		}
		if = {
			limit = { GER = { NOT = { has_war_with = POL } } }
			POL = { country_event = { id = ukraine.702 days = 1 } }
		}
	}

	option = {
		name = ukraine.699.b
		trigger = {
			NOT = { 91 = { is_owned_and_controlled_by = POL } }
		}
		add_ai_strategy = {
			type = alliance
			id = FROM
			value = 200
		}
		add_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		add_tech_bonus = {
			name = UKR_peace_with_germany
			bonus = 1.0
			uses = 1
			category = armor
		}
	}
}
# Treaty with Germany - non-agressive pact
country_event = {
	id = ukraine.700
	title = ukraine.700.t
	desc = ukraine.700.d
	picture = GFX_report_event_german_troops

	is_triggered_only = yes
	
	option = {
		name = ukraine.700.a
		trigger = {
			91 = { is_owned_and_controlled_by = POL }
		}
		add_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		add_tech_bonus = {
			name = UKR_peace_with_germany
			bonus = 1.0
			uses = 1
			category = armor
		}
		POL = { country_event = { id = ukraine.702 days = 1 } }
	}

	option = {
		name = ukraine.700.b
		trigger = {
			NOT = { 91 = { is_owned_and_controlled_by = POL } }
		}
		add_relation_modifier = {
			target = GER
			modifier = UKR_license_foreign_equipment
		}
		add_tech_bonus = {
			name = UKR_peace_with_germany
			bonus = 1.0
			uses = 1
			category = armor
		}
	}
}
# Treaty with Germany - refuse
country_event = {
	id = ukraine.701
	title = ukraine.701.t
	desc = ukraine.701.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.701.a
		trigger = {
			91 = { is_owned_and_controlled_by = POL }
		}
		ai_chance = {
			factor = 60
			modifier = {
				factor = 0.5
				FROM = { has_army_manpower = { size < 350000 } }
			}
		}
		POL = { country_event = { id = ukraine.702 days = 1 } }
	}

	option = {
		name = ukraine.701.b
		ai_chance = {
			factor = 40
		}
		if = {
			limit = {
				country_exists = POL
				NOT = { has_completed_focus = UKR_volunteers_from_germany }
				NOT = { has_war_with = POL }
				NOT = { is_in_faction_with = POL }
			}
			complete_national_focus = UKR_stop_germany_monster
		}
	}
}
# Ultimatum to Poland for altdem
country_event = {
	id = ukraine.702
	title = ukraine.702.t
	desc = ukraine.702.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.702.a
		ai_chance = {
			factor = 40
			modifier = {
				factor = 2
				has_war = yes
				surrender_progress > 0
			}
		}
		FROM = { country_event = { id = ukraine.703 hours = 6 } }
		effect_tooltip = {
			FROM = {
				transfer_state = 89
				transfer_state = 91
				transfer_state = 93
				transfer_state = 987
			}
		}
	}
	
	option = {
		name = ukraine.702.b
		ai_chance = {
			factor = 60
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio > 0.75
				}
			}
			modifier = {
				factor = 2
				any_other_country = {
					is_major = yes
					is_in_faction_with = ROM
				}
			}
		}
		FROM = { country_event = { id = ukraine.704 hours = 6 } }
		effect_tooltip = {
			FROM = {
				UKR_create_wargoal_against_poland = yes
			}
		}
	}
}
# Poland cede West Ukraine for altdem
country_event = {
	id = ukraine.703
	title = ukraine.703.t
	desc = ukraine.703.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes
	
	option = {
		name = ukraine.703.a
		transfer_state = 89
		transfer_state = 91
		transfer_state = 93
		transfer_state = 987
	}
}
# Poland refuse altdem's ultimatum
country_event = {
	id = ukraine.704
	title = ukraine.704.t
	desc = ukraine.704.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes
	
	option = {
		name = ukraine.704.a
		UKR_create_wargoal_against_poland = yes
	}
}
# Propose to Poland for join to war against GER
country_event = {
	id = ukraine.705
	title = ukraine.705.t
	desc = ukraine.705.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.705.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				85 = { is_controlled_by = GER } # Danzig
			}
		}
		add_state_claim = 5
		add_state_claim = 763
		add_state_claim = 63
		add_state_claim = 68
		add_state_claim = 66
		add_state_claim = 67
		add_to_war = { targeted_alliance = FROM enemy = GER }
		FROM = { country_event = ukraine.706 }
	}
	
	option = {
		name = ukraine.705.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
		}
		FROM = { country_event = ukraine.707 }
		effect_tooltip = {
			FROM = {
				UKR_create_wargoal_against_poland = yes
			}
		}
	}
}
# Poland agree join to war
country_event = {
	id = ukraine.706
	title = ukraine.706.t
	desc = ukraine.706.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.706.a
	}
}
# Poland reject join to war
country_event = {
	id = ukraine.707
	title = ukraine.707.t
	desc = ukraine.707.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes
	
	option = {
		name = ukraine.707.a
		UKR_create_wargoal_against_poland = yes
	}
}
# Propose to Poland for prevent war against GER
country_event = {
	id = ukraine.708
	title = ukraine.708.t
	desc = ukraine.708.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.708.a
		ai_chance = {
			factor = 70
			modifier = {
				factor = 2
				85 = { is_controlled_by = GER } # Danzig
			}
			modifier = {
				factor = 2
				GER = { has_government = fascism }
			}
		}
		set_country_flag = POL_altdem_prevent_war_with_ger
		add_state_claim = 5
		add_state_claim = 763
		add_state_claim = 63
		add_state_claim = 68
		add_state_claim = 66
		add_state_claim = 67
		FROM = { country_event = ukraine.709 }
		effect_tooltip = {
			FROM = { 
				create_wargoal = {
					type = topple_government
					target = GER
					expire = 0
				}
			}
		}
	}
	
	option = {
		name = ukraine.705.b
		ai_chance = {
			factor = 30
			modifier = {
				factor = 3
				has_war = yes
			}
		}
		FROM = { country_event = ukraine.710 }
		effect_tooltip = {
			FROM = {
				UKR_create_wargoal_against_poland = yes
			}
		}
	}
}
# Poland agree for prevent war
country_event = {
	id = ukraine.709
	title = ukraine.709.t
	desc = ukraine.709.d
	picture = GFX_report_event_polish_tanks_02

	is_triggered_only = yes
	
	option = {
		name = ukraine.709.a
		create_wargoal = {
			type = topple_government
			target = GER
			expire = 0
		}
	}
}
# Poland reject prevent war
country_event = {
	id = ukraine.710
	title = ukraine.710.t
	desc = ukraine.710.d
	picture = GFX_report_event_poland_rejects

	is_triggered_only = yes
	
	option = {
		name = ukraine.710.a
		UKR_create_wargoal_against_poland = yes
	}
}
# Poland start war with GER together with UKR
country_event = {
	id = ukraine.711
	title = ukraine.711.t
	desc = ukraine.711.d

	trigger = {
		original_tag = POL
		has_country_flag = POL_altdem_prevent_war_with_ger
		has_capitulated = no
		UKR = { has_war_with = GER }
		NOT = { has_war_with = GER }
	}

	fire_only_once = yes

	mean_time_to_happen = { days = 7 }

	option = {
		name = ukraine.711.a
		declare_war_on = {
			target = GER
			type = annex_everything
		}
		UKR = {
			if = {
				limit = {
					89 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 89
				89 = { remove_core_of = POL }
			}
			if = {
				limit = {
					91 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 91
				91 = { remove_core_of = POL }
			}
			if = {
				limit = {
					93 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 93
				93 = { remove_core_of = POL }
			}
			if = {
				limit = {
					987 = { is_owned_and_controlled_by = ROOT }
				}
				transfer_state = 987
				987 = { remove_core_of = POL }
			}
		}
	}
}
# Cancel state of emergency
country_event = {
	id = ukraine.712
	title = ukraine.712.t
	desc = ukraine.712.d
	picture = GFX_report_event_usa_election_generic

	is_triggered_only = yes
	
	option = {
		name = ukraine.712.a
	}
}
# Junta full control event
country_event = {
	id = ukraine.713
	title = ukraine.713.t
	desc = ukraine.713.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes
	
	option = {
		name = ukraine.713.a
		promote_character = UKR_military_junta
		clr_country_flag = UKR_altdem_bop_is_available
		set_country_flag = UKR_altdem_army_victory
		remove_dynamic_modifier = { modifier = UKR_support_in_rada_mod }
		remove_power_balance = { id = UKR_power_balance }
		retire_character = UKR_kost_levytsky
		retire_character = UKR_andriy_livytskyi
		retire_character = UKR_stepan_vytvytskyi
		retire_character = UKR_olga_petliura
		set_variable = { ukrainian_parliament_support = 0 }
		set_party_name = { ideology = democratic name = UKR_junta_dem_party_short long_name = UKR_junta_dem_party_long }
		if = {
			limit = { has_idea = UKR_language_question }
			remove_ideas = UKR_language_question
		}
	}
}
# Rada full control event
country_event = {
	id = ukraine.714
	title = ukraine.714.t
	desc = ukraine.714.d
	picture = GFX_report_event_ukrainian_state_rada

	is_triggered_only = yes
	
	option = {
		name = ukraine.714.a
		set_politics = { ruling_party = democratic elections_allowed = yes }
		promote_character = UKR_yuriy_tyutyunnyk
		add_ideas = UKR_strong_parliamentarianism
		set_country_flag = UKR_altdem_rada_victory
		clr_country_flag = UKR_altdem_bop_is_available
		remove_power_balance = { id = UKR_power_balance }
		retire_character = UKR_olga_petliura
		UKR_parliament_support_add10 = yes
		set_party_name = { ideology = democratic name = UKR_rada_dem_party_short long_name = UKR_rada_dem_party_long }
	}
}
# Demand Carphatian Ukraine (puppet) for altdem
country_event = {
	id = ukraine.715
	title = ukraine.715.t
	desc = ukraine.715.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes

	option = {
		name = ukraine.715.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 2
				CUA = { has_completed_focus = CUA_proukrainian_government }
			}
			modifier = {
				factor = 3
				tag = GER
				FROM = { has_completed_focus = UKR_peace_with_germany }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
		}
		UKR = { country_event = ukraine.716 }
		effect_tooltip = {
			CUA = { transfer_state = 73 }
			if = {
				limit = {
					834 = { is_owned_and_controlled_by = FROM }
					984 = { is_owned_and_controlled_by = ROOT }
				}
				CUA = { transfer_state = 984 }
			}
			FROM = {
				puppet = CUA
			}
		}
	}
	
	option = {
		name = ukraine.715.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.1
				is_in_faction_with = FROM
				FROM = { is_faction_leader = yes }
			}
		}
		UKR = { country_event = ukraine.717 } 
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					target = CUA
					type = annex_everything
				}
			}
		}
	}
}
# Carpathian Ukraine goes to Ukraine
country_event = {
	id = ukraine.716
	title = ukraine.716.t
	desc = ukraine.716.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes
	
	option = {
		name = ukraine.716.a
		if = {
			limit = { NOT = { country_exists = CUA } }
			CUA = { 
				transfer_state = 73
			}
		}
		CUA = { 
			unlock_national_focus = CUA_new_leader
			unlock_national_focus = CUA_proukrainian_government
		}
		if = {
			limit = {
				834 = { is_owned_and_controlled_by = ROOT }
				984 = { is_owned_and_controlled_by = FROM }
			}
			CUA = { transfer_state = 984 }
		}
		puppet = CUA
	}
}
# FROM don`t cede Carpathian Ukraine for altdem
country_event = {
	id = ukraine.717
	title = ukraine.717.t
	desc = ukraine.717.d
	picture = GFX_report_event_carpathian_soldiers

	is_triggered_only = yes
	
	option = {
		name = ukraine.717.a
		add_state_claim = 73
		if = {
			limit = { country_exists = CUA }
			create_wargoal = {
				target = CUA
				type = annex_everything
			}
		}
		else = {
			create_wargoal = {
				target = FROM
				type = take_state_focus
				generator = { 73 }
			}
		}
		
	}
}
# Demand Carpathian Ukraine (territory) for altdem
country_event = {
	id = ukraine.718
	title = ukraine.718.t
	desc = ukraine.718.d
	picture = GFX_report_event_carphatian_ukraine

	is_triggered_only = yes

	option = {
		name = ukraine.718.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				has_war = yes
			}
			modifier = {
				factor = 2
				73 = { NOT = { is_owned_by = ROOT } }
			}
			modifier = {
				factor = 3
				tag = GER
				FROM = { has_completed_focus = UKR_peace_with_germany }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1.5
				}
			}
		}
		UKR = { country_event = ukraine.716 }
		effect_tooltip = {
			CUA = { transfer_state = 73 }
			if = {
				limit = {
					834 = { is_owned_and_controlled_by = FROM }
					984 = { is_owned_and_controlled_by = ROOT }
				}
				CUA = { transfer_state = 984 }
			}
			FROM = {
				puppet = CUA
			}
		}
	}
	
	option = {
		name = ukraine.718.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				73 = { is_core_of = ROOT }
			}
			modifier = {
				factor = 0.1
				is_in_faction_with = FROM
				FROM = { is_faction_leader = yes }
			}
		}
		UKR = { country_event = ukraine.717 } 
		effect_tooltip = {
			UKR = {
				create_wargoal = {
					target = ROOT
					type = take_state_focus
					generator = { 73 }
				}
			}
		}
	}
}
# Peace with USSR for altdem`s
country_event = {
	id = ukraine.719
	title = ukraine.719.t
	desc = ukraine.719.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes
	
	option = { #sure
		name = ukraine.719.a
		ai_chance = {
			factor = 60
			modifier = {
				has_opinion = { target = UKR value > 20 }
				factor = 1.5
			}
			modifier = {
				has_war = yes
				factor = 2
			}
		}
		diplomatic_relation = { country = UKR relation = non_aggression_pact }
		set_country_flag = {
			flag = SOV_UKR_big_deal
			days = 1825
		}
		UKR = { country_event = ukraine.720 }
	}

	option = { #no
		name = ukraine.719.b
		ai_chance = {
			factor = 40
		}
		UKR = { country_event = ukraine.721 }	
	}
}
# USSR agree
country_event = {
	id = ukraine.720
	title = ukraine.720.t
	desc = ukraine.720.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = { 
		name = ukraine.720.a
		if = {
			limit = { has_idea = UKR_prepare_east_front1 }
			remove_ideas = UKR_prepare_east_front1
		}
		add_tech_bonus = {
			name = UKR_stop_east_expansion
			bonus = 1.0
			uses = 1
			category = air_equipment
		}
		add_tech_bonus = {
			name = UKR_stop_east_expansion
			bonus = 1.0
			uses = 1
			category = industry
		}
	}
}
# USSR refuse
country_event = {
	id = ukraine.721
	title = ukraine.721.t
	desc = ukraine.721.d
	picture = GFX_report_event_soviet_tanks
	
	is_triggered_only = yes

	option = {
		name = ukraine.721.a
		complete_national_focus = UKR_expansion_on_east
	}
}
# Choice king from two new candidates
country_event = {
	id = ukraine.722
	title = ukraine.722.t
	desc = ukraine.722.d
	picture = GFX_report_event_choice_new_tzar

	is_triggered_only = yes
	
	option = {
		name = ukraine.722.a
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_altmonarchy_branch_is_available
		set_country_flag = UKR_restore_of_rurikids
		mark_focus_tree_layout_dirty = yes
	}
	option = {
		name = ukraine.722.b
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_altmonarchy_branch_is_available
		set_country_flag = UKR_restore_of_romanovs
		mark_focus_tree_layout_dirty = yes
	}
}
# Unrests on coronation
country_event = {
	id = ukraine.723
	title = ukraine.723.t
	desc = {
		text = ukraine.723.desc_RUR
		trigger = {
			has_country_flag = UKR_restore_of_rurikids
		}
	}
	desc = {
		text = ukraine.723.desc_ROM
		trigger = {
			has_country_flag = UKR_restore_of_romanovs
		}  
	}
	picture = GFX_report_event_worker_protests

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			set_variable = { var_ukr_integration_eastslavic_cost = 75 }
			set_variable = { var_ukr_integration_eastslavic_days = 120 }
		}
	}
	
	option = {
		name = ukraine.723.a
		trigger = {
			has_country_flag = UKR_restore_of_rurikids
		}
		set_cosmetic_tag = UKR_RURIKIDS
		promote_character = UKR_king_anatolii
		retire_character = UKR_yevhen_konovalets
		retire_character = UKR_ivan_poltavets_ostryanitsya
		add_stability = -0.10
		set_power_balance = {
			id = UKR_power_balance
			left_side = UKR_ukrainophilia_side	
			right_side = UKR_moscophilia_side	
			set_default = yes
		}
	}
	option = {
		name = ukraine.723.b
		trigger = {
			NOT = { has_country_flag = UKR_restore_of_rurikids }
		}
		set_cosmetic_tag = UKR_ROMANOVS
		promote_character = UKR_king_vsevolod
		retire_character = UKR_yevhen_konovalets
		retire_character = UKR_ivan_poltavets_ostryanitsya
		add_stability = -0.10
		set_power_balance = {
			id = UKR_power_balance
			left_side = UKR_ukrainophilia_side	
			right_side = UKR_moscophilia_side	
			set_default = yes
		}
	}
}
# Ukrainian king demand obedience from monarchist Poland
country_event = {
	id = ukraine.724
	title = ukraine.724.t
	desc = ukraine.724.d

	is_triggered_only = yes

	option = {
		name = ukraine.724.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				surrender_progress > 0.1
			}
			modifier = {
				factor = 2
				GER = { has_government = fascism }
			}
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
			}
		}
		FROM = { country_event = ukraine.725 }
		effect_tooltip = {
			FROM = {
				puppet = ROOT
			}
		}
	}
	
	option = {
		name = ukraine.724.b
		ai_chance = {
			factor = 50
		}
		FROM = { country_event = ukraine.726 } 
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					target = ROOT
					type = puppet_wargoal_focus
				}
			}
		}
	}
}
# Polish kingdom accept ultimatum
country_event = {
	id = ukraine.725
	title = ukraine.725.t
	desc = ukraine.725.d

	is_triggered_only = yes
	
	option = {
		name = ukraine.725.a
		puppet = FROM
		UKR_adam_montrezor = {
			set_nationality = FROM
		}
	}
}
# Polish kingdom reject ultimatum
country_event = {
	id = ukraine.726
	title = ukraine.726.t
	desc = ukraine.726.d
	picture = GFX_report_event_polish_army

	is_triggered_only = yes
	
	option = {
		name = ukraine.726.a
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}
}
# Religious choice for new monarchy
country_event = {
	id = ukraine.727
	title = ukraine.727.t
	desc = ukraine.727.d

	is_triggered_only = yes

	option = {
		name = ukraine.727.a
		ai_chance = {
			factor = 50
		}
		complete_national_focus = UKR_native_faith
	}
	
	option = {
		name = ukraine.727.b
		ai_chance = {
			factor = 50
		}
		complete_national_focus = UKR_unification_of_churches
	}
}
# Loyalty request for Crimea or non-communism Russia
country_event = {
	id = ukraine.728
	title = ukraine.728.t
	desc = ukraine.728.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.728.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				strength_ratio = {
					tag = FROM
					ratio < 0.75
				}
			}
			modifier = {
				factor = 2
				has_government = neutrality
			}
		}
		FROM = {
			country_event = { id = ukraine.729 days = 1 }
		}
		effect_tooltip = {
			if = {
				limit = {
					tag = CRM
				}
				FROM = {
					annex_country = { target = ROOT transfer_troops = yes  }
				} 
			}
			else = {
				FROM = {
					puppet = ROOT
				}
			}
		}
	}
	option = {
		name = ukraine.728.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0
				has_government = neutrality
				FROM = {
					has_country_flag = UKR_restore_of_romanovs
				}
			}
		}
		FROM = {
			country_event = { id = ukraine.730 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Accept ultimatum of new tzar
country_event = {
	id = ukraine.729
	title = ukraine.729.t
	desc = ukraine.729.d
	picture = GFX_report_event_royal_parade
	
	is_triggered_only = yes

	option = {
		name = ukraine.729.a
		if = {
			limit = {
				FROM = { tag = CRM }
			}
			FROM = {
				every_unit_leader = {
					set_nationality = ROOT
				}
				every_navy_leader = {
					set_nationality = ROOT
				}
				if = {
					limit = { has_character = CRM_nikanor_savich }
					CRM_nikanor_savich = { 
						set_nationality = ROOT
					}
				}
				if = {
					limit = { has_character = CRM_nikolai_talberg }
					CRM_nikolai_talberg = { 
						set_nationality = ROOT
					}
				}
			}
			annex_country = { target = FROM transfer_troops = yes }
			every_owned_state = {
				limit = {
					is_core_of = CRM
				}
				add_compliance = 30
			}
		}
		else = {
			puppet = FROM
			if = {
				limit = { has_dlc = "No Step Back" }
				set_autonomy = {
					target = FROM
					autonomy_state = autonomy_personal_union
				}
			}
		} 
	}
}
# Decline ultimatum of new tzar
country_event = {
	id = ukraine.730
	title = ukraine.730.t
	desc = ukraine.730.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.730.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
# Loyalty request for rebels in SCW
country_event = {
	id = ukraine.731
	title = ukraine.731.t
	desc = ukraine.731.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.728.a
		ai_chance = {
			factor = 50
			modifier = {
				factor = 2
				any_other_country = {
					original_tag = SOV
					has_government = communism
					has_civil_war = yes
					surrender_progress < 0.1
				}
			}
			modifier = {
				factor = 2
				has_government = neutrality
			}
		}
		FROM = {
			country_event = { id = ukraine.732 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				puppet = ROOT
			}
		}
	}
	option = {
		name = ukraine.728.b
		ai_chance = {
			factor = 50
			modifier = {
				factor = 0.5
				has_game_rule = {
					rule = SOV_ai_behavior
					option = EXILES_TSARIST
				}
			}
			modifier = {
				factor = 0
				surrender_progress > 0.2
			}
		}
		FROM = {
			country_event = { id = ukraine.730 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Rebels agree for submission for war against soviets
country_event = {
	id = ukraine.732
	title = ukraine.732.t
	desc = ukraine.732.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.732.a
		puppet = FROM
		SOU = {
			declare_war_on = {
				target = FROM
				type = annex_everything
			}
			declare_war_on = {
				target = ROOT
				type = puppet_wargoal_focus
			}
		}
	}
}
# Intervention in SCW after completing focus UKR_loyalty_requirement
country_event = {
	id = ukraine.733
	title = ukraine.733.t
	desc = ukraine.733.d
	picture = GFX_report_event_usa_election_generic

	fire_only_once = yes

	trigger = {
		tag = UKR
		has_country_flag = UKR_no_rebellion_in_siberia
		has_government = neutrality
		is_subject = no
		NOT = { has_war_with = SOV }
		SOV = {
			exists = yes
			NOT = { has_government = communism }
			is_subject = no 
		}
	}
	
	mean_time_to_happen = {	days = 7 }

	option = {
		name = ukraine.733.a
		if = {
			limit = { # without soviet CW
				SOV = {
					has_civil_war = no
				}
			}
			SOV = { country_event = { id = ukraine.728 days = 1 } }
		}
		else_if = { # in time of soviet CW
			limit = {
				SOV = {
					has_civil_war = yes
				}
			}
			SOV = { country_event = { id = ukraine.731 days = 1 } }
		}
	}
}
# Coup of Montrezor - in CW
country_event = {
	id = ukraine.734
	title = ukraine.734.t
	desc = ukraine.734.d
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes

	option = {
		name = ukraine.734.a
		if = {
			limit = { has_war_with = WUA }
			FROM = {
				puppet = WUA
			}
		}
		FROM = {
			country_event = ukraine.736
			puppet = ROOT
		}
		promote_character = UKR_adam_montrezor
		add_country_leader_trait = puppet_regent
		set_cosmetic_tag = POL_KINGDOM
		hidden_effect = {
			POL_set_attempted_royal_takeover_flag = yes
			set_country_flag = POL_banned_monarchy_flag
			random_other_country = {
				limit = {
					original_tag = POL
					NOT = { has_war_with = POL }
				}
				declare_war_on = {
					target = POL
					type = annex_everything
				}
			}
		}
	}
}
# Coup of Montrezor - in peace - submiss or CW
country_event = {
	id = ukraine.735
	title = ukraine.735.t
	desc = ukraine.735.d
	picture = GFX_report_event_generic_riot

	is_triggered_only = yes

	option = {
		name = ukraine.735.a
		ai_chance = {
			base = 30
			modifier = {
				add = -25
				FROM = { has_army_size = { size < 40 } }
			}
			modifier = {
				add = 100
				FROM = { has_army_size = { size > 39 } }
			}
			modifier = {
				add = 20
				is_in_faction_with = FROM
			}
			modifier = {
				factor = 0.1
				is_in_faction = yes
			}
			modifier = {
				factor = 0.5
				check_variable = { monarchist_support > 50 }
			}
		}
		FROM = {
			country_event = ukraine.737
			puppet = ROOT
		}
		promote_character = UKR_adam_montrezor
		add_country_leader_trait = puppet_regent
		set_cosmetic_tag = POL_KINGDOM
		hidden_effect = {
			POL_set_attempted_royal_takeover_flag = yes
			set_country_flag = POL_banned_monarchy_flag
		}
	}

	option = {
		name = ukraine.735.b
		ai_chance = {
			base = 10
			modifier = {
				FROM = { has_army_size = { size > 39 } }
				factor = 0.5
			}
			modifier = {
				add = 20
				FROM = { has_army_size = { size < 30 } }
			}
			modifier = {
				factor = 2
				is_in_faction = yes
				NOT = { is_in_faction_with = FROM }
			}
			modifier = {
				any_other_country = {
					has_guaranteed = PREV
				}
				factor = 5 
			}
			modifier = {
				factor = 10
				check_variable = { monarchist_support < 40 }
			}
		}
		hidden_effect = {
			set_country_flag = POL_banned_monarchy_flag
			POL_set_attempted_royal_takeover_flag = yes
		}
		FROM = {
			set_country_flag = attempted_royal_takeover_in_POL
			puppet = ROOT
			country_event = ukraine.736
		}
		set_variable = {
			var = civil_war_size_var
			value = monarchist_support
		}
		start_civil_war = {
			ideology = neutrality
			size = civil_war_size_var
			keep_political_leader = yes
			keep_unit_leaders_trigger = {
				NOT = { has_unit_leader_flag = POL_monarchy_sympathies_flag }
			}
		}
		random_other_country = {
			limit = {
				has_civil_war = yes
				original_tag = POL
			}
			ROOT = {
				UKR_adam_montrezor = {
					set_nationality = PREV.PREV
				}
			}
			promote_character = UKR_adam_montrezor
			add_country_leader_trait = puppet_regent
			set_cosmetic_tag = POL_KINGDOM
			set_country_flag = UKR_poland_personal_union_flag
		}
	}
}
# Coup of Montrezor - success, but POL have civil war
country_event = {
	id = ukraine.736
	title = ukraine.736.t
	desc = ukraine.736.d
	picture = GFX_report_event_generic_battle

	is_triggered_only = yes

	option = {
		name = ukraine.736.a
	}
}
# Coup of Montrezor - success, peaceful puppeting
country_event = {
	id = ukraine.737
	title = ukraine.737.t
	desc = ukraine.737.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	option = {
		name = ukraine.737.a
	}
}
# Polish puppet return West Ukraine
country_event = {
	id = ukraine.738
	title = ukraine.738.t
	desc = ukraine.738.d
	picture = GFX_report_event_generic_peaceful_annexation

	is_triggered_only = yes

	option = {
		name = ukraine.738.a
		FROM = {
			transfer_state = 89
			transfer_state = 91
			transfer_state = 93
			transfer_state = 987
		}
		if = {
			limit = {
				FROM = {
					has_completed_focus = UKR_three_nations
				}
			}
			if = {
				limit = {
					94 = { is_owned_and_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 94
				}
			}
			if = {
				limit = {
					95 = { is_owned_and_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 95
				}
			}
			if = {
				limit = {
					96 = { is_owned_and_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 96
				}
			}
			if = {
				limit = {
					97 = { is_owned_and_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 97
				}
			}
			if = {
				limit = {
					784 = { is_owned_and_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 784
				}
			}
		}
	}
}
# Coronation of Romanov in Moscow
country_event = {
	id = ukraine.739
	title = ukraine.739.t
	desc = ukraine.739.d
	picture = GFX_report_event_royal_parade
	is_triggered_only = yes

	option = {
		name = ukraine.739.a
	}
}
# Return Romanov's capital to Petrograd
country_event = {
	id = ukraine.740
	title = ukraine.740.t
	desc = ukraine.740.d
	picture = GFX_report_event_usa_election_generic

	fire_only_once = yes

	trigger = {
		tag = UKR
		has_government = neutrality
		has_completed_focus = UKR_capital_of_monarch
		has_country_flag = UKR_restore_of_romanovs
		195 = {
			is_owned_and_controlled_by = UKR
			is_core_of = UKR
		}
	}
	
	mean_time_to_happen = {	days = 30 }

	option = {
		name = ukraine.740.a
		ai_chance = {
			base = 50
		}
		set_capital = { state = 195 }
		if = {
			limit = {
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.10
			}
		}
	}
	option = {
		name = ukraine.740.b
		ai_chance = {
			base = 50
		}
		if = {
			limit = {
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = -0.10
			}
		}
	}
}
# Ultimatum to Baltic countries and Finland from monarchists
country_event = {
	id = ukraine.741
	title = ukraine.741.t
	desc = ukraine.741.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.741.a
		ai_chance = {
			factor = 90
			modifier = {
				tag = FIN
				NOT = { EST = { is_subject_of = FROM } }
				NOT = { LAT = { is_subject_of = FROM } }
				NOT = { LIT = { is_subject_of = FROM } }
				factor = 0.5
			}
		}
		FROM = {
			country_event = { id = ukraine.742 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				puppet = ROOT
			}
		}
	}
	option = {
		name = ukraine.741.b
		ai_chance = {
			factor = 10
			modifier = {
				has_army_manpower = { size > 150000 }
				factor = 5
			}
		}
		FROM = {
			country_event = { id = ukraine.743 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Baltic state accept ultimatum
country_event = {
	id = ukraine.742
	title = ukraine.742.t
	desc = ukraine.742.d
	picture = GFX_report_event_generic_peaceful_annexation
	
	is_triggered_only = yes

	option = {
		name = ukraine.742.a
		puppet = FROM
		set_autonomy = {
			target = FROM
			autonomy_state = autonomy_real_union
		}
		if = {
			limit = {
				FROM = {
					tag = FIN
				}
			}
			FROM = {
				set_cosmetic_tag = FIN_GRAND_DUCHY
			}
		}
	}
}
# Baltic state decline ultimatum
country_event = {
	id = ukraine.743
	title = ukraine.743.t
	desc = ukraine.743.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.743.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
# Patriarch of unified Church of all Rus
country_event = {
	id = ukraine.744
	title = ukraine.744.t
	desc = ukraine.744.d

	is_triggered_only = yes

	option = { # Vasyl
		name = ukraine.744.a
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_unification_of_churches_flag
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = UKR_metropolitan_vasyl
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = -0.15
			}
		}
	}
	
	option = { # Panteleimon
		name = ukraine.744.b
		ai_chance = {
			factor = 50
		}
		set_country_flag = UKR_united_church_of_rus_flag
		custom_effect_tooltip = available_political_advisor
		show_ideas_tooltip = UKR_metropolitan_panteleimon
		if = {
			limit = {
				has_completed_focus = UKR_coronation
				has_any_power_balance = yes
			}
			add_power_balance_value = {
				id = UKR_power_balance
				value = 0.15
			}
		}
	}
}
# Ultimatum for Alaska to USA
country_event = {
	id = ukraine.745
	title = ukraine.745.t
	desc = ukraine.745.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.745.a
		ai_chance = {
			factor = 10
			modifier = {
				naval_strength_ratio = {
					tag = FROM
					ratio < 1
				}
				factor = 10
			}
		}
		FROM = {
			country_event = { id = ukraine.746 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				transfer_state = 463
			}
		}
	}
	option = {
		name = ukraine.745.b
		ai_chance = {
			factor = 90
			modifier = {
				has_war = yes
				factor = 0.5
			}
			modifier = {
				463 = { NOT = { is_core_of = ROOT } }
				factor = 0.5
			}
		}
		FROM = {
			country_event = { id = ukraine.747 days = 1 }
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = take_state_focus
					target = FROM
					generator = { 463 650 }
				}
			}
		}
	}
}
# Ultimatum for Alaska - USA accept
country_event = {
	id = ukraine.746
	title = ukraine.746.t
	desc = ukraine.746.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.746.a
		transfer_state = 463
		if = {
			limit = {
				650 = { is_owned_and_controlled_by = FROM }
			}
			transfer_state = 650
		}
	}
}
# Ultimatum for Alaska - USA refuse
country_event = {
	id = ukraine.747
	title = ukraine.747.t
	desc = ukraine.747.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.747.a
		create_wargoal = {
			type = take_state_focus
			target = FROM
			generator = { 463 650 }
			expire = 0
		}
	}
}
# Ultimatum of altmonarchy for rusyns lands
country_event = {
	id = ukraine.748
	title = ukraine.748.t
	desc = ukraine.748.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.748.a
		ai_chance = {
			factor = 50
			modifier = {
				strength_ratio = {
					tag = FROM
					ratio < 1
				}
				factor = 2
			}
		}
		FROM = {
			country_event = ukraine.749
		}
		effect_tooltip = {
			if = {
				limit = {
					73 = { is_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 73
				}
			}
			if = {
				limit = {
					78 = { is_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 78
				}
			}
			if = {
				limit = {
					80 = { is_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 80
				}
			}
			if = {
				limit = {
					766 = { is_controlled_by = ROOT }
				}
				FROM = {
					transfer_state = 766
				}
			}
		}
	}
	option = {
		name = ukraine.748.b
		ai_chance = {
			factor = 50
			modifier = {
				has_war = yes
				factor = 0.5
			}
		}
		FROM = {
			country_event = ukraine.750
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Ultimatum of altmonarchy for rusyns lands - accept
country_event = {
	id = ukraine.749
	title = ukraine.749.t
	desc = ukraine.749.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.749.a
		if = {
			limit = {
				73 = { is_controlled_by = FROM }
			}
			transfer_state = 73
		}
		if = {
			limit = {
				78 = { is_controlled_by = FROM }
			}
			transfer_state = 78
		}
		if = {
			limit = {
				80 = { is_controlled_by = FROM }
			}
			transfer_state = 80
		}
		if = {
			limit = {
				766 = { is_controlled_by = FROM }
			}
			transfer_state = 766
		}
	}
}
# Ultimatum of altmonarchy for rusyns lands - refuse
country_event = {
	id = ukraine.750
	title = ukraine.750.t
	desc = ukraine.750.d
	picture = GFX_report_event_usa_election_generic
	
	is_triggered_only = yes

	option = {
		name = ukraine.750.a
		if = {
			limit = {
				FROM = {
					is_subject = no
					NOT = { is_in_faction_with = ROOT }
				}
			}
			create_wargoal = {
				type = puppet_wargoal_focus
				target = FROM
				expire = 0
			}
		}
	}
}
# Big game - invite muslims countries
country_event = {
	id = ukraine.751
	title = ukraine.751.t
	desc = ukraine.751.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.751.a
		ai_chance = {
			factor = 60
			modifier = {
				has_opinion = { target = FROM value > 25 }
				factor = 1.5
			}
			modifier = {
				tag = YEM
				factor = 2
			}
		}
		FROM = {
			country_event = ukraine.752
		}
		effect_tooltip = {
			if = {
				limit = {
					FROM = {
						is_faction_leader = yes
					}
				}
				FROM = { add_to_faction = ROOT }
			}
			else = {
				FROM = { puppet = ROOT }
			}
		}
	}
	option = {
		name = ukraine.751.b
		ai_chance = {
			factor = 40
			modifier = {
				has_war = yes
				factor = 0.5
			}
		}
		FROM = {
			country_event = ukraine.753
		}
		effect_tooltip = {
			FROM = {
				create_wargoal = {
					type = puppet_wargoal_focus
					target = ROOT
					expire = 0
				}
			}
		}
	}
}
# Big game - country accept invite
country_event = {
	id = ukraine.752
	title = ukraine.752.t
	desc = ukraine.752.d
	picture = GFX_report_event_generic_sign_treaty2
	
	is_triggered_only = yes

	option = {
		name = ukraine.752.a
		if = {
			limit = {
				is_faction_leader = yes
			}
			add_to_faction = FROM
		}
		else = {
			set_autonomy = {
				target = FROM
				autonomous_state = autonomy_dominion
				freedom_level = 0.2
			}
		}
	}
}
# Big game - country refuse invite
country_event = {
	id = ukraine.753
	title = ukraine.753.t
	desc = ukraine.753.d
	
	is_triggered_only = yes

	option = {
		name = ukraine.753.a
		create_wargoal = {
			type = puppet_wargoal_focus
			target = FROM
			expire = 0
		}
	}
}
# Romanov want marriage with scandal Lady Mary Lygon
country_event = {
	id = ukraine.754
	title = ukraine.754.t
	desc = ukraine.754.d
	picture = GFX_report_event_lady_mary_lygon

	fire_only_once = yes

	trigger = {
		tag = UKR
		has_government = neutrality
		has_completed_focus = UKR_new_aristocraty
		has_country_flag = UKR_restore_of_romanovs
	}
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.754.a
		ai_chance = {
			base = 50
		}
		add_stability = -0.05
	}
	option = {
		name = ukraine.754.b
		ai_chance = {
			base = 50
		}
		add_political_power = -100
	}
}
# Yevhen Gagarin vs Biskupsky
country_event = {
	id = ukraine.755
	title = ukraine.755.t
	desc = ukraine.755.d
	picture = GFX_report_event_hetman_with_generals

	fire_only_once = yes

	trigger = {
		tag = UKR
		has_government = neutrality
		has_completed_focus = UKR_new_aristocraty
		has_country_flag = UKR_restore_of_rurikids
		UKR = { has_character = UKR_vasily_biskupsky }
	}
	
	mean_time_to_happen = {	days = 20 }

	option = {
		name = ukraine.755.a
		ai_chance = {
			base = 100
		}
		custom_effect_tooltip = available_military_high_command
		show_ideas_tooltip = UKR_yevhen_gagarin
		retire_character = UKR_vasily_biskupsky
		set_country_flag = UKR_yevhen_gagarin_is_available
	}
	option = {
		name = ukraine.755.b
		ai_chance = {
			base = 0
		}
		add_political_power = -75
	}
}
# Issue of non-slavic separatists after crash of bolshevics
country_event = {
	id = ukraine.756
	title = ukraine.756.t
	desc = ukraine.756.d

	fire_only_once = yes

	trigger = {
		tag = UKR
		has_government = neutrality
		has_completed_focus = UKR_three_nations
		NOT = { country_exists = SOV }
		any_other_country = {
			has_country_flag = SOV_breakaway_country_flag
			NOT = { tag = BLR }
		}
	}
	
	mean_time_to_happen = {	days = 30 }

	option = { # demand submission
		name = ukraine.756.a
		ai_chance = {
			factor = 50
		}
		every_country = {
			limit = {
				has_country_flag = SOV_breakaway_country_flag
				NOT = { is_in_faction_with = ROOT }
				NOT = { has_war_with = ROOT }
			}
			country_event = {
				id = ukraine.757
				days = 1
				random_days = 1
			}
		}
	}
	option = { # free for current independent states (but not BLR)
		name = ukraine.756.b
		ai_chance = {
			factor = 30
		}
		if = {
			limit = {
				country_exists = BLR
				BLR = { is_subject = no }
				NOT = { is_in_faction_with = BLR }
				NOT = { has_war_with = BLR }
			}
			BLR = {
				country_event = { id = ukraine.757 days = 1 }
			}
		}
	}
	option = { # free for all (but not BLR)
		name = ukraine.756.c
		ai_chance = {
			factor = 20
		}
		if = {
			limit = {
				country_exists = BLR
				BLR = { is_subject = no }
				NOT = { is_in_faction_with = BLR }
				NOT = { has_war_with = BLR }
			}
			BLR = {
				country_event = { id = ukraine.757 days = 1 }
			}
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = GEO
				}
			}
			release_puppet = GEO
			add_stability = 0.01
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = AZR
				}
			}
			release_puppet = AZR
			add_stability = 0.01
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = ARM
				}
			}
			release_puppet = ARM
			add_stability = 0.01		
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = KAZ
				}
			}
			release_puppet = KAZ
			add_stability = 0.02	
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = TMS
				}
			}
			release_puppet = TMS
			add_stability = 0.01
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = TAJ
				}
			}
			release_puppet = TAJ
			add_stability = 0.01
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = UZB
				}
			}
			release_puppet = UZB
			add_stability = 0.02
		}
		if = {
			limit = {
				any_owned_state = {
					is_core_of = KYR
				}
			}
			release_puppet = KYR
			add_stability = 0.01
		}
	}
}
# Separatists offered autonomy
country_event = {
	id = ukraine.757
	title = ukraine.757.t
	desc = ukraine.757.d
	picture =  GFX_report_event_generic_read_write
	is_triggered_only = yes
	# Nah
	option = {
		name = ukraine.757.a	
		ai_chance = {
			base = 1
			modifier = {
				factor = 5
				is_in_faction = yes # Don't surrender so easily if already have friends
			}
			modifier = {
				factor = 2
				check_variable = { ROOT.num_owned_states > 5 } # We're big enough to defend ourselves
			}
		}
		FROM = {
			country_event = {
				id = ukraine.759
				days = 1
				random_days = 1
			}
		}
		
	}
	# We have to accept, I suppose
	option = {
		name = ukraine.757.b	
		ai_chance = {
			base = 1
			modifier = {
				factor = 2
				check_variable = { ROOT.num_owned_states < 3 }
			}
		}
		FROM = {
			country_event = {
				id = ukraine.758
				days = 1
				random_days = 1
			}
		}
	
	}
}

# Separatists accept puppet status
country_event = {
	id = ukraine.758
	title = ukraine.758.t
	desc = ukraine.758.d
	picture = GFX_report_event_generic_sign_treaty2
	is_triggered_only = yes

	option = {
		name = ukraine.758.a	
		puppet = FROM
	}
}

# Separatists reject puppet status
country_event = {
	id = ukraine.759
	title = ukraine.759.t
	desc = ukraine.759.d
	picture = GFX_report_event_generic_parliament
	is_triggered_only = yes

	option = {
		name = ukraine.759.a	
		create_wargoal = {
			target = FROM
			type = puppet_wargoal_focus
		}
	}
}