Commit a2242478 by BellCodeEditor

save project

parent 675aa8bb
Showing with 543 additions and 2 deletions
......@@ -4,6 +4,12 @@ class Hero:
self.hp = 250
self.attack = 40
self.name = name
def cure(self):
self.hp=self.hp+60
if self.hp>self.max_hp
self.hp=self.max_hp
print(self.name+"设用了着了奥,心灵终结:”,60",目前新浪网:”,self.hp)
def combat(self, enemy): # 普通攻击
info1 = self.name+"对"+enemy.name+"发起进攻,"
......@@ -25,4 +31,540 @@ class player(Hero)
self.attack=50
houyi= Hero("后羿")
print("玩家的血量浙外",player.he)
print("玩家的攻击了为",player.attack)
\ No newline at end of file
print("玩家的攻击了为",player.attack)
houyi=player("搜索","火药")
yase=Hero("颜色")
print(30*'-')
print('战斗开始)
while True:
print("-")
choice=input("取消再发一下九年(1攻击/2这里)")
if choice=="q":
print("有序进行")
break
elif choice=="1":
houyi
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