Ejemplo n.º 1
0
        static void FightForMelee(Zombo fightFor)
        {
            var killTargets = PointHelper.ZombosAroundPoint(fightFor.location).Where(x => x.alliance != fightFor.alliance);

            if (killTargets.Any())
            {
                EntityControl.Kill(ListHelper.RandomElementInEnumerable(killTargets));
            }
        }
Ejemplo n.º 2
0
        public static void RandomWalkZombo(Zombo toWalk)
        {
            var options = PointHelper.EmptyPointsAroundPoint(toWalk.location);

            if (options.Any())
            {
                var moveTo = ListHelper.RandomElementInEnumerable(options);
                EntityControl.MoveZomboTo(toWalk, moveTo);
            }
        }
Ejemplo n.º 3
0
 static void FightForRanged(Zombo fightFor)
 {
     for (int i = 0; i < 1; i++)
     {
         var killTargets = PointHelper.ZombosAroundPoint(fightFor.location, 3).Where(x => x.alliance != fightFor.alliance);
         if (killTargets.Any())
         {
             EntityControl.Kill(ListHelper.RandomElementInEnumerable(killTargets));
             ZomboFoodManager.IncrementFoodFor(fightFor, 1);
         }
     }
 }
Ejemplo n.º 4
0
 static void DuplicateCheck(Zombo check)
 {
     if (check.FoodCount >= FoodToCopy[check.zomboType])
     {
         var possiblePoints = PointHelper.EmptyPointsAroundPoint(check.location);
         if (possiblePoints.Count() == 8)
         {
             EntityControl.DuplicateZomboAt(check, ListHelper.RandomElementInEnumerable(possiblePoints));
             check.FoodCount -= FoodToCopy[check.zomboType];
         }
     }
 }
Ejemplo n.º 5
0
 public static List <Point> PointsAroundPoint(Point point, int rad) => PointHelper.PointsInSquareAround(point, rad);