Explorar el Código

Added new subskill to Swords, Stab

nossr50 hace 6 años
padre
commit
e0341f7ae7

+ 16 - 1
Changelog.txt

@@ -7,6 +7,21 @@ Key:
   ! Change
   ! Change
   - Removal
   - Removal
 
 
+Version 2.1.26
+    Changed how Iron Arm damage is calculated (Rank 1 now effectively gives twice the damage bonus it used to, with a net result of 3 extra RAW damage before reductions)
+    Added a new subskill named Stab to Swords to help with lategame PVP combat
+    New permission node 'mcmmo.ability.swords.stab'
+    NOTE: Combat skills will be completely configurable in the upcoming 2.2 update, be patient <3
+
+    Notes:
+    These changes are meant to be minor tweaks to PVP, a dedicated PVP update where I do a lot more research and testing will happen after 2.3
+
+    Stab is unlocked at level 75/750, and ranks up again at level 100/1000
+    Stab permanently adds small amounts of extra damage when attacking players with a sword.
+    Stab is meant to make up for Swords lackluster damage against fully geared opponents.
+
+    Iron Arm got buffed because Unarmed was dealing lackluster damage compared to other skills.
+
 Version 2.1.25
 Version 2.1.25
     Shake now has an upper limit of damage (10) - Will be configurable in 2.2 which is coming in the near future
     Shake now has an upper limit of damage (10) - Will be configurable in 2.2 which is coming in the near future
     Rank 1 of Catalysis & Concoctions are now available at level 0 by default (update skillranks.yml or delete it to regen a new one)
     Rank 1 of Catalysis & Concoctions are now available at level 0 by default (update skillranks.yml or delete it to regen a new one)
@@ -17,7 +32,7 @@ Version 2.1.24
 
 
 Version 2.1.23
 Version 2.1.23
     Fixed a bug with Double Drops for Mining (Update your configs instructions below)
     Fixed a bug with Double Drops for Mining (Update your configs instructions below)
-    Fixed a 7 year old bug where damage in mcMMO from Skills was potentially getting reduced by damage reduction TWICE
+    Fixed a 7 year old bug where damage in mcMMO from SkillBs was potentially getting reduced by damage reduction TWICE
     Fixed a bug where killing entities with Rupture would not properly credit you as the killer
     Fixed a bug where killing entities with Rupture would not properly credit you as the killer
     Fixed a bug where Serrated Strikes was applying Rupture twice
     Fixed a bug where Serrated Strikes was applying Rupture twice
     Players will now be ejected from Minecarts if they cast their fishing rod (anti-afk)
     Players will now be ejected from Minecarts if they cast their fishing rod (anti-afk)

+ 1 - 1
src/main/java/com/gmail/nossr50/datatypes/skills/PrimarySkillType.java

