Commit 2d0bb152 by BellCodeEditor

auto save

parent 6829a006
Showing with 26 additions and 2 deletions
import random
class Hero(object):
def __init__(self,name):
self.name=name
self.leavel=1
self.hp=250
self.attack=40
self.maxhp = self.hp
def cure(self):
if a==1:
self.hp =self.hp+50
if self.hp>=self.maxhp:
self.hp =self.maxhp
class Player(Hero):
def __init__(self,name):
super.__init__(self,name)
self.hp=200
self.attack=70
yase =Hero("亚瑟")
houyi =Hero("后羿")
while True:
print('-'*30)
b=input("请选择技能:1攻击/2治疗")
\ No newline at end of file
\ 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