Fix Arrows/Bolts having hardcoded amount of modifiers, not respecting material traits like writeable. #1230

This commit is contained in:
Bernhard Bonigl committed 2014-12-18 22:19:22 +01:00
1 parent bd0fb35aae
commit 5422d3881a
1 file changed
+6 -3
@@ -86,8 +86,9 @@ public class WeaponryHandler {
{
tags.setInteger("Fiery", 5);
}
// arrows get only 2 modifiers
tags.setInteger("Modifiers", 2);
// arrows get only 2 modifiers (so one less) by default
int mods = Math.max(0, tags.getInteger("Modifiers")-1);
tags.setInteger("Modifiers", mods);
}
else if(event.tool instanceof BoltAmmo)
{
@@ -113,7 +114,9 @@ public class WeaponryHandler {
int reinforced = Math.max(headMat.reinforced(), coreMat.reinforced());
setAmmoData(tags, durability, weight, breakChance, accuracy, shoddy, reinforced);
tags.setInteger("Modifiers", 2);
int mods = Math.max(0, tags.getInteger("Modifiers")-1);
tags.setInteger("Modifiers", mods);
}
// now that durability has been handled...