Commit abc5f71e by BellCodeEditor

save project

parent a82b9773
Showing with 8 additions and 3 deletions
...@@ -6,5 +6,11 @@ class Hero() ...@@ -6,5 +6,11 @@ class Hero()
self.attack = attack self.attack = attack
yase=Hero('yase',300,24) yase=Hero('yase',300,24)
houyi=Hero('houyi',350,29) houyi=Hero('houyi',350,29)
print('yase的血量',yase,HP) def upgrade()
print('houyi的血量',yase,HP) yase level= yase level+1
\ No newline at end of file yase HP= yase HP+50
yase attack= yase attack+4
upgrade()
upgrade()
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