summaryrefslogtreecommitdiff
path: root/tmw-info
diff options
context:
space:
mode:
authorLedmitz <smoothshifter@tuta.io>2020-08-16 02:46:33 +0000
committerLedmitz <smoothshifter@tuta.io>2020-08-16 02:46:33 +0000
commitc4e39da985adb0748c536e39c899865b4ea2d07a (patch)
tree518df005b00db46e4b3028b4d293e83093fd3cc2 /tmw-info
parent99f4aaee22252499d6095b1c536eacfe063f87c2 (diff)
downloadtmw-info-c4e39da985adb0748c536e39c899865b4ea2d07a.tar.gz
tmw-info-c4e39da985adb0748c536e39c899865b4ea2d07a.tar.bz2
tmw-info-c4e39da985adb0748c536e39c899865b4ea2d07a.tar.xz
tmw-info-c4e39da985adb0748c536e39c899865b4ea2d07a.zip
Added a ratio representaion of chances to get a dropped item from a monsterdrop_ratio
Diffstat (limited to 'tmw-info')
-rwxr-xr-xtmw-info3
1 files changed, 2 insertions, 1 deletions
diff --git a/tmw-info b/tmw-info
index 628ee9c..c6277d2 100755
--- a/tmw-info
+++ b/tmw-info
@@ -323,9 +323,10 @@ 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)
#echo "DROP_NAME: $DROP_NAME"
#echo "DROP_PERC: $DROP_PERC"
- echo "$DROP_NAME($DROP_PERCENT%)," >> "$TMW_INFO/mob-drops-$MOB_ID.tmp"
+ echo "$DROP_NAME($DROP_PERCENT% | $DROP_RATIO:1)," >> "$TMW_INFO/mob-drops-$MOB_ID.tmp"
cat < "$TMW_INFO/mob-drops-$MOB_ID.tmp" | tr '\n' ' ' > "$TMW_INFO/mob-drops-$MOB_ID.tmp.tmp"
mv "$TMW_INFO/mob-drops-$MOB_ID.tmp.tmp" "$TMW_INFO/mob-drops-$MOB_ID.tmp"
DROP_COUNT=$(( DROP_COUNT + 1 ))