@@ -58,7 +58,7 @@ public enum PrimarySkillType {
     SMELTING(SmeltingManager.class, Color.YELLOW,
     SMELTING(SmeltingManager.class, Color.YELLOW,
             ImmutableList.of(SubSkillType.SMELTING_UNDERSTANDING_THE_ART, /*SubSkillType.SMELTING_FLUX_MINING,*/ SubSkillType.SMELTING_FUEL_EFFICIENCY, SubSkillType.SMELTING_SECOND_SMELT)),
             ImmutableList.of(SubSkillType.SMELTING_UNDERSTANDING_THE_ART, /*SubSkillType.SMELTING_FLUX_MINING,*/ SubSkillType.SMELTING_FUEL_EFFICIENCY, SubSkillType.SMELTING_SECOND_SMELT)),
     SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), SuperAbilityType.SERRATED_STRIKES, ToolType.SWORD,
     SWORDS(SwordsManager.class, Color.fromRGB(178, 34, 34), SuperAbilityType.SERRATED_STRIKES, ToolType.SWORD,
-            ImmutableList.of(SubSkillType.SWORDS_SERRATED_STRIKES, SubSkillType.SWORDS_RUPTURE, SubSkillType.SWORDS_COUNTER_ATTACK)),
+            ImmutableList.of(SubSkillType.SWORDS_SERRATED_STRIKES, SubSkillType.SWORDS_STAB, SubSkillType.SWORDS_RUPTURE, SubSkillType.SWORDS_COUNTER_ATTACK)),
     TAMING(TamingManager.class, Color.PURPLE,
     TAMING(TamingManager.class, Color.PURPLE,
             ImmutableList.of(SubSkillType.TAMING_BEAST_LORE, SubSkillType.TAMING_CALL_OF_THE_WILD, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE, SubSkillType.TAMING_FAST_FOOD_SERVICE, SubSkillType.TAMING_GORE, SubSkillType.TAMING_HOLY_HOUND, SubSkillType.TAMING_SHARPENED_CLAWS, SubSkillType.TAMING_SHOCK_PROOF, SubSkillType.TAMING_THICK_FUR, SubSkillType.TAMING_PUMMEL)),
             ImmutableList.of(SubSkillType.TAMING_BEAST_LORE, SubSkillType.TAMING_CALL_OF_THE_WILD, SubSkillType.TAMING_ENVIRONMENTALLY_AWARE, SubSkillType.TAMING_FAST_FOOD_SERVICE, SubSkillType.TAMING_GORE, SubSkillType.TAMING_HOLY_HOUND, SubSkillType.TAMING_SHARPENED_CLAWS, SubSkillType.TAMING_SHOCK_PROOF, SubSkillType.TAMING_THICK_FUR, SubSkillType.TAMING_PUMMEL)),
     UNARMED(UnarmedManager.class, Color.BLACK, SuperAbilityType.BERSERK, ToolType.FISTS,
     UNARMED(UnarmedManager.class, Color.BLACK, SuperAbilityType.BERSERK, ToolType.FISTS,

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

@@ -71,6 +71,7 @@ public enum SubSkillType {
     SWORDS_COUNTER_ATTACK(1),
     SWORDS_COUNTER_ATTACK(1),
     SWORDS_RUPTURE(4),
     SWORDS_RUPTURE(4),
     SWORDS_SERRATED_STRIKES(1),
     SWORDS_SERRATED_STRIKES(1),
+    SWORDS_STAB(2),
 
 
     /* Taming */
     /* Taming */
     TAMING_BEAST_LORE(1),
     TAMING_BEAST_LORE(1),

+ 0 - 2
src/main/java/com/gmail/nossr50/skills/swords/Swords.java

@@ -4,10 +4,8 @@ import com.gmail.nossr50.config.AdvancedConfig;
 
 
 public class Swords {
 public class Swords {
     public static int    bleedMaxTicks      = AdvancedConfig.getInstance().getRuptureMaxTicks();
     public static int    bleedMaxTicks      = AdvancedConfig.getInstance().getRuptureMaxTicks();
-    public static int    bleedBaseTicks     = AdvancedConfig.getInstance().getRuptureBaseTicks();
 
 
     public static double  counterAttackModifier      = AdvancedConfig.getInstance().getCounterModifier();
     public static double  counterAttackModifier      = AdvancedConfig.getInstance().getCounterModifier();
 
 
     public static double serratedStrikesModifier   = AdvancedConfig.getInstance().getSerratedStrikesModifier();
     public static double serratedStrikesModifier   = AdvancedConfig.getInstance().getSerratedStrikesModifier();
-    public static int    serratedStrikesBleedTicks = AdvancedConfig.getInstance().getSerratedStrikesTicks();
 }
 }

+ 20 - 0
src/main/java/com/gmail/nossr50/skills/swords/SwordsManager.java

@@ -33,6 +33,10 @@ public class SwordsManager extends SkillManager {
         return mcMMOPlayer.getToolPreparationMode(ToolType.SWORD) && Permissions.serratedStrikes(getPlayer());
         return mcMMOPlayer.getToolPreparationMode(ToolType.SWORD) && Permissions.serratedStrikes(getPlayer());
     }
     }
 
 
+    public boolean canUseStab() {
+        return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_STAB) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_STAB);
+    }
+
     public boolean canUseRupture() {
     public boolean canUseRupture() {
         return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_RUPTURE);
         return Permissions.isSubSkillEnabled(getPlayer(), SubSkillType.SWORDS_RUPTURE) && RankUtils.hasUnlockedSubskill(getPlayer(), SubSkillType.SWORDS_RUPTURE);
     }
     }
