Commit 193dab9f by BellCodeEditor

auto save

parent 5d05d386
Showing with 7 additions and 7 deletions
class Hero(object):
def __init__(self, name):
self.name = name
self.level = 1
self.hp = 250
self.attack = 40
self.max_hp = self.hp
class Hero(object): #创建英雄类
def __init__(self, name): #定义函数
self.name = name #名字
self.level = 1 #等级
self.hp = 250 #血量
self.attack = 40 #攻击力
self.max_hp = self.hp #最大血量3
def cure(self): # 治疗
self.hp=self.hp+60
......
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