Commit 4bb83881 by BellCodeEditor

save project

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