mirror of
				https://github.com/mcMMO-Dev/mcMMO.git
				synced 2025-11-04 02:53:43 +01:00 
			
		
		
		
	Fixed Greater Impact not dealing damage, nerf'd Axes critical chance.
This commit is contained in:
		@@ -13,6 +13,9 @@ Version 1.3.02
 | 
			
		||||
 ! Changed Tree Feller to cause injury if your axe splinters from a failed Tree Feller attempt
 | 
			
		||||
 ! Changed invincibility checks in EntityDamage listeners to accommodate for vanilla MC behaviour
 | 
			
		||||
 ! Changed Ignition to add fire ticks rather than replacing them.
 | 
			
		||||
 ! Changed Axes critical to have a max critical rate of 37.5% down from 75%
 | 
			
		||||
 = Fixed bug with Axes command displaying wrong Greater Impact bonus damage
 | 
			
		||||
 = Fixed bug where Impact didn't apply bonus damage
 | 
			
		||||
 = Fixed Impact proccing multiple times in a row
 | 
			
		||||
 = Fixed bug where PVE skills didn't level
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -82,7 +82,7 @@ public class Combat
 | 
			
		||||
				Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
 | 
			
		||||
				
 | 
			
		||||
				//Impact
 | 
			
		||||
				Axes.impact(attacker, target);
 | 
			
		||||
				Axes.impact(attacker, target, event);
 | 
			
		||||
					
 | 
			
		||||
				if (PPa.getSkullSplitterMode())
 | 
			
		||||
					Axes.applyAoeDamage(attacker, event, pluginx);
 | 
			
		||||
 
 | 
			
		||||
@@ -26,9 +26,9 @@ public class AxesCommand implements CommandExecutor {
 | 
			
		||||
 | 
			
		||||
		float skillvalue = (float) PP.getSkillLevel(SkillType.AXES);
 | 
			
		||||
		if (PP.getSkillLevel(SkillType.AXES) < 750)
 | 
			
		||||
			percentage = String.valueOf((skillvalue / 1000) * 100);
 | 
			
		||||
			percentage = String.valueOf((skillvalue / 2000) * 100);
 | 
			
		||||
		else
 | 
			
		||||
			percentage = "75";
 | 
			
		||||
			percentage = "37.5";
 | 
			
		||||
		
 | 
			
		||||
		int bonusDmg = Users.getProfile(player).getSkillLevel(SkillType.AXES)/50;
 | 
			
		||||
		if(bonusDmg > 4)
 | 
			
		||||
@@ -60,7 +60,7 @@ public class AxesCommand implements CommandExecutor {
 | 
			
		||||
		
 | 
			
		||||
		player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes1_0"), mcLocale.getString("m.AbilBonusAxes1_1", new Object[] {bonusDmg}) }));
 | 
			
		||||
        player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes2_0"), mcLocale.getString("m.AbilBonusAxes2_1", new Object[] {durDmg}) }));
 | 
			
		||||
        player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes3_0"), mcLocale.getString("m.AbilBonusAxes3_1", new Object[] {1}) }));
 | 
			
		||||
        player.sendMessage(mcLocale.getString("m.AbilityBonusTemplate", new Object[] { mcLocale.getString("m.AbilBonusAxes3_0"), mcLocale.getString("m.AbilBonusAxes3_1", new Object[] {2}) }));
 | 
			
		||||
        player.sendMessage(mcLocale.getString("m.AxesSkullLength", new Object[] { ticks }));
 | 
			
		||||
 | 
			
		||||
		return true;
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ public class Axes {
 | 
			
		||||
    	PlayerProfile PPa = Users.getProfile(attacker);
 | 
			
		||||
    	if(m.isAxes(attacker.getItemInHand()) && mcPermissions.getInstance().axes(attacker)){
 | 
			
		||||
    		if(PPa.getSkillLevel(SkillType.AXES) >= 750){
 | 
			
		||||
    			if(Math.random() * 1000 <= 750 && !x.isDead()){
 | 
			
		||||
    			if(Math.random() * 2000 <= 750 && !x.isDead()){
 | 
			
		||||
    				if(x instanceof Player){
 | 
			
		||||
    					int damage = (event.getDamage() * 2) - (event.getDamage() / 2);
 | 
			
		||||
    					event.setDamage(damage);
 | 
			
		||||
@@ -78,7 +78,7 @@ public class Axes {
 | 
			
		||||
        			}
 | 
			
		||||
    				attacker.sendMessage(ChatColor.RED+"CRITICAL HIT!");
 | 
			
		||||
    			}
 | 
			
		||||
    		} else if(Math.random() * 1000 <= PPa.getSkillLevel(SkillType.AXES) && !x.isDead()){
 | 
			
		||||
    		} else if(Math.random() * 2000 <= PPa.getSkillLevel(SkillType.AXES) && !x.isDead()){
 | 
			
		||||
    			if(x instanceof Player){
 | 
			
		||||
    				int damage = (event.getDamage() * 2) - (event.getDamage() / 2);
 | 
			
		||||
					event.setDamage(damage);
 | 
			
		||||
@@ -94,7 +94,7 @@ public class Axes {
 | 
			
		||||
    	}
 | 
			
		||||
    }
 | 
			
		||||
	
 | 
			
		||||
	public static void impact(Player attacker, LivingEntity target)
 | 
			
		||||
	public static void impact(Player attacker, LivingEntity target, EntityDamageByEntityEvent event)
 | 
			
		||||
	{
 | 
			
		||||
	    //TODO: Finish this skill, the idea is you will greatly damage an opponents armor and when they are armor less you have a proc that will stun them and deal additional damage.
 | 
			
		||||
	    if(target instanceof Player)
 | 
			
		||||
@@ -116,18 +116,18 @@ public class Axes {
 | 
			
		||||
	        }
 | 
			
		||||
	        
 | 
			
		||||
	        if(emptySlots == 4)
 | 
			
		||||
	            applyImpact(attacker, target);
 | 
			
		||||
	            applyImpact(attacker, target, event);
 | 
			
		||||
	    }
 | 
			
		||||
	    else
 | 
			
		||||
	        //Since mobs are technically unarmored this will always trigger
 | 
			
		||||
	        applyImpact(attacker, target);
 | 
			
		||||
	        applyImpact(attacker, target, event);
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	public static void applyImpact(Player attacker, LivingEntity target)
 | 
			
		||||
	public static void applyImpact(Player attacker, LivingEntity target, EntityDamageByEntityEvent event)
 | 
			
		||||
	{
 | 
			
		||||
	    if(Math.random() * 100 > 75)
 | 
			
		||||
        {
 | 
			
		||||
            Combat.dealDamage(target, 2, attacker);
 | 
			
		||||
            event.setDamage(event.getDamage()+2);
 | 
			
		||||
            target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(1.5D));
 | 
			
		||||
            attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy"));
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user