//-- Hangar tower annoucer
criterion "IsAnnounceConcept" "concept" "Announce" "required"

// Does the capship have these
criterion "HasShields" "capship_hasshields" "1" required
criterion "HasEngineering" "capship_hasengineering" "1" required
criterion "HasWeapons" "capship_hasweapons" "1" required

// Are they up?
criterion "ShieldsExternalUp" "capship_shields" "1" required
criterion "EngineeringUp" "capship_engineering" "1" required
criterion "WeaponsUp" "capship_weapons" "1" required

// Are they down?
criterion "ShieldsDown" "capship_shields" "0" required
criterion "EngineeringDown" "capship_engineering" "0" required
criterion "WeaponsDown" "capship_weapons" "0" required

criterion "CapshipHealthy" "capship_healthfrac" ">=0.7"
criterion "CapshipMinor" "capship_healthfrac" ">0.4,<=0.7"
criterion "CapshipGrave" "capship_healthfrac" ">0.15,<=0.4"
criterion "CapshipCritical" "capship_healthfrac" "<=0.15"

response "EngDown"
{
	speak "FlightController.ExternalDestroyedFriendly" odds 70
}

rule AnnounceEngDown
{
	criteria IsAnnounceConcept HasEngineering EngineeringDown
	response EngDown
}

response "ShieldDown"
{
	speak "FlightController.ShieldsDown" odds 80
}

rule AnnounceShieldDown
{
	criteria IsAnnounceConcept HasShields ShieldsDown
	response ShieldDown
}

rule AnnounceWeaponsDown
{
	criteria IsAnnounceConcept HasWeapons WeaponsDown
	response EngDown
}