mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 07:06:45 +01:00
Nerfs to axes
This commit is contained in:
parent
c1d6e79a41
commit
80dabad10e
@ -8,6 +8,7 @@ Key:
|
|||||||
- Removal
|
- Removal
|
||||||
|
|
||||||
Version 1.3.11
|
Version 1.3.11
|
||||||
|
! Changed axes to start with 1 durability damage instead of 5, gain 1 durability damage every 50 levels instead of 30, and only have a 25% chance on hit to damage armor (per armor piece)
|
||||||
+ Added compatibility with bow-wielding NPCs from Citizens/NPC mods
|
+ Added compatibility with bow-wielding NPCs from Citizens/NPC mods
|
||||||
+ Added compatibility for pvp-prevention plugins for Serrated Strikes
|
+ Added compatibility for pvp-prevention plugins for Serrated Strikes
|
||||||
= Fixed bug where mcMMO could throw NPE errors if trees cut down were from a custom mod and had an id of 17
|
= Fixed bug where mcMMO could throw NPE errors if trees cut down were from a custom mod and had an id of 17
|
||||||
|
@ -23,7 +23,7 @@ public class AxesCommand extends SkillCommand {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void dataCalculations() {
|
protected void dataCalculations() {
|
||||||
impactDamage = String.valueOf(5 + ((int) skillValue / 30));
|
impactDamage = String.valueOf(1 + ((int) skillValue / 50));
|
||||||
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
|
skullSplitterLength = String.valueOf(2 + ((int) skillValue / 50));
|
||||||
greaterImpactDamage = "2";
|
greaterImpactDamage = "2";
|
||||||
|
|
||||||
|
@ -102,6 +102,7 @@ public class Axes {
|
|||||||
* @param target The defending entity
|
* @param target The defending entity
|
||||||
* @param event The event to modify
|
* @param event The event to modify
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
public static void impact(Player attacker, LivingEntity target, EntityDamageByEntityEvent event) {
|
public static void impact(Player attacker, LivingEntity target, EntityDamageByEntityEvent event) {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -110,16 +111,17 @@ public class Axes {
|
|||||||
*/
|
*/
|
||||||
if (target instanceof Player) {
|
if (target instanceof Player) {
|
||||||
Player targetPlayer = (Player) target;
|
Player targetPlayer = (Player) target;
|
||||||
short durabilityDamage = 5; //Start with 5 durability damage
|
short durabilityDamage = 1; //Start with 1 durability damage
|
||||||
|
|
||||||
/* Every 30 Skill Levels you gain 1 durability damage */
|
/* Every 30 Skill Levels you gain 1 durability damage */
|
||||||
durabilityDamage += Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/30;
|
durabilityDamage += Users.getProfile(attacker).getSkillLevel(SkillType.AXES)/50;
|
||||||
|
|
||||||
if (!hasArmor(targetPlayer)) {
|
if (!hasArmor(targetPlayer)) {
|
||||||
applyGreaterImpact(attacker, target, event);
|
applyGreaterImpact(attacker, target, event);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (ItemStack armor : targetPlayer.getInventory().getArmorContents()) {
|
for (ItemStack armor : targetPlayer.getInventory().getArmorContents()) {
|
||||||
|
if(Math.random() * 100 > 75)
|
||||||
armor.setDurability((short) (armor.getDurability() + durabilityDamage)); //Damage armor piece
|
armor.setDurability((short) (armor.getDurability() + durabilityDamage)); //Damage armor piece
|
||||||
}
|
}
|
||||||
targetPlayer.updateInventory();
|
targetPlayer.updateInventory();
|
||||||
|
Loading…
Reference in New Issue
Block a user