Commit 6a11a2bd by BellCodeEditor

save project

parent 8747c8fb
Showing with 23 additions and 5 deletions
class hero:
def __init__(self):
self.level=1
self.hp=300
self.attack=2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
class Hero():
def __init__(self,name,hp,attack):
self.level = 1
self.name1 = name
self.hp1 = hp
self.attack1 = attack
def upgrade(self):
yase.hp1 = yase.hp1+50
yase.level = yase.level+1
yase.level = yase.hp1+50
yase = Hero("yase",100,200)
yase.upgrade()
print(yase.hp1)
print(yase.level)
print(yase.level)
houyi = hero("honyi",150,200)
print(houyi.hp1)
\ 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