Commit 03308d92 by BellCodeEditor

save project

parent 95f466c2
Showing with 14 additions and 0 deletions
...@@ -4,7 +4,21 @@ class Here: ...@@ -4,7 +4,21 @@ class Here:
self.name=name self.name=name
self.hp=hp self.hp=hp
self.attack=attack self.attack=attack
def upgrade():
year.level=year.level+1
year.hp=year.hp+50
year.attack=year.attack+4
year=Here("亚索",300,20) year=Here("亚索",300,20)
upgrade()
upgrade()
huwwi=Here("后羿",240,23) huwwi=Here("后羿",240,23)
print("后羿的血量为:",year.hp) print("后羿的血量为:",year.hp)
print("亚索的攻击为:",huwwi.hp) print("亚索的攻击为:",huwwi.hp)
def upgrade():
year.level=year.level+1
year.hp=year.hp+50
year.attack=year.attack+4
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