Commit cc929b8e by BellCodeEditor

save project

parent d2879ca9
Showing with 8 additions and 10 deletions
class Hero:
def__init__(self,name,level,hp,attack)
self.level=level
def __init__(self,name):
self.level=1
self.hp=250
self.attack=40
self.name=name
self.hp=hp
self.attack=attack
def ungrade(self)
self.level=self.level+1
self.hp=self.hp+300
self.attack+=4
\ No newline at end of file
def combat(self,enemy):
enemy.hp=self.attack
info1=self.name+"对"+enemy.name+"进行攻击"
info2="造成了"+——
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