From 857bb00c8a8851bce5996d5658fba9858467a95d Mon Sep 17 00:00:00 2001 From: GJ Date: Thu, 17 Jan 2013 15:20:20 -0500 Subject: [PATCH] Because this way is easier. --- .../gmail/nossr50/skills/acrobatics/AcrobaticsManager.java | 4 ++-- .../com/gmail/nossr50/skills/archery/ArcheryManager.java | 4 ++-- src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java | 2 +- .../com/gmail/nossr50/skills/axes/ImpactEventHandler.java | 2 +- .../java/com/gmail/nossr50/skills/gathering/Excavation.java | 2 +- .../java/com/gmail/nossr50/skills/gathering/Fishing.java | 6 +++--- .../java/com/gmail/nossr50/skills/gathering/Herbalism.java | 6 +++--- .../com/gmail/nossr50/skills/gathering/WoodCutting.java | 2 +- src/main/java/com/gmail/nossr50/skills/repair/Repair.java | 4 ++-- .../java/com/gmail/nossr50/skills/swords/SwordsManager.java | 4 ++-- .../java/com/gmail/nossr50/skills/taming/TamingManager.java | 4 ++-- .../com/gmail/nossr50/skills/unarmed/UnarmedManager.java | 6 +++--- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java index ffaf682a0..6ffcae96a 100644 --- a/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/acrobatics/AcrobaticsManager.java @@ -32,7 +32,7 @@ public class AcrobaticsManager extends SkillManager { int randomChance = 100; if (Permissions.luckyAcrobatics(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } double chance; @@ -68,7 +68,7 @@ public class AcrobaticsManager extends SkillManager { int randomChance = 100; if (Permissions.luckyAcrobatics(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } double chance = (Acrobatics.dodgeMaxChance / Acrobatics.dodgeMaxBonusLevel) * eventHandler.skillModifier; diff --git a/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java b/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java index 76652a605..454031d82 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/ArcheryManager.java @@ -28,7 +28,7 @@ public class ArcheryManager extends SkillManager { int randomChance = 100; if (Permissions.luckyArchery(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } double chance = (Archery.retrieveMaxChance / Archery.retrieveMaxBonusLevel) * eventHandler.skillModifier; @@ -53,7 +53,7 @@ public class ArcheryManager extends SkillManager { int randomChance = 100; if (Permissions.luckyArchery(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } double chance = (Archery.dazeMaxBonus / Archery.dazeMaxBonusLevel) * eventHandler.skillModifier; diff --git a/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java b/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java index 034f44fd3..27b7ed3a2 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/AxeManager.java @@ -49,7 +49,7 @@ public class AxeManager extends SkillManager { int randomChance = 100; if (Permissions.luckyAxes(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } double chance = (Axes.criticalHitMaxChance / Axes.criticalHitMaxBonusLevel) * eventHandler.skillModifier; diff --git a/src/main/java/com/gmail/nossr50/skills/axes/ImpactEventHandler.java b/src/main/java/com/gmail/nossr50/skills/axes/ImpactEventHandler.java index 694a64b54..1a62fdfd9 100644 --- a/src/main/java/com/gmail/nossr50/skills/axes/ImpactEventHandler.java +++ b/src/main/java/com/gmail/nossr50/skills/axes/ImpactEventHandler.java @@ -64,7 +64,7 @@ public class ImpactEventHandler { int randomChance = 100; if (Permissions.luckyAxes(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (Misc.getRandom().nextInt(randomChance) <= Axes.greaterImpactChance) { diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Excavation.java b/src/main/java/com/gmail/nossr50/skills/gathering/Excavation.java index bc18844ac..55ec05f31 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Excavation.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Excavation.java @@ -97,7 +97,7 @@ public class Excavation { int randomChance = 100; if (Permissions.luckyExcavation(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (Misc.getRandom().nextDouble() * randomChance <= treasure.getDropChance()) { diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java index e733286f0..1e441d966 100755 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java @@ -97,7 +97,7 @@ public class Fishing { int randomChance = 100; if (Permissions.luckyFishing(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (Misc.getRandom().nextDouble() * randomChance <= foundTreasure.getDropChance()) { @@ -147,7 +147,7 @@ public class Fishing { int randomChance = 100; if (Permissions.luckyFishing(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (player.getWorld().hasStorm()) { @@ -214,7 +214,7 @@ public class Fishing { int randomChance = 100; if (Permissions.luckyFishing(event.getPlayer())) { - randomChance = (int) (randomChance * 1.25); + randomChance = 125; } final Player player = event.getPlayer(); diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java index ee7801ddb..7733c84d1 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Herbalism.java @@ -104,7 +104,7 @@ public class Herbalism { int randomChance = 100; if (Permissions.luckyHerbalism(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel); @@ -451,7 +451,7 @@ public class Herbalism { int randomChance = 100; if (Permissions.luckyHerbalism(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel); @@ -525,7 +525,7 @@ public class Herbalism { int randomChance = 100; if (Permissions.luckyHerbalism(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel); diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java index c1f2d6d2c..547e298bb 100644 --- a/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/WoodCutting.java @@ -358,7 +358,7 @@ public class WoodCutting { if (chance > MAX_CHANCE) chance = MAX_CHANCE; if (Permissions.luckyWoodcutting(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (chance > Misc.getRandom().nextInt(randomChance) && Permissions.woodcuttingDoubleDrops(player)) { diff --git a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java index 70025beda..81805e13d 100644 --- a/src/main/java/com/gmail/nossr50/skills/repair/Repair.java +++ b/src/main/java/com/gmail/nossr50/skills/repair/Repair.java @@ -113,7 +113,7 @@ public class Repair { int randomChance = 100; if (Permissions.luckyRepair(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (Misc.getRandom().nextInt(randomChance) <= getEnchantChance(rank)) { @@ -242,7 +242,7 @@ public class Repair { int chance = (int) (((double) SUPER_REPAIR_CHANCE_MAX / (double) SUPER_REPAIR_MAX_BONUS_LEVEL) * skillLevel); if (skillLevel >= SUPER_REPAIR_MAX_BONUS_LEVEL) chance = SUPER_REPAIR_CHANCE_MAX; - if (Permissions.luckyRepair(player)) randomChance = (int) (randomChance * 0.75); + if (Permissions.luckyRepair(player)) randomChance = 75; if (chance > Misc.getRandom().nextInt(randomChance) && Permissions.repairBonus(player)) { player.sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy")); diff --git a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java index 1c7a0b89d..93a461230 100644 --- a/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java +++ b/src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java @@ -34,7 +34,7 @@ public class SwordsManager extends SkillManager { int randomChance = 100; if (Permissions.luckySwords(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Swords.BLEED_CHANCE_MAX / (double) Swords.BLEED_MAX_BONUS_LEVEL) * skillLevel); @@ -63,7 +63,7 @@ public class SwordsManager extends SkillManager { int randomChance = 100; if (Permissions.luckySwords(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Swords.COUNTER_ATTACK_CHANCE_MAX / (double) Swords.COUNTER_ATTACK_MAX_BONUS_LEVEL) * skillLevel); diff --git a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java index 6dc282a49..c0481a03a 100644 --- a/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java +++ b/src/main/java/com/gmail/nossr50/skills/taming/TamingManager.java @@ -40,7 +40,7 @@ public class TamingManager extends SkillManager { int randomChance = 100; if (Permissions.luckyTaming(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } if (Misc.getRandom().nextInt(randomChance) < Taming.FAST_FOOD_SERVICE_ACTIVATION_CHANCE) { @@ -89,7 +89,7 @@ public class TamingManager extends SkillManager { int randomChance = 100; if (Permissions.luckyTaming(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Taming.GORE_CHANCE_MAX / (double) Taming.GORE_MAX_BONUS_LEVEL) * skillLevel); diff --git a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java index 47a3d6022..9b156367f 100644 --- a/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java +++ b/src/main/java/com/gmail/nossr50/skills/unarmed/UnarmedManager.java @@ -34,7 +34,7 @@ public class UnarmedManager extends SkillManager { int randomChance = 100; if (Permissions.luckyUnarmed(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Unarmed.DISARM_MAX_CHANCE / (double) Unarmed.DISARM_MAX_BONUS_LEVEL) * skillLevel); @@ -68,7 +68,7 @@ public class UnarmedManager extends SkillManager { int randomChance = 100; if (Permissions.luckyUnarmed(player)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Unarmed.DEFLECT_MAX_CHANCE / (double) Unarmed.DEFLECT_MAX_BONUS_LEVEL) * skillLevel); @@ -118,7 +118,7 @@ public class UnarmedManager extends SkillManager { int randomChance = 100; if (Permissions.luckyUnarmed(defender)) { - randomChance = (int) (randomChance * 0.75); + randomChance = 75; } float chance = (float) (((double) Unarmed.IRON_GRIP_MAX_CHANCE / (double) Unarmed.IRON_GRIP_MAX_BONUS_LEVEL) * skillLevel);