Commit 715e65e5 by BellCodeEditor

save project

parent c0920406
Showing with 9 additions and 4 deletions
...@@ -6,10 +6,15 @@ class Hero: ...@@ -6,10 +6,15 @@ class Hero:
self.attack=attack self.attack=attack
def upgrade(): def upgrade():
yase.level=leyel+1 yase.level=yase.level+1
yase.hp=hp+20 yase.hp=yase.hp+50
yase.attack=attack+4 yase.attack=yase.attack+4
yase = Hero("亚瑟",300,20)
yase = Hero("亚瑟",300,20)
upgrade()
print(yase.hp)
upgrade()
print(yase.hp)
#wangzhaojun = Hero("王昭君",200,100) #wangzhaojun = Hero("王昭君",200,100)
#xiaoqiao = Hero("小乔",100,20) #xiaoqiao = Hero("小乔",100,20)
#print(yase.attack) #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