Commit 090daaaf by BellCodeEditor

save project

parent 161b60c5
Showing with 17 additions and 5 deletions
......@@ -36,9 +36,21 @@ class Player(Hero):
print("角色"+self.name+"创建成功,英雄类型为:", self.hero_type)
print("当前等级、血量、攻击力分别为:",self.level,self.hp,self.attack)
import random
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
houyi.combat(yase)
yase.combat(houyi)
houyi.cure()
yase.cure()
\ No newline at end of file
print("-"*30)
print("战斗开始")
print("-"*30)
while True:
jineng=input("宁要干嘛?1/2:")
int(jineng)
if jineng==1:
houyi.combat(yase)
else:
houyi.cure()
jineng = random.randint(1,2)
if jineng==1:
yase.combat(houyi)
else:
yase.cure()
\ 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