def bug1():
global a
l1_value = 0.75
l1_value_diamond = 8 * 0.05
a = l1_value + l1_value_diamond
bug1()
print("一个一级石头需要消耗金",':',a)
def bug2():
global b
l1_to_l3 = 12 * a
l1_to_l3_gold = 0.39
l1_to_l3_vit = 10 * 1
b = l1_to_l3 + l1_to_l3_gold + l1_to_l3_vit
bug2()
print('一个3级石头需要耗费金',':',b)
def bug3():
global c
global d
global e
e = 1
global f
global g
l3_to_l4 = 16 * a
l3_to_l4_gold = 0.897
l3_to_l4_vit = 10
l3_to_l4_rate = 0.4878
while l3_to_l4_rate < 1:
l3_to_l4_rate += l3_to_l4_rate
e += 1
if l3_to_l4_rate < 1:
d = l3_to_l4_gold + l3_to_l4
f = d * e
print('一个4级石头失败需要耗费金',':',f)
else:
c = l3_to_l4 + l3_to_l4_gold + l3_to_l4_vit + l3_to_l4_rate
print('一个4级石头需要耗费金',':',c)
bug3()
g = c + f
print('一个4级石头转化成果需要耗费金',':',g)
def bug4():
global h
l4_to_l6 = 12 * g
l4_to_l6_gold = 19.75
l4_to_l6_vit = 10
h = int(l4_to_l6 + l4_to_l6_gold + l4_to_l6_vit)
bug4()
print('一个6级石头需要耗费金',':',h)
if h > 750:
print('自己合成石头为',h,'金,直接花费750金购买6级石头划算')
else:
print('自己合成石头为',h,'金,自己合成划算')