#Hawkishness
Militarist_Hawkishness_Max = {
	check_variable = { GER_Militarist_Hawkishness = 100 }
}
Militarist_Hawkishness_Very_High = {
	Militarist_Hawkishness_Max = no
	check_variable = { GER_Militarist_Hawkishness > 80 }
}
Militarist_Hawkishness_High = {
	Militarist_Hawkishness_Very_High = no
	check_variable = { GER_Militarist_Hawkishness > 60 }
}
Militarist_Hawkishness_Medium = {
	Militarist_Hawkishness_High = no
	check_variable = { GER_Militarist_Hawkishness > 40 }
}
Militarist_Hawkishness_Low = {
	Militarist_Hawkishness_Medium = no
	check_variable = { GER_Militarist_Hawkishness > 20 }
}
Militarist_Hawkishness_Very_Low = {
	Militarist_Hawkishness_Low = no
	check_variable = { GER_Militarist_Hawkishness > 0 }
}
#Power

Militarist_Power_Max = {
	check_variable = { GER_Militarist_Power = 100 }
}
Militarist_Power_Very_High = {
	Militarist_Power_Max = no
	check_variable = { GER_Militarist_Power > 80 }
}
Militarist_Power_High = {
	Militarist_Power_Very_High = no
	check_variable = { GER_Militarist_Power > 60 }
}
Militarist_Power_Medium = {
	Militarist_Power_High = no
	check_variable = { GER_Militarist_Power > 40 }
}
Militarist_Power_Low = {
	Militarist_Power_Medium = no
	check_variable = { GER_Militarist_Power > 20 }
}
Militarist_Power_Very_Low = {
	Militarist_Power_Low = no
	check_variable = { GER_Militarist_Power > 0 }
}
#Loyalty
Militarist_Loyalty_Max = {
	check_variable = { GER_Militarist_Loyalty = 100 }
}
Militarist_Loyalty_Very_High = {
	Militarist_Loyalty_Max = no
	check_variable = { GER_Militarist_Loyalty > 80 }
}
Militarist_Loyalty_High = {
	Militarist_Loyalty_Very_High = no
	check_variable = { GER_Militarist_Loyalty > 60 }
}
Militarist_Loyalty_Medium = {
	Militarist_Loyalty_High = no
	check_variable = { GER_Militarist_Loyalty > 40 }
}
Militarist_Loyalty_Low = {
	Militarist_Loyalty_Medium = no
	check_variable = { GER_Militarist_Loyalty > 20 }
}
Militarist_Loyalty_Very_Low = {
	Militarist_Loyalty_Low = no
	check_variable = { GER_Militarist_Loyalty > 0 }
}

militarists_are_pleased = {
	if = {
		limit = {
			NOT = {
				has_global_flag = piss_off
			}
		}
		militarists_are_pleased_core = yes
	}
}

militarists_are_pleased_core = {
	custom_trigger_tooltip = {
		tooltip = militarists_are_pleased_tt
		set_temp_variable = { difference = GER_Militarist_Power }
		divide_temp_variable = { difference = 100 }
		multiply_temp_variable = { difference = GER_Militarist_Hawkishness }
		
		set_temp_variable_to_random = { # round_temp_variable doesn't work
			var = difference_new
			min = difference
			max = difference

			integer = yes
		}
		
		add_to_temp_variable = { difference_new = required_difference }

		clamp_temp_variable = {
			var = difference_new
			min = 0
			max = 100
		}
		
		set_temp_variable = { required_loyalty = difference_new }
		
		OR = {
			check_variable = { difference_new < GER_Militarist_Loyalty }
			check_variable = { difference_new = GER_Militarist_Loyalty }
		}
	}
}