Tweaks to SkullSplitter/SerratedStrikes

This commit is contained in:
nossr50
2012-02-14 10:33:49 -08:00
parent 441015d6a5
commit 939344816e
5 changed files with 30 additions and 42 deletions

View File

@ -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--;
}
}

View File

@ -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 */

View File

@ -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--;
}
}