float modMP = MP / game.getOptions().floatOption("gravity"); modMP = ((Math.round (modMP) - modMP) < (0.5+0.000001)) ? (Math.round(modMP - 0.000001 * 2.0)) : Math.round(modMP); return Math.max ((int)modMP, 0);
float fMP = MP / game.getOptions().floatOption("gravity"); fMP = (Math.abs((Math.round(fMP) - fMP)) == 0.5) ? (float)Math.floor(fMP) : Math.round(fMP); result = (int)fMP;
    protected int applyGravityEffectsOnMP (int MP) {        if (game != null) {            float modMP = MP / game.getOptions().floatOption("gravity");            modMP = ((Math.round (modMP) - modMP) < (0.5+0.000001)) ? (Math.round(modMP - 0.000001 * 2.0)) : Math.round(modMP);            return Math.max ((int)modMP, 0);        }        return MP;     }