PHI_USA_alignment_wins_trigger = {
	has_global_flag = USA_civil_war_over_flag
	check_variable = { PHI.PHI_USA_alignment_var > PHI.PHI_IND_alignment_var }
	check_variable = { PHI.PHI_USA_alignment_var > PHI.PHI_CPS_alignment_var }
	check_variable = { PHI.PHI_USA_alignment_var > PHI.PHI_GEA_alignment_var }
}

PHI_GEA_alignment_wins_trigger = {
	check_variable = { PHI.PHI_GEA_alignment_var > PHI.PHI_IND_alignment_var }
	check_variable = { PHI.PHI_GEA_alignment_var > PHI.PHI_CPS_alignment_var }
	if = {
		limit = { has_global_flag = USA_civil_war_over_flag }
		check_variable = { PHI.PHI_GEA_alignment_var > PHI.PHI_USA_alignment_var }
	}
}

PHI_CPS_alignment_wins_trigger = {
	check_variable = { PHI.PHI_CPS_alignment_var > PHI.PHI_IND_alignment_var }
	check_variable = { PHI.PHI_CPS_alignment_var > PHI.PHI_GEA_alignment_var }
	if = {
		limit = { has_global_flag = USA_civil_war_over_flag }
		check_variable = { PHI.PHI_CPS_alignment_var > PHI.PHI_USA_alignment_var }
	}
}

PHI_pacfic_war_is_over_trigger = {
	OR = {
		AND = {
			custom_override_tooltip = {
				tooltip = PHI_ally_controls_singapore_tt
				is_ally_with = var:336.controller #Singapore's owner
			}
			custom_override_tooltip = {
				tooltip = PHI_ally_controls_taiwan_tt
				is_ally_with = var:524.controller #Taiwan's owner
			}
		#	custom_override_tooltip = {
		#		tooltip = PHI_ally_controls_canberra_tt
		#		is_ally_with = var:985.controller #Canberra
		#	}
			custom_override_tooltip = {
				tooltip = PHI_ally_controls_hawaii_tt
				is_ally_with = var:629.controller #Hawaii
			}
		}
		AND = {
			#Congrats you survived the Pacific War without getting invaded
			date > 1944.01.01
			has_war = no
		}
	}
	is_subject = no
	has_capitulated = no
}

PHI_ai_should_anger_elitists_trigger = {
	date < 1939.09.16
	OR = {
		has_country_flag = PHI_quezon_chooses_progressive_ai_plan_flag
		AND = {
			has_country_flag = PHI_quezon_chooses_moderate_ai_plan_flag
			#if you're angering the populists too much, need to go back to middle
			is_power_balance_in_range = {
				id = PHI_power_balance
				range > PHI_bop_populist_tensions
			}
		}
	}
}

PHI_ai_should_anger_populists_trigger = {
	date < 1939.09.16
	OR = {
		has_country_flag = PHI_quezon_chooses_conservative_ai_plan_flag
		AND = {
			has_country_flag = PHI_quezon_chooses_moderate_ai_plan_flag
			#If you're angering the elites too much, need to go back to middle
			is_power_balance_in_range = {
				id = PHI_power_balance
				range < PHI_bop_elitist_tensions
			}
		}
	}
}
