Commit 8711e74c by BellCodeEditor

save project

parent e6780ab0
Showing with 8 additions and 13 deletions
......@@ -5,20 +5,15 @@ class Here:
self.hp=hp
self.attack=attack
def upgrade():
year.level=year.level+1
year.hp=year.hp+50
year.attack=year.attack+4
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+4
year=Here("亚索",300,20)
upgrade()
upgrade()
huwwi=Here("后羿",240,23)
print("后羿的血量为:",year.hp)
print("亚索的攻击为:",huwwi.hp)
def upgrade():
year.level=year.level+1
year.hp=year.hp+50
year.attack=year.attack+4
year.upgrade()
print("亚索的等级为:",year.hp)
print("亚索的血量为:",year.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