# befriend
# conquer
# antagonize
# build_ship
# build_army
# unit_ratio
# build_building
# research_tech
# garrison
# protect
# influence
# contain
# area_priority
# building_target

disable_attack_on_norway = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = GER
		date > 1937.1.1
		date < 1940.3.1
	}
	abort = {
		AND = {
			date > 1940.3.1
		}
	}

	ai_strategy = {
		type = declare_war
		id = "NOR"
		value = -200 
	}
	ai_strategy = {
		type = declare_war
		id = "DEN"
		value = -200 
	}
}

enable_attack_on_norway = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = GER
		has_war_with = POL
		POL = { has_capitulated = yes }
		date > 1940.4.8
		date < 1940.6.6
	}
	abort = {
		AND = {
			date > 1940.6.6
		}
	}

	ai_strategy = {
		type = declare_war
		id = "NOR"
		value = 200 
	}
	ai_strategy = {
		type = declare_war
		id = "DEN"
		value = 200 
	}
}

enable_attack_on_yugoslavia = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = GER
		has_war_with = POL
		POL = { has_capitulated = yes }
		date > 1941.4.4
		date < 1941.6.6
	}
	abort = {
		AND = {
			date > 1941.6.6
		}
	}

	ai_strategy = {
		type = declare_war
		id = "YUG"
		value = 200 
	}
	ai_strategy = {
		type = declare_war
		id = "GRE"
		value = 200 
	}
}

block_attack_on_luxembourg = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = GER
		date > 1937.1.1
		date < 1940.5.9
	}
	abort = {
		AND = {
			date > 1940.5.9
		}
	}

	ai_strategy = {
		type = declare_war
		id = "HOL"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "BEL"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "LUX"
		value = -20000 
	}
	ai_strategy = {
		type = ignore_claim
		id = "BEL"			
		value = 1
	}
	ai_strategy = {
		type = ignore_claim
		id = "HOL"			
		value = 1
	}
	ai_strategy = {
		type = antagonize
		id = "HOL"			
		value = -200
	}
	ai_strategy = {
		type = antagonize
		id = "BEL"			
		value = -200
	}	
}

block_attack_on_benelux = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = GER
		has_war_with = POL
		POL = { has_capitulated = no }
		date > 1937.1.1
		date < 1940.5.9
	}
	abort = {
		AND = {
			POL = { has_capitulated = yes }
			date > 1940.5.9
		}
	}

	ai_strategy = {
		type = declare_war
		id = "HOL"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "BEL"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "LUX"
		value = -20000 
	}

	ai_strategy = {
		type = ignore_claim
		id = "BEL"			
		value = 1
	}
	ai_strategy = {
		type = ignore_claim
		id = "HOL"			
		value = 1
	}
	ai_strategy = {
		type = antagonize
		id = "HOL"			
		value = -200
	}
	ai_strategy = {
		type = antagonize
		id = "BEL"			
		value = -200
	}	
}

enable_bulgaria_for_axis = {
	enable = {
		is_historical_focus_on = yes
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		tag = BUL
		date > 1937.1.1
		OR = {
			date > 1941.3.1
			ROM = { is_in_faction_with = GER }
			YUG = { has_war_with = GER }
		}
	}
	abort = {
		date > 1941.6.1
	}

	ai_strategy = {
		type = befriend
		id = "GER"			
		value = 2000
	}
	ai_strategy = {
		type = alliance
		id = "GER"			
		value = 2000
	}	
}

dont_take_claims_on_yug2 = {
	enable = {
		tag = ITA
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		country_exists = YUG
		is_historical_focus_on = yes
		date > 1937.1.1
		date < 1941.1.1
	}

	abort = {
		OR = {
			NOT = { country_exists = YUG }
			date > 1941.2.2
		}
	}
	
	ai_strategy = {
		type = ignore_claim
		id = "YUG"			
		value = 1
	}
}

yugoslavia_war_goal2 = {
	enable = {
		tag = ITA
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		has_completed_focus = ITA_slovenia_dalmatia_claims
		country_exists = YUG
		date > 1937.1.1
		date < 1941.1.1
	}
	abort = {
		OR = {
			NOT = {
				country_exists = YUG
			}
			date > 1941.2.2
		}
	}
	
	ai_strategy = {
		type = antagonize
		id = "YUG"			
		value = -200
	}		
}

dont_take_claims_on_lux2 = {
	enable = {
		tag = GER
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		country_exists = LUX
		is_historical_focus_on = yes
		date > 1937.1.1
		date < 1940.5.5
	}

	abort = {
		OR = {
			NOT = { country_exists = LUX }
			date > 1940.5.5
		}
	}
	
	ai_strategy = {
		type = ignore_claim
		id = "LUX"			
		value = 1
	}
}

lux_war_goal2 = {
	enable = {
		tag = GER
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		country_exists = LUX
		is_historical_focus_on = yes
		date > 1937.1.1
		date < 1940.5.5
	}
	abort = {
		OR = {
			NOT = {
				country_exists = LUX
			}
			date > 1940.5.5
		}
	}
	
	ai_strategy = {
		type = antagonize
		id = "LUX"			
		value = -200
	}	
}

#If Germany is too weak to declare a war we will do it
soviet_assault_on_germany_1942_1943 = {
	enable = {
		is_historical_focus_on = yes
		tag = SOV
		date > 1937.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		GER = { is_subject = no }
		NOT = { is_in_faction_with = GER }
		AND = {
			date > 1942.1.1
			date < 1943.12.12
			NOT = { GER = { controls_state = 16 } }				
		}
	}
	abort = {
		date > 1944.1.1
		GER = { is_subject = yes }
		SOV = { is_in_faction_with = GER }
	}

	ai_strategy = {
		type = declare_war
		id = "GER"
		value = 20000 
	}
}

FRA_ITA_will_probably_join_GER = {
	# if GER is going to war with us, consider ITA as a threat as well

	allowed = {
		original_tag = FRA
	}

	enable = {
		ITA = {
			has_government = fascism
			NOT = { 
				has_war_with = FRA
			}
		}
		GER = {
			has_government = fascism
			has_war_with = FRA
		}
		date > 1937.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}
	
	abort_when_not_enabled = yes
	
	ai_strategy = {
		type = prepare_for_war
		id = ITA
		value = 200
	}
}

soviet_union_wont_start_ww3_on_historical_focus = {
	enable = {
		is_historical_focus_on = yes
		tag = SOV
		date > 1941.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = declare_war
		id = "ENG"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "FRA"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "USA"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "PER"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "IRQ"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "AFG"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "GRE"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "TUR"
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "POL"
		value = -20000 
	}
}

block_attack_on_poland_on_historical = {
	enable = {
		is_historical_focus_on = yes
		tag = GER
		date > 1937.1.1
		date < 1939.8.30
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}
	abort = {
		date > 1939.8.31
	}

	ai_strategy = {
		type = declare_war
		id = "POL"			
		value = -20000 
	}
}

block_attack_on_usa_on_historical = {
	enable = {
		is_historical_focus_on = yes
		tag = JAP
		date > 1937.1.1
		date < 1941.12.5
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}
	abort = {
		date > 1941.12.6
	}

	ai_strategy = {
		type = declare_war
		id = "PHI"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "USA"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "ENG"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "HOL"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "FRA"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "AST"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "NZL"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "INS"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "MAL"			
		value = -20000 
	}
}

block_china_attack_on_indochina_on_historical = {
	enable = {
		is_historical_focus_on = yes
		tag = PRC
		date > 1937.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = declare_war
		id = "PHI"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "VIN"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "CAM"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "LAO"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "SIA"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "BRM"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "RAJ"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "INS"			
		value = -20000 
	}
	ai_strategy = {
		type = declare_war
		id = "MAL"			
		value = -20000 
	}
}

siam_should_join_japan_not_germany = {
	enable = {
		tag = SIA
		date > 1937.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
		country_exists = GER
	}
	abort = {
		is_in_faction_with = GER
	}
	ai_strategy = {
		type = alliance
		id = "GER"			
		value = -200
	}	
}

ENG_IRQ_will_probably_join_GER = {
	# if GER is going to war with us, consider IRQ as a threat as well

	allowed = {
		original_tag = ENG
	}

	enable = {
		is_historical_focus_on = yes
		has_war_with = GER
		date > 1937.1.1
		date < 1942.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}
	
	abort_when_not_enabled = yes
	
	ai_strategy = {
		type = prepare_for_war
		id = IRQ
		value = 200
	}
}

ENG_ITA_will_probably_join_GER = {
	# if GER is going to war with us, consider ITA as a threat as well

	allowed = {
		original_tag = ENG
	}

	enable = {
		is_historical_focus_on = yes
		has_war_with = GER
		date > 1937.1.1
		date < 1942.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}
	
	abort_when_not_enabled = yes
	
	ai_strategy = {
		type = prepare_for_war
		id = ITA
		value = 200
	}
}

hiep_early_invasion_of_china = {

	allowed = {
		original_tag = JAP
	}

	enable = {
		is_historical_focus_on = yes
		has_war_with = CHI
		date > 1937.1.1
		date < 1941.1.1
		NOT = { has_global_flag = disable_AI_tweaks_hiep }
	}

	abort_when_not_enabled = yes

	ai_strategy = {
		type = invade
		id = "CHI"			
		value = 500
	}

	ai_strategy = {
		type = invade
		id = "GXC"			
		value = 500
	}
	
}