Commit e552ec97 by BellCodeEditor

save project

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