Prechádzať zdrojové kódy

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.
TfT_02 11 rokov pred
rodič
commit
ed8197bd50

+ 1 - 0
Changelog.txt

@@ -52,6 +52,7 @@ Version 1.4.07-dev
  ! Changed default XP multiplier for repairing shears
  ! Changed "Shake" drops for Witches. They no longer drop water bottles, since they no longer drop them in Vanilla.
  ! Changed various values to double in advanced.yml for the sake of consistency.
+ ! Nerfed Fishing "Master Angler" (removed skill level based bonus) and also made the modifiers configurable
  ! Nerfed Archery damage to eliminate constant one-hit kills.
  ! Changed the way Repair hands out XP, also added config options to control Repair XP
  ! Changed Swords "Counter Attack" ability from passive to active. Blocking is required to activate.

+ 9 - 2
src/main/java/com/gmail/nossr50/commands/skills/FishingCommand.java

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

+ 16 - 0
src/main/java/com/gmail/nossr50/config/AdvancedConfig.java

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

+ 4 - 4
src/main/java/com/gmail/nossr50/skills/fishing/FishingManager.java

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

+ 8 - 0
src/main/resources/advanced.yml

@@ -159,6 +159,14 @@ Skills:
         IceFishing:
             # UnlockLevel: Fishing level when the Ice Fishing ability unlocks
             UnlockLevel: 50
+
+        MasterAngler:
+            # UnlockLevel: Fishing level when the Master Angler ability unlocks
+            # BoatMultiplier: Catch rate is multiplied by this modifier
+            # BiomeModifier: Catch rate is multiplied by this modifier
+            UnlockLevel: 125
+            BoatModifier: 2.0
+            BiomeModifier: 2.0
     #
     #  Settings for Herbalism
     ###

+ 2 - 1
src/main/resources/locale/locale_en_US.properties

@@ -103,6 +103,7 @@ Fishing.Ability.Chance=[[RED]]Bite Chance: [[YELLOW]]{0}
 Fishing.Ability.Info=[[RED]]Magic Hunter: [[GRAY]] **Improves With Treasure Hunter Rank**
 Fishing.Ability.Locked.0=LOCKED UNTIL {0}+ SKILL (SHAKE)
 Fishing.Ability.Locked.1=LOCKED UNTIL {0}+ SKILL (ICE FISHING)
+Fishing.Ability.Locked.2=LOCKED UNTIL {0}+ SKILL (MASTER ANGLER)
 Fishing.Ability.Rank=[[RED]]Treasure Hunter Rank: [[YELLOW]]{0}/{1}
 Fishing.Ability.TH.DropRate=[[RED]] Drop Rate: [[DARK_RED]]Trap: [[YELLOW]]{0} [[GRAY]]Common: [[YELLOW]]{1} [[GREEN]]Uncommon: [[YELLOW]]{2}\n[[BLUE]]Rare: [[YELLOW]]{3} [[LIGHT_PURPLE]]Epic: [[YELLOW]]{4} [[GOLD]]Legendary: [[YELLOW]]{5} [[AQUA]]Record: [[YELLOW]]{6}
 Fishing.Ability.TH.MagicRate=[[RED]]Magic Hunter Chance: [[YELLOW]]{0}
@@ -660,7 +661,7 @@ Guides.Excavation.Section.5=[[DARK_AQUA]]Notes about Excavation:\n[[YELLOW]]Exca
 Guides.Fishing.Section.0=[[DARK_AQUA]]About Fishing:\n[[YELLOW]]With the Fishing skill, Fishing is exciting again!\n[[YELLOW]]Find hidden treasures, and shake items off mobs.\n\n[[DARK_AQUA]]XP GAIN:\n[[YELLOW]]Catch fish.
 Guides.Fishing.Section.1=[[DARK_AQUA]]How does Treasure Hunter work?\n[[YELLOW]]This ability allows you to find treasure from fishing \n[[YELLOW]]with a small chance of the items being enchanted.\n[[YELLOW]]Every possible treasure for Fishing has a chance\n[[YELLOW]]to drop on any level. It depends however\n[[YELLOW]]what the rarity of the item is how often it will drop.\n[[YELLOW]]The higher your Fishing skill is, the better\n[[YELLOW]]your chances are to find better treasures.
 Guides.Fishing.Section.2=[[DARK_AQUA]]How does Ice Fishing work?\n[[YELLOW]]This passive skill allows you to fish in ice lakes!\n[[YELLOW]]Cast your fishing rod in an ice lake and the ability will\n[[YELLOW]]create a small hole in the ice to fish in.
-Guides.Fishing.Section.3=[[DARK_AQUA]]How does Master Angler work?\n[[YELLOW]]This passive skill increases the bite chance while fishing.\n[[YELLOW]]When you've unlocked this ability, fishing while in\n[[YELLOW]]a boat or an ocean biome will double the bite chance.
+Guides.Fishing.Section.3=[[DARK_AQUA]]How does Master Angler work?\n[[YELLOW]]This passive skill increases the bite chance while fishing.\n[[YELLOW]]When you've unlocked this ability, fishing while in\n[[YELLOW]]a boat or when an ocean biome doubles the bite chance.
 Guides.Fishing.Section.4=[[DARK_AQUA]]How does Shake work?\n[[YELLOW]]This active ability allows you to shake items loose from mobs\n[[YELLOW]]by hooking them with the fishing rod. \n[[YELLOW]]Mobs will drop items they would normally drop on death.\n[[YELLOW]]It is also possible to acquire mob skulls, which are normally \n[[YELLOW]]unobtainable in survival mode.
 Guides.Fishing.Section.5=[[DARK_AQUA]]How does Fisherman's Diet work?\n[[YELLOW]]This passive skill increases the amount of hunger restored \n[[YELLOW]]from eating fish.
 Guides.Fishing.Section.6=[[DARK_AQUA]]Notes about Fishing:\n[[YELLOW]]Fishing drops are completely customizable,\n[[YELLOW]]so results vary server to server.