Commit cc929b8e by BellCodeEditor

save project

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