Commit d91949f9 by BellCodeEditor

auto save

parent f47689a4
Showing with 18 additions and 0 deletions
class Hero:
def _init_(self):
self.level = 1
self.hp = 300
self.attack = 20
yase = Hero("dd",55,77)
hy = Hero("hy",55,60)
def upgrade(self):
self.level=yase.level+1
self.hp-=yase.hp+50
self.attack=yase.attack
yase = Hero("ys",44,44)
yase.upgrade()
print("dkjdkd",yase.level)
print("dkjdkd",yase.hp)
print("dkjdkd",yase.attackf)
\ 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