Merge pull request #357 from TfT-02/master

Various fixes and patches
This commit is contained in:
Glitchfinder
2012-12-28 12:19:44 -08:00
16 changed files with 98 additions and 43 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,18 +42,18 @@ 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";
else farmersDietRank = String.valueOf((double) skillValue / (double) farmersDietRankChange);
else farmersDietRank = String.valueOf((int) ((double) skillValue / (double) farmersDietRankChange));
//GREEN THUMB
if(skillValue >= greenThumbStageMaxLevel) greenThumbStage = "4";
else greenThumbStage = String.valueOf((double) skillValue / (double) greenThumbStageChange);
else greenThumbStage = String.valueOf((int) ((double) skillValue / (double) greenThumbStageChange));
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);