double dbv = 0; double obv = 0;   dbv += getTotalArmor();   dbv += getTotalInternal() / 2;  double typeModifier; switch (getMovementType()) { case Entity.MovementType.TRACKED: typeModifier = 0.8; break; case Entity.MovementType.WHEELED: typeModifier = 0.7; break; case Entity.MovementType.HOVER: typeModifier = 0.6; break;  default: typeModifier = 0.5; }  dbv *= typeModifier;   int tmmRan = Compute.getTargetMovementModifier(getRunMP(), false).getValue(); if (tmmRan > 5) { tmmRan = 5; } double[] tmmFactors = { 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 }; dbv *= tmmFactors[tmmRan];  double weaponBV = 0;   double weaponsBVFront = 0; double weaponsBVRear = 0; for (Enumeration i = weaponList.elements(); i.hasMoreElements();) { Mounted mounted = (Mounted)i.nextElement(); WeaponType wtype = (WeaponType)mounted.getType(); if (mounted.getLocation() == LOC_REAR) { weaponsBVRear += wtype.getBV(this); } else { weaponsBVFront += wtype.getBV(this); } } if (weaponsBVFront > weaponsBVRear) { weaponBV += weaponsBVFront; weaponBV += (weaponsBVRear * 0.5); } else { weaponBV += weaponsBVRear; weaponBV += (weaponsBVFront * 0.5); }   double ammoBV = 0; for (Enumeration i = ammoList.elements(); i.hasMoreElements();) { Mounted mounted = (Mounted)i.nextElement(); AmmoType atype = (AmmoType)mounted.getType(); ammoBV += atype.getBV(this); } weaponBV += ammoBV;   double speedFactor = getRunMP() - 5; speedFactor /= 10; speedFactor++; speedFactor = Math.pow(speedFactor, 1.2); speedFactor = Math.round(speedFactor * 100) / 100.0;  obv = weaponBV * speedFactor;   double pilotFactor = crew.getBVSkillMultiplier();  return (int)Math.round((dbv + obv) * pilotFactor);
return calculateBattleValue(false);
    public int calculateBattleValue() {        double dbv = 0; // defensive battle value        double obv = 0; // offensive bv                // total armor points        dbv += getTotalArmor();                // total internal structure                dbv += getTotalInternal() / 2;                double typeModifier;        switch (getMovementType()) {            case Entity.MovementType.TRACKED:                typeModifier = 0.8;                break;            case Entity.MovementType.WHEELED:                typeModifier = 0.7;                break;            case Entity.MovementType.HOVER:                typeModifier = 0.6;                break;            // vtol and naval to come            default:                typeModifier = 0.5;        }                dbv *= typeModifier;                // adjust for target movement modifier        int tmmRan = Compute.getTargetMovementModifier(getRunMP(), false).getValue();        if (tmmRan > 5) {            tmmRan = 5;        }        double[] tmmFactors = { 1.0, 1.1, 1.2, 1.3, 1.4, 1.5 };        dbv *= tmmFactors[tmmRan];                double weaponBV = 0;                // figure out base weapon bv        double weaponsBVFront = 0;        double weaponsBVRear = 0;        for (Enumeration i = weaponList.elements(); i.hasMoreElements();) {            Mounted mounted = (Mounted)i.nextElement();            WeaponType wtype = (WeaponType)mounted.getType();            if (mounted.getLocation() == LOC_REAR) {                weaponsBVRear += wtype.getBV(this);            } else {                weaponsBVFront += wtype.getBV(this);            }        }        if (weaponsBVFront > weaponsBVRear) {            weaponBV += weaponsBVFront;            weaponBV += (weaponsBVRear * 0.5);        } else {            weaponBV += weaponsBVRear;            weaponBV += (weaponsBVFront * 0.5);        }                // add ammo bv        double ammoBV = 0;        for (Enumeration i = ammoList.elements(); i.hasMoreElements();) {            Mounted mounted = (Mounted)i.nextElement();            AmmoType atype = (AmmoType)mounted.getType();            ammoBV += atype.getBV(this);        }        weaponBV += ammoBV;                // adjust further for speed factor        double speedFactor = getRunMP() - 5;        speedFactor /= 10;        speedFactor++;        speedFactor = Math.pow(speedFactor, 1.2);        speedFactor = Math.round(speedFactor * 100) / 100.0;                obv = weaponBV * speedFactor;                // and then factor in pilot        double pilotFactor = crew.getBVSkillMultiplier();        return (int)Math.round((dbv + obv) * pilotFactor);    }