Commit 0f0f2fa5 by BellCodeEditor

auto save

parent 73ed515f
Showing with 4 additions and 2 deletions
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.level = 1 self.level = 1
self.hp = 10 self.hp = 200
self.attack = 40 self.attack = 40
self.name = name self.name = name
...@@ -15,7 +15,8 @@ class Hero(object): ...@@ -15,7 +15,8 @@ class Hero(object):
print(info1 + info2 + info3) print(info1 + info2 + info3)
else: else:
info3 = enemy.name + '阵亡' info3 = enemy.name + '阵亡'
print(info1 + info2 + info3) print(info3)
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) 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