From ee661bf08cf90021199966b13962228e18bce618 Mon Sep 17 00:00:00 2001 From: Bernhard Bonigl Date: Mon, 9 Feb 2015 15:56:30 +0100 Subject: [PATCH] Smooth out the highend-damage balance for bow and arrows so it doesn't affect low end much --- .../java/tconstruct/library/entity/ProjectileBase.java | 8 ++------ .../java/tconstruct/library/weaponry/BowBaseAmmo.java | 5 +++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/main/java/tconstruct/library/entity/ProjectileBase.java b/src/main/java/tconstruct/library/entity/ProjectileBase.java index 4cf0e0675b5..6c1c50541dd 100644 --- a/src/main/java/tconstruct/library/entity/ProjectileBase.java +++ b/src/main/java/tconstruct/library/entity/ProjectileBase.java @@ -184,10 +184,6 @@ public void onHitEntity(MovingObjectPosition movingobjectposition) { NBTTagCompound tags = returnStack.getTagCompound().getCompoundTag("InfiTool"); float speed = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); - // yay for balance on existing stuff.. sigh - if(this instanceof ArrowEntity) - speed = Math.max(0, speed-2); - // absolute distance travelled minus the current tick float distance = speed * (this.ticksInAir-1); // distance travelled in the current tick @@ -220,9 +216,9 @@ public void onHitEntity(MovingObjectPosition movingobjectposition) { // add quartz damage damage += (totalAttack - baseAttack); - // we substract flat damage for balance ;-; + // this is needed so really high scaling bow&arrow combinations don't get out of hand if(this instanceof ArrowEntity) - damage = Math.max(0, damage - 5f); + damage = Math.max(0, damage - totalAttack/2f); boolean shotByPlayer = this.shootingEntity != null && this.shootingEntity instanceof EntityPlayer; diff --git a/src/main/java/tconstruct/library/weaponry/BowBaseAmmo.java b/src/main/java/tconstruct/library/weaponry/BowBaseAmmo.java index ee6452444f1..bddfaac759c 100644 --- a/src/main/java/tconstruct/library/weaponry/BowBaseAmmo.java +++ b/src/main/java/tconstruct/library/weaponry/BowBaseAmmo.java @@ -48,6 +48,11 @@ public float getMinWindupProgress(ItemStack itemStack) { return 0.5f; } + @Override + public float getProjectileSpeed(ItemStack itemStack) { + return super.getProjectileSpeed(itemStack) * 0.9f; + } + @Override public ItemStack searchForAmmo(EntityPlayer player, ItemStack weapon) {