int wmp = getOriginalWalkMP(); int legsDestroyed = 0; int hipHits = 0; int actuatorHits = 0;   wmp = applyGravityEffectsOnMP(wmp);  for ( int i = 0; i < locations(); i++ ) { if ( locationIsLeg(i) ) { if ( !isLocationBad(i) ) { if ( legHasHipCrit(i) ) { hipHits++; if (!game.getOptions().booleanOption("maxtech_leg_damage")) { continue; } } actuatorHits += countLegActuatorCrits(i); } else { legsDestroyed++; } } }   if(legsDestroyed > 0) { if ( legsDestroyed == 1 ) wmp--; else if ( legsDestroyed == 2 ) wmp = 1; else wmp = 0; }  if ( wmp > 0 ) { if (hipHits>0) { if (game.getOptions().booleanOption("maxtech_leg_damage")) { wmp = wmp - (2 * hipHits); } else { for (int i = 0; i < hipHits; i++) { wmp = (int) Math.ceil( (double) wmp / 2.0); } } }  wmp -= actuatorHits; }   wmp -= (int)(heat / 5);    if (heat >= 9 && hasTSM()) { if (heat == 9) { wmp += 2; } else { wmp += 1; } }   wmp = Math.max(0, wmp);  return wmp;
return getWalkMP(true);
    public int getWalkMP() {      int wmp = getOriginalWalkMP();      int legsDestroyed = 0;      int hipHits = 0;      int actuatorHits = 0;            //gravity      wmp = applyGravityEffectsOnMP(wmp);            for ( int i = 0; i < locations(); i++ ) {              if ( locationIsLeg(i) ) {              if ( !isLocationBad(i) ) {                  if ( legHasHipCrit(i) ) {                      hipHits++;                      if (!game.getOptions().booleanOption("maxtech_leg_damage")) {                          continue;                      }                  }                  actuatorHits += countLegActuatorCrits(i);              } else {                  legsDestroyed++;              }          }      }            // leg damage effects        if(legsDestroyed > 0) {          if ( legsDestroyed == 1 )            wmp--;          else if ( legsDestroyed == 2 )            wmp = 1;          else            wmp = 0;        }                 if ( wmp > 0 ) {            if (hipHits>0) {                if (game.getOptions().booleanOption("maxtech_leg_damage")) {                   wmp = wmp - (2 * hipHits);                } else {                    for (int i = 0; i < hipHits; i++) {                        wmp = (int) Math.ceil( (double) wmp / 2.0);                    }                }            }          wmp -= actuatorHits;        }            // and we still need to factor in heat!        wmp -= (int)(heat / 5);                      // TSM negates some heat        if (heat >= 9 && hasTSM()) {            if (heat == 9) {                wmp += 2;            }            else {                wmp += 1;            }        }              //For sanity sake...        wmp = Math.max(0, wmp);                return wmp;    }