mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-27 03:04:44 +02:00
Tweaks to SkullSplitter/SerratedStrikes
This commit is contained in:
@ -69,6 +69,7 @@ public class Axes {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void axeCriticalCheck(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||
{
|
||||
Entity x = event.getEntity();
|
||||
@ -118,6 +119,12 @@ public class Axes {
|
||||
public static void applyAoeDamage(Player attacker, EntityDamageByEntityEvent event, Plugin pluginx)
|
||||
{
|
||||
int targets = 0;
|
||||
|
||||
int dmgAmount = (event.getDamage()/2);
|
||||
|
||||
//Setup minimum damage
|
||||
if(dmgAmount < 1)
|
||||
dmgAmount = 1;
|
||||
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
{
|
||||
@ -135,6 +142,7 @@ public class Axes {
|
||||
if(Party.getInstance().inSameParty(attacker, Taming.getOwner(hurrDurr, pluginx)))
|
||||
continue;
|
||||
}
|
||||
|
||||
//Damage nearby LivingEntities
|
||||
if(derp instanceof LivingEntity && targets >= 1)
|
||||
{
|
||||
@ -154,18 +162,19 @@ public class Axes {
|
||||
if(target.isDead())
|
||||
continue;
|
||||
|
||||
if(targets >= 1 && derp.getWorld().getPVP() && !target.isDead())
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, event.getDamage() / 2, attacker);
|
||||
Combat.dealDamage(target, dmgAmount);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by CLEAVE!");
|
||||
targets--;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, event.getDamage() / 2, attacker);
|
||||
Combat.dealDamage(target, dmgAmount);
|
||||
targets--;
|
||||
}
|
||||
}
|
||||
|
@ -1119,7 +1119,7 @@ public class Fishing {
|
||||
if(le instanceof Player)
|
||||
return;
|
||||
|
||||
Combat.dealDamage(le, 1, event.getPlayer());
|
||||
Combat.dealDamage(le, 1);
|
||||
Location loc = le.getLocation();
|
||||
|
||||
/* Neutral Mobs */
|
||||
|
@ -113,6 +113,12 @@ public class Swords
|
||||
{
|
||||
int targets = 0;
|
||||
|
||||
int dmgAmount = (event.getDamage()/4);
|
||||
|
||||
//Setup minimum damage
|
||||
if(dmgAmount < 1)
|
||||
dmgAmount = 1;
|
||||
|
||||
if(event.getEntity() instanceof LivingEntity)
|
||||
{
|
||||
LivingEntity x = (LivingEntity) event.getEntity();
|
||||
@ -146,7 +152,7 @@ public class Swords
|
||||
continue;
|
||||
if(targets >= 1 && derp.getWorld().getPVP())
|
||||
{
|
||||
Combat.dealDamage(target, event.getDamage() / 4, attacker);
|
||||
Combat.dealDamage(target, dmgAmount);
|
||||
target.sendMessage(ChatColor.DARK_RED+"Struck by Serrated Strikes!");
|
||||
Users.getProfile(target).addBleedTicks(5);
|
||||
targets--;
|
||||
@ -159,7 +165,7 @@ public class Swords
|
||||
pluginx.misc.addToBleedQue((LivingEntity)derp);
|
||||
|
||||
LivingEntity target = (LivingEntity)derp;
|
||||
Combat.dealDamage(target, event.getDamage() / 4, attacker);
|
||||
Combat.dealDamage(target, dmgAmount);
|
||||
targets--;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user