Commit ad145caa by BellCodeEditor

save project

parent 6a7dbf05
Showing with 17 additions and 2 deletions
import random
class Sans:
def __init__(self,AT,HP,HUP,AUP,name,MP):
self.Level = 1
......@@ -32,6 +33,7 @@ class Sans:
Hero.Name+'的攻击成长点'+str(Hero.Attack_UpPoint)+'\n')
def cure(plus):
plus.HitPoint+=40
print(plus.Name+'回血,现血量:'+str(plus.HitPoint))
class Sanses(Sans):
def __init__(self,AT,HP,HUP,AUP,name):
......@@ -46,9 +48,11 @@ while True:
if choose=='Outer':
Player1=Outer
break
print('-'*60)
if choose=='Mudder':
Player1=Mudder
break
print('-'*60)
else:
print('请重新选择')
continue
......@@ -58,12 +62,18 @@ while True:
if choose1=='Outer':
Player2=Outer
break
print('-'*60)
if choose1=='Mudder':
Player2=Mudder
break
print('-'*60)
else:
print('请重新选择')
continue
print('-'*60)
print('游戏开始')
print('-'*60)
while True:
a=input('请行动(1·治疗/2·攻击):')
......@@ -71,12 +81,16 @@ while True:
Player1.cure()
if Player1.HitPoint>=Player1.Max_HP:
Player1.HitPoint=Player1.Max_HP
print('-'*60)
if a=='2':
Player1.combat(Player2)
b=input('请行动(1·治疗/2·攻击):')
print('-'*60)
b=str(random.choice([1,2]))
if b=='1':
Player2.cure()
if Player2.HitPoint>=Player2.Max_HP:
Player2.HitPoint=Player2.Max_HP
if a=='2':
print('-'*60)
if b=='2':
Player2.combat(Player1)
print('-'*60)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment