#scripted trigger for Hungary

is_available_fighter_HUN = {
	OR = {
		AND = {
			has_tech = fighter1
			ROOT = { 
				NOT = { has_tech = fighter1}
			}
		}
		AND = {
			has_tech = fighter2
			ROOT = { 
				NOT = { has_tech = fighter2}
			}
		}
		AND = {
			has_tech = fighter3
			ROOT = { 
				NOT = { has_tech = fighter3}
			}
		}
		AND = {
			has_tech = basic_small_airframe
			ROOT = { 
				NOT = { has_tech = basic_small_airframe}
			}
		}
		AND = {
			has_tech = improved_small_airframe
			ROOT = { 
				NOT = { has_tech = improved_small_airframe}
			}
		}
		AND = {
			has_tech = advanced_small_airframe
			ROOT = { 
				NOT = { has_tech = advanced_small_airframe}
			}
		}
	}
	NOT = {
		has_war_with = ROOT
	}
}

is_available_heavy_fighter_HUN = {
	OR = {
		AND = {
			has_tech = heavy_fighter1
			ROOT = { 
				NOT = { has_tech = heavy_fighter1}
			}
		}
		AND = {
			has_tech = heavy_fighter2
			ROOT = { 
				NOT = { has_tech = heavy_fighter2}
			}
		}
		AND = {
			has_tech = heavy_fighter3
			ROOT = { 
				NOT = { has_tech = heavy_fighter3}
			}
		}
		AND = {
			has_tech = basic_medium_airframe
			ROOT = { 
				NOT = { has_tech = basic_medium_airframe}
			}
		}
		AND = {
			has_tech = improved_medium_airframe
			ROOT = { 
				NOT = { has_tech = improved_medium_airframe}
			}
		}
		AND = {
			has_tech = advanced_medium_airframe
			ROOT = { 
				NOT = { has_tech = advanced_medium_airframe}
			}
		}
	}
	NOT = {
		has_war_with = ROOT
	}
}

is_available_cas_HUN = {
	OR = {
		AND = {
			has_tech = CAS1
			ROOT = { 
				NOT = { has_tech = CAS1}
			}
		}
		AND = {
			has_tech = CAS2
			ROOT = { 
				NOT = { has_tech = CAS2}
			}
		}
		AND = {
			has_tech = CAS3
			ROOT = { 
				NOT = { has_tech = CAS3}
			}
		}
		AND = {
			has_tech = basic_small_airframe
			ROOT = { 
				NOT = { has_tech = basic_small_airframe}
			}
		}
		AND = {
			has_tech = improved_small_airframe
			ROOT = { 
				NOT = { has_tech = improved_small_airframe}
			}
		}
		AND = {
			has_tech = advanced_small_airframe
			ROOT = { 
				NOT = { has_tech = advanced_small_airframe}
			}
		}
	}
	NOT = {
		has_war_with = ROOT
	}
}

is_available_tac_HUN = {
	OR = {
		AND = {
			has_tech = tactical_bomber1
			ROOT = { 
				NOT = { has_tech = tactical_bomber1}
			}
		}
		AND = {
			has_tech = tactical_bomber2
			ROOT = { 
				NOT = { has_tech = tactical_bomber2}
			}
		}
		AND = {
			has_tech = tactical_bomber3
			ROOT = { 
				NOT = { has_tech = tactical_bomber3}
			}
		}
		AND = {
			has_tech = basic_medium_airframe
			ROOT = { 
				NOT = { has_tech = basic_medium_airframe}
			}
		}
		AND = {
			has_tech = improved_medium_airframe
			ROOT = { 
				NOT = { has_tech = improved_medium_airframe}
			}
		}
		AND = {
			has_tech = advanced_medium_airframe
			ROOT = { 
				NOT = { has_tech = advanced_medium_airframe}
			}
		}
	}
	NOT = {
		has_war_with = ROOT
	}
}

### HABSBURGS ###

# Nations that are eligible to have and be interacted with through the joint Habsburg focus tree
HABSBURG_is_a_habsburg_viable_nation = {
	OR = {
		original_tag = HUN
		AND = {
			original_tag = AUS
			OR = {
				has_completed_focus = AUS_demand_hungarian_submission
				has_completed_focus = AUS_the_danubian_federation
				is_subject_of = HUN
				AND = {
					is_in_faction_with = HUN
					HUN = { 
						is_faction_leader = yes
						has_completed_focus = wuw_HUN_a_danubian_federation
					}	
				}
			}
		}
		AND = {
			original_tag = UKR
			has_country_flag = UKR_constitution_monarchy
		}
		original_tag = CZE
		original_tag = SLO
		original_tag = TRA
		original_tag = CRO
		original_tag = LBV
		original_tag = SIL
		original_tag = MNT
		original_tag = BOS
		original_tag = SLV
		original_tag = HRZ
		original_tag = ALB
	}
}
HABSBURG_joint_trigger = {
	HABSBURG_is_a_habsburg_viable_nation = yes
	OR = {
		tag = global.AH_originator_country
		is_in_faction_with = global.AH_originator_country
		is_subject_of = global.AH_originator_country
	}
}

### NEW HUNGARIAN TRIGGERS ###

# Hungary having no trianon treaty spirit of any kind
wuw_HUN_does_not_have_trianon = {
	custom_trigger_tooltip = {
	    tooltip = wuw_HUN_does_not_have_trianon_tt		
	    NOT = {
	    	OR = {
	    		has_idea = HUN_treaty_of_triannon
	    		has_idea = HUN_treaty_of_triannon_aat
	    		has_idea = HUN_treaty_of_triannon_wuw
	    		has_idea = HUN_treaty_of_triannon_aat_wuw
	    		has_idea = HUN_treaty_of_triannon_2
	    		has_idea = HUN_treaty_of_triannon_3
	    		has_idea = HUN_treaty_of_triannon_wuw_no_army_exp_debuff
	    		has_idea = HUN_treaty_of_triannon_aat_wuw_no_army_exp_debuff
	    		has_idea = HUN_treaty_of_triannon_wuw_no_air_debuff
	    		has_idea = HUN_treaty_of_triannon_aat_wuw_no_air_debuff
	    		has_idea = HUN_treaty_of_triannon_wuw_no_air_or_army_debuff
	    		has_idea = HUN_treaty_of_triannon_aat_wuw_no_air_or_army_debuff
	    	}
	    }
	}
}
