Commit 8f310ff2 by BellCodeEditor

save project

parent 9de62133
Showing with 9 additions and 2 deletions
...@@ -5,4 +5,11 @@ class Hero: ...@@ -5,4 +5,11 @@ class Hero:
self.attack=50 self.attack=50
yase=Hero() yase=Hero()
print("yase的血量值为:",yase.hp) print("yase的血量值为:",yase.hp)
print("yase的血量值为:",yase.attack) print("yase的攻击值为:",yase.attack)
\ No newline at end of file def upgrade():
yase.level=yase.level+1
yase.hp=yase.hp+30
yase.sttack=yase.attack+4
upgrade()
print("yase的血量值为:",yase.hp)
print("yase的攻击值为:",yase.attack)
\ 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