mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 08:39:49 +01:00
Because this way is easier.
This commit is contained in:
parent
c5ae4ca615
commit
857bb00c8a
@ -32,7 +32,7 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyAcrobatics(player)) {
|
if (Permissions.luckyAcrobatics(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
double chance;
|
double chance;
|
||||||
@ -68,7 +68,7 @@ public class AcrobaticsManager extends SkillManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyAcrobatics(player)) {
|
if (Permissions.luckyAcrobatics(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
double chance = (Acrobatics.dodgeMaxChance / Acrobatics.dodgeMaxBonusLevel) * eventHandler.skillModifier;
|
double chance = (Acrobatics.dodgeMaxChance / Acrobatics.dodgeMaxBonusLevel) * eventHandler.skillModifier;
|
||||||
|
@ -28,7 +28,7 @@ public class ArcheryManager extends SkillManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyArchery(player)) {
|
if (Permissions.luckyArchery(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
double chance = (Archery.retrieveMaxChance / Archery.retrieveMaxBonusLevel) * eventHandler.skillModifier;
|
double chance = (Archery.retrieveMaxChance / Archery.retrieveMaxBonusLevel) * eventHandler.skillModifier;
|
||||||
@ -53,7 +53,7 @@ public class ArcheryManager extends SkillManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyArchery(player)) {
|
if (Permissions.luckyArchery(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
double chance = (Archery.dazeMaxBonus / Archery.dazeMaxBonusLevel) * eventHandler.skillModifier;
|
double chance = (Archery.dazeMaxBonus / Archery.dazeMaxBonusLevel) * eventHandler.skillModifier;
|
||||||
|
@ -49,7 +49,7 @@ public class AxeManager extends SkillManager {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyAxes(player)) {
|
if (Permissions.luckyAxes(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
double chance = (Axes.criticalHitMaxChance / Axes.criticalHitMaxBonusLevel) * eventHandler.skillModifier;
|
double chance = (Axes.criticalHitMaxChance / Axes.criticalHitMaxBonusLevel) * eventHandler.skillModifier;
|
||||||
|
@ -64,7 +64,7 @@ public class ImpactEventHandler {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyAxes(player)) {
|
if (Permissions.luckyAxes(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.getRandom().nextInt(randomChance) <= Axes.greaterImpactChance) {
|
if (Misc.getRandom().nextInt(randomChance) <= Axes.greaterImpactChance) {
|
||||||
|
@ -97,7 +97,7 @@ public class Excavation {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyExcavation(player)) {
|
if (Permissions.luckyExcavation(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.getRandom().nextDouble() * randomChance <= treasure.getDropChance()) {
|
if (Misc.getRandom().nextDouble() * randomChance <= treasure.getDropChance()) {
|
||||||
|
@ -97,7 +97,7 @@ public class Fishing {
|
|||||||
|
|
||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
if (Permissions.luckyFishing(player)) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.getRandom().nextDouble() * randomChance <= foundTreasure.getDropChance()) {
|
if (Misc.getRandom().nextDouble() * randomChance <= foundTreasure.getDropChance()) {
|
||||||
@ -147,7 +147,7 @@ public class Fishing {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyFishing(player)) {
|
if (Permissions.luckyFishing(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.getWorld().hasStorm()) {
|
if (player.getWorld().hasStorm()) {
|
||||||
@ -214,7 +214,7 @@ public class Fishing {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyFishing(event.getPlayer())) {
|
if (Permissions.luckyFishing(event.getPlayer())) {
|
||||||
randomChance = (int) (randomChance * 1.25);
|
randomChance = 125;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Player player = event.getPlayer();
|
final Player player = event.getPlayer();
|
||||||
|
@ -104,7 +104,7 @@ public class Herbalism {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyHerbalism(player)) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel);
|
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel);
|
||||||
@ -451,7 +451,7 @@ public class Herbalism {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyHerbalism(player)) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel);
|
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * herbLevel);
|
||||||
@ -525,7 +525,7 @@ public class Herbalism {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyHerbalism(player)) {
|
if (Permissions.luckyHerbalism(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
float chance = (float) (((double) MAX_CHANCE / (double) MAX_BONUS_LEVEL) * skillLevel);
|
||||||
|
@ -358,7 +358,7 @@ public class WoodCutting {
|
|||||||
if (chance > MAX_CHANCE) chance = MAX_CHANCE;
|
if (chance > MAX_CHANCE) chance = MAX_CHANCE;
|
||||||
|
|
||||||
if (Permissions.luckyWoodcutting(player)) {
|
if (Permissions.luckyWoodcutting(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (chance > Misc.getRandom().nextInt(randomChance) && Permissions.woodcuttingDoubleDrops(player)) {
|
if (chance > Misc.getRandom().nextInt(randomChance) && Permissions.woodcuttingDoubleDrops(player)) {
|
||||||
|
@ -113,7 +113,7 @@ public class Repair {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyRepair(player)) {
|
if (Permissions.luckyRepair(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.getRandom().nextInt(randomChance) <= getEnchantChance(rank)) {
|
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);
|
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 (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)) {
|
if (chance > Misc.getRandom().nextInt(randomChance) && Permissions.repairBonus(player)) {
|
||||||
player.sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy"));
|
player.sendMessage(LocaleLoader.getString("Repair.Skills.FeltEasy"));
|
||||||
|
@ -34,7 +34,7 @@ public class SwordsManager extends SkillManager {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckySwords(player)) {
|
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);
|
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;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckySwords(player)) {
|
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);
|
float chance = (float) (((double) Swords.COUNTER_ATTACK_CHANCE_MAX / (double) Swords.COUNTER_ATTACK_MAX_BONUS_LEVEL) * skillLevel);
|
||||||
|
@ -40,7 +40,7 @@ public class TamingManager extends SkillManager {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyTaming(player)) {
|
if (Permissions.luckyTaming(player)) {
|
||||||
randomChance = (int) (randomChance * 0.75);
|
randomChance = 75;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Misc.getRandom().nextInt(randomChance) < Taming.FAST_FOOD_SERVICE_ACTIVATION_CHANCE) {
|
if (Misc.getRandom().nextInt(randomChance) < Taming.FAST_FOOD_SERVICE_ACTIVATION_CHANCE) {
|
||||||
@ -89,7 +89,7 @@ public class TamingManager extends SkillManager {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyTaming(player)) {
|
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);
|
float chance = (float) (((double) Taming.GORE_CHANCE_MAX / (double) Taming.GORE_MAX_BONUS_LEVEL) * skillLevel);
|
||||||
|
@ -34,7 +34,7 @@ public class UnarmedManager extends SkillManager {
|
|||||||
int randomChance = 100;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyUnarmed(player)) {
|
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);
|
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;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyUnarmed(player)) {
|
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);
|
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;
|
int randomChance = 100;
|
||||||
|
|
||||||
if (Permissions.luckyUnarmed(defender)) {
|
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);
|
float chance = (float) (((double) Unarmed.IRON_GRIP_MAX_CHANCE / (double) Unarmed.IRON_GRIP_MAX_BONUS_LEVEL) * skillLevel);
|
||||||
|
Loading…
Reference in New Issue
Block a user