dbv += getTotalInternal() / 2;
dbv += (double)getTotalInternal() / 2;
    public int calculateBattleValue(boolean assumeLinkedC3) {        double dbv = 0; // defensive battle value        double obv = 0; // offensive bv                // total armor points        dbv += getTotalArmor();                // total internal structure                dbv += getTotalInternal() / 2;                // add defensive equipment        double dEquipmentBV = 0;        for (Enumeration i = equipmentList.elements(); i.hasMoreElements();) {            Mounted mounted = (Mounted)i.nextElement();            EquipmentType etype = mounted.getType();            // don't count destroyed equipment            if (mounted.isDestroyed())                continue;            if ((etype instanceof WeaponType && ((WeaponType)etype).getAmmoType() == AmmoType.T_AMS)            || (etype instanceof AmmoType && ((AmmoType)etype).getAmmoType() == AmmoType.T_AMS)            || etype.hasFlag(MiscType.F_ECM)) {                dEquipmentBV += etype.getBV(this);            }        }        dbv += dEquipmentBV;                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;        }*/        typeModifier=.4;                dbv *= typeModifier;                // adjust for target movement modifier        int tmmRan = Compute.getTargetMovementModifier(getOriginalRunMP(), 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;        boolean hasTargComp = hasTargComp();        for (Enumeration i = weaponList.elements(); i.hasMoreElements();) {            Mounted mounted = (Mounted)i.nextElement();            WeaponType wtype = (WeaponType)mounted.getType();            double dBV = wtype.getBV(this);            // don't count destroyed equipment            if (mounted.isDestroyed())                continue;            // don't count AMS, it's defensive            if (wtype.getAmmoType() == AmmoType.T_AMS) {                continue;            }                        // artemis bumps up the value            if (mounted.getLinkedBy() != null) {                Mounted mLinker = mounted.getLinkedBy();                if (mLinker.getType() instanceof MiscType &&                         mLinker.getType().hasFlag(MiscType.F_ARTEMIS)) {                    dBV *= 1.2;                }            }                         // and we'll add the tcomp here too            if (wtype.hasFlag(WeaponType.F_DIRECT_FIRE) && hasTargComp) {                dBV *= 1.2;            }                        if (mounted.getLocation() == LOC_REAR) {                weaponsBVRear += dBV;            } else {                weaponsBVFront += dBV;            }        }        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();                        // don't count depleted ammo            if (mounted.getShotsLeft() == 0)                continue;            // don't count AMS, it's defensive            if (atype.getAmmoType() == AmmoType.T_AMS) {                continue;            }            ammoBV += atype.getBV(this);        }        weaponBV += ammoBV;                // adjust further for speed factor        double speedFactor = getOriginalRunMP() - 5;        speedFactor /= 10;        speedFactor++;        speedFactor = Math.pow(speedFactor, 1.2);        speedFactor = Math.round(speedFactor * 100) / 100.0;                obv = weaponBV * speedFactor;        // we get extra bv from c3 networks. a valid network requires at least 2 members        // some hackery and magic numbers here.  could be better        // also, each 'has' loops through all equipment.  inefficient to do it 3 times        double xbv = 0.0;        if ((hasC3MM() && calculateFreeC3MNodes() < 2) ||            (hasC3M() && calculateFreeC3Nodes() < 3) ||            (hasC3S() && C3Master > NONE) ||            (hasC3i() && calculateFreeC3Nodes() < 5) ||            assumeLinkedC3) {                xbv = (double)(Math.round(0.35 * weaponsBVFront + (0.5 * weaponsBVRear)));        }                // and then factor in pilot        double pilotFactor = crew.getBVSkillMultiplier();        return (int)Math.round((dbv + obv + xbv) * pilotFactor);    }