Commit c7a71588 by BellCodeEditor

save project

parent eebb9ed8
Showing with 21 additions and 9 deletions
......@@ -7,12 +7,13 @@ class hero:
gody = hero("gody",300,20)
def upgrade():
gody.level=gody.level+1
gody.hp=gody.hp+50
gody.attack=gody.attack+4
#guo = hero("锅子",240,23)
upgrade()
upgrade()
print("gody的血量为:",gody.hp)
#print("锅子的血量为:",guo.hp)
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
gody = hero("gody",300,20)
gody.upgrade()
print("等级是:",gody.level)
print("血量是:",gody.hp)
print("攻击力:"gody.attack)
\ No newline at end of file
gody = hero("gody",300,20)
def upgrade():
gody.level=gody.level+1
gody.hp=gody.hp+50
gody.attack=gody.attack+4
#guo = hero("锅子",240,23)
upgrade()
upgrade()
print("gody的血量为:",gody.hp)
#print("锅子的血量为:",guo.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