@Override public boolean shouldStay(MovePath mp) { return mp.getFinalVelocity() >= 0; } }
|| (c.getX() == (game.getBoard().getWidth() - 1)) || (c.getY() == (game.getBoard().getHeight() - 1))) && (mp.getFinalVelocity() > 0)) { result.add(mp.clone().addStep(MoveStepType.RETURN));
int currentVelocity = startingPath.getFinalVelocity(); if(startingPath.getFinalVelocity() <= upperBound && startingPath.getFinalVelocity() >= lowerBound) { paths.add(startingPath.clone());
/** * Generates a list of possible step combinations that should be done at the beginning of a path * This implementation generates exactly one path, which is either no moves or one hex forward when velocity > 0 * @return "List" of all possible "starting" paths */ @Override protected List<MovePath> generateStartingPaths(MovePath startingEdge) { List<MovePath> startingPaths = new ArrayList<>(); // calculate max and min safe velocity // in space, we can go as slow or as fast as we want. IAero aero = (IAero) startingEdge.getEntity(); int maxThrust = AeroPathUtil.calculateMaxSafeThrust(aero); int maxVelocity = aero.getCurrentVelocity() + maxThrust; int minVelocity = Math.max(0, aero.getCurrentVelocity() - maxThrust); startingPaths.addAll(AeroPathUtil.generateValidAccelerations(startingEdge, minVelocity, maxVelocity)); // all non-zero-velocity paths must move at least one hex forward for(MovePath path : startingPaths) { if(path.getFinalVelocity() > 0) { path.addStep(MoveStepType.FORWARDS); } } return startingPaths; }
boolean isSpheroid = UnitType.isSpheroidDropship(movePath.getEntity()); if ((movePath.getFinalVelocity() == 0) && isAirborne && !isSpheroid) { return true;
choices.add(other); } else if (cmd.getFinalVelocity() == oa.getCurrentVelocity()) { choices.add(other);
choices.add(other); } else if (cmd.getFinalVelocity() == oa.getCurrentVelocity()) { choices.add(other);
default PilotingRollData checkStall(MovePath md) { PilotingRollData roll = ((Entity) this).getBasePilotingRoll(md.getLastStepMovementType()); // if the entity has already moved, its movement got interrupted (probably by a hidden unit, not much else can interrupt an aero unit) // in which case, the movement is complete. We just need to allow the user to hit 'done'. if(((Entity) this).delta_distance > 0) { roll.addModifier(TargetRoll.CHECK_FALSE, "Check false: aero has already moved"); // an airborne, aerodyne aero is considered to "stall" if it's not moving anywhere, // hovering, landing, or going off board } else if ((md.getFinalVelocity() == 0) && !md.contains(MoveStepType.HOVER) && isAirborne() && !isSpheroid() && !((Entity) this).getGame().getBoard().inSpace() && !md.contains(MoveStepType.LAND) && !md.contains(MoveStepType.VLAND) && !md.contains(MoveStepType.RETURN) && !md.contains(MoveStepType.OFF) && !md.contains(MoveStepType.FLEE)) { roll.append(new PilotingRollData(((Entity) this).getId(), 0, "stalled out")); } else { roll.addModifier(TargetRoll.CHECK_FALSE, "Check false: entity not stalled out"); } return roll; }
&& !md.contains(MoveStepType.VLAND)) { rollTarget = a.checkVelocityDouble(md.getFinalVelocity(), overallMoveType); checkNag(rollTarget, nagReport, psrList);
} else if (cmd.getFinalVelocity() == oa.getCurrentVelocity()) { setJoinEnabled(true); isGood = true;
} else if (cmd.getFinalVelocity() == oa .getCurrentVelocity()) { if (ce instanceof Dropship) {
&& !md.contains(MoveStepType.VLAND)) { rollTarget = a.checkVelocityDouble(md.getFinalVelocity(), overallMoveType); checkNag(rollTarget, nagReport, psrList);