Commit 6bb42a9b by BellCodeEditor

save project

parent a51377af
Showing with 29 additions and 4 deletions
......@@ -12,8 +12,33 @@ class Hero:
Houyi = Hero("后羿",240,23)
print("后羿的初始等级为:",Houyi.level)
print("后羿的初始血量为:",Houyi.hp)
print("后羿的初始攻击力为:",Houyi.attack)
Houyi.upgrade()
Houyi.upgrade() #升级几次就调用几次
print("*"*50) # *星号隔开
print("升级两次后后羿的等级为:",Houyi.level)
print("升级两次后后羿的血量为:",Houyi.hp)
print("升级两次后后羿的攻击力为:",Houyi.attack)
print("*"*50) # *星号隔开
yase = Hero("亚瑟",300,20)
print("亚瑟的初始等级为:",yase.level)
print("亚瑟的初始血量为:",yase.hp)
print("亚瑟的初始攻击力为:",yase.attack)
yase.upgrade()
yase.upgrade() #升级几次就调用几次
print("*"*50) # *星号隔开
print("升级两次后亚瑟的等级为:",yase.level)
print("升级两次后亚瑟的血量为:",yase.hp)
print("升级两次后亚瑟的攻击力为:",yase.attack)
print("等级为:",Houyi.level)
print("血量为:",Houyi.hp)
print("攻击力为:",Houyi.attack)
\ No newline at end of file
print("*"*50) # *星号隔开
\ 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