Commit 5fd84cf5 by BellCodeEditor

auto save

parent 141abb99
Showing with 6 additions and 2 deletions
...@@ -12,10 +12,10 @@ class Hero(object): ...@@ -12,10 +12,10 @@ class Hero(object):
info2="造成了"+str(self.attack)+"点伤害\n" info2="造成了"+str(self.attack)+"点伤害\n"
info3=str(enermy.name)+"英雄还剩下"+str(enermy.hp)+"点血量\n" info3=str(enermy.name)+"英雄还剩下"+str(enermy.hp)+"点血量\n"
info=info1+info2+info3 info=info1+info2+info3
print(info) #print(info)
else: else:
die=str(enermy.name)+"仅有血量不足\n英雄死亡" die=str(enermy.name)+"仅有血量不足\n英雄死亡"
print(die) #print(die)
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
yase.combat(houyi) yase.combat(houyi)
...@@ -35,3 +35,6 @@ class Player(Hero): ...@@ -35,3 +35,6 @@ class Player(Hero):
self.attack=50 self.attack=50
Player=Player("!@#$%^&**()") Player=Player("!@#$%^&**()")
print(Player.hp) print(Player.hp)
print(Player.name)
print(Player.attack)
print(Player.level)
\ 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