Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Calculate the number of packs to open to complete rares for a set
- # Most recent sets have 53 rares. As a rule of thumb,
- # 53 * 4 * (1-completion%) * 1.2 is the number of packs you want to have.
- # The 1.2 accounts for mythic rares and wildcard upgrades.
- ceil() {
- echo "define ceil (x) {if (x<0) {return x/1} \
- else {if (scale(x)==0) {return x} \
- else {return x/1 + 1 }}} ; ceil($1)" | bc
- }
- packs=$( echo "53 * 4 * (1 - $1/100)" | bc -l )
- packs=$(ceil $packs 0)
- echo "$packs packs missing"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement