fieldFire.get(bracket).addAll(Compute.coordsAtRange(c, range)); range++; if (range>100) break; // only to avoid hangs
public static ArrayList<Entity> getMountableUnits(Entity en, Coords pos, int elev, IGame game) { ArrayList<Entity> mountable = new ArrayList<Entity>(); // for the moment only allow small craft/dropship mounting, but // this could be expanded to include other unit types // the rules don't say that the unit must be facing loader // so lets take the ring for (Coords c : coordsAtRange(pos, 1)) { IHex hex = game.getBoard().getHex(c); if (null == hex) { continue; } for (Entity other : game.getEntitiesVector(c)) { // Is the other unit friendly and not the current entity? if ((en.getOwner().equals(other.getOwner()) || (en.getOwner() .getTeam() == other.getOwner().getTeam())) && !en.equals(other) && (other instanceof SmallCraft) && other.canLoad(en) && !other.isAirborne() && (Math.abs((hex.surface() + other.getElevation()) - elev) < 3) && !mountable.contains(other)) { mountable.add(other); } } } return mountable; }
.getLevel() + ce.getElevation(); ArrayList<Coords> ring = Compute.coordsAtRange(pos, 1); if (ce instanceof Dropship) { ring = Compute.coordsAtRange(pos, 2);
server.deliverThunderMinefield(drop, ae.getOwner().getId(), 20, ae.getId()); ArrayList<Coords> hexes = Compute.coordsAtRange(drop, 1); for (Coords c : hexes) { server.deliverThunderMinefield(c,