Commit 6d0aadc3 by BellCodeEditor

auto save

parent d3f3b148
Showing with 16 additions and 2 deletions
class Hore:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = hp
self.attack = attack
yase = Hore("亚瑟",100,80)
def upgarde():
yase.level = self.level + 1
yase.hp = self.hp + 50
yase.attack = self.attack + 20
upgarde()
print("亚瑟升级后的血量是:",hp)
\ No newline at end of file
class
\ 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