KOR_decisions_category_wars_and_conflicts = {
    ###activate_mission = ITA_Mission_AUS_PIE_Peace_Treaty_1860
	KOR_Mission_FRA_Expedition_War_Decision = {
        allowed = { always = no } # MEANS NO ONE SEES IT AT GAMESTART
        icon = generic_political_actions

        is_good = no # AI is smarter with conditions/achieving them if it is no, trust me.
        days_mission_timeout = 200 # Arbitrary number, but I recommend a time of 1.5x expected time to finish war, max 1000
        activation = { always = no } # MEANS THIS MISSION WILL BE MANUALLY ENABLED (~400x Optimized)

        available = {
            # Conditions to trigger peace treaty
            OR = {
                custom_trigger_tooltip = {
                    tooltip = KOR_KOR_Mission_FRA_Expedition_War_Decision_tt
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1016
							controls_state = 527
							controls_state = 1015
							controls_state = 1017
							controls_state = 1018
							controls_state = 1028
							controls_state = 1024
							controls_state = 1019
							controls_state = 1021
							controls_state = 1020
							controls_state = 525
							controls_province = 13916
						}
						surrender_progress < 0.01
					}
				}
                custom_trigger_tooltip = {
                    tooltip = FRA_KOR_Mission_FRA_Expedition_War_Decision_tt
					tag = FRA
					KOR = {
						surrender_progress > 0.5
					}
     			}
			}
		}
        complete_effect = {
            # Peace Treaty (Simple form, you can customize it later for various outcomes)
            if = {
                limit = { 
					# INSERT PIEDMONT'S VICTORY CONDITIONS HERE
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1016
							controls_state = 527
							controls_state = 1015
							controls_state = 1017
							controls_state = 1018
							controls_state = 1028
							controls_state = 1024
							controls_state = 1019
							controls_state = 1021
							controls_state = 1020
							controls_state = 525
							controls_province = 13916
						}
					}
				} 
				# Insert Sardinia's Victory Here (Recommended you also check for tag so it only fires for Sardinia)
				KOR = {
					white_peace = FRA
					transfer_state = 1019
					##add_ideas ##Victory Confirmed idea ## Historical
				}
				FRA = {
					country_event = {
						id = KOR_joseon_dynasty.25
					}
				}
			}
            else_if = {
				# INSERT AUSTRIA'S VICTORY CONDITIONS HERE
                limit = {  
					tag = FRA
					KOR = {
						surrender_progress > 0.5
					}
				} 

				# Insert Austria's Victory Here (Recommended you also check for tag so it only fires for Austria)
				FRA = {
					white_peace = KOR
					transfer_state = 1019
					1019 = {
						#add_core_of = FRA
						#remove_core_of = KOR
					}
					country_event = {
						id = KOR_joseon_dynasty.22
						days = 10
					}
				}
				KOR = {
					country_event = {
						id = KOR_joseon_dynasty.24
					}
				}
            }
            else = {
                ## IMPORTANT, IF YOU USE 'ELSE' IT WILL ALWAYS BE SEEN BY AI/PLAYER
                # Optional: could be used for a custom_effect_tooltip to say simply 'will fire peace conference'
                custom_effect_tooltip = KOR_Mission_FRA_Expedition_War_Decision_Peace_tt
            }
        }
        timeout_effect = {
            if = {
                limit = { date > 1868.1.1 } # Optional Trigger in case war lasting too long
				FRA = {
					white_peace = KOR
					transfer_state = 1019
					1019 = {
						#add_core_of = FRA
						#remove_core_of = KOR
					}
					country_event = {
						id = KOR_joseon_dynasty.22
						days = 10
					}
				} # Stalemate if it is lasting too long
            }
            else_if = {
                limit = { FRA = { has_war_with = KOR } } # Check if they are still at war
                activate_mission = KOR_Mission_FRA_Expedition_War_Decision # Loops the mission if they are still at war.
            }
    	}
   	}
	KOR_Mission_FRA_Korean_Revolt_Decision = {
		allowed = { always = no } # MEANS NO ONE SEES IT AT GAMESTART
		icon = generic_political_actions

		is_good = no # AI is smarter with conditions/achieving them if it is no, trust me.
		days_mission_timeout = 200 # Arbitrary number, but I recommend a time of 1.5x expected time to finish war, max 1000
		activation = { always = no } # MEANS THIS MISSION WILL BE MANUALLY ENABLED (~400x Optimized)

		available = {
			# Conditions to trigger peace treaty
			OR = {
				custom_trigger_tooltip = {
					tooltip = KOR_KOR_Mission_FRA_Korean_Revolt_Decision_tt
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1019
						}
					}
				}
				custom_trigger_tooltip = {
					tooltip = FRA_KOR_Mission_FRA_Expedition_War_Decision_tt
						tag = FRA
						KOR = {
							surrender_progress > 0.5
						}
					   }
				}
			}
		complete_effect = {
			# Peace Treaty (Simple form, you can customize it later for various outcomes)
			if = {
				limit = { 
					# INSERT PIEDMONT'S VICTORY CONDITIONS HERE
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1019
						}
					}
				} 
					# Insert Sardinia's Victory Here (Recommended you also check for tag so it only fires for Sardinia)
					KOR = {
						white_peace = FRA
						transfer_state = 1019
						1019 = {
							#add_core_of = KOR
							#remove_core_of = FRA
						}
						##add_ideas ##Victory Confirmed idea ## Historical
					}
					FRA = {
						country_event = {
							id = KOR_joseon_dynasty.35
						}
					}
			}
			else_if = {
				# INSERT AUSTRIA'S VICTORY CONDITIONS HERE
				limit = {  
					tag = FRA
					KOR = {
						surrender_progress > 0.5
					}
				} 

				# Insert Austria's Victory Here (Recommended you also check for tag so it only fires for Austria)
				FRA = {
					white_peace = KOR
					1019 = {
						#add_core_of = KOR
						#remove_core_of = FRA
					}
					country_event = {
						id = KOR_joseon_dynasty.39
					}
				}
				KOR = {
					FRA = {
						puppet = KOR
					}
					transfer_state = 1019
					load_focus_tree = generic_vic_ft
					set_cosmetic_tag = KOR_FRA_Protectorate
					set_party_name = { 
						ideology = autocracy
						long_name = KOR_FRA_Protectorate_long_name 
						name = KOR_FRA_Protectorate_autocracy_short_name 
					} 
					create_country_leader = {
						name = "Henri de Bellonet"
						#desc = "POLITICS_MOHAMMED_ZAHIR_SHAH_DESC"
						picture = "Portrait_KOR_Henri_Zuber.dds"
						expire = "1900.1.1"
						ideology = despotism
						traits = {
							headstrong inexperienced_imperialist
						}
					}
					hidden_effect = {
						if = {
							limit = {
								has_idea = KOR_Catholic_Influence
							}
							remove_ideas = KOR_Catholic_Influence
						}
						if = {
							limit = {
								has_idea = KOR_Catholic1_Influence
							}
							remove_ideas = KOR_Catholic1_Influence
						}
						if = {
							limit = {
								has_idea = KOR_Catholic1_Influence_Removed
							}
							remove_ideas = KOR_Catholic1_Influence_Removed
						}
						if = {
							limit = {
								has_idea = KOR_Catholic2_Influence_Removed
							}
							remove_ideas = KOR_Catholic2_Influence_Removed
						}
					}
					country_event = {
						id = KOR_joseon_dynasty.40
					}
				}
			}
			else = {
				## IMPORTANT, IF YOU USE 'ELSE' IT WILL ALWAYS BE SEEN BY AI/PLAYER
				# Optional: could be used for a custom_effect_tooltip to say simply 'will fire peace conference'
				custom_effect_tooltip = KOR_Mission_FRA_Korean_Revolt_Decision_Peace_tt
			}
		}
		timeout_effect = {
			if = {
				limit = { date > 1871.1.1 } # Optional Trigger in case war lasting too long
				FRA = {
					white_peace = KOR
					1019 = {
						#add_core_of = KOR
						#remove_core_of = FRA
					}
					country_event = {
						id = KOR_joseon_dynasty.39
					}
				} # Stalemate if it is lasting too long
				KOR = {
					transfer_state = 1019
					set_cosmetic_tag = KOR_FRA_Protectorate
					set_party_name = { 
						ideology = autocracy
						long_name = KOR_FRA_Protectorate_long_name 
						name = KOR_FRA_Protectorate_autocracy_short_name 
					} 
					create_country_leader = {
						name = "Henri de Bellonet"
						#desc = "POLITICS_MOHAMMED_ZAHIR_SHAH_DESC"
						#picture = "Portrait_Afghanistan_Mohammed_Zahir_Shah.png"
						expire = "1900.1.1"
						ideology = despotism
						traits = {
							headstrong inexperienced_imperialist
						}
					}
					country_event = {
						id = KOR_joseon_dynasty.40
					}
				}
			}
			else_if = {
				limit = { FRA = { has_war_with = KOR } } # Check if they are still at war
				activate_mission = KOR_Mission_FRA_Korean_Revolt_Decision # Loops the mission if they are still at war.
			}
		}
	}
	KOR_Mission_USA_Expedition_War_Decision = {
		allowed = { always = no } # MEANS NO ONE SEES IT AT GAMESTART
		icon = generic_political_actions

		is_good = no # AI is smarter with conditions/achieving them if it is no, trust me.
		days_mission_timeout = 200 # Arbitrary number, but I recommend a time of 1.5x expected time to finish war, max 1000
		activation = { always = no } # MEANS THIS MISSION WILL BE MANUALLY ENABLED (~400x Optimized)

		available = {
			# Conditions to trigger peace treaty
			OR = {
				custom_trigger_tooltip = {
					tooltip = KOR_KOR_Mission_USA_Expedition_War_Decision_tt
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1016
							controls_state = 527
							controls_state = 1015
							controls_state = 1017
							controls_state = 1018
							controls_state = 1028
							controls_state = 1024
							controls_state = 1019
							controls_state = 1021
							controls_state = 1020
							controls_state = 525
						controls_province = 13916
						}
					}
				}
				if = {
					limit = {
						NOT = {
							has_completed_focus = KOR_nonegotiationpolicy
						}
					}
					custom_trigger_tooltip = {
						tooltip = USA_KOR_Mission_USA_Expedition_War_Decision_tt
							tag = USA
							KOR = {
								surrender_progress > 0.5
							}
						}
					}
				else_if = {
					limit = {
						has_completed_focus = KOR_nonegotiationpolicy
					}
					custom_trigger_tooltip = {
						tooltip = USA_KOR_Mission_USA_Expedition_War_Decision_Negotiation_tt
						tag = USA
						KOR = {
							has_capitulated = yes
						}
					}
				}
			}
		}
		complete_effect = {
			# Peace Treaty (Simple form, you can customize it later for various outcomes)
			if = {
				limit = { 
					# INSERT PIEDMONT'S VICTORY CONDITIONS HERE
					AND = { 
						tag = KOR
						KOR = {
							controls_state = 1016
							controls_state = 527
							controls_state = 1015
							controls_state = 1017
							controls_state = 1018
							controls_state = 1028
							controls_state = 1024
							controls_state = 1019
							controls_state = 1021
							controls_state = 1020
							controls_state = 525
						controls_province = 13916
						}
					}
				} 
					# Insert Sardinia's Victory Here (Recommended you also check for tag so it only fires for Sardinia)
				KOR = {
					white_peace = USA
					transfer_state = 1019
					##add_ideas ##Victory Confirmed idea ## Historical
				}
				###USA event for losing 
				USA = {
					country_event = {
						id = KOR_joseon_dynasty.41
					}
				}
			}
			else_if = {
				# INSERT AUSTRIA'S VICTORY CONDITIONS HERE
				limit = {  
					if = {
						limit = {
							NOT = {
								has_completed_focus = KOR_nonegotiationpolicy
							}
						}
						tag = USA
						KOR = {
							surrender_progress > 0.5
						}
					}
					else_if = {
						limit = {
							has_completed_focus = KOR_nonegotiationpolicy
						}
						tag = USA
						KOR = {
							has_capitulated = yes
						}
					}
				} 

				# Insert Austria's Victory Here (Recommended you also check for tag so it only fires for Austria)
				USA = {
					white_peace = KOR
					transfer_state = 1019
					1019 = {
						#add_core_of = USA
						#remove_core_of = KOR
					}
					#country_event = {
					##	id = KOR_joseon_dynasty.22
					#	days = 10
					#}
				}
				#KOR = {
				#	country_event = {
				#		id = KOR_joseon_dynasty.24
				#	}
				#}
			}
			else = {
				## IMPORTANT, IF YOU USE 'ELSE' IT WILL ALWAYS BE SEEN BY AI/PLAYER
				# Optional: could be used for a custom_effect_tooltip to say simply 'will fire peace conference'
				custom_effect_tooltip = KOR_Mission_USA_Expedition_War_Decision_Peace_tt
			}
		}
		timeout_effect = {
			if = {
				limit = { date > 1874.1.1 } # Optional Trigger in case war lasting too long
				USA = {
					white_peace = KOR
					transfer_state = 1019
					1019 = {
						#add_core_of = USA
						#remove_core_of = KOR
					}
					#country_event = {
					#	id = KOR_joseon_dynasty.22
					#	days = 10
					#}
				} # Stalemate if it is lasting too long
			}
			else_if = {
				limit = { USA = { has_war_with = KOR } } # Check if they are still at war
				activate_mission = KOR_Mission_FRA_Expedition_War_Decision # Loops the mission if they are still at war.
			}
			
		}
	}
}
