﻿add_namespace = gorsk


#otdat kavkaz slavanam
country_event = {
	id = gorsk.1
	title = gorsk.1.t
	desc = gorsk.1.d
	picture = GFX_report_event_soviet_tanks_snow
	
	trigger = {
		has_global_flag = zsl_go_to_kaukaus
		tag = ZGO		
		ZGO = {
			has_war_with = ZSL
			is_faction_leader = yes
			NOT = {
				controls_state = 234
				controls_state = 235
#				controls_state = 232
#				controls_state = 233
			}		
#			surrender_progress > 0.15
			has_civil_war = no
			NOT = {
				OR = {
					is_in_faction_with = ZRI
					is_in_faction_with = ZPA
					is_in_faction_with = ZPE
					is_in_faction_with = ZIK
				}
			}
		}
	}
	mean_time_to_happen = { days = 1 }
	fire_only_once = yes
	#Surrender and offer territory
	option = {
		name = gorsk.1.a
		ai_chance = {
			base = 15
		}
		ZSL = {
			country_event = { id = gorsk.2 }
		}
		custom_effect_tooltip = gorsk.1.a_tt
		effect_tooltip = {
			ZSL = { 
				white_peace = {
					tag = ZGO 
					message = ZGO_agree_peace 
				} 
			}
			transfer_state = 234
			transfer_state = 235
#			transfer_state = 232
#			transfer_state = 233
		234 = { add_manpower = -84684 }
		235 = { add_manpower = -65771 }
#		232 = { add_manpower = -25641 }
#		233 = { add_manpower = -45138 }
		231 = { add_manpower = 131574 }
			every_other_country = {
				limit = {
						has_war_with = ZSL
						is_in_faction_with = ZGO
				}
				white_peace = {
					tag = ZSL 
					message = ZSL_agree_peace 
				}
			}
		}
	}
	#Never give up!
	option = {
		name = gorsk.1.b
		ai_chance = {
			base = 2
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}
		}
	}
}

#to zsl o mire
country_event = {
	id = gorsk.2
	title = gorsk.2.t
	desc = gorsk.2.d
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	#Accept surrender
	option = {
		name = gorsk.2.a
		ai_chance = {
			base = 15
		}
		white_peace = ZGO
		transfer_state = 234
		transfer_state = 235
#		transfer_state = 232
#		transfer_state = 233
		234 = { add_manpower = -84684 }
		235 = { add_manpower = -65771 }
#		232 = { add_manpower = -25641 }
#		233 = { add_manpower = -45138 }
		231 = { add_manpower = 131574 }
		every_other_country = {
				limit = {
						has_war_with = ZSL
						is_in_faction_with = ZGO
				}
				white_peace = {
					tag = ZSL 
					message = ZSL_agree_peace 
				}
			}
		hidden_effect = {
			news_event = { hours = 3 id = ar_news.626 }
			ZGO = {
				country_event = { days = 5 id = gorsk.4 }
			}
		}
	}
	#Take it all
	option = {
		name = gorsk.2.b
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				is_historical_focus_on = yes
			}			
		}
		ZGO = { country_event = { id = gorsk.3 } }
	}
}

#zsl  says no!
country_event = {
	id = gorsk.3
	title = gorsk.3.t
	desc = gorsk.3.d
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	option = {
		name = gorsk.3.a
		add_stability = 0.2
		add_war_support = 0.2
	}
}

#objedinenie s arminiei
country_event = {
	id = gorsk.4
	title = gorsk.4.t
	desc = gorsk.4.d
	picture = GFX_report_event_finnish_soldiers_snow
	
	is_triggered_only = yes

	option = {
		name = gorsk.4.a
		ai_chance = { factor = 100 }
		if = {
			limit = {
				controls_state = 231				
				is_in_faction_with = ZAI
				is_faction_leader = yes
				
			}
			dismantle_faction = yes
			custom_effect_tooltip = GAME_OVER_TT
			ZAI = {
				country_event = { id = gorsk.5 }
			}			
		}
	}
	option = { # Refuse
		name = gorsk.4.b
	}
}
# zai annex zgo
country_event = {
	id = gorsk.5
	title = gorsk.5.t
	desc = gorsk.5.d
	picture = GFX_report_event_stalin_propaganda
	
	is_triggered_only = yes
	
	option = {
		name = gorsk.5.a
		annex_country = { target = ZGO }
		hidden_effect = {
			ZAI = {
				country_event = { days = 1 id = ar_news.627 }
			}
		}
	}
}