Tactical AI: Damage tolerance now works
Tactical AI: basic actions when unit under attack
Some code refactoring and optimizations