File tree 3 files changed +43
-0
lines changed
3 files changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ import math
2
+ import sys
3
+
4
+
5
+ def gold_for_invsize (size : int ) -> int :
6
+ size -= 100 # Starting inventory
7
+ increases = math .ceil (size / 50 )
8
+ # Starts at 15, increments by 15 for each +50.
9
+ return sum (range (15 , 15 * (increases + 1 ), 15 ))
10
+
11
+
12
+ def test_gold_for_invsize ():
13
+ assert gold_for_invsize (300 ) == 150
14
+
15
+
16
+ def gold_to_dollars (gold : int ) -> int :
17
+ # 6,500 gold == $200
18
+ return math .ceil (gold / 6500 ) * 200
19
+
20
+
21
+ def test_gold_to_dollars ():
22
+ assert gold_to_dollars (10000 ) == 400
23
+
24
+
25
+ if __name__ == "__main__" :
26
+ invsize = int (sys .argv [1 ])
27
+ gold = gold_for_invsize (invsize )
28
+ dollars = gold_to_dollars (gold )
29
+ print (f"{ invsize } is { gold } gold or ${ dollars } " )
Original file line number Diff line number Diff line change
1
+ import droprates
2
+
3
+ if __name__ == "__main__" :
4
+ data = {}
5
+ for loc , loc_data in droprates .total_drops ().items ():
6
+ stamina = loc_data ["stamina" ]
7
+ drops = loc_data ["drops" ]["ALL" ]
8
+ data [loc ] = stamina / drops
9
+ for loc , stam_per_drop in sorted (data .items (), key = lambda kv : kv [1 ]):
10
+ print (f"{ loc } : ten={ stam_per_drop * 10 :.1f} twenty={ stam_per_drop * 20 :.1f} " )
Original file line number Diff line number Diff line change
1
+ import fixtures
2
+
3
+ max_id = max (int (it .id ) for it in fixtures .load_items ())
4
+ print (f"https://farmrpg.com/index.php#!/item.php?id={ max_id } " )
You can’t perform that action at this time.
0 commit comments