# 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 = {
                state = 525
            }
            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 = {
                state = 525
            }
            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 = {
                state = 527
            }
            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
    }
}
