Commit 6d312c27 by BellCodeEditor

save project

parent 6f18a4d4
Showing with 7 additions and 2 deletions
class Cat:
def skill(self,a):
self.a=a
b=Cat.a
......@@ -8,10 +8,10 @@ class Hero:
def combat(self,enemy):
info1=self.name+'攻击了'+enemy.name+'。'
info2=enemy.name+'受到了'+self.attack+'点攻击。'
info2=enemy.name+'受到了'+str(self.attack)+'点攻击。'
enemy.hp-=self.attack
if enemy.hp>0:
info3=enemy.name+'还剩'+enemy.hp-=self.attack+'滴血。'
info3=enemy.name+'还剩'+str(enemy.hp)+'滴血。'
info=info1+info2+info3
print(info)
else:
......
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