Commit 60e78a0e by BellCodeEditor

save project

parent 231ae234
Showing with 9 additions and 2 deletions
......@@ -6,5 +6,13 @@ class Hero:
self.attack=attack
yase=Hero("亚瑟",150,200)
hoyi=Hero("后羿",105,203)
print("姓名:",yase.name,"血量:",yase.hp,"攻击力:",yase.attack)
# print("姓名:",hoyi.name,"血量:",hoyi.hp,"攻击力:",hoyi.attack)
def upgrade():
yase.level+=1
yase.hp+=50
yase.attack+=4
upgrade()
upgrade()
print("姓名:",yase.name,"血量:",yase.hp,"攻击力:",yase.attack)
print("姓名:",hoyi.name,"血量:",hoyi.hp,"攻击力:",hoyi.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