Commit 8dd812e2 by BellCodeEditor

auto save

parent 048013e8
Showing with 11 additions and 3 deletions
......@@ -9,7 +9,7 @@ class Hero(object):
def cure(self): # 治疗
self.hp=self.hp+60
if self.hp>self.max_hp:
self.hp=sel.max_hp
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:", 60,",目前的血量为:",self.hp)
def combat(self, enemy): # 普通攻击
......@@ -43,4 +43,7 @@ print(" 战斗开始")
while True:
print('-'*30)
a=input("选择技能:(1、攻击,2、治疗):")
\ No newline at end of file
if a=='1':
houyi.combat(yase)
else:
houyi.cure()
\ No newline at end of file
aa={'ss':12}
aa['kk']=13
aa.clear()
print(aa)
\ 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