mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-02 16:49:58 +01:00
commit
4f128ebbef
@ -82,11 +82,13 @@ public class Combat
|
|||||||
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
Axes.axeCriticalCheck(attacker, event, pluginx); //Critical hit
|
||||||
|
|
||||||
//Impact
|
//Impact
|
||||||
if(event.getEntity() instanceof LivingEntity)
|
if(!(event instanceof FakeEntityDamageByEntityEvent))
|
||||||
Axes.impact(attacker, (LivingEntity)event.getEntity());
|
{
|
||||||
|
Axes.impact(attacker, target);
|
||||||
|
|
||||||
if (!(event instanceof FakeEntityDamageByEntityEvent) && PPa.getSkullSplitterMode())
|
if (PPa.getSkullSplitterMode())
|
||||||
Axes.applyAoeDamage(attacker, event, pluginx);
|
Axes.applyAoeDamage(attacker, event, pluginx);
|
||||||
|
}
|
||||||
|
|
||||||
if(target instanceof Player)
|
if(target instanceof Player)
|
||||||
PvPExperienceGain(attacker, PPa, (Player) target, event.getDamage(), SkillType.AXES);
|
PvPExperienceGain(attacker, PPa, (Player) target, event.getDamage(), SkillType.AXES);
|
||||||
|
@ -97,8 +97,6 @@ public class Axes {
|
|||||||
public static void impact(Player attacker, LivingEntity target)
|
public static void impact(Player attacker, LivingEntity target)
|
||||||
{
|
{
|
||||||
//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.
|
//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.
|
||||||
boolean didImpact = false;
|
|
||||||
|
|
||||||
if(target instanceof Player)
|
if(target instanceof Player)
|
||||||
{
|
{
|
||||||
Player targetPlayer = (Player) target;
|
Player targetPlayer = (Player) target;
|
||||||
@ -120,31 +118,21 @@ public class Axes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(emptySlots == 4)
|
if(emptySlots == 4)
|
||||||
{
|
applyImpact(attacker, target);
|
||||||
didImpact = applyImpact(attacker, target);
|
|
||||||
if(didImpact)
|
|
||||||
targetPlayer.sendMessage(mcLocale.getString("Axes.GreaterImpactOnSelf"));
|
|
||||||
}
|
}
|
||||||
} else {
|
else
|
||||||
//Since mobs are technically unarmored this will always trigger
|
//Since mobs are technically unarmored this will always trigger
|
||||||
didImpact = applyImpact(attacker, target);
|
applyImpact(attacker, target);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(didImpact)
|
public static void applyImpact(Player attacker, LivingEntity target)
|
||||||
{
|
|
||||||
attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy"));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static boolean applyImpact(Player attacker, LivingEntity target)
|
|
||||||
{
|
{
|
||||||
if(Math.random() * 100 > 75)
|
if(Math.random() * 100 > 75)
|
||||||
{
|
{
|
||||||
Combat.dealDamage(target, 2, attacker);
|
Combat.dealDamage(target, 2, attacker);
|
||||||
target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(1.5D));
|
target.setVelocity(attacker.getLocation().getDirection().normalize().multiply(1.5D));
|
||||||
return true;
|
attacker.sendMessage(mcLocale.getString("Axes.GreaterImpactOnEnemy"));
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void applyAoeDamage(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
public static void applyAoeDamage(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||||
|
Loading…
Reference in New Issue
Block a user