mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-25 10:14:43 +02:00
Added new subskill to Swords, Stab
This commit is contained in:
@ -58,7 +58,7 @@ public enum PrimarySkillType {
|
||||
SMELTING(SmeltingManager.class, Color.YELLOW,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
|
@ -71,6 +71,7 @@ public enum SubSkillType {
|
||||
SWORDS_COUNTER_ATTACK(1),
|
||||
SWORDS_RUPTURE(4),
|
||||
SWORDS_SERRATED_STRIKES(1),
|
||||
SWORDS_STAB(2),
|
||||
|
||||
/* Taming */
|
||||
TAMING_BEAST_LORE(1),
|
||||
|
@ -4,10 +4,8 @@ import com.gmail.nossr50.config.AdvancedConfig;
|
||||
|
||||
public class Swords {
|
||||
public static int bleedMaxTicks = AdvancedConfig.getInstance().getRuptureMaxTicks();
|
||||
public static int bleedBaseTicks = AdvancedConfig.getInstance().getRuptureBaseTicks();
|
||||
|
||||
public static double counterAttackModifier = AdvancedConfig.getInstance().getCounterModifier();
|
||||
|
||||
public static double serratedStrikesModifier = AdvancedConfig.getInstance().getSerratedStrikesModifier();
|
||||
public static int serratedStrikesBleedTicks = AdvancedConfig.getInstance().getSerratedStrikesTicks();
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ public class SwordsManager extends SkillManager {
|
||||
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() {
|
||||
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)
|
||||
{
|
||||
if(ItemUtils.isDiamondTool(itemStack))
|
||||
|
@ -61,6 +61,12 @@ public final class CombatUtils {
|
||||
}
|
||||
}
|
||||
|
||||
//Add Stab Damage
|
||||
if(swordsManager.canUseStab())
|
||||
{
|
||||
event.setDamage(swordsManager.stabCheck(target) + initialDamage);
|
||||
}
|
||||
|
||||
if (swordsManager.canUseSerratedStrike()) {
|
||||
swordsManager.serratedStrikes(target, initialDamage, modifiers);
|
||||
}
|
||||
|
@ -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.Rupture.Name=Rupture
|
||||
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.Extra=Rupture: [[GREEN]]{0} ticks [{1} DMG vs Player] [{2} DMG vs Mobs]
|
||||
Swords.Effect.4=Serrated Strikes Rupture+
|
||||
|
@ -561,6 +561,7 @@ permissions:
|
||||
description: Allows access to all Swords abilities
|
||||
children:
|
||||
mcmmo.ability.swords.rupture: true
|
||||
mcmmo.ability.swords.stab: true
|
||||
mcmmo.ability.swords.counterattack: true
|
||||
mcmmo.ability.swords.serratedstrikes: true
|
||||
mcmmo.ability.swords.rupture:
|
||||
|
@ -381,6 +381,13 @@ Fishing:
|
||||
Rank_7: 850
|
||||
Rank_8: 1000
|
||||
Swords:
|
||||
Stab:
|
||||
Standard:
|
||||
Rank_1: 75
|
||||
Rank_2: 100
|
||||
RetroMode:
|
||||
Rank_1: 750
|
||||
Rank_2: 1000
|
||||
CounterAttack:
|
||||
Standard:
|
||||
Rank_1: 20
|
||||
|
Reference in New Issue
Block a user