Commit 26d5fa9a by BellCodeEditor

auto save

parent 901073ae
Showing with 9 additions and 6 deletions
...@@ -12,10 +12,13 @@ print("攻击力:",yase.attack) ...@@ -12,10 +12,13 @@ print("攻击力:",yase.attack)
print("姓名:",houyi.name) print("姓名:",houyi.name)
print("血量:",houyi.hp) print("血量:",houyi.hp)
print("攻击力:",houyi..attack) print("攻击力:",houyi..attack)
def upgrade(): def upgrade():
self.level+=1 yase.level+=1
self.hp+=300 yase.hp+=300
self.attack+=50 yase.attack+=50
houyi.level+=1
houyi.hp+=300
houyi.attack+=50
upgrade() upgrade()
upgrade() upgrade()
print("攻击力:",self.hp) print("攻击力:",yase.hp)
\ No newline at end of file \ No newline at end of file
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