Commit e39f5fa5 by BellCodeEditor

save project

parent c0603fab
Showing with 10 additions and 6 deletions
# 英雄角色类
class Hero(object):
def __init__(self, name):
self.level = self.level
self.hp = self.hp
self.attack = self.attack
def __init__(self, level,hp,attack,name):
self.level = level
self.hp = hp
self.attack = attack
self.name = name
yase = Hero("垭瑟"30020)
yase = Hero("后羿"25023)
def upgrade():
yase.level = yase.level +1
yase.hp = yase.hp +50
yase.attack = yase.attack +4
yase = Hero(1,300,20,'yase')
hoyi = Hero(1,250,23,'hoyi')
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