@Override public TechAdvancement getConstructionTechAdvancement() { int index = getWeightClass(); if (index < 0 || index >= TA_BATTLEARMOR.length) { index = EntityWeightClass.WEIGHT_MEDIUM; } return TA_BATTLEARMOR[index]; }
public int getMaximumArmorPoints() { switch(getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: return 2; case EntityWeightClass.WEIGHT_LIGHT: return 6; case EntityWeightClass.WEIGHT_MEDIUM: return 10; case EntityWeightClass.WEIGHT_HEAVY: return 14; case EntityWeightClass.WEIGHT_ASSAULT: return 18; default: return 0; } }
public double getAlternateWeight() { double troopton; switch (getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: troopton = troopers * 0.25; break; case EntityWeightClass.WEIGHT_LIGHT: troopton = troopers * 0.5; break; case EntityWeightClass.WEIGHT_MEDIUM: troopton = troopers * 1.0; break; case EntityWeightClass.WEIGHT_HEAVY: troopton = troopers * 1.5; break; case EntityWeightClass.WEIGHT_ASSAULT: troopton = troopers * 2.0; break; default: troopton = troopers; } return troopton; }
public static int maxVtolMP(BattleArmor ba) { if ((ba.getChassisType() == BattleArmor.CHASSIS_TYPE_QUAD) || (ba.getWeightClass() > EntityWeightClass.WEIGHT_MEDIUM)) { return 0; } else { return 7 - ba.getWeightClass() + EntityWeightClass.WEIGHT_ULTRA_LIGHT; } }
public double getWeightChassis() { if (ba.isClan() && !((ba.getWeightClass() > EntityWeightClass.WEIGHT_ULTRA_LIGHT) && (ba.isClanExoWithoutHarjel()))) { return CHASSIS_WEIGHT_CLAN[ba.getWeightClass()]; } else { return CHASSIS_WEIGHT_IS[ba.getWeightClass()]; } }
/** * Returns true if this <code>BattleArmor</code> can use a detachable weapon * pack. A <code>BattleArmor</code> must have 2 or more walking MP and be * Medium or heavier to mount DWP. * * @return */ public boolean canMountDWP() { return (getOriginalWalkMP() >= 2) && (getWeightClass() >= EntityWeightClass.WEIGHT_MEDIUM); }
public static int maxUmuMP(BattleArmor ba) { if (ba.getChassisType() == BattleArmor.CHASSIS_TYPE_QUAD) { return 0; } else { return Math.min(5, 5 - ba.getWeightClass() + EntityWeightClass.WEIGHT_LIGHT); } }
public static int maxWalkMP(BattleArmor ba) { int max = 3; if (ba.getWeightClass() >= EntityWeightClass.WEIGHT_HEAVY) { max--; } if (ba.getChassisType() == BattleArmor.CHASSIS_TYPE_QUAD) { max += 2; } return max; }
public int getArmCrits() { if(getChassisType() == CHASSIS_TYPE_QUAD) { return 0; } switch(getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: case EntityWeightClass.WEIGHT_LIGHT: return 2; case EntityWeightClass.WEIGHT_MEDIUM: case EntityWeightClass.WEIGHT_HEAVY: return 3; default: return 4; } }
public double getTrooperWeight() { return EntityWeightClass.getClassLimit(getWeightClass(), this); }
public int getMaximumWalkMP() { int max = 2; if(getWeightClass() < EntityWeightClass.WEIGHT_HEAVY) { max = 3; } if(chassisType == CHASSIS_TYPE_QUAD) { max += 2; } // Mechanical jump boosters add 1 MP and can increase it over the max if (hasWorkingMisc(MiscType.F_MECHANICAL_JUMP_BOOSTER)){ max++; } if (hasMyomerBooster()){ switch (getWeightClass()){ case EntityWeightClass.WEIGHT_ULTRA_LIGHT: case EntityWeightClass.WEIGHT_LIGHT: case EntityWeightClass.WEIGHT_MEDIUM: max += 2; break; case EntityWeightClass.WEIGHT_HEAVY: case EntityWeightClass.WEIGHT_ASSAULT: max++; break; } } return max; }
if(getWeightClass() <= EntityWeightClass.WEIGHT_LIGHT) { max = 5; else if(getWeightClass() == EntityWeightClass.WEIGHT_MEDIUM) { max = 4; else if(getWeightClass() == EntityWeightClass.WEIGHT_HEAVY) { max = 3; if(getWeightClass() == EntityWeightClass.WEIGHT_ULTRA_LIGHT) { max = 7; else if(getWeightClass() == EntityWeightClass.WEIGHT_LIGHT) { max = 6; else if(getWeightClass() == EntityWeightClass.WEIGHT_MEDIUM) { max = 5; if(getWeightClass() < EntityWeightClass.WEIGHT_HEAVY) { max = 3;
public double getWeightSecondaryMotiveSystem() { int jumpMP = ba.getOriginalJumpMP(); if (ba.getMovementMode() == EntityMovementMode.VTOL) { return jumpMP * BAMotiveSystems.BA_VTOL.getWeight(ba.getWeightClass()); } else if (ba.getMovementMode() == EntityMovementMode.INF_UMU) { return jumpMP * BAMotiveSystems.BA_UMU.getWeight(ba.getWeightClass()); } else { return jumpMP * BAMotiveSystems.BA_JUMP.getWeight(ba.getWeightClass()); } }
public double getWeightGroundMP() { int walkMP = ba.getOriginalWalkMP(); if (ba.getChassisType() == BattleArmor.CHASSIS_TYPE_QUAD) { walkMP -= QUAD_FREE_MP; } else { walkMP -= BIPED_FREE_MP; } if (walkMP > 0) { return ADDITIONAL_GROUND_MP_WEIGHT[ba.getWeightClass()] * walkMP; } else { return 0; } }
switch(getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: return 0; switch(getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: return 2;
@Override public boolean canMakeAntiMekAttacks() { return !isBurdened() && canDoMechanizedBA() && (getWeightClass() < EntityWeightClass.WEIGHT_HEAVY) && (getMovementMode() != EntityMovementMode.INF_UMU); }
&& game.getOptions().booleanOption(OptionsConstants.ADVANCED_TACOPS_BA_WEIGHT)) { double troopton = troopers; switch (getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: troopton = troopers * 0.25;
if (hasMyomerBooster()) { if (!ignoreMyomerBooster) { if (getWeightClass() >= EntityWeightClass.WEIGHT_HEAVY) { j++; } else { if (getWeightClass() == EntityWeightClass.WEIGHT_MEDIUM) { j -= 3; } else if (getWeightClass() >= EntityWeightClass.WEIGHT_HEAVY) { j -= 2;
int tArmoredGloveCount = countWorkingMisc(MiscType.F_ARMORED_GLOVE); int tBattleClawCount = countWorkingMisc(MiscType.F_BATTLE_CLAW); switch (getWeightClass()) { case EntityWeightClass.WEIGHT_ULTRA_LIGHT: case EntityWeightClass.WEIGHT_LIGHT:
public BattleArmorSuit(BattleArmor ba, int loc, Campaign c) { super((int)ba.getWeight(), c); this.trooper = loc; this.quad = ba.getChassisType() == BattleArmor.CHASSIS_TYPE_QUAD; this.weightClass= ba.getWeightClass(); this.groundMP = ba.getOriginalWalkMP(); this.jumpMP = ba.getOriginalJumpMP(); this.clan = ba.isClan(); this.chassis = ba.getChassis(); this.model = ba.getModel(); this.jumpType = ba.getMovementMode(); this.name = chassis + " " + model + " Suit"; initializeExtraCostsAndTons(); }