on_actions = {
	on_capitulation = {
	
		effect = {
		#Победа ЗРРФ - фины
			if = {
				limit = {
					ROOT = {
						OR = {
							original_tag = FIN
						}
					}
					FROM = {
						OR = {
							original_tag = WRS
						}
					}
				}
				ROOT = {
					white_peace = FROM
					leave_faction = yes
				}
				
				every_state = {
					limit = {
						OR = {
							state = 213
							state = 215
							state = 722
							state = 147
							state = 146
							state = 216
						}
					}

					WRS = {
						transfer_state = PREV
						add_state_core = PREV
					}
				}
			}
			
		#Победа Германии
		
			if = {
				limit = {
					ROOT = {
						OR = {
							original_tag = WRS
						}
					}
					FROM = {
						OR = {
							original_tag = GER
						}
					}
				}
				FROM = {
					white_peace = ROOT
				}
				
				if = {
					limit = {
						country_exists = FIN
					}
					every_state = {
						limit = {
							OR = {
								state = 213
								state = 215
								state = 722
								state = 147
								state = 146
								state = 216
							}
						}

						FIN = {
							transfer_state = PREV
							add_state_core = PREV
						}
					}
				}
				
					
				WRS = {
					country_event = wrs.4001
					add_ideas = WRS_IS_DEFEATED
				}
			}
			
		#Победа ЗРРФ - Германия
			
			if = {
				limit = {
					ROOT = {
						OR = {
							original_tag = GER
						}
					}
					FROM = {
						OR = {
							original_tag = WRS
						}
					}
				}
				FROM = {
					white_peace = ROOT
				}
				
				every_state = {
					limit = {
						is_core_of = SOV
						owner = {
							OR = {
								tag = GER
								tag = QZQ
								is_subject_of = GER
							}
						}
					}
					WRS = {
						transfer_state = PREV
						add_state_core = PREV
					}
				}
				
				if = {
					limit = {
						country_exists = FIN
					}
					every_state = {
						limit = {
							OR = {
								state = 213
								state = 215
								state = 722
								state = 147
								state = 146
								state = 216
							}
						}

						WRS = {
							transfer_state = PREV
							add_state_core = PREV
						}
					}
				}
				
				every_state = {
					limit = {
						owner = {
							OR = {
								tag = GER
								is_ally_with = GER
							}
						}
						OR = {
							state = 94
							state = 93
							state = 91
							state = 89
							state = 80
							state = 78
							state = 766
							state = 192
							state = 834
							state = 95
							state = 784
							state = 96
							state = 814
							state = 763
							state = 188
							state = 189
							state = 190
							state = 809
							state = 815
							state = 808
							state = 11
							state = 12
							state = 810
							state = 13
							state = 811
							state = 812
							state = 813
							state = 191
						}
					}

					WRS = {
						transfer_state = PREV
					}
				}
				
				reset_province_name = 3529
				reset_province_name = 3151
				
				every_country = {
					limit = {
						has_war_with = WRS
					}
					
					diplomatic_relation = {
						country = WRS
						relation = non_aggression_pact
						active = yes
					}
					
					white_peace = WRS
				}
				
				WRS = {
					set_capital = {state = 219}
					load_focus_tree = WRS_Post_War_tree
					mark_focus_tree_layout_dirty = yes
					country_event = { days = 1 id = wrs.3012 }
				}
	
				news_event = { days = 3 id = wrsnews.1 }
			}
		}
	}
}
