Commit 774eb82b by BellCodeEditor

auto save

parent 9e55c89c
Showing with 5 additions and 5 deletions
......@@ -6,7 +6,7 @@ class Hero(object):
self.attack = 40
self.name = name
def combat(slef,enemny):
def combat(slef,enemy):
enemy.hp -= slef.attack # 攻击
info1=slef.name+"对"+enemy.name+"发起进攻,"
info2="造成"+str(slef.attack)+"点伤害,"
......@@ -19,6 +19,6 @@ class Hero(object):
inof=inof1+info2+info3
print(info)
exit()
# yase = Hero("垭瑟")
# houyi= Hero("后羿")
# yase.combat(houyi)
\ No newline at end of file
yase = Hero("垭瑟")
houyi= Hero("后羿")
yase.combat(houyi)
\ No newline at end of file
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