summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLedmitz <smoothshifter@tuta.io>2020-08-16 22:36:34 +0000
committerLedmitz <smoothshifter@tuta.io>2020-08-16 22:36:34 +0000
commitbdde31e5ec25159bdbb94209c0e50f9fa3c2723f (patch)
treebf6d8223eb24fe542600230426a374a006939f7b
parentc4e39da985adb0748c536e39c899865b4ea2d07a (diff)
downloadtmw-info-drop_ratio_dec.tar.gz
tmw-info-drop_ratio_dec.tar.bz2
tmw-info-drop_ratio_dec.tar.xz
tmw-info-drop_ratio_dec.zip
Made non-whole numbers in drop ratio show 2 decimal places for more precise chance reportingdrop_ratio_dec
-rwxr-xr-xtmw-info2
1 files changed, 1 insertions, 1 deletions
diff --git a/tmw-info b/tmw-info
index c6277d2..a0bc49b 100755
--- a/tmw-info
+++ b/tmw-info
@@ -323,7 +323,7 @@ elif [ "$1" == "mob-search" ]; then
DROP_NAME=$(echo "$DROP_NAMES" | awk "{print $"$DROP_COUNT"}")
DROP_PERC=$(echo "$DROP_PERCS" | awk "{print $"$DROP_COUNT"}")
DROP_PERCENT=$(echo "scale=2; $DROP_PERC / 100" | bc)
- DROP_RATIO=$(echo "100 / $DROP_PERCENT" | bc)
+ DROP_RATIO=$(echo "scale=2; 100 / $DROP_PERCENT" | bc | sed 's/.00$//g' )
#echo "DROP_NAME: $DROP_NAME"
#echo "DROP_PERC: $DROP_PERC"
echo "$DROP_NAME($DROP_PERCENT% | $DROP_RATIO:1)," >> "$TMW_INFO/mob-drops-$MOB_ID.tmp"