Commit c4c96509 by BellCodeEditor

save project

parent a1ca701f
Showing with 5 additions and 5 deletions
...@@ -6,7 +6,7 @@ class Hero(): ...@@ -6,7 +6,7 @@ class Hero():
self.attack=attack self.attack=attack
yase=Hero("亚瑟",300,20) yase=Hero("亚瑟",300,20)
houyi=hero("后羿",260,24) houyi=hero("后羿",260,24)
print("亚瑟的生命值是",yase.hp) def upgrage():
print("亚瑟的攻击值是",yase.attack) yase.level=yase.level+1
print("后羿的生命值是",houyi.hp) yase.hp=yase.hp+50
print("后羿的攻击值是",houyi.attack) yase.attack=yase.attack+10
\ 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