Commit 0f0f2fa5 by BellCodeEditor

auto save

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