Commit 3580374b by BellCodeEditor

save project

parent d6c81a0f
Showing with 18 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.Level=1
self.Name=name
self.Hp=hp
self.Attack=attack
HIM=Hero('亚瑟',100,50)
ROBBOT=Hero('K-3573',200,100)
print(HIM.Hp)
print(ROBBOT.Hp)
def HIMup(b):
HIM.Level+=1*b
HIM.Hp+=50*b
HIM.Attack+=4*b
def BOBBOTup(a):
BOBBOT.Level+=1*a
BOBBOT.Hp+=50*a
BOBBOT.Attack+=4*a
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