用户:
Napolean查看:0 回复:0 评论:0 创建时间:2020-01-26T21:10:19
【作品展示】

【作品介绍】
大战Sans
【作品源代码】
import time as t
def fight_with_sans(x):
if x == 0:
import random as r
you = 100
sans = 10000
huihe = 1
jingu = 0
while True:
print("你有{}滴血".format(you))
print("Sans有{}滴血".format(sans))
hide_talk = "你的攻击被闪避了"
sans_hide_talk = "你成功闪避了Sans的攻击"
print("你的回合")
t.sleep(2)
print()
print("""技能列表:
1.TNT的力量(使对方损失500滴血,闪避率45%)
2.铁傀儡守卫(使对方损失300滴血,闪避率30%)
3.隐身药水(本回合内己方闪避率增加40%)
4.治疗药水(血量增加20)
5.禁锢(三回合内使对方无法出击,闪避率75%)
6.暴击(使对方损失600滴血,闪避率50%)""")
choice = int(input("请输入你的选择:"))
t.sleep(2.5)
hide = r.randint(1,100)
if choice == 1:
if hide >=1 and hide<=45:
print(hide_talk)
else:
sans -= 500
print("你成功用TNT炸了Sans")
elif choice == 2:
if hide >= 1 and hide<=30:
print(hide_talk)
else:
sans -= 300
print("铁傀儡揍了Sans一顿")
elif choice == 3:
print("你喝下了隐形药水")
elif choice == 4:
you+=10
print("你喝下了治疗药水")
elif choice == 5:
if hide >= 1 and hide <= 75:
print(hide_talk)
else:
jingu = huihe
print("你禁锢了Sans")
if choice == 6:
if hide >= 1 and hide <= 50:
print(hide_talk)
else:
sans -= 600
print("你暴击了Sans")
if sans<=0:
t.sleep(3)
print("你获得了胜利!")
break
print()
print()
if jingu+2
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn