Commit 31ce6733 by BellCodeEditor

save project

parent f47689a4
Showing with 16 additions and 0 deletions
class hero:
def __init__(self,name,hp,attack):
self.name = name
self.hp = hp
self.level = 1
self.attack = attack
def yase_upgrage():
yase.level = yase.level + 1
yase.hp = yase.hp + 500
yase.attack = yase.attack + 60
print('亚瑟的血量为:',yase.hp)
print('亚瑟的等级为:',yase.level)
print('亚瑟的攻击力为:',yase.attack)
yase = hero('亚瑟',3000,200)
yase_upgrage()
\ 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