Commit 52e8a4f6 by BellCodeEditor

save project

parent 5609c5e1
Showing with 8 additions and 8 deletions
class Hero():
def __init__(self,name,up,attack):
def __init__(self,name,hp,attack):
self.level = 1
self.up = 300
self.hp = 300
self.attack = 40
self.name =name
def up(self):
self.level=self.level+1
self.up=yase.up+50
self.hp=yase.hp+50
self.attack=yase.attack+4
yase=Hero("亚瑟"300,20)
print(yase.hp)
upgrade()
upgrade()
print(yase.hp)
yase=Hero("亚瑟",300,20)
print(yase.attack)
yase.up()
yase.up()
print(yase.attack)
......
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