Browse Source

Prep for release of 2.1.4
Fixed many display bugs
Added ranks to Super Repair, and Repair Mastery
Fixes #3754, #3746, #3745, #3756

nossr50 6 years ago
parent
commit
8262711e7e

+ 10 - 0
Changelog.txt

@@ -10,6 +10,16 @@ Key:
 Version 2.1.4
     Fixed a bug where Alchemy didn't gain XP
     Fixed a bug where Archery gained XP from mob spawned entities
+    Fixed a display bug with Roll on /acrobatics command
+    Fixed a display bug for bite chance on Fishing
+    Fixed a display bug for treasure drop chances on Fishing
+    Fixed a display bug for Arcane Forging on Repair
+    Fixed a display bug for Super Repair on Repair
+    Fixed a display bug for Repair Mastery on Repair
+    Fixed a display bug for Second Smelt on Smelting
+    Repair Mastery now uses a rank system
+    Super Repair now uses a rank system
+    Changed the stat for bite chance to be more clear that its additive chance
     Fixed Styling for the /salvage command
     Temporarily disabled Flux Mining
     Removed XP from entities that target endermite to prevent easy exploitation (Credits to TheBentoBox for the tip!) [Can be turned off in experience.yml]

+ 1 - 1
pom.xml

@@ -2,7 +2,7 @@
     <modelVersion>4.0.0</modelVersion>
     <groupId>com.gmail.nossr50.mcMMO</groupId>
     <artifactId>mcMMO</artifactId>
-    <version>2.1.4-SNAPSHOT</version>
+    <version>2.1.4</version>
     <name>mcMMO</name>
     <url>https://github.com/mcMMO-Dev/mcMMO</url>
     <scm>

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/AcrobaticsCommand.java

@@ -71,7 +71,7 @@ public class AcrobaticsCommand extends SkillCommand {
                 graceChance      = RandomChanceUtil.getRandomChanceExecutionChance(grace_rcs);
                 //damageThreshold  = AdvancedConfig.getInstance().getRollDamageThreshold();
 
-                String rollStrings[] = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.MINING_DOUBLE_DROPS);
+                String rollStrings[] = getAbilityDisplayValues(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, player, SubSkillType.ACROBATICS_ROLL);
 
                 //Format
                 double rollChanceLucky  = rollChance * 1.333D;

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

@@ -8,6 +8,7 @@ import com.gmail.nossr50.datatypes.treasure.Rarity;
 import com.gmail.nossr50.locale.LocaleLoader;
 import com.gmail.nossr50.skills.fishing.Fishing;
 import com.gmail.nossr50.skills.fishing.FishingManager;
+import com.gmail.nossr50.util.Permissions;
 import com.gmail.nossr50.util.TextComponentFactory;
 import com.gmail.nossr50.util.player.UserManager;
 import com.gmail.nossr50.util.random.RandomChanceSkillStatic;
