/** * return the number of heatsinks that fit weight-free into the engine * @return */ public int getWeightFreeEngineHeatSinks() { // Support Vee engines never provide free heat-sinks, TM pg 133 if (hasFlag(SUPPORT_VEE_ENGINE)) { return 0; } if (isFusion()) { return 10; } else if (engineType == FISSION) { return 5; } else if (engineType == FUEL_CELL) { return 1; } else { return 0; } }
public double getFighterFuelCost(Entity e) { Engine en = e.getEngine(); if (en.isFusion()) { return ((Aero) e).getFuelTonnage() * 4 * 15000; } else { return ((Aero) e).getFuelTonnage() * 4 * 1000; } }
@Override public int getFuelUsed(int thrust) { if(!hasEngine()) { return 0; } int overThrust = Math.max(thrust - getWalkMP(), 0); int safeThrust = thrust - overThrust; int used = safeThrust + (2 * overThrust); if (!getEngine().isFusion()) { used = (int) Math.floor(safeThrust * 0.5) + overThrust; } else if (game.getOptions().booleanOption( OptionsConstants.ADVAERORULES_STRATOPS_CONV_FUSION_BONUS)) { used = (int) Math.floor(safeThrust * 0.5) + (2 * overThrust); } return used; }
if (engine.hasFlag(Engine.TANK_ENGINE) && engine.isFusion()) { weight *= 1.5f;
if (engine.hasFlag(Engine.TANK_ENGINE) && engine.isFusion()) { weight *= 1.5f;
if (engine.hasFlag(Engine.TANK_ENGINE) && engine.isFusion()) { weight *= 1.5f;
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(); } }
if (tank.hasEngine() && tank.getEngine().isFusion()) { if (tank.getEngine().getEngineType() == Engine.LIGHT_ENGINE) { engineSlots = 1;
if(tank.hasEngine() && !(tank.getEngine().isFusion() || (tank.getEngine().getEngineType() == Engine.FUEL_CELL) || (tank.getEngine().getEngineType() == Engine.SOLAR)
@Override public double getWeightEngine() { double wt = super.getWeightEngine(); // Conventional fighters with fusion engines require extra shielding. // Per TacOps fission engines require extra shielding as well. if (getEntity().hasETypeFlag(Entity.ETYPE_CONV_FIGHTER) && (null != getEntity().getEngine()) && (getEntity().getEngine().isFusion() || getEntity().getEngine().hasFlag(Engine.FISSION))) { wt = ceil(wt * 1.5, Ceil.HALFTON); } return wt; }
private void updateSelfDestructButton() { final Entity ce = ce(); if (null == ce) { return; } if (!clientgui.getClient().getGame().getOptions() .booleanOption(OptionsConstants.ADVANCED_TACOPS_SELF_DESTRUCT)) { return; } if (ce instanceof Infantry) { return; } setSelfDestructEnabled(ce.hasEngine() && ce.getEngine().isFusion() && !ce.getSelfDestructing() && !ce.getSelfDestructInitiated()); }
/** * Computes and returns the power amplifier weight for this entity, if any. * Returns 0.0 if the entity needs no amplifiers due to engine type or not * carrying any weapons requiring them. * * @return the power amplifier weight in tons. */ public double getPowerAmplifierWeight() { // If we're fusion- or fission-powered, we need no amplifiers to begin // with. if(hasEngine() && (getEngine().isFusion() || (getEngine().getEngineType() == Engine.FISSION))) { return 0.0; } // Otherwise we need to iterate over our weapons, find out which of them // require amplification, and keep a running weight total of those. double total = 0.0; for (Mounted m : getWeaponList()) { WeaponType wt = (WeaponType) m.getType(); if ((wt.hasFlag(WeaponType.F_LASER) && (wt.getAmmoType() == AmmoType.T_NA)) || wt.hasFlag(WeaponType.F_PPC) || wt.hasFlag(WeaponType.F_PLASMA) || wt.hasFlag(WeaponType.F_PLASMA_MFUK) || (wt.hasFlag(WeaponType.F_FLAMER) && (wt.getAmmoType() == AmmoType.T_NA))) { total += wt.getTonnage(this); } } // Finally use that total to compute and return the actual power // amplifier weight. return Math.ceil(total / 5) / 2; }
if (hasFlag(TANK_ENGINE) && (isFusion() || (engineType == FISSION))) { weight *= 1.5;
fuelPerTurn = aero.getWalkMP() * 0.5f; if(aero.hasEngine()) { if(aero.getEngine().isFusion()) { fuelPerTurn += (aero.getRunMP()-aero.getWalkMP()) * 2; } else {
@Override protected void addSystemTechAdvancement(CompositeTechLevel ctl) { super.addSystemTechAdvancement(ctl); // battlemechs with non-fusion engines are experimental if (hasEngine() && !isIndustrial() && !getEngine().isFusion()) { ctl.addComponent(new TechAdvancement().setStaticTechLevel(SimpleTechLevel.EXPERIMENTAL)); } if (getGyroTechAdvancement() != null) { ctl.addComponent(getGyroTechAdvancement()); } if (getCockpitTechAdvancement() != null) { ctl.addComponent(getCockpitTechAdvancement()); } if (hasFullHeadEject()) { ctl.addComponent(getFullHeadEjectAdvancement()); } //FIXME: Clan interface cockpit has higher tech rating //if (getCockpitType() == COCKPIT_INTERFACE && isClan()) { // techAdvancement.setTechRating(Math.max(techAdvancement.getTechRating(), RATING_F)); //} }
if (!isShutDown() && getEngine().isFusion()) { engineCritHeat += 5 * getHitCriticals(CriticalSlot.TYPE_SYSTEM, Mech.SYSTEM_ENGINE, Mech.LOC_CT);
@Override public double getWeightPowerAmp() { if (getEntity().isSupportVehicle() && (getEntity().getWeight() < 5)) { return 0; } if (!engine.isFusion() && (engine.getEngineType() != Engine.FISSION)) { double weight = 0; for (Mounted m : tank.getWeaponList()) { WeaponType wt = (WeaponType) m.getType(); if (wt.hasFlag(WeaponType.F_ENERGY) && !(wt instanceof CLChemicalLaserWeapon) && !(wt instanceof VehicleFlamerWeapon)) { weight += wt.getTonnage(tank); } if ((m.getLinkedBy() != null) && (m.getLinkedBy().getType() instanceof MiscType) && m.getLinkedBy().getType(). hasFlag(MiscType.F_PPC_CAPACITOR)) { weight += ((MiscType)m.getLinkedBy().getType()).getTonnage(tank); } } return TestEntity.ceil(weight / 10, getWeightCeilingPowerAmp()); } return 0; }
if (hasEngine() && getEngine().isFusion()) { if (getEngine().getEngineType() == Engine.LIGHT_ENGINE) { usedSlots++;
assertTrue(mek.getEngine().isFusion()); assertEquals(Engine.XL_ENGINE, mek.getEngine().getEngineType()); assertEquals(8, mek.getWalkMP());
assertTrue(mek.getEngine().isFusion()); assertEquals(Engine.NORMAL_ENGINE, mek.getEngine().getEngineType()); assertEquals(7, mek.getWalkMP());