if (attacker.isLocationDestroyed(Mech.LOC_RARM) && attacker.isLocationDestroyed(Mech.LOC_LARM)) {
if (attacker.isLocationBad(Mech.LOC_RARM) && attacker.isLocationBad(Mech.LOC_LARM)) {
    private static ToHitData getProneMods(Game game, Entity attacker, int weaponId) {    if (!attacker.isProne()) {      return null; // no modifier    }    ToHitData mods = new ToHitData();    Mounted weapon = attacker.getEquipment(weaponId);        if ( attacker.entityIsQuad() ) {            int legsDead = ((Mech)attacker).countDestroyedLegs();            if (legsDead == 0) {        // No legs destroyed: no penalty and can fire all weapons              return null; // no modifier            } else if ( legsDead >= 3 ) {        return new ToHitData(ToHitData.IMPOSSIBLE, "Prone with three or more legs destroyed.");      }      // we have one or two dead legs...            // Need an intact front leg            if (attacker.isLocationDestroyed(Mech.LOC_RARM) && attacker.isLocationDestroyed(Mech.LOC_LARM)) {                return new ToHitData(ToHitData.IMPOSSIBLE, "Prone with both front legs destroyed.");            }            // front leg-mounted weapons have addidional trouble            if (weapon.getLocation() == Mech.LOC_RARM || weapon.getLocation() == Mech.LOC_LARM) {                int otherArm = weapon.getLocation() == Mech.LOC_RARM ? Mech.LOC_LARM : Mech.LOC_RARM;                // check previous attacks for weapons fire from the other arm                if (isFiringFromArmAlready(game, weaponId, attacker, otherArm)) {          return new ToHitData(ToHitData.IMPOSSIBLE, "Prone and firing from other front leg already.");                }            }            // can't fire rear leg weapons            if (weapon.getLocation() == Mech.LOC_LLEG || weapon.getLocation() == Mech.LOC_RLEG) {                return new ToHitData(ToHitData.IMPOSSIBLE, "Can't fire rear leg-mounted weapons while prone with destroyed legs.");            }            mods.addModifier(2, "attacker prone");        } else {            int l3ProneFiringArm = Entity.LOC_NONE;            if (attacker.isLocationDestroyed(Mech.LOC_RARM) || attacker.isLocationDestroyed(Mech.LOC_LARM)) {              if ( game.getOptions().booleanOption("maxtech_prone_fire") ) {                //Can fire with only one arm                if (attacker.isLocationDestroyed(Mech.LOC_RARM) && attacker.isLocationDestroyed(Mech.LOC_LARM)) {                    return new ToHitData(ToHitData.IMPOSSIBLE, "Prone with both arms destroyed.");                }                l3ProneFiringArm = attacker.isLocationDestroyed(Mech.LOC_RARM) ? Mech.LOC_LARM : Mech.LOC_RARM;              } else {                // must have an arm intact                return new ToHitData(ToHitData.IMPOSSIBLE, "Prone with one or both arms destroyed.");              }            }            // arm-mounted weapons have addidional trouble            if (weapon.getLocation() == Mech.LOC_RARM || weapon.getLocation() == Mech.LOC_LARM) {              if ( l3ProneFiringArm == weapon.getLocation() ) {                return new ToHitData(ToHitData.IMPOSSIBLE, "Prone and propping up with this arm.");              }                int otherArm = weapon.getLocation() == Mech.LOC_RARM ? Mech.LOC_LARM : Mech.LOC_RARM;        // check previous attacks for weapons fire from the other arm        if (isFiringFromArmAlready(game, weaponId, attacker, otherArm)) {          return new ToHitData(ToHitData.IMPOSSIBLE, "Prone and firing from other arm already.");        }            }            // can't fire leg weapons            if (weapon.getLocation() == Mech.LOC_LLEG || weapon.getLocation() == Mech.LOC_RLEG) {                return new ToHitData(ToHitData.IMPOSSIBLE, "Can't fire leg-mounted weapons while prone.");            }            mods.addModifier(2, "attacker prone");            if ( l3ProneFiringArm != Entity.LOC_NONE ) {              mods.addModifier(1, "attacker propping on single arm");            }        }        return mods;  }