Skip to content

Commit

Permalink
Smooth out the highend-damage balance for bow and arrows so it doesn'…
Browse files Browse the repository at this point in the history
…t affect low end much
  • Loading branch information
bonii-xx committed Feb 9, 2015
1 parent 434516d commit ee661bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/tconstruct/library/entity/ProjectileBase.java
Expand Up @@ -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
Expand Down Expand Up @@ -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;

Expand Down
5 changes: 5 additions & 0 deletions src/main/java/tconstruct/library/weaponry/BowBaseAmmo.java
Expand Up @@ -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)
{
Expand Down

0 comments on commit ee661bf

Please sign in to comment.