v2.4.0: fixed a few bugs when tipped darts get high durability
This commit is contained in:
+1
-1
@@ -426,7 +426,7 @@ public class WandOfRegrowth extends Wand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float seedPreservation(){
|
public float seedPreservation(){
|
||||||
return 0.40f + 0.04f*wandLvl;
|
return Math.min( 1f, 0.40f + 0.04f*wandLvl );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
+3
@@ -186,6 +186,9 @@ public abstract class TippedDart extends Dart {
|
|||||||
usages += 4;
|
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
|
//add a tiny amount to account for rounding error for calculations like 1/3
|
||||||
return (MAX_DURABILITY/usages) + 0.001f;
|
return (MAX_DURABILITY/usages) + 0.001f;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user