Commit 1e95d5ac by BellCodeEditor

auto save

parent 929005b5
Showing with 15 additions and 0 deletions
def combat(self,enemy):
infol=self.name'对'+enermy.name+'发起攻击'
info2='造成'+str(self.attack)+'点伤害'
enemy.hp-=slef.attack
if enemy.hp>0:
info3=enemy.name+'还剩下'+str(enemyhp)+'血量'
info=info1+info2+info3
print(info)
else:
info3=enemy.name+'阵亡,游戏结束'
info=info1+info2+info3
print(info)
exit()
def skill(self,prey):
print('小猫抓住了'+prey)
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