Commit 3ca1e344 by BellCodeEditor

save project

parent 038ba6fd
Showing with 19 additions and 4 deletions
class Hero:
def __init__(self):
self.Hp=100
def __init__(self,name,Hp,attack):
self.Hp=Hp
self.lever=1
self.life=100
\ No newline at end of file
self.attack=attack
self.name=name
def lever_up:
self.Hp= self.Hp+50
self.attack= self.attack+50
self.lever=self.lever+1
yase=Hero('yase',1000,50)
houyi=Hero("houyi",950,90)
print(yase.Hp)
print(houyi.Hp)
def lever_up:
yase.Hp= yase.Hp+50
yase.Hp= yase.+50
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