Commit f0f370e3 by BellCodeEditor

save project

parent 7527c0af
Showing with 4 additions and 4 deletions
...@@ -5,11 +5,11 @@ class Hero: ...@@ -5,11 +5,11 @@ class Hero:
self.hp = hp self.hp = hp
self.attack = attack self.attack = attack
yase=Hero('垭瑟',300,20) yase=Hero('垭瑟',300,20)
houyi=Hero('后羿',250,23) #houyi=Hero('后羿',250,23)
print(yase.hp) print(yase.hp)
print(houyi.hp) #print(houyi.hp)
def upgrade(): def upgrade():
yase.level = yase.level+1 yase.level = yase.level+1
yase.hp = yase.hp+50 yase.hp = yase.hp+50
yase.attack = yase.attack+4 yase.attack = yase.attack+4
print(yase.hp) print(yase.hp+50)
\ 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