mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 02:04:44 +02:00
Remove level based bonus from Master Angler
Let's try this another way, instead of removing this passive ability all togheter I think it would be nice to keep the boat/biome catch rate boost. The level based boost was out of hand and counter-intuitive as it made leveling easier on high skill levels.
This commit is contained in:
@ -82,7 +82,7 @@ public class FishingCommand extends SkillCommand {
|
||||
|
||||
// MASTER ANGLER
|
||||
if (canMasterAngler) {
|
||||
double rawBiteChance = ((Math.max((skillValue / 200.0), 1.0)) / (isStorming ? 300 : 500));
|
||||
double rawBiteChance = 1.0 / (isStorming ? 300 : 500);
|
||||
Biome biome = player.getLocation().getBlock().getBiome();
|
||||
|
||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||
@ -169,7 +169,14 @@ public class FishingCommand extends SkillCommand {
|
||||
}
|
||||
|
||||
if (canMasterAngler) {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Chance", biteChance));
|
||||
int unlockLevel = AdvancedConfig.getInstance().getMasterAnglerUnlockLevel();
|
||||
|
||||
if (skillValue < unlockLevel) {
|
||||
player.sendMessage(LocaleLoader.getString("Ability.Generic.Template.Lock", LocaleLoader.getString("Fishing.Ability.Locked.2", unlockLevel)));
|
||||
}
|
||||
else {
|
||||
player.sendMessage(LocaleLoader.getString("Fishing.Ability.Chance", biteChance));
|
||||
}
|
||||
}
|
||||
|
||||
if (canShake) {
|
||||
|
@ -207,6 +207,18 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
reason.add("Skills.Fishing.IceFishing.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerUnlockLevel() < 1) {
|
||||
reason.add("Skills.Fishing.MasterAngler.UnlockLevel should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerBoatModifier() < 1) {
|
||||
reason.add("Skills.Fishing.MasterAngler.BoatModifier should be at least 1!");
|
||||
}
|
||||
|
||||
if (getMasterAnglerBiomeModifier() < 1) {
|
||||
reason.add("Skills.Fishing.MasterAngler.BiomeModifier should be at least 1!");
|
||||
}
|
||||
|
||||
/* HERBALISM */
|
||||
if (getFarmerDietRankChange() < 1) {
|
||||
reason.add("Skills.Herbalism.FarmersDiet.RankChange should be at least 1!");
|
||||
@ -655,6 +667,10 @@ public class AdvancedConfig extends AutoUpdateConfigLoader {
|
||||
|
||||
public int getIceFishingUnlockLevel() { return config.getInt("Skills.Fishing.IceFishing.UnlockLevel", 50); }
|
||||
|
||||
public int getMasterAnglerUnlockLevel() {return config.getInt("Skills.Fishing.MasterAngler.UnlockLevel", 125); }
|
||||
public double getMasterAnglerBoatModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BoatModifier", 2.0); }
|
||||
public double getMasterAnglerBiomeModifier() {return config.getDouble("Skills.Fishing.MasterAngler.BiomeModifier", 2.0); }
|
||||
|
||||
/* HERBALISM */
|
||||
public int getFarmerDietRankChange() { return config.getInt("Skills.Herbalism.FarmersDiet.RankChange", 200); }
|
||||
|
||||
|
@ -80,7 +80,7 @@ public class FishingManager extends SkillManager {
|
||||
}
|
||||
|
||||
public boolean canMasterAngler() {
|
||||
return Permissions.masterAngler(getPlayer());
|
||||
return getSkillLevel() >= AdvancedConfig.getInstance().getMasterAnglerUnlockLevel() && Permissions.masterAngler(getPlayer());
|
||||
}
|
||||
|
||||
public boolean unleashTheKraken() {
|
||||
@ -284,14 +284,14 @@ public class FishingManager extends SkillManager {
|
||||
public void masterAngler(Fish hook) {
|
||||
Player player = getPlayer();
|
||||
Biome biome = player.getLocation().getBlock().getBiome();
|
||||
double biteChance = Math.min(hook.getBiteChance() * Math.max((getSkillLevel() / 200.0), 1.0), 1.0);
|
||||
double biteChance = hook.getBiteChance();
|
||||
|
||||
if (biome == Biome.RIVER || biome == Biome.OCEAN) {
|
||||
biteChance = biteChance * 2.0;
|
||||
biteChance = biteChance * AdvancedConfig.getInstance().getMasterAnglerBiomeModifier();
|
||||
}
|
||||
|
||||
if (player.isInsideVehicle() && player.getVehicle().getType() == EntityType.BOAT) {
|
||||
biteChance = biteChance * 2.0;
|
||||
biteChance = biteChance * AdvancedConfig.getInstance().getMasterAnglerBoatModifier();
|
||||
}
|
||||
|
||||
hook.setBiteChance(biteChance);
|
||||
|
Reference in New Issue
Block a user