diff --git a/src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java index 90b296681..0b52957b5 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java @@ -44,22 +44,22 @@ public class AcrobaticsCommand extends SkillCommand { if (skillValue >= dodgeMaxBonusLevel) dodgeChanceF = dodgeChanceMax; else dodgeChanceF = (float) (((double) dodgeChanceMax / (double) dodgeMaxBonusLevel) * skillValue); dodgeChance = percent.format(dodgeChanceF / 100D); - if (dodgeChanceF + dodgeChanceF * 0.3333D >= 100D) dodgeChanceLucky = percent.format(1D); - else dodgeChanceLucky = percent.format((dodgeChanceF + dodgeChanceF * 0.3333D) / 100D); + if (dodgeChanceF * 1.3333D >= 100D) dodgeChanceLucky = percent.format(1D); + else dodgeChanceLucky = percent.format(dodgeChanceF * 1.3333D / 100D); // ROLL if (skillValue >= rollMaxBonusLevel) rollChanceF = rollChanceMax; else rollChanceF = (float) (((double) rollChanceMax / (double) rollMaxBonusLevel) * skillValue); rollChance = percent.format(rollChanceF / 100D); - if (rollChanceF + rollChanceF * 0.3333D >= 100D) rollChanceLucky = percent.format(1D); - else rollChanceLucky = percent.format((rollChanceF + rollChanceF * 0.3333D) / 100D); + if (rollChanceF * 1.3333D >= 100D) rollChanceLucky = percent.format(1D); + else rollChanceLucky = percent.format(rollChanceF * 1.3333D / 100D); // GRACEFULROLL if (skillValue >= gracefulRollMaxBonusLevel) gracefulRollChanceF = gracefulRollChanceMax; else gracefulRollChanceF = (float) (((double) gracefulRollChanceMax / (double) gracefulRollMaxBonusLevel) * skillValue); gracefulRollChance = percent.format(gracefulRollChanceF / 100D); - if (gracefulRollChanceF + gracefulRollChanceF * 0.3333D >= 100D) gracefulRollChanceLucky = percent.format(1D); - else gracefulRollChanceLucky = percent.format((gracefulRollChanceF + gracefulRollChanceF * 0.3333D) / 100D); + if (gracefulRollChanceF * 1.3333D >= 100D) gracefulRollChanceLucky = percent.format(1D); + else gracefulRollChanceLucky = percent.format(gracefulRollChanceF * 1.3333D / 100D); } @Override diff --git a/src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java index fac5b277e..d29e274f7 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/ArcheryCommand.java @@ -50,15 +50,15 @@ public class ArcheryCommand extends SkillCommand { if (skillValue >= dazeMaxBonusLevel) dazeChanceF = dazeBonusMax; else dazeChanceF = (float) (((double) dazeBonusMax / (double) dazeMaxBonusLevel) * skillValue); dazeChance = percent.format(dazeChanceF / 100D); - if (dazeChanceF + dazeChanceF * 0.3333D >= 100D) dazeChanceLucky = percent.format(1D); - else dazeChanceLucky = percent.format((dazeChanceF + dazeChanceF * 0.3333D) / 100D); + if (dazeChanceF * 1.3333D >= 100D) dazeChanceLucky = percent.format(1D); + else dazeChanceLucky = percent.format(dazeChanceF * 1.3333D / 100D); // Retrieve if (skillValue >= retrieveMaxBonusLevel) retrieveChanceF = retrieveBonusMax; else retrieveChanceF = (float) (((double) retrieveBonusMax / (double) retrieveMaxBonusLevel) * skillValue); retrieveChance = percent.format(retrieveChanceF / 100D); - if (retrieveChanceF + retrieveChanceF * 0.3333D >= 100D) retrieveChanceLucky = percent.format(1D); - else retrieveChanceLucky = percent.format((retrieveChanceF + retrieveChanceF * 0.3333D) / 100D); + if (retrieveChanceF * 1.3333D >= 100D) retrieveChanceLucky = percent.format(1D); + else retrieveChanceLucky = percent.format(retrieveChanceF * 1.3333D / 100D); } @Override diff --git a/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java index 6a2f4d18f..7bc3b9109 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/AxesCommand.java @@ -72,8 +72,8 @@ public class AxesCommand extends SkillCommand { if (skillValue >= critMaxBonusLevel) critChanceF = (float) critMaxChance; else critChanceF = (float) ((critMaxChance / critMaxBonusLevel) * skillCheck); critChance = percent.format(critChanceF / 100D); - if (critChanceF + critChanceF * 0.3333D >= 100D) critChanceLucky = percent.format(1D); - else critChanceLucky = percent.format((critChanceF + critChanceF * 0.3333D) / 100D); + if (critChanceF * 1.3333D >= 100D) critChanceLucky = percent.format(1D); + else critChanceLucky = percent.format(critChanceF * 1.3333D / 100D); //Axe Mastery if (skillValue >= bonusDamageAxesMaxBonusLevel) bonusDamage = String.valueOf(bonusDamageAxesBonusMax); else bonusDamage = String.valueOf(skillValue / ((double) bonusDamageAxesMaxBonusLevel / (double) bonusDamageAxesBonusMax)); diff --git a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java index e12516bf6..9e3fbbf13 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java @@ -49,14 +49,14 @@ public class FishingCommand extends SkillCommand { magicChanceInt = (int) (magicChanceInt * 1.1D); } magicChance = percent.format(magicChanceInt / 100D); - if (magicChanceInt + (magicChanceInt * 0.3333D) >= 100D) magicChanceLucky = percent.format(1D); - else magicChanceLucky = percent.format((magicChanceInt + (magicChanceInt * 0.3333D)) / 100D); + if (magicChanceInt * 1.3333D >= 100D) magicChanceLucky = percent.format(1D); + else magicChanceLucky = percent.format(magicChanceInt * 1.3333D / 100D); //Shake int dropChance = Fishing.getShakeChance(lootTier); shakeChance = percent.format(dropChance / 100D); - if (dropChance + (dropChance * 0.3333D) >= 100D) shakeChanceLucky = percent.format(1D); - else shakeChanceLucky = percent.format((dropChance + (dropChance * 0.3333D)) / 100D); + if (dropChance * 1.3333D >= 100D) shakeChanceLucky = percent.format(1D); + else shakeChanceLucky = percent.format(dropChance * 1.3333D / 100D); shakeUnlockLevel = advancedConfig.getShakeUnlockLevel(); //Fishermans Diet diff --git a/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java index 585ad3c2b..c7dfde236 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/HerbalismCommand.java @@ -76,14 +76,14 @@ public class HerbalismCommand extends SkillCommand { if (skillValue >= greenThumbMaxLevel) greenThumbChanceF = (float) (greenThumbMaxBonus); else greenThumbChanceF = (float) ((greenThumbMaxBonus / greenThumbMaxLevel) * skillValue); greenThumbChance = percent.format(greenThumbChanceF / 100D); - if (greenThumbChanceF + greenThumbChanceF * 0.3333D >= 100D) greenThumbChanceLucky = percent.format(1D); - else greenThumbChanceLucky = percent.format((greenThumbChanceF + greenThumbChanceF * 0.3333D) / 100D); + if (greenThumbChanceF * 1.3333D >= 100D) greenThumbChanceLucky = percent.format(1D); + else greenThumbChanceLucky = percent.format(greenThumbChanceF * 1.3333D / 100D); //DOUBLE DROPS if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus); else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue); doubleDropChance = percent.format(doubleDropChanceF / 100D); - if (doubleDropChanceF + doubleDropChanceF * 0.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); - else doubleDropChanceLucky = percent.format((doubleDropChanceF + doubleDropChanceF * 0.3333D) / 100D); + if (doubleDropChanceF * 1.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); + else doubleDropChanceLucky = percent.format(doubleDropChanceF * 1.3333D / 100D); } @Override diff --git a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java index d8fe07814..cedfc5d74 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/MiningCommand.java @@ -71,8 +71,8 @@ public class MiningCommand extends SkillCommand { if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus); else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue); doubleDropChance = percent.format(doubleDropChanceF / 100D); - if (doubleDropChanceF + doubleDropChanceF * 0.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); - else doubleDropChanceLucky = percent.format((doubleDropChanceF + doubleDropChanceF * 0.3333D) / 100D); + if (doubleDropChanceF * 1.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); + else doubleDropChanceLucky = percent.format(doubleDropChanceF * 1.3333D / 100D); //Blast Mining if (skillValue >= blastMiningRank8) { diff --git a/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java index 456e582d0..dbb637e45 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java @@ -70,8 +70,8 @@ public class RepairCommand extends SkillCommand { if (skillValue >= superRepairMaxBonusLevel) superRepairChanceF = superRepairChanceMax; else superRepairChanceF = (float) (((double) superRepairChanceMax / (double) superRepairMaxBonusLevel) * skillValue); superRepairChance = percent.format(superRepairChanceF / 100D); - if (superRepairChanceF + superRepairChanceF * 0.3333D >= 100D) superRepairChanceLucky = percent.format(1D); - else superRepairChanceLucky = percent.format((superRepairChanceF + superRepairChanceF * 0.3333D) / 100D); + if (superRepairChanceF * 1.3333D >= 100D) superRepairChanceLucky = percent.format(1D); + else superRepairChanceLucky = percent.format((superRepairChanceF * 1.3333D) / 100D); arcaneForgingRank = Repair.getArcaneForgingRank(profile); } diff --git a/src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java index 83f739bca..08007db95 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/SwordsCommand.java @@ -67,15 +67,15 @@ public class SwordsCommand extends SkillCommand { if (skillValue >= bleedMaxLevel) bleedChanceF = bleedChanceMax; else bleedChanceF = (float) (((double) bleedChanceMax / (double) bleedMaxLevel) * skillValue); bleedChance = percent.format(bleedChanceF / 100D); - if (bleedChanceF + bleedChanceF * 0.3333D >= 100D) bleedChanceLucky = percent.format(1D); - else bleedChanceLucky = percent.format((bleedChanceF + bleedChanceF * 0.3333D) / 100D); + if (bleedChanceF * 1.3333D >= 100D) bleedChanceLucky = percent.format(1D); + else bleedChanceLucky = percent.format(bleedChanceF * 1.3333D / 100D); //Counter Attack if (skillValue >= counterMaxLevel) counterAttackChanceF = counterChanceMax; else counterAttackChanceF = (float) (((double) counterChanceMax / (double) counterMaxLevel) * skillValue); counterAttackChance = percent.format(counterAttackChanceF / 100D); - if (counterAttackChanceF + counterAttackChanceF * 0.3333D >= 100D) counterAttackChanceLucky = percent.format(1D); - else counterAttackChanceLucky = percent.format((counterAttackChanceF + counterAttackChanceF * 0.3333D) / 100D); + if (counterAttackChanceF * 1.3333D >= 100D) counterAttackChanceLucky = percent.format(1D); + else counterAttackChanceLucky = percent.format(counterAttackChanceF * 1.3333D / 100D); } @Override diff --git a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java index 306b16c08..ea2f2a4f0 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/TamingCommand.java @@ -43,8 +43,8 @@ public class TamingCommand extends SkillCommand { if (skillValue >= goreMaxLevel) goreChanceF = (goreChanceMax); else goreChanceF = (float) (((double) goreChanceMax / (double) goreMaxLevel) * skillValue); goreChance = percent.format(goreChanceF / 100D); - if (goreChanceF + goreChanceF * 0.3333D >= 100D) goreChanceLucky = percent.format(1D); - else goreChanceLucky = percent.format((goreChanceF + goreChanceF * 0.3333D) / 100D); + if (goreChanceF * 1.3333D >= 100D) goreChanceLucky = percent.format(1D); + else goreChanceLucky = percent.format(goreChanceF * 1.3333D / 100D); } @Override diff --git a/src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java index 71ee4f1a3..d75d2692d 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/UnarmedCommand.java @@ -64,15 +64,15 @@ public class UnarmedCommand extends SkillCommand { if (skillValue >= disarmMaxLevel) disarmChanceF = disarmChanceMax; else disarmChanceF = (float) (((double) disarmChanceMax / (double) disarmMaxLevel) * skillValue); disarmChance = percent.format(disarmChanceF / 100D); - if (disarmChanceF + disarmChanceF * 0.3333D >= 100D) disarmChanceLucky = percent.format(1D); - else disarmChanceLucky = percent.format((disarmChanceF + disarmChanceF * 0.3333D) / 100D); + if (disarmChanceF * 1.3333D >= 100D) disarmChanceLucky = percent.format(1D); + else disarmChanceLucky = percent.format(disarmChanceF * 1.3333D / 100D); //Deflect if (skillValue >= deflectMaxLevel) deflectChanceF = deflectChanceMax; else deflectChanceF = (float) (((double) deflectChanceMax / (double) deflectMaxLevel) * skillValue); deflectChance = percent.format(deflectChanceF / 100D); - if (deflectChanceF + deflectChanceF * 0.3333D >= 100D) deflectChanceLucky = percent.format(1D); - else deflectChanceLucky = percent.format((deflectChanceF + deflectChanceF * 0.3333D) / 100D); + if (deflectChanceF * 1.3333D >= 100D) deflectChanceLucky = percent.format(1D); + else deflectChanceLucky = percent.format(deflectChanceF * 1.3333D / 100D); //Iron Arm if (skillValue >= 250) ironArmBonus = String.valueOf(ironArmMaxBonus); diff --git a/src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java b/src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java index 59701cf0e..960605bcf 100644 --- a/src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java +++ b/src/main/java/com/gmail/nossr50/commands/skills/WoodcuttingCommand.java @@ -59,8 +59,8 @@ public class WoodcuttingCommand extends SkillCommand { if (skillValue >= doubleDropsMaxLevel) doubleDropChanceF = (float) (doubleDropsMaxBonus); else doubleDropChanceF = (float) ((doubleDropsMaxBonus / doubleDropsMaxLevel) * skillValue); doubleDropChance = percent.format(doubleDropChanceF / 100D); - if (doubleDropChanceF + doubleDropChanceF * 0.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); - else doubleDropChanceLucky = percent.format((doubleDropChanceF + doubleDropChanceF * 0.3333D) / 100D); + if (doubleDropChanceF * 1.3333D >= 100D) doubleDropChanceLucky = percent.format(1D); + else doubleDropChanceLucky = percent.format(doubleDropChanceF * 1.3333D / 100D); } @Override