Commit 11cbbd8f by BellCodeEditor

auto save

parent b50f934e
Showing with 20 additions and 2 deletions
player=input("玩家出拳,剪刀,石头,布") class hero:
print("玩家请出拳") def __init__(self,name,hp,attack):
self.level=1
self.name=name
self.hp=hp
self.attack=attack
def ab(self):
self.level=self.level+1
self.hp=self.hp+50
self.attack=self.attack+15
def e(self):
slef.hp=self.hp+self.hp*0.15
yase=hero("yase",300,20)
hoyi=hero("hoyi",250,40)
yase.e()
print(yase.hp)
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