Commit f37ebd62 by BellCodeEditor

auto save

parent da60e227
Showing with 3 additions and 2 deletions
...@@ -4,7 +4,7 @@ class Hero(object): ...@@ -4,7 +4,7 @@ class Hero(object):
self.level = 1 self.level = 1
self.hp = 3500 self.hp = 3500
self.attack = 388 self.attack = 388
self.name = name self.name =
def combat(self,enemy): # 攻击 def combat(self,enemy): # 攻击
enemy.hp -= self.attack enemy.hp -= self.attack
...@@ -17,6 +17,6 @@ class Hero(object): ...@@ -17,6 +17,6 @@ class Hero(object):
print(info1 + info2 + info3) print(info1 + info2 + 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