had a glass of wine trying to write an ai with pseudo code
Starting with a check on the hull since it is the most vital component
if (hull = down) then
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////THIS IS WHEN NOT TO >>NOT TO<< REPAIR THE BROKEN HULL/////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//This case is when the AI would not run to try and save a broken hull:
// If the AI can deal deadly damage with a gun, due to enemy armor down, gun type and distance to gun - go for the killing blow
if (can_ai_deal_deadly_damage_with_gun = true) and (is_enemy_armor_down = true ) and (is_ai_closest_engineer_to_gun = true) then
// Tell the AI to shoot the gun until the target gets armor back up, dies or fly our of arc obviously using the fastest path avaliable to get to the gun
-> AI.SHOOT.GUN until (TARGET.ARMOR = UP) or (TARGET.ARC <> ) or (TARGET = DEAD)
else
-> AI.REPAIR.HULL until (HULL.BROKEN = FALSE)
are there any other times an engineer should not repair a broken hull ?