public static Integer maxJumpMP(Mech mech) { if (mech.isSuperHeavy()) { return 0; } if (mech.getJumpType() == Mech.JUMP_BOOSTER) { return null; } else if (!mech.hasEngine() || (!mech.getEngine().isFusion() && (mech.getEngine().getEngineType() != Engine.FISSION))) { return 0; } else if ((mech.getJumpType() == Mech.JUMP_IMPROVED) || (mech.getJumpType() == Mech.JUMP_PROTOTYPE_IMPROVED)) { return (int)Math.ceil(mech.getOriginalWalkMP() * 1.5); } else { return mech.getOriginalWalkMP(); } }
public boolean correctMovement(StringBuffer buff) { // Mechanical Jump Boosts can be greater then Running as long as // the unit can handle the weight. if ((mech.getJumpMP(false) > mech.getOriginalRunMPwithoutMASC()) && !mech.hasJumpBoosters() && !mech.hasWorkingMisc(MiscType.F_PARTIAL_WING)) { buff.append("Jump MP exceeds run MP\n"); return false; } if ((mech.getJumpMP(false) > mech.getOriginalWalkMP()) && (((mech.getJumpType() != Mech.JUMP_IMPROVED) && (mech.getJumpType() != Mech.JUMP_PROTOTYPE_IMPROVED)) && !mech.hasWorkingMisc(MiscType.F_PARTIAL_WING) && !mech .hasJumpBoosters())) { buff.append("Jump MP exceeds walk MP without IJJs\n"); return false; } if ((mech instanceof LandAirMech) && mech.getJumpMP(false) < 3) { buff.append("LAMs must have at least 3 jumping MP.\n"); return false; } return true; }
private String formatJJDesc() { switch (mech.getJumpType()) { case Mech.JUMP_STANDARD: return Messages.getString("TROView.jjStandard"); case Mech.JUMP_IMPROVED: return Messages.getString("TROView.jjImproved"); case Mech.JUMP_PROTOTYPE: return Messages.getString("TROView.jjPrototype"); case Mech.JUMP_PROTOTYPE_IMPROVED: return Messages.getString("TROView.jjImpPrototype"); case Mech.JUMP_BOOSTER: return Messages.getString("TROView.jjBooster"); default: return Messages.getString("TROView.jjNone"); } }
ammoPenalty += toSubtract; if (getJumpType() == JUMP_PROTOTYPE_IMPROVED) { ammoPenalty += this.getJumpMP(false, true);
@Override public int getJumpHeat(int movedMP) { int extra = bDamagedCoolantSystem?1:0; // don't count movement granted by Partial Wing for (Mounted mount : getMisc()) { if (mount.getType().hasFlag(MiscType.F_PARTIAL_WING)) { movedMP -= getPartialWingJumpBonus(mount); break; } } switch (getJumpType()) { case JUMP_IMPROVED: return extra + (hasEngine() ? getEngine().getJumpHeat((movedMP / 2) + (movedMP % 2)) : 0); case JUMP_PROTOTYPE_IMPROVED: // min 6 heat, otherwise 2xJumpMp, XTRO:Succession Wars pg17 return extra + (hasEngine() ? Math.max(6, getEngine().getJumpHeat(movedMP * 2)) : 0); case JUMP_BOOSTER: case JUMP_DISPOSABLE: return extra; case JUMP_NONE: return 0; default: return extra + (hasEngine() ? getEngine().getJumpHeat(movedMP) : 0); } }
if (misc.hasFlag(MiscType.F_UMU) && (mech.getJumpType() != Mech.JUMP_NONE) && (mech.getJumpType() != Mech.JUMP_BOOSTER)) { illegal = true; buff.append("UMUs cannot be mounted with jump jets " illegal = true; if ((mech.getJumpType() != Mech.JUMP_STANDARD) && (mech.getJumpType() != Mech.JUMP_NONE) && (mech.getJumpType() != Mech.JUMP_PROTOTYPE) && (mech.getJumpType() != Mech.JUMP_BOOSTER)) { buff.append("industrial mechs can only mount standard jump jets or mechanical jump boosters\n"); illegal = true;
/** * Returns this mech's jumping MP, modified for missing & underwater jets * and gravity. */ @Override public int getJumpMPWithTerrain() { if ((getPosition() == null) || (game.getBoard().getHex(getPosition()) == null) || (getJumpType() == JUMP_BOOSTER)) { return getJumpMP(); } int waterLevel = 0; if (!isOffBoard()) { waterLevel = game.getBoard().getHex(getPosition()) .terrainLevel(Terrains.WATER); } if ((waterLevel <= 0) || (getElevation() >= 0)) { return getJumpMP(); } else if (waterLevel > 1) { return 0; } else { // waterLevel == 1 return applyGravityEffectsOnMP(torsoJumpJets()); } }
if (getJumpType() == Mech.JUMP_BOOSTER) { jumpBaseCost = 150; costs[i++] = Math.pow(getOriginalJumpMP(), 2.0) * weight if (getJumpType() == Mech.JUMP_BOOSTER) { jumpBaseCost = 150; } else if (getJumpType() == Mech.JUMP_IMPROVED) { jumpBaseCost = 500;