@@ -80,6 +84,22 @@ public class SwordsManager extends SkillManager {
         }
         }
     }
     }
 
 
+    public double stabCheck(LivingEntity target)
+    {
+        if(!(target instanceof Player))
+            return 0;
+
+        int rank = RankUtils.getRank(getPlayer(), SubSkillType.SWORDS_STAB);
+
+        if(rank > 0)
+        {
+            double stabDamage = 1.0D + (rank * 1.5);
+            return stabDamage;
+        }
+
+        return 0;
+    }
+
     public int getToolTier(ItemStack itemStack)
     public int getToolTier(ItemStack itemStack)
     {
     {
         if(ItemUtils.isDiamondTool(itemStack))
         if(ItemUtils.isDiamondTool(itemStack))

+ 6 - 0
src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java

@@ -61,6 +61,12 @@ public final class CombatUtils {
             }
             }
         }
         }
 
 
+        //Add Stab Damage
+        if(swordsManager.canUseStab())
+        {
+            event.setDamage(swordsManager.stabCheck(target) + initialDamage);
+        }
+
         if (swordsManager.canUseSerratedStrike()) {
         if (swordsManager.canUseSerratedStrike()) {
             swordsManager.serratedStrikes(target, initialDamage, modifiers);
             swordsManager.serratedStrikes(target, initialDamage, modifiers);
         }
         }

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

@@ -404,6 +404,8 @@ Swords.SubSkill.SerratedStrikes.Description=Deal partial damage in an AOE with a
 Swords.SubSkill.SerratedStrikes.Stat=Serrated Strikes Length
 Swords.SubSkill.SerratedStrikes.Stat=Serrated Strikes Length
 Swords.SubSkill.Rupture.Name=Rupture
 Swords.SubSkill.Rupture.Name=Rupture
 Swords.SubSkill.Rupture.Description=Apply a powerful bleed DoT
 Swords.SubSkill.Rupture.Description=Apply a powerful bleed DoT
+Swords.SubSkill.Stab.Name=Stab
+Swords.SubSkill.Stab.Description=Adds {0} extra damage when attacking players.
 Swords.SubSkill.Rupture.Stat=Rupture Chance
 Swords.SubSkill.Rupture.Stat=Rupture Chance
 Swords.SubSkill.Rupture.Stat.Extra=Rupture: [[GREEN]]{0} ticks [{1} DMG vs Player] [{2} DMG vs Mobs]
 Swords.SubSkill.Rupture.Stat.Extra=Rupture: [[GREEN]]{0} ticks [{1} DMG vs Player] [{2} DMG vs Mobs]
 Swords.Effect.4=Serrated Strikes Rupture+
 Swords.Effect.4=Serrated Strikes Rupture+

+ 1 - 0
src/main/resources/plugin.yml

@@ -561,6 +561,7 @@ permissions:
         description: Allows access to all Swords abilities
         description: Allows access to all Swords abilities
         children:
         children:
             mcmmo.ability.swords.rupture: true
             mcmmo.ability.swords.rupture: true
+            mcmmo.ability.swords.stab: true
             mcmmo.ability.swords.counterattack: true
             mcmmo.ability.swords.counterattack: true
             mcmmo.ability.swords.serratedstrikes: true
             mcmmo.ability.swords.serratedstrikes: true
     mcmmo.ability.swords.rupture:
     mcmmo.ability.swords.rupture:

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

@@ -381,6 +381,13 @@ Fishing:
             Rank_7: 850
             Rank_7: 850
             Rank_8: 1000
             Rank_8: 1000
 Swords:
 Swords:
+    Stab:
+        Standard:
+            Rank_1: 75
+            Rank_2: 100
+        RetroMode:
+            Rank_1: 750
+            Rank_2: 1000
     CounterAttack:
     CounterAttack:
         Standard:
         Standard:
             Rank_1: 20
             Rank_1: 20