Commit 86d7e0c1 by BellCodeEditor

save project

parent 156e0450
Showing with 18 additions and 0 deletions
class Hero:
def __init__(self,name,hp,attack):
self.level = 1
self.name = name
self.hp = 250
self.attack = 40
def combat(self,enemy):
enemy.hp -= self.attack
info1 = self.name+'对'+enemy.name+'发起进攻,'
i
# def ShengJi(self):
# self.evel = self.level + 1
# self.hp = self.hp * 1.2
# self.attack = self.attack * 1.2
\ 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