/** * Check to see if this step's position is a valid end of a path. * * @return <code>true</code> if this step's position is a legal end of a * path. If the step is not legal for an end of a path, then * <code>false</code> is returned. */ public boolean isLegalEndPos() { // Can't be a stacking violation. boolean legal = true; if (isStackingViolation) { legal = false; } else if (terrainInvalid) { // Can't be into invalid terrain. legal = false; } else if (isJumping() && (distance == 0)) { // Can't jump zero hexes. legal = false; } else if (hasEverUnloaded && (type != MoveStepType.UNLOAD) && (type != MoveStepType.LAUNCH) && (type != MoveStepType.DROP) && (type != MoveStepType.UNDOCK) && (type != MoveStepType.DISCONNECT) && (getAltitude() == 0)) { // Can't be after unloading BA/inf legal = false; } return legal; }
if (getGame().getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_PSR_JUMP_HEAVY_WOODS)) { if (!isEnd && isJumping() && (pos.containsTerrain(Terrains.WOODS, 2) || pos.containsTerrain(Terrains.WOODS, 3))) {
&& !(isJumping() && (entity.getJumpType() == Mech.JUMP_BOOSTER)) && (((destAlt != srcAlt) && !game.getOptions().booleanOption( OptionsConstants.ADVGRNDMOV_TACOPS_WALK_BACKWARDS)) || (game.getOptions() && (destAlt != srcAlt) && !(entity instanceof VTOL) && !(isJumping() && (entity.getJumpType() == Mech.JUMP_BOOSTER))) { if (game.getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_TACOPS_WALK_BACKWARDS) && (Math.abs(destAlt - srcAlt) > 1)) { if (!isJumping() && (type != MoveStepType.CHARGE) && (type != MoveStepType.DFA)) { if (isJumping()) { terrainInvalid = true; } else { && (isJumping() || (entity.getMovementMode() == EntityMovementMode.VTOL)) && (srcEl < srcHex.terrainLevel(Terrains.BLDG_ELEV))) { if (isJumping()) { terrainInvalid = true; } else {
if (moveStep.isJumping()) { return false;
&& getEntity().getPosition().equals(prev) && (getEntity().getPosition().distance(getPosition()) == 1) && (!isJumping())) { mp = 0; return; !game.getOptions().booleanOption(OptionsConstants.ADVGRNDMOV_NO_NIGHT_MOVE_PEN); boolean carefulExempt = (moveMode == EntityMovementMode.VTOL) || isJumping(); if (isJumping()) { return;
} else if (isJumping()) { IHex hex = game.getBoard().getHex(getPosition()); int maxElevation = (entity.getJumpMP() + entity.getElevation() + game
prev.setFromEntity(entity, game); prev.isCarefulPath = isCareful(); prev.isJumpingPath = isJumping(); setFirstStep(prev.mpUsed == 0); // Bug 1519330 - its not a first step when continuing after a fall } else if (prev.isFirstStep() // Some step types don't remove first step status setMp((isJumping() || isHasJustStood() || (isInfantry && !isFieldArtillery)) ? 0 : 1); setNStraight(0); & (entity instanceof QuadMech)) { setMp(getMp()); } else if (isJumping() && (entity.getJumpType() == Mech.JUMP_BOOSTER)) { setMp(1); & (entity instanceof QuadMech)) { setMp(getMp()); } else if (isJumping() && (entity.getJumpType() == Mech.JUMP_BOOSTER)) { setMp(1); setMp(isJumping() ? 0 : 2); } else { setMp(isJumping() ? 0 : 1); } else { if (entity instanceof Protomech) { setMp(isJumping() ? 0 : 2);
if (isJumping() && (getMpUsed() <= entity.getJumpMPWithTerrain()) && !isProne() && ((stepType == MoveStepType.TURN_LEFT) || (stepType == MoveStepType.TURN_RIGHT)) && isFirstStep()) { if (isJumping()) { movementType = EntityMovementType.MOVE_JUMP; } else { if (!isJumping() && !entity.isStuck() && (tmpWalkMP > 0) && (getMp() > 0)) { if (isJumping() && (entity.getJumpType() == Mech.JUMP_BOOSTER) && ((stepType == MoveStepType.TURN_LEFT) || (stepType == MoveStepType.TURN_RIGHT))) { || (movementType == EntityMovementType.MOVE_VTOL_RUN || (movementType == EntityMovementType.MOVE_VTOL_SPRINT)) || isJumping())) { movementType = EntityMovementType.MOVE_ILLEGAL;