Commit 360e4fae by BellCodeEditor

save project

parent 60229f40
Showing with 7 additions and 1 deletions
...@@ -7,4 +7,10 @@ class Hero: ...@@ -7,4 +7,10 @@ class Hero:
yase=Hero('亚瑟',200,300) yase=Hero('亚瑟',200,300)
houyi=Hero('亚瑟',200,300) houyi=Hero('亚瑟',200,300)
print('后羿的攻击力是:',houyi.gongji) def shengji():
houyi.level=houyi.level+1
houyi.hp=houyi.hp+100
houyi.gongji=gongji.hp+4
shengji()
print('后羿攻击力是:',houyi.gongji)
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