accurate-ish weapon damage tracking
This commit is contained in:
parent
f0fc2fd519
commit
de4568d448
@ -52,6 +52,12 @@ import mineplex.game.clans.clans.siege.weapon.util.AccessType;
|
|||||||
import mineplex.game.clans.clans.siege.weapon.util.BarrierCollisionBox;
|
import mineplex.game.clans.clans.siege.weapon.util.BarrierCollisionBox;
|
||||||
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
|
import mineplex.game.clans.clans.siege.weapon.util.WeaponStateInfo;
|
||||||
import mineplex.game.clans.items.PlayerGear;
|
import mineplex.game.clans.items.PlayerGear;
|
||||||
|
import mineplex.game.clans.items.legendaries.AlligatorsTooth;
|
||||||
|
import mineplex.game.clans.items.legendaries.GiantsBroadsword;
|
||||||
|
import mineplex.game.clans.items.legendaries.HyperAxe;
|
||||||
|
import mineplex.game.clans.items.legendaries.LegendaryItem;
|
||||||
|
import mineplex.game.clans.items.legendaries.MagneticMaul;
|
||||||
|
import mineplex.game.clans.items.legendaries.WindBlade;
|
||||||
|
|
||||||
public abstract class SiegeWeapon implements Listener
|
public abstract class SiegeWeapon implements Listener
|
||||||
{
|
{
|
||||||
@ -201,7 +207,6 @@ public abstract class SiegeWeapon implements Listener
|
|||||||
UtilTextMiddle.display(UtilText.possesive(_ownerClan.getName(), _name), C.cRed + "-" + health, 5, 15, 5);
|
UtilTextMiddle.display(UtilText.possesive(_ownerClan.getName(), _name), C.cRed + "-" + health, 5, 15, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected int getHandDamage(Player player)
|
protected int getHandDamage(Player player)
|
||||||
{
|
{
|
||||||
ItemStack stack = player.getItemInHand();
|
ItemStack stack = player.getItemInHand();
|
||||||
@ -209,15 +214,34 @@ public abstract class SiegeWeapon implements Listener
|
|||||||
|
|
||||||
if (stack == null)
|
if (stack == null)
|
||||||
{
|
{
|
||||||
return 1 ;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gear.getWeapon() != null)
|
if (gear.getWeapon() != null && gear.getWeapon() instanceof LegendaryItem)
|
||||||
{
|
{
|
||||||
|
if (gear.getWeapon() instanceof AlligatorsTooth)
|
||||||
|
{
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
else if (gear.getWeapon() instanceof GiantsBroadsword)
|
||||||
|
{
|
||||||
|
return 10;
|
||||||
|
}
|
||||||
|
else if (gear.getWeapon() instanceof HyperAxe)
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
else if (gear.getWeapon() instanceof MagneticMaul)
|
||||||
|
{
|
||||||
|
return 8;
|
||||||
|
}
|
||||||
|
else if (gear.getWeapon() instanceof WindBlade)
|
||||||
|
{
|
||||||
|
return 7;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return UtilItem.getAttackDamage(player);
|
return (int) UtilItem.getAttackDamage(stack.getType());
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void ResetEntities()
|
protected void ResetEntities()
|
||||||
|
Loading…
Reference in New Issue
Block a user