Commit 05fc8115 by BellCodeEditor

save project

parent 082aa89a
Showing with 6 additions and 0 deletions
......@@ -6,5 +6,10 @@ class Hero:
self.attack=attack
luban=Hero('鲁班',300,30)
kai=Hero('凯',500,25)
def shengji():
luban.level=luban.level+1
luban.HP=luban.HP+30
luban.attack=luban.attack+10
shengji()
print('鲁班的血量是',luban.HP)
print('凯的攻击是',kai.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