Skip to content

Commit ae4dca9

Browse files
overmind1980overmind1980
authored andcommitted
update 000002game
1 parent 36c2d37 commit ae4dca9

4 files changed

Lines changed: 109 additions & 2 deletions

File tree

‎links.xlsx‎

17.2 KB
Binary file not shown.

‎samples/000002/game.py‎

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# @Version : 2.0
2+
# @Time : 2022/09/25
3+
# @Author : oeasy
4+
5+
import time
6+
7+
print('■■■■■■■■■■ 欢迎来到地下城,送死的凡人 ■■■■■■■■■■')
8+
print('''
9+
, _..._ ,
10+
{'. .' '. .'}
11+
{ ~ '. _|= __|_ .' ~}
12+
{ ~ ~ '-._ (___________) _.-'~ ~ }
13+
{~ ~ ~ ~.' '. ~ ~ }
14+
{ ~ ~ ~ / /\ /\ \ ~ ~ }
15+
{ ~ ~ / __ __ \ ~ ~ }
16+
{ ~ /\/ -<( o) ( o)>- \/\ ~ ~}
17+
{ ~ ;( \/ .-. \/ ); ~ }
18+
{ ~ ~\_ () ^ ( ) ^ () _/ ~ }
19+
'-._~ \ (`-._'-'_.-') / ~_.-'
20+
'--\ `'._'+'_.'` /--'
21+
\ \`-'/ /
22+
`\ '-' /'
23+
`\ /'
24+
'-...-'
25+
''')
26+
27+
hp = 0
28+
att = 0
29+
defend = 0
30+
monsterLevel = 0
31+
32+
job = input('''请选择你的职业(输入a或b):
33+
A:战士
34+
B:法师
35+
'''
36+
)
37+
while (job != "a" and job != "A" and job != "b" and job != "B"):
38+
print("输入错误,请输入 a 或者 b")
39+
job = input('''请选择你的职业:
40+
A:战士
41+
B:法师
42+
''')
43+
44+
level = int(input('请输入你的等级:') )
45+
monsterLevel = int(input('请输入怪物的等级:') )
46+
47+
if job == "a" or job == "A":
48+
hp = 800 + level * 59
49+
att = 100 + level * 10
50+
defend = 20 + level * 5
51+
52+
53+
if job == "b" or job == "B":
54+
hp = 500 + level * 35
55+
att = 120 + level * 19
56+
defend = 15 + level * 3
57+
58+
print('你的等级是{},攻击力{},血量{},防御力{}' .format(level, att, hp,defend))
59+
print("■■■■■■■■■■■■■■■■■ 战斗开始 ■■■■■■■■■■■■■■■■■")
60+
bosshp = 10000 + monsterLevel*30
61+
bossatt = 50 + monsterLevel * 8
62+
bossdef = 50
63+
64+
while bosshp >= 0 and hp >= 0:
65+
hp = hp - bossatt
66+
print("怪物攻击了你,HP - {},剩余HP:{}".format(bossatt, hp))
67+
bosshp = bosshp - att;
68+
print("你攻击了Boss,砍掉了 {} 点血,剩余HP:{}".format(att,bosshp))
69+
print("■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■")
70+
71+
time.sleep(0.5)
72+
73+
if hp <= 0:
74+
print("战败,大侠请从头来过(试试把自己等级提高,怪物等级降低,再运行一次~)")
75+
if bosshp <= 0:
76+
print("恭喜你战胜了Boss,爆到屠龙刀一把。")
77+
print('''
78+
,
79+
/ \\
80+
{ }
81+
! !
82+
; : ;
83+
| : |
84+
| : |
85+
l ; l
86+
l ; l
87+
I ; I
88+
I ; I
89+
I ; I
90+
I ; I
91+
d | b
92+
H | H
93+
H | H
94+
H I H
95+
,;, H I H ,;,
96+
;H@H; ;_H_;, ;H@H;
97+
`\Y/d_,;|4H@HK|;,_b\Y/'
98+
'\;MMMMM$@@@$MMMMM;/'
99+
~~~*; !8@8!; *~~~
100+
;888;
101+
;888;
102+
;888;
103+
;888;
104+
d8@8b
105+
O8@8O
106+
T808T
107+
`~`
108+
''')
109+

‎test‎

Lines changed: 0 additions & 2 deletions
This file was deleted.

‎~$links.xlsx‎

-165 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)