Adresses issue #364

This commit is contained in:
TfT_02 2012-12-28 00:41:56 +01:00
parent 2c8bfd6573
commit e13ba010bf
9 changed files with 10 additions and 10 deletions

View File

@ -33,7 +33,7 @@ public class AcrobaticsCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
// DODGE
if(skillValue >= dodgeMaxBonusLevel) dodgeChance = df.format(dodgeChanceMax);
else dodgeChance = df.format(((double) dodgeChanceMax / (double) dodgeMaxBonusLevel) * skillValue);

View File

@ -37,7 +37,7 @@ public class ArcheryCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
// SkillShot
double bonus = (int)((double) skillValue / (double) skillShotIncreaseLevel) * skillShotIncreasePercentage;
if (bonus > skillShotBonusMax) skillShotBonus = percent.format(skillShotBonusMax);

View File

@ -39,7 +39,7 @@ public class AxesCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
int skillCheck = Misc.skillCheck((int)skillValue, critMaxBonusLevel);
impactDamage = String.valueOf(1 + ((double) skillValue / (double) greaterImpactIncreaseLevel));

View File

@ -42,7 +42,7 @@ public class HerbalismCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
greenTerraLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
//FARMERS DIET
if(skillValue >= farmersDietMaxLevel) farmersDietRank = "5";
@ -53,7 +53,7 @@ public class HerbalismCommand extends SkillCommand {
if(skillValue >= greenThumbMaxLevel) greenThumbChance = String.valueOf(greenThumbMaxBonus);
else greenThumbChance = String.valueOf((greenThumbMaxBonus / greenThumbMaxLevel) * skillValue);
else greenThumbChance = df.format((greenThumbMaxBonus / greenThumbMaxLevel) * skillValue);
//DOUBLE DROPS
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
else doubleDropChance = df.format((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue);

View File

@ -45,7 +45,7 @@ public class MiningCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
superBreakerLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
if(skillValue >= doubleDropsMaxLevel) doubleDropChance = df.format(doubleDropsMaxBonus);
else doubleDropChance = df.format((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue);

View File

@ -49,7 +49,7 @@ public class RepairCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
// We're using pickaxes here, not the best but it works
Repairable diamondRepairable = mcMMO.repairManager.getRepairable(278);
Repairable goldRepairable = mcMMO.repairManager.getRepairable(285);

View File

@ -36,7 +36,7 @@ public class SwordsCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
serratedStrikesLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
if (skillValue >= bleedMaxLevel) bleedLength = String.valueOf(bleedMaxTicks);

View File

@ -38,7 +38,7 @@ public class TamingCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
if(skillValue >= goreMaxLevel) goreChance = df.format(goreChanceMax);
else goreChance = df.format(((double) goreChanceMax / (double) goreMaxLevel) * skillValue);
}

View File

@ -35,7 +35,7 @@ public class UnarmedCommand extends SkillCommand {
@Override
protected void dataCalculations() {
DecimalFormat df = new DecimalFormat("#.0");
DecimalFormat df = new DecimalFormat("0.0");
berserkLength = String.valueOf(2 + (int) ((double) skillValue / (double) abilityLengthIncreaseLevel));
if(skillValue >= disarmMaxLevel) disarmChance = df.format(disarmChanceMax);