Commit 5fd84cf5 by BellCodeEditor

auto save

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