选择项目的Python机会

时间:2019-03-05 17:35:50

标签: python

我遇到了一个问题,我在游戏中找不到有关如何执行此操作的任何好信息。我希望矿石有不同的选择百分比。我尝试了几种方法,但找不到很多。

while refine != yes: #another while loop
  refine = input("Would you like to refine the {}: ".format(math))
if refine == yes: #if it is yes
  print ("Working on refining {}".format(math))
  if math == "Stone":
if math2 == "failed!":
  sleep(1)
  print("The refining of the {0} ore has {1}".format(math, math2))
else:
  sleep(1)
  print("The refining of the {0} ore has {1}".format(math, math2))
  stoneInv += 1
  elif math == "Iron":
    if math2 == "failed!":
      sleep(1)
      print("The refining of the {0} ore has {1}".format(math, math2))
else:
  sleep(1)
  print("The refining of the {0} ore has {1}".format(math, math2))
  ironInv += 1
  elif math == "Silver":
if math2 == "failed!":
  sleep(1)
  print("The refining of the {0} ore has {1}".format(math, math2))
else:
  sleep(1)
  print("The refining of the {0} ore has {1}".format(math, math2))
  silverInv += 1

0 个答案:

没有答案