# Default Logic behaviour that the AI will fallback on if no other fits the bill
# Should just be "good enough" to make sure the AI acts smart in the war
# Written by Henrik "Groogy" Hansson

#Adjustments
#Default AI (ie neutral AI) will act like a mix between democratic and fascist, but in general way more conservative and mostly interested in obtaining cores and the status quo. If they have enough warscore, they will puppet/liberate neighbors as well.
#Neutral AI in general do not directly annex other nations.
#The plan is to eventually make individualized AI for every country in the game.

# Temp variables
# Old actions will be stored as temp variables
# For Winners:
#	taken_states@TAG: an array where each element contains the state that is taken by country TAG
#	taken_by@STATE_ID: is set to country that took the state
# For Losers:
# 	current_states@TAG: Remaining states of loser
# For each subject action:
#   subject_states@TAG : an array where each element contains the state that is subjected by country TAG
#   subject_countries@TAG : an array where each element contains the country that is subjected by country TAG
#   subjected_by@STATE_ID : a variable for each state that is subjected by a country, value is overlord
#   subjected_by@TAG : an array for each loser that is subjected, array contains overlord
# For each liberated:
#   liberate_states@TAG : an array where each element contains the state that is liberated by country TAG
#   liberate_countries@TAG : an array where each element contains the country that is liberated by country TAG
# A trigger named "build_temp_vars" will be called before any evaluation so further temp variables can be calculated

default_peace = {
	enable = {
		always = yes
	}
	annex_randomness = 0 #350
	liberate_randomness = 0 #100
	puppet_randomness = 0 #200
	take_states_randomness = 0 #150
	force_government_randomness = 0 #50
	
	build_temp_vars = {
		
	}
	
	# ROOT = Taker, FROM = Giver
	annex = {
		factor = 0#500


		#modifier = {
		#	factor = 0
		#	is_puppet = yes
		#}
	}

	# ROOT = Taker, FROM = Liberated
	liberate = {
		factor = 0 #100
		
		#modifier = {
		#	factor = 0
		#	NOT = { is_owner_neighbor_of = FROM }
		#}
	}

	# ROOT = Taker, FROM = Giver
	puppet = {
		factor = 200 #0
	}
	
	# ROOT = Taker, FROM = Giver
	puppet_all = {
		base = 0 
	}
	
	# ROOT = STATE, FROM = Taker, FROM.FROM = Giver
	puppet_state = {
		base = 0 
	}

	# ROOT = Taker, FROM = State
	take_states = {
		factor = 0#50
		
	}

	# ROOT = Taker, FROM = Giver
	force_government = {
		factor = 0 #10 - neutrals should never do this
	}
}
