Commit 61d66642 by BellCodeEditor

save project

parent e8409af1
Showing with 25 additions and 5 deletions
import turtle
pen=turtle.Pen()
pen.speed(100)
pen.fillcolor("red")
pen.begin_fill()
for i in range(85):
pen.forward(320)
pen.left(140)
pen.left(14)
pen.end_fill()
turtle.done()
\ No newline at end of file
print('-'*30)
print(' 战斗开始')
print('-'*30)
......@@ -12,4 +13,9 @@ while True:
elif a =="2":
print("2==开始治疗")
else:
print("请选择技能:1攻击/2治疗")
\ No newline at end of file
print("请选择技能:1攻击/2治疗")
b=random.randint(1,3)
if a==1:
yase.combat(houyi)
elif a==2:
yase.cure()
\ No newline at end of file
......@@ -40,11 +40,11 @@ class Player(Hero):
print('-'*30)
print(' 战斗开始')
def cure(self):
c=random.randint(35,50)
self.hp+=c
blood=random.randint(30,50)
self.hp=self.hp+blood
if self.hp>self.max_hp:
self.hp=self.max_hp
print(self.name+"使用了治疗,血量增加:",str(c),",目前的血量为:",self.hp)
print(self.name+"使用了治疗,血量增加:",blood,",目前的血量为:",self.hp)
houyi = Player("射手", "后羿")
yase = Hero("垭瑟")
......
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