#scripted trigger for Austria

AUS_anschluss_risk_low = { 
	custom_trigger_tooltip = {
		tooltip = AUS_anschluss_risk_low_tt 
		
		GER = {
			fighting_army_strength_ratio = {
				tag = AUS
				ratio < global.medium_anschluss_risk
			}
	
			has_completed_focus = GER_remilitarize_the_rhineland
			NOT = {
				has_completed_focus = GER_heed_von_neuraths_concerns
				has_completed_focus = GER_reorganize_the_wehrmacht
			}
		}	
	}
}

AUS_anschluss_risk_medium = { 
	
	custom_trigger_tooltip = {
		tooltip = AUS_anschluss_risk_medium_tt 
		
		GER = {
			OR = {
				AND = {
					fighting_army_strength_ratio = {
						tag = AUS
						ratio > global.medium_anschluss_risk
					}
					fighting_army_strength_ratio = {
						tag = AUS
						ratio < global.high_anschluss_risk
					}
					NOT = {
						has_completed_focus = GER_heed_von_neuraths_concerns
						has_completed_focus = GER_reorganize_the_wehrmacht
					}	
				}
				AND = {
					OR = {
						has_completed_focus = GER_heed_von_neuraths_concerns
						has_completed_focus = GER_reorganize_the_wehrmacht
					}
					
					fighting_army_strength_ratio = {
						tag = AUS
						ratio < global.medium_anschluss_risk
					}
				}
			}
			
			
			has_completed_focus = GER_remilitarize_the_rhineland
		}
	}
}

AUS_anschluss_risk_high = { 
	custom_trigger_tooltip = {
		tooltip = AUS_anschluss_risk_high_tt 
		
		GER = {
			OR = {
				AND = {
					fighting_army_strength_ratio = {
						tag = AUS
						ratio < global.deployed_manpower_ratio_needed_for_anschluss 
					}
					fighting_army_strength_ratio = {
						tag = AUS
						ratio > global.high_anschluss_risk
					}
					NOT = {
						has_completed_focus = GER_heed_von_neuraths_concerns
						has_completed_focus = GER_reorganize_the_wehrmacht
					}
				}

				AND = {
					OR = {
						has_completed_focus = GER_heed_von_neuraths_concerns
						has_completed_focus = GER_reorganize_the_wehrmacht
					}
					fighting_army_strength_ratio = {
						tag = AUS
						ratio > global.medium_anschluss_risk
					}

					fighting_army_strength_ratio = {
						tag = AUS
						ratio < global.high_anschluss_risk
					}
				}
			}
			
			
			
			has_completed_focus = GER_remilitarize_the_rhineland
		}
	}	
}

AUS_anschluss_risk_critical = { 

	custom_trigger_tooltip = {
		tooltip = AUS_anschluss_risk_critical_tt 
		GER = {
			OR = {
				AND = {
					OR = {
						has_completed_focus = GER_heed_von_neuraths_concerns
						has_completed_focus = GER_reorganize_the_wehrmacht
					}
					fighting_army_strength_ratio = {
						tag = AUS
						ratio > global.high_anschluss_risk
					}
				}

				fighting_army_strength_ratio = {
					tag = AUS
					ratio > global.deployed_manpower_ratio_needed_for_anschluss 
				}
			}
			
		}
	}
}

AUS_danubian_communism_bypass = {
	custom_trigger_tooltip = {
		tooltip = AUS_danubian_communism_bypass_tt

		AND = {
			
			IF = {
				limit = { HUN = { exists = yes } }

				HUN = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { CZE = { exists = yes } }

				CZE = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { YUG = { exists = yes } }

				YUG = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { ROM = { exists = yes } }

				ROM = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { BUL = { exists = yes } }

				BUL = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { SLO = { exists = yes } }

				SLO = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { TRA = { exists = yes } }

				TRA = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { CRO = { exists = yes } }

				CRO = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { LBV = { exists = yes } }

				LBV = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { SIL = { exists = yes } }

				SIL = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { MNT = { exists = yes } }

				MNT = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { BOS = { exists = yes } }

				BOS = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { SLV = { exists = yes } }

				SLV = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { FRA = { exists = yes } }

				FRA = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { TUR = { exists = yes } }

				TUR = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { GRE = { exists = yes } }

				GRE = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { HOL = { exists = yes } }

				HOL = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { LUX = { exists = yes } }

				LUX = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { BEL = { exists = yes } }

				BEL = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}

			IF = {
				limit = { MAC = { exists = yes } }

				MAC = { 
					OR = {
					
						has_government = communism
							
						has_country_flag = AUS_this_country_refused_communism_flag
					}
				}
			}
		}
	}
}

AUS_is_historical_ai = {
	OR = {
		AND = {
			is_historical_focus_on = yes
			has_game_rule = {
				rule = AUS_ai_behavior
				option = DEFAULT
			}
		}
		has_country_flag = AUS_AI_RANDOM_HISTORICAL
		has_game_rule = {
			rule = AUS_ai_behavior
			option = HISTORICAL
		}
	}
}

