public static List <Zone> GetAllEnemyZone(Zone from) { Zone[] array = Zone.GetZones(); Dictionary <int, ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); var res = from a in array where CheckCondition(NextType.EnemyZone, a) orderby a.data.incomingSquad ascending, GetDistanceFrom(a.id, allWays) ascending select a; return(res.ToList()); }
public static List <Zone> GetAllNextStation(Zone from, int minPlatinum = 1) { Zone[] array = Zone.GetZones(); Dictionary <int, ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); var res = from a in array where a.data.platinum >= minPlatinum && (a.IsNeutralZone() || a.IsOwnedByEnemy()) orderby GetDistanceFrom(a.id, allWays), a.data.platinum descending select a; return(res.ToList()); }
public static List <Zone> GetAllNextStation(Zone from) { Zone[] array = Zone.GetZones(); Dictionary <int, ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); var res = from a in array where CheckCondition(NextType.StationZone, a) orderby GetDistanceFrom(a.id, allWays), a.data.platinum descending select a; return(res.ToList()); }
public static List <Zone> GetAllUndiscoveredZone(Zone from = null) { Zone[] array = Zone.GetZones(); Dictionary <int, ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); var res = from a in array where a.data.viewed == false orderby GetDistanceFrom(a.id, allWays) // orderby a.data.platinum descending //testing select a; return(res.ToList()); }
//TOADDATHOME //public static List<Zone> GetNext_TEST(Zone from) //{ // Zone[] array = Zone.GetZones(); // Dictionary<int,ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); // var res = from a in array // where a.IsNeutralZone() // orderby GetDistanceFrom(a.id, allWays), a.data.platinum descending // select a; // return res.ToList(); //} public static List <Zone> GetAllNextNeutral(Zone from = null) { Zone[] array = Zone.GetZones(); Dictionary <int, ShortestWayNode> allWays = AllWaysGoToRome.GetMap(from); var res = from a in array where a.IsNeutralZone() orderby GetDistanceFrom(a.id, allWays) ascending, a.data.platinum descending // orderby a.data.platinum descending //testing select a; return(res.ToList()); }
//public FixedMap map; public void SetPlayerOrigineZone(bool isEnemy, Zone zone) { if (isEnemy) { enemyFlagLocalisation = zone; enemyFlagPath = AllWaysGoToRome.GetMap(zone); } else { myFlagLocalisation = zone; myFlagPath = AllWaysGoToRome.GetMap(zone); } if (myFlagLocalisation != null && enemyFlagPath != null) { ShortestWayNode swn = null; enemyFlagPath.TryGetValue(myFlagLocalisation.id, out swn); CostNodeZone nz = swn.GetNextNodeZone(); enemyDistance = nz.cost; } }