Commit 6e8cd588 by BellCodeEditor

save project

parent f88dabcd
Showing with 11 additions and 0 deletions
def upgrade(self):
self.level=self.level+1
self.hp=self.hp+100
self.attack=self.attack+10
yase = Hero("亚瑟",300,20)
yase.upgrade()
print("等级为:",yase.level)
print("攻击为:",yase.attack)
print("血量为:",yase.hp)
\ 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