mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 19:59:55 +00:00
Increase weight and weight-to-arpen ratio for bolts
This commit is contained in:
1 parent
f94d9bf351
commit
d26f176def
3 files changed
+14
-4
No files matched your search
@@ -98,7 +98,7 @@ public class WeaponryHandler {
|
||||
fletching = (FletchingMaterial) TConstructRegistry.getCustomMaterial(tags.getInteger("Accessory"), FletchlingLeafMaterial.class);
|
||||
|
||||
int durability = (int)((float)headMat.durability() * coreMat.handleDurability() * fletching.durabilityModifier);
|
||||
float weight = head.mass + core.mass;
|
||||
float weight = head.mass + core.mass*1.5f;
|
||||
float accuracy = fletching.accuracy;
|
||||
float breakChance = fletching.breakChance*3;
|
||||
float shoddy = (headMat.shoddy() + coreMat.shoddy())/2f;
|
||||
|
||||
@@ -73,20 +73,23 @@ public class ArrowEntity extends ProjectileBase {
|
||||
@Override
|
||||
public boolean dealDamage(float damage, ToolCore ammo, NBTTagCompound tags, Entity entityHit)
|
||||
{
|
||||
boolean dealtDamage;
|
||||
boolean dealtDamage = false;
|
||||
|
||||
//Minecraft.getMinecraft().thePlayer.sendChatMessage("Damage/Weight: " + damage + " - " + tags.getFloat("Mass"));
|
||||
|
||||
// we take the weight, and shift the damage done towards armor piercing, the more weight the arrow/bolt has!
|
||||
float shift = (tags.getFloat("Mass") - 0.7f);
|
||||
float shift = (tags.getFloat("Mass") - 0.7f)*armorPenetrationModifier();
|
||||
|
||||
if(shift < 0)
|
||||
shift = 0;
|
||||
if(shift > damage)
|
||||
shift = damage;
|
||||
|
||||
damage -= shift;
|
||||
|
||||
// deal regular damage
|
||||
dealtDamage = super.dealDamage(damage-shift, ammo, tags, entityHit);
|
||||
if(damage > 0)
|
||||
dealtDamage = super.dealDamage(damage, ammo, tags, entityHit);
|
||||
|
||||
// deal armor piercing damage
|
||||
if(shift > 0) {
|
||||
@@ -103,4 +106,6 @@ public class ArrowEntity extends ProjectileBase {
|
||||
|
||||
return dealtDamage;
|
||||
}
|
||||
|
||||
protected float armorPenetrationModifier() { return 1.0f; }
|
||||
}
|
||||
@@ -24,4 +24,9 @@ public class BoltEntity extends ArrowEntity {
|
||||
protected void playHitBlockSound(int x, int y, int z) {
|
||||
this.playSound("random.bowhit", 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected float armorPenetrationModifier() {
|
||||
return 1.5f;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user