Buff crossbow projectile speed, nerf lognbow proj. speed and move the proper modifications into the stats of the weapon

This commit is contained in:
Bernhard Bonigl committed 2014-11-06 23:14:38 +01:00
1 parent 253dde7cce
commit 2b161aa0bb
4 files changed
+9 -15

No files matched your search

@@ -118,11 +118,9 @@ public abstract class ProjectileWeapon extends ToolCore implements IAccuracy, IW
public float getProjectileSpeed(ItemStack itemStack)
{
NBTTagCompound toolTag = itemStack.getTagCompound().getCompoundTag("InfiTool");
return toolTag.getFloat("FlightSpeed") * projectileSpeedModifier(itemStack);
return toolTag.getFloat("FlightSpeed");
}
protected float projectileSpeedModifier(ItemStack itemStack) { return 1.0f; }
/* Bow usage */
@Override
public EnumAction getItemUseAction(ItemStack par1ItemStack) {
@@ -138,11 +138,14 @@ public class WeaponryHandler {
flightSpeed = (top.flightSpeedMax + bottom.flightSpeedMax)/2 * string.flightSpeedModifier;
// SHORT bows have a SHORTER windup because they're SHORT. hahahaha.... get it?
if(event.tool instanceof ShortBow)
if(event.tool instanceof ShortBow) {
drawSpeed *= 0.9;
}
// longbows have LONGER drawspeed. LOGIC!
if(event.tool instanceof LongBow)
if(event.tool instanceof LongBow) {
drawSpeed *= 1.5f;
flightSpeed *= 1.3f;
}
}
else if(event.tool instanceof Crossbow)
{
@@ -155,6 +158,9 @@ public class WeaponryHandler {
// crossbows are more efficient the higher the base drawspeed is. So the higher the drawspeed, the more bonus you get
drawSpeed *= 2.5f;
drawSpeed -= drawSpeed*0.25f;
// crossbows are stronk
flightSpeed *= 1.5;
}
else
return;
@@ -55,11 +55,6 @@ public class Crossbow extends ProjectileWeapon {
return 1.0f;
}
@Override
public float getProjectileSpeed(ItemStack itemStack) {
return super.getProjectileSpeed(itemStack);
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
NBTTagCompound tags = stack.getTagCompound().getCompoundTag("InfiTool");
@@ -31,11 +31,6 @@ public class LongBow extends BowBaseAmmo {
return 1.7f;
}
@Override
protected float projectileSpeedModifier(ItemStack itemStack) {
return 1.5f;
}
@Override
protected Entity createProjectile(ItemStack arrows, World world, EntityPlayer player, float speed, float accuracy) {
if(arrows.getItem() instanceof ArrowAmmo)