Because this way is easier.

This commit is contained in:
GJ 2013-01-17 15:20:20 -05:00
parent c5ae4ca615
commit 857bb00c8a
12 changed files with 23 additions and 23 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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) {

View File

@ -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()) {

View File

@ -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();

View File

@ -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);

View File

@ -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)) {

View File

@ -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"));

View File

@ -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);

View File

@ -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);

View File

@ -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);