Пример #1
0
 private bool CheckSharedTarget(MapUnit from, MapUnit target)
 {
     if (from == null || target == null)
     {
         return(false);
     }
     // order checks by performance
     if (!from.Player.Diplomacy[target.Player.ID].HasFlag(DiplomacyFlags.Enemy))
     {
         return(false);
     }
     if (from.CanSeeUnit(target) < 2)
     {
         return(false);
     }
     return(true);
 }