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

peace_ai_desires = {

     # Soviet really wants that Königsberg place for themselves, don't they?
    SOV_wants_konigsberg = {
        peace_action_type = take_states
        enable = {
            tag = SOV  # Negotiatior is soviet union
            FROM = { tag = ROOT }  # And the negotiator is also taking for themselves
            FROM.FROM.FROM = { state = 763 }  # Königsberg
        }

        ai_desire = 50  # 50 percent higher desire
    }

    # If Lithuania is not a Soviet Puppet, the Soviets want Memel too
    SOV_wants_memel = {
        peace_action_type = take_states
        enable = {
            tag = SOV  # Negotiatior is soviet union
            NOT = { LIT = { is_subject_of = ROOT } }
            FROM = { tag = ROOT }  # And the negotiator is also taking for themselves
            FROM.FROM.FROM = { state = 188 }  # Memel
        }

        ai_desire = 50  # 50 percent higher desire
    }
     # If Lithuania is a Soviet Puppet, the Soviets want Memel for it
    SOV_wants_memel = {
        peace_action_type = take_states
        enable = {
            tag = SOV  # Negotiatior is soviet union
            LIT = { pc_is_puppeted_by = ROOT }
            FROM = { tag = LIT }  # And the negotiator is also taking for themselves
            FROM.FROM.FROM = { state = 188 }  # Memel
        }

        ai_desire = 50  # 50 percent higher desire
    }


    SOV_czech_puppet_histo = {
        peace_action_type = puppet
        enable = {
            is_historical_focus_on = yes
            ROOT.FROM = { tag = CZE }
            ROOT.FROM.FROM.FROM = { is_core_of = CZE }
            tag = SOV
        }
        ai_desire = 150
    }


    SOV_claims_histo = {
        peace_action_type = take_state
        enable = {
            is_historical_focus_on = yes
            ROOT.FROM.FROM.FROM = {
                OR = {
                    state = 73
                    state = 763
                    state = 5
                }
            }
            ROOT.FROM = { tag = SOV }
        }
        ai_desire = 400
    }


    SOV_leave_austria_alone = {
        peace_action_type = { take_states puppet liberate force_government }
        enable = {
            is_historical_focus_on = yes
            ROOT = { tag = SOV }
            ROOT.FROM.FROM.FROM = { is_core_of = AUS }
        }
        ai_desire = -50
    }


    # Create a Korean puppet in North Korea.
    SOV_puppet_n_korea = {
        peace_action_type = { puppet }
        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
				}
            }
            FROM = {
                original_tag = KOR
            }
            ROOT = {
                original_tag = SOV
                has_government = communism
            }
        }
        ai_desire = 75
    }


    # The 38th parallell - don't take South Korea if the US are on the same side
    SOV_not_puppet_s_korea = {
        peace_action_type = { puppet take_states liberate force_government}
        enable = {
            is_historical_focus_on = yes
            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 = SOV
                has_government = communism
            }
            USA = {
                OR = {
                    has_war_with = JAP
                    has_war_with = KOR
                }
                NOT = { has_war_with = ROOT }
            }
        }
        ai_desire = -100
    }
	
	
	
	
	
	
	SOV_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
				}
            }
			has_global_flag = KSR_korea_divided
        }
        ai_desire = 1100 #Finite offset
	}
	
	
	
	SOV_not_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
				}
            }
			has_global_flag = KSR_korea_divided
        }
        ai_desire = -200
	}
}
