Commit e552ec97 by BellCodeEditor

save project

parent 5018b5b6
Showing with 3 additions and 2 deletions
......@@ -2,11 +2,12 @@
class Hero(object):
def __init__(self, name):
self.level = 1
self.hp = 250
self.attack = 40
self.hp = 2500000
self.attack = 400999
self.name = name
def combat(self,enemy): # 攻击
enemy.hp-=self.attack
info1=self.name+"对"+enemy.name+"进行攻击"
info2="造成了"+str(self.attack)+"伤害"
if enemy.hp>0:
......
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