Commit a3c0d5ce by BellCodeEditor

save project

parent 2d0c0b54
Showing with 13 additions and 0 deletions
# 英雄角色类 # 英雄角色类
class Hero(object):
def __init__(self,name):
self.level = 1
self.hp = 3500000
self.attack = 388
self.name = name
def combat(self,enemy):
enemy.hp -= self.attack
info1 = self.name + '对' + enemy.name + '发起攻击'
inin
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