Commit eb0a1c7a by BellCodeEditor

save project

parent 68bb8daf
Showing with 1 additions and 7 deletions
...@@ -4,12 +4,6 @@ class Hero: ...@@ -4,12 +4,6 @@ class Hero:
self.name =name self.name =name
self.hp =2500 self.hp =2500
self.attack = 50 self.attack = 50
#def upgrade():
# yase.level = yase.level+1
# yase.hp = yase.hp+50
# yase.attack = yase.attack+4
#upgrade()
#print(yase.hp)
def combat(self,enemy): def combat(self,enemy):
enemy.hp-=self.attack enemy.hp-=self.attack
info1=self.name+"对"+enemy.name+"发起攻击," info1=self.name+"对"+enemy.name+"发起攻击,"
...@@ -19,7 +13,7 @@ class Hero: ...@@ -19,7 +13,7 @@ class Hero:
info=info1+info2+info3 info=info1+info2+info3
print(info) print(info)
else: else:
info3=enemy.name+"已阵亡,游戏结束" info3 = enemy.name+"阵亡,游戏结束"
info=info1+info2+info3 info=info1+info2+info3
print(info) print(info)
exit() exit()
......
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