@@ -96,6 +97,7 @@ public class FishingCommand extends SkillCommand {
         // MASTER ANGLER
         if (canMasterAngler) {
             double rawBiteChance = 1.0 / (player.getWorld().hasStorm() ? 300 : 500);
+
             Location location = fishingManager.getHookLocation();
 
             if (location == null) {
@@ -110,7 +112,9 @@ public class FishingCommand extends SkillCommand {
                 rawBiteChance = rawBiteChance * AdvancedConfig.getInstance().getMasterAnglerBoatModifier();
             }
 
-            biteChance = RandomChanceUtil.calculateAbilityDisplayValuesStatic(player,PrimarySkillType.FISHING,rawBiteChance)[0];
+            double luckyModifier = Permissions.lucky(player, PrimarySkillType.FISHING) ? 1.333D : 1.0D;
+
+            biteChance = String.valueOf((rawBiteChance * 100.0D) * luckyModifier);
         }
     }
 
@@ -142,7 +146,7 @@ public class FishingCommand extends SkillCommand {
 
         if (canMasterAngler) {
             //TODO: Update this with more details
-            messages.add(getStatMessage(SubSkillType.FISHING_MASTER_ANGLER, biteChance));
+            messages.add(getStatMessage(false, true, SubSkillType.FISHING_MASTER_ANGLER, biteChance));
         }
         
         if (canShake) {

+ 7 - 4
src/main/java/com/gmail/nossr50/commands/skills/RepairCommand.java

@@ -76,9 +76,9 @@ public class RepairCommand extends SkillCommand {
 
     @Override
     protected void permissionsCheck(Player player) {
-        canSuperRepair = Permissions.isSubSkillEnabled(player, SubSkillType.REPAIR_SUPER_REPAIR);
-        canMasterRepair = Permissions.isSubSkillEnabled(player, SubSkillType.REPAIR_REPAIR_MASTERY);
-        canArcaneForge = Permissions.isSubSkillEnabled(player, SubSkillType.REPAIR_ARCANE_FORGING);
+        canSuperRepair = canUseSubskill(player, SubSkillType.REPAIR_SUPER_REPAIR);
+        canMasterRepair = canUseSubskill(player, SubSkillType.REPAIR_REPAIR_MASTERY);
+        canArcaneForge = canUseSubskill(player, SubSkillType.REPAIR_ARCANE_FORGING);
         canRepairDiamond = Permissions.repairMaterialType(player, MaterialType.DIAMOND);
         canRepairGold = Permissions.repairMaterialType(player, MaterialType.GOLD);
         canRepairIron = Permissions.repairMaterialType(player, MaterialType.IRON);
@@ -96,7 +96,10 @@ public class RepairCommand extends SkillCommand {
         if (canArcaneForge) {
             RepairManager repairManager = UserManager.getPlayer(player).getRepairManager();
 
-            messages.add(getStatMessage(false, true, SubSkillType.REPAIR_ARCANE_FORGING, RankUtils.getHighestRankStr(SubSkillType.REPAIR_ARCANE_FORGING)));
+            messages.add(getStatMessage(false, true,
+                    SubSkillType.REPAIR_ARCANE_FORGING,
+                    String.valueOf(RankUtils.getRank(player, SubSkillType.REPAIR_ARCANE_FORGING)),
+                    RankUtils.getHighestRankStr(SubSkillType.REPAIR_ARCANE_FORGING)));
 
             if (ArcaneForging.arcaneForgingEnchantLoss || ArcaneForging.arcaneForgingDowngrades) {
                 messages.add(getStatMessage(true, true, SubSkillType.REPAIR_ARCANE_FORGING,

+ 1 - 1
src/main/java/com/gmail/nossr50/commands/skills/SmeltingCommand.java

@@ -76,7 +76,7 @@ public class SmeltingCommand extends SkillCommand {
         }
 
         if (canSecondSmelt) {
-            messages.add(getStatMessage(SubSkillType.SMELTING_SECOND_SMELT, str_fluxMiningChance)
+            messages.add(getStatMessage(SubSkillType.SMELTING_SECOND_SMELT, str_secondSmeltChance)
                     + (isLucky ? LocaleLoader.getString("Perks.Lucky.Bonus", str_secondSmeltChanceLucky) : ""));
         }
 

+ 2 - 2
src/main/java/com/gmail/nossr50/datatypes/skills/SubSkillType.java

@@ -55,8 +55,8 @@ public enum SubSkillType {
 
     /* Repair */
     REPAIR_ARCANE_FORGING(8),
-    REPAIR_REPAIR_MASTERY,
-    REPAIR_SUPER_REPAIR,
+    REPAIR_REPAIR_MASTERY(1),
+    REPAIR_SUPER_REPAIR(1),
 
     /* Salvage */
     SALVAGE_ADVANCED_SALVAGE(1),

+ 4 - 1
src/main/java/com/gmail/nossr50/skills/repair/RepairManager.java

@@ -262,7 +262,7 @@ public class RepairManager extends SkillManager {
     private short repairCalculate(short durability, int repairAmount) {
         Player player = getPlayer();
 
-        if (Permissions.isSubSkillEnabled(player, SubSkillType.REPAIR_REPAIR_MASTERY)) {
+        if (Permissions.isSubSkillEnabled(player, SubSkillType.REPAIR_REPAIR_MASTERY) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.REPAIR_REPAIR_MASTERY)) {
             double bonus = repairAmount * Math.min((((Repair.repairMasteryMaxBonus / Repair.repairMasteryMaxBonusLevel) * getSkillLevel()) / 100.0D), Repair.repairMasteryMaxBonus / 100.0D);
             repairAmount += bonus;
         }
@@ -284,6 +284,9 @@ public class RepairManager extends SkillManager {
      * @return true if bonus granted, false otherwise
      */
     private boolean checkPlayerProcRepair() {
+        if(!RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.REPAIR_SUPER_REPAIR))
+            return false;
+
         if (RandomChanceUtil.isActivationSuccessful(SkillActivationType.RANDOM_LINEAR_100_SCALE_WITH_CAP, SubSkillType.REPAIR_SUPER_REPAIR, getPlayer())) {
             NotificationManager.sendPlayerInformation(getPlayer(), NotificationType.SUBSKILL_MESSAGE, "Repair.Skills.FeltEasy");
             return true;

+ 3 - 3
src/main/resources/locale/locale_en_US.properties

@@ -224,7 +224,7 @@ Fishing.Ability.Locked.2=LOCKED UNTIL {0}+ SKILL (MASTER ANGLER)
 Fishing.SubSkill.TreasureHunter.Name=Treasure Hunter
 Fishing.SubSkill.TreasureHunter.Description=Fish up misc. objects
 Fishing.SubSkill.TreasureHunter.Stat=Treasure Hunter Rank: [[GREEN]]{0}[[DARK_AQUA]]/[[GREEN]]{1}
-Fishing.SubSkill.TreasureHunter.Stat.Extra=Drop Rate: [[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.SubSkill.TreasureHunter.Stat.Extra=Drop Rate: [[GRAY]]Common: [[YELLOW]]{0} [[GREEN]]Uncommon: [[YELLOW]]{1}\n[[BLUE]]Rare: [[YELLOW]]{2} [[LIGHT_PURPLE]]Epic: [[YELLOW]]{3} [[GOLD]]Legendary: [[YELLOW]]{4} [[AQUA]]Record: [[YELLOW]]{5}
 Fishing.SubSkill.MagicHunter.Name=Magic Hunter
 Fishing.SubSkill.MagicHunter.Description=Find Enchanted Items
 Fishing.SubSkill.MagicHunter.Stat=Magic Hunter Chance
@@ -236,7 +236,7 @@ Fishing.SubSkill.FishermansDiet.Description=Improves hunger restored from fished
 Fishing.SubSkill.FishermansDiet.Stat=Fisherman's Diet:[[GREEN]] Rank {0}
 Fishing.SubSkill.MasterAngler.Name=Master Angler
 Fishing.SubSkill.MasterAngler.Description=Improves chance of getting a bite while fishing
-Fishing.SubSkill.MasterAngler.Stat=Bite Chance at your current location
+Fishing.SubSkill.MasterAngler.Stat=Added Bite Chance at your current location: [[GREEN]]+[[YELLOW]]{0}%
 Fishing.SubSkill.IceFishing.Name=Ice Fishing
 Fishing.SubSkill.IceFishing.Description=Allows you to fish in icy biomes
 Fishing.SubSkill.IceFishing.Stat=Ice Fishing
@@ -992,7 +992,7 @@ Smelting.SubSkill.FuelEfficiency.Description=Increase the burn time of fuel used
 Smelting.SubSkill.FuelEfficiency.Stat=Fuel Efficiency Multiplier: [[YELLOW]]{0}x
 Smelting.SubSkill.SecondSmelt.Name=Second Smelt
 Smelting.SubSkill.SecondSmelt.Description=Double the resources gained from smelting
-Smelting.SubSkill.SecondSmelt.Stat=Second Smelt Chance:
+Smelting.SubSkill.SecondSmelt.Stat=Second Smelt Chance
 Smelting.Effect.4=Vanilla XP Boost
 Smelting.Effect.5=Increase vanilla XP gained while smelting
 Smelting.SubSkill.FluxMining.Name=Flux Mining

+ 10 - 0
src/main/resources/skillranks.yml

@@ -514,6 +514,16 @@ Excavation:
             Rank_7: 850
             Rank_8: 1000
 Repair:
+    RepairMastery:
+        Standard:
+            Rank_1: 20
+        RetroMode:
+            Rank_1: 200
+    SuperRepair:
+        Standard:
+            Rank_1: 40
+        RetroMode:
+            Rank_1: 400
     ArcaneForging:
         Standard:
             Rank_1: 10