# Scripted AI desire for peace actions.
# See documentation.info file for more detailed scripting information.

peace_ai_desires = {

    # We want a base in this region
    USA_take_okinawa = {
        peace_action_type = { take_states }
        enable = {
            FROM.FROM.FROM = {
                state = 526 # Okinawa
            }
            ROOT = {
                original_tag = USA
            }
        }
        ai_desire = 1500
    }


    # Don't give Okinawa to Japan
    USA_take_okinawa_part_two = {
        peace_action_type = { puppet force_government }
        enable = {
            FROM.FROM.FROM = {
                state = 526 # Okinawa
            }
            ROOT = {
                original_tag = USA
            }
        }
        ai_desire = -100
    }


    # If the Soviets have a puppet Korea, we want one two
    USA_puppet_s_korea = {
        peace_action_type = { puppet }
        enable = {
            FROM.FROM.FROM = {
                OR = {
					state = 525
					state = 1311
					state = 1312
					state = 1313
					state = 1314
					state = 1315
					state = 1316
					state = 1317
					state = 1318
					state = 1319
				}
            }
            FROM = {
                original_tag = KOR
            }
            ROOT = {
                original_tag = USA
                has_government = democratic
            }
            SOV = {
                OR = {
                    has_war_with = JAP
                    has_war_with = KOR
                }
            }
        }
        ai_desire = 200
    }


    # Reduce desire to liberate if the Soviets are involved in order to establish control
    USA_puppet_s_korea_part_two = {
        peace_action_type = { liberate force_government }
        enable = {
            FROM.FROM.FROM = {
                OR = {
					state = 525
					state = 1311
					state = 1312
					state = 1313
					state = 1314
					state = 1315
					state = 1316
					state = 1317
					state = 1318
					state = 1319
				}
            }
            FROM = {
                original_tag = KOR
            }
            ROOT = {
                original_tag = USA
                has_government = democratic
            }
            SOV = {
                OR = {
                    has_war_with = JAP
                    has_war_with = KOR
                }
            }

        }
        ai_desire = -75
    }


    # The 38th parallell
    USA_dont_puppet_n_korea = {
        peace_action_type = { puppet }
        enable = {
            is_historical_focus_on = yes
            FROM.FROM.FROM = {
                OR = {
					state = 527
					state = 1320
					state = 1321
					state = 1322
					state = 1323
					state = 1324
					state = 1325
					state = 1326
					state = 1327
					state = 1328
					state = 1329
				}
            }
            FROM = {
                original_tag = KOR
            }
            ROOT = {
                original_tag = USA
                has_government = democratic
            }
            SOV = {
                OR = {
                    has_war_with = JAP
                    has_war_with = KOR
                }
                NOT = { has_war_with = ROOT }
            }
        }
        ai_desire = -50
    }


    # MacArthur
    USA_puppet_japan = {
        peace_action_type = { puppet }
        enable = {
            FROM.FROM.FROM = {
                is_core_of = JAP
                NOT = { state = 526 } # Keep Okinawa
            }
            FROM = {
                original_tag = JAP
            }
            ROOT = {
                original_tag = USA
                has_government = democratic
                pc_total_score > 800 # Only attempt if we can puppet most of Japan (with cost modifier now)
            }
        }
        ai_desire = 200
    }
	
	USA_take_some_islands = {
        peace_action_type = { take_states }
        enable = {
            FROM.FROM.FROM = {
				is_core_of = JAP
                OR = {
					region = 94
					region = 84
					region = 97
					region = 78
				}
				NOT = {
					state = 526 #Okinawa
				}
            }
        }
        ai_desire = 1100 #Finite offset
    }


    USA_dont_liberate_the_wrong_usa = {
        peace_action_type = { puppet force_government liberate }
        enable = {
            FROM = {
                OR = {
                    tag = USB
                    tag = CSA
                }
            }
        }
        ai_desire = -200
    }
	
	
	
	
	
	
	
	
	
	USA_annex_s_korea_if_division_plan = {
		peace_action_type = { take_states }
        enable = {
            FROM.FROM.FROM = {
                OR = {
					state = 525
					state = 1311
					state = 1312
					state = 1313
					state = 1314
					state = 1315
					state = 1316
					state = 1317
					state = 1318
					state = 1319
				}
            }
			ROOT = {
                original_tag = USA
            }
			has_global_flag = KSR_korea_divided
        }
        ai_desire = 1100 #Finite offset
	}
	
	
	USA_not_annex_n_korea_if_division_plan = {
		peace_action_type = { take_states }
        enable = {
            FROM.FROM.FROM = {
                OR = {
					state = 527
					state = 1320
					state = 1321
					state = 1322
					state = 1323
					state = 1324
					state = 1325
					state = 1326
					state = 1327
					state = 1328
					state = 1329
				}
            }
			ROOT = {
                original_tag = USA
            }
			has_global_flag = KSR_korea_divided
        }
        ai_desire = -200
	}
}
