v2.4.0: fixed a few bugs when tipped darts get high durability

This commit is contained in:
Evan Debenham
2024-03-27 16:38:18 -04:00
parent 375368403a
commit c1fabfbd8a
2 changed files with 4 additions and 1 deletions

View File

@@ -426,7 +426,7 @@ public class WandOfRegrowth extends Wand {
}
public float seedPreservation(){
return 0.40f + 0.04f*wandLvl;
return Math.min( 1f, 0.40f + 0.04f*wandLvl );
}
@Override

View File

@@ -186,6 +186,9 @@ public abstract class TippedDart extends Dart {
usages += 4;
}
//at 100 uses, items just last forever.
if (usages >= 100f) return 0;
//add a tiny amount to account for rounding error for calculations like 1/3
return (MAX_DURABILITY/usages) + 0.001f;
}