mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
Reduce damage for arrows/bolts a bit by a flat amount. This is done in a hacky way to support compatibility with existing items.
This commit is contained in:
1 parent
bf0c012827
commit
53ae13fd1a
1 file changed
+8
-1
@@ -24,6 +24,7 @@ import tconstruct.library.ActiveToolMod;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.tools.AbilityHelper;
|
||||
import tconstruct.library.tools.ToolCore;
|
||||
import tconstruct.weaponry.entity.ArrowEntity;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -183,7 +184,9 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
NBTTagCompound tags = returnStack.getTagCompound().getCompoundTag("InfiTool");
|
||||
float speed = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
|
||||
|
||||
speed = Math.max(0, speed-2);
|
||||
// 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);
|
||||
@@ -217,6 +220,10 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
// add quartz damage
|
||||
damage += (totalAttack - baseAttack);
|
||||
|
||||
// we substract flat damage for balance ;-;
|
||||
if(this instanceof ArrowEntity)
|
||||
damage = Math.max(0, damage - 5f);
|
||||
|
||||
boolean shotByPlayer = this.shootingEntity != null && this.shootingEntity instanceof EntityPlayer;
|
||||
|
||||
// Damage calculations and stuff. For reference see AbilityHelper.onLeftClickEntity
|
||||
|
||||
Reference in new issue
Block a user