这个家伙真不是人,连老婆都打死了。
[Python] 纯文本查看 复制代码 import random,time
fox_gj = random.randint(30,50)
fox_sb = random.randint(2,4)
fox_life = random.randint(100,150)
foxwife_gj = random.randint(30,50)
foxwife_sb = random.randint(2,6)
foxwife_life = random.randint(70,150)
fox = {'fox_gj':fox_gj,'fox_sb':fox_sb,'fox_life':fox_life,'foxwife_gj':foxwife_gj,'foxwife_sb':foxwife_sb,'foxwife_life':foxwife_life}
print('双方属性展示\n---------------\n 狐狸生命值:{}狐狸闪避值:{}狐狸的伤害值:{} \n----------------\n 狐狸老婆生命值:{}狐狸老婆闪避值:{} \n狐狸老婆伤害值:{} '.format(fox['fox_life'],fox['fox_sb'],fox['fox_gj'],fox['foxwife_life'],fox['foxwife_sb'],fox['foxwife_gj']))
print('-----------------------')
time.sleep(1)
while True:
while fox_life > 0 and foxwife_life > 0:
fox_life = fox_life + fox_sb - foxwife_gj
foxwife_life = foxwife_life + foxwife_sb - fox_gj
print('狐狸准备打老婆,他老婆闪了避了一下他%s伤害,血量剩余%s了'%(foxwife_sb,foxwife_life))
time.sleep(1)
print('他老婆立马还击,狐狸冒着闪了老腰的风险避了一下%s伤害,血量剩余%s了'%(fox_sb,fox_life))
time.sleep(1)
print(' ')
if fox_life>0 and foxwife_life <= 0:
print('《连老婆都打死了,真不是人》')
elif fox_life<=0 and foxwife_life > 0:
print('《就得这样,就算被老婆打死,也要开开嘻嘻的》')
else:
print('你真low,连老婆都打不过 丢人')
q=input('还想再来一局吗,想的话输入《想》')
if q=='想':
continue
else:
break
|