当前位置:   article > 正文

c++ 小游戏 NO6 跑酷游戏_"setpos(4, 6); cout << \"↑/↓ 跳跃/下翻,←→ 些微移动(松手即返回)\

"setpos(4, 6); cout << \"↑/↓ 跳跃/下翻,←→ 些微移动(松手即返回)\"; setpos(8,"

最后一章有惊喜: 

  1. int ti(float a) {
  2. return ((int)(a*10+5))/10;
  3. }
  4. void Setpos(float x,float y) {
  5. COORD pos;
  6. pos.X=ti(y*4)/2;
  7. pos.Y=ti(x);
  8. SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
  9. }
  10. void Color(int a) {
  11. if(a==0) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
  12. if(a==1) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
  13. if(a==2) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
  14. if(a==3) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
  15. if(a==4) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
  16. if(a==5) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
  17. if(a==6) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
  18. if(a==7) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
  19. if(a==8) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);
  20. if(a==9) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_GREEN|BACKGROUND_BLUE);
  21. if(a==10) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),BACKGROUND_INTENSITY|BACKGROUND_RED|BACKGROUND_BLUE);
  22. if(a==11) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_BLUE);
  23. if(a==12) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN);
  24. if(a==13) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY);
  25. if(a==14) SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_BLUE);
  26. }
  27. int Blomax,Ren,Exp,Expmax,Lv,Lvl,Ice,Drug,ar1,ar2,Tar1,Tar2,bl,br,Win,T,Tb,Sy,Up,Upt,Down,u1,u2,Kill,Killb,L,Ll[4],Li,D,Gd[10],Biao,Fire,Fir,Water,Thun,Wind,Magne,I[20][2],ib,Dis,Disb,Dis1,Disb1,Boss,Bblo,Bblomax,Bwhat1,Bwhat2,Bwhat3,Bgo1[10],Bgo2[10],Bgo3[10],Bbr,Bbl,Bl[4];
  28. float X,Y,Vx,Vy,Ding,Blo,Hui,Bx1,By1,Bx2,By2,Bx3,By3,Bvx1,Bvy1,Bvx2,Bvy2,Bvx3,Bvy3,Bway[1001][2];
  29. struct bullet {
  30. float x,y,vx,vy;
  31. int what;
  32. int a,t,How;
  33. int life;
  34. bool kill;
  35. } B[100001];
  36. void Map(int a,int b);
  37. void Pan(int a,float x,float y,int b) {
  38. float Nox[4],Noy[4];
  39. Nox[0]=X,Noy[0]=Y;
  40. if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
  41. else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
  42. else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
  43. else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
  44. for(int i=0; i<3; i++) {
  45. if(a==-1) {
  46. if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {
  47. if(B[b].what==-10)Exp+=2;
  48. if(B[b].what==-11)Exp+=1;
  49. B[b].life=0;
  50. if(B[b].life==0&&b==bl) bl++;
  51. Map(3,b);
  52. break;
  53. }
  54. }
  55. if(a==-2) {
  56. if(abs(x-Nox[i])+abs(y-Noy[i])<2.5) {
  57. if(B[b].what==-2)Exp+=20,Biao+=20;
  58. if(B[b].what==-3)Fire=1000000,Ice=10000000,Fir=10000000;
  59. if(B[b].what==-4)Water=10000000;
  60. if(B[b].what==-5) {
  61. Wind=10;
  62. Ding=10000000;
  63. Ice=10000000;
  64. if(Y<Ding-1)Vy=5;
  65. else Vy=0;
  66. if(Up>=1) Vx=-5;
  67. if(Down==2) Vx=5;
  68. }
  69. if(B[b].what==-6) {
  70. Thun=200;
  71. system("color 1F");
  72. Sleep(20);
  73. system("color 6F");
  74. Sleep(10);
  75. system("color 0F");
  76. }
  77. if(B[b].what==-7)Magne=300;
  78. if(B[b].what==-8)Ice=0,Drug=0,Blo=fmin((float)Blomax,Blo+20);
  79. if(B[b].what==-9)Exp=fmin((float)Expmax,Exp+20);
  80. B[b].life=0;
  81. if(B[b].life==0&&b==bl) bl++;
  82. Map(3,b);
  83. break;
  84. }
  85. }
  86. }
  87. if(Wind==0&&Thun==0&&(B[b].kill!=0||Killb>=15||Ren==1&&Killb>0)) return;
  88. for(int i=0; i<3; i++) {
  89. if((Wind>=1||Thun>=1)&&abs(x-Nox[i])+abs(y-Noy[i])<2.5) {
  90. if(B[b].what<98)Exp+=2;
  91. B[b].life=0;
  92. Map(3,b);
  93. break;
  94. }
  95. if(a==1) {
  96. if(abs(x-Nox[i])<0.5&&abs(y-Noy[i])<1) {
  97. if(B[b].what>=99)Blo-=10;
  98. if(B[b].what==14)Blo-=15,Ice=100,B[b].life=0;
  99. else if(B[b].what==15)Blo-=20,Ice=0,B[b].life=0;
  100. else if(B[b].what==17)Blo-=5,Drug=100,B[b].life=0;
  101. else if(B[b].what>=13&&B[b].what<=17)Blo-=10,B[b].life=0;
  102. else Blo-=15;
  103. B[b].kill=1,Killb=20;
  104. Kill=1;
  105. Map(3,b);
  106. break;
  107. }
  108. }
  109. if(a==2||a==6||a==8||a==9||a==10||a==11||a==12) {
  110. if(abs(x-Nox[i])+abs(y-Noy[i])<1.5) {
  111. if(a==2)Blo-=20;
  112. else if(a==8)Blo-=10;
  113. else Blo-=15;
  114. B[b].kill=1,Killb=20;
  115. Kill=1;
  116. if(a!=2) {
  117. B[b].life=0;
  118. if(B[b].life==0&&b==bl) bl++;
  119. Map(3,b);
  120. break;
  121. }
  122. }
  123. }
  124. if(a==4) {
  125. if((Wind>=1||Thun>=1)&&abs(x-Nox[i])<1.5&&Noy[i]-y<=0&&Noy[i]-y>=-8) {
  126. if(B[b].what<98)Exp+=2;
  127. B[b].life=0;
  128. Map(3,b);
  129. break;
  130. }
  131. if(abs(x-Nox[i])<1&&Noy[i]-y<=0&&Noy[i]-y>=-8) {
  132. Blo-=25,B[b].kill=1,Killb=20;
  133. Kill=1;
  134. Vy=-1;
  135. Y-=0.5;
  136. break;
  137. }
  138. }
  139. }
  140. }
  141. void Map(int a,int b) {
  142. Color(0);
  143. if(a==-1) {
  144. if(Boss==1||Boss==6) {
  145. if(Bwhat1==5) {
  146. if(ti(Bx1)==20)Setpos(Bx1,By1),cout<<"==";
  147. else Setpos(Bx1,By1),cout<<" ";
  148. } else {
  149. Setpos(Bx1-1,By1-0.5),cout<<" ";
  150. Setpos(Bx1,By1-1),cout<<" ";
  151. Setpos(Bx1+1,By1-0.5),cout<<" ";
  152. if(abs(ti(Bx1)-20)<=1)Setpos(20,By1-1),cout<<"======";
  153. }
  154. }
  155. if(Boss==2||Boss==6) {
  156. Setpos(Bx2-1,By2-1);
  157. cout<<" ";
  158. Setpos(Bx2,By2-1);
  159. cout<<" ";
  160. Setpos(Bx2+1,By2-1),cout<<" ";
  161. Color(0);
  162. if(abs(ti(Bx2)-20)<=1)Setpos(20,By2-1),cout<<"======";
  163. }
  164. if(Boss==3||Boss==6) {
  165. Setpos(Bx3-1,By3-0.5);
  166. cout<<" ";
  167. Setpos(Bx3,By3);
  168. cout<<" ";
  169. Setpos(Bx3+1,By3-1),cout<<" ";
  170. Color(0);
  171. if(abs(ti(Bx3)-20)<=1)Setpos(20,By3-1),cout<<"=======";
  172. }
  173. if(X<0)return;
  174. if(X>=17&&X<=19) {
  175. Setpos(X-1,Y);
  176. cout<<" ";
  177. Setpos(X,Y-1);
  178. cout<<" ";
  179. Setpos(X+1,Y-1),cout<<" ";
  180. } else if(X<=23&&X>=21) {
  181. Setpos(X+1,Y);
  182. cout<<" ";
  183. Setpos(X,Y-1);
  184. cout<<" ";
  185. Setpos(X-1,Y-1),cout<<" ";
  186. } else if(X>23) {
  187. Setpos(X,Y-1);
  188. cout<<" ";
  189. Setpos(X-1,Y-0.5),cout<<" ";
  190. } else if(X<17&&Upt!=0) {
  191. Setpos(X,Y-1);
  192. cout<<" ";
  193. Setpos(X+1,Y-1.5),cout<<" ";
  194. } else if(X<17) {
  195. Setpos(X,Y-1);
  196. cout<<" ";
  197. Setpos(X+1,Y-0.5),cout<<" ";
  198. }
  199. if(Thun>0) {
  200. Setpos(X-2,Y-1),cout<<" ";
  201. Setpos(X+2,Y-1),cout<<" ";
  202. Setpos(X,Y+2),cout<<" ";
  203. Setpos(X,Y-2.5),cout<<" ";
  204. Setpos(X-1,Y+1),cout<<" ";
  205. Setpos(X+1,Y+1),cout<<" ";
  206. Setpos(X-1,Y-2),cout<<" ";
  207. Setpos(X+1,Y-2),cout<<" ";
  208. Setpos(20,Y-2.5),cout<<"============";
  209. }
  210. if(Wind!=0) {
  211. Setpos(X+1,Y-5);
  212. cout<<" ";
  213. Setpos(X,Y-5);
  214. cout<<" ";
  215. Setpos(X-1,Y-5);
  216. cout<<" ";
  217. Setpos(20,Y-5),cout<<"========";
  218. }
  219. if(Water!=0) {
  220. Setpos(X,Y-4);
  221. cout<<" ";
  222. Setpos(X+2,Y-3.5);
  223. cout<<" ";
  224. Setpos(X-2,Y-3.5);
  225. cout<<" ";
  226. Setpos(X+1,Y-3.5);
  227. cout<<" ";
  228. Setpos(X-1,Y-3.5);
  229. cout<<" ";
  230. Setpos(20,Y-5),cout<<"========";
  231. }
  232. if(Fire!=0) {
  233. Setpos(X,Y+1),cout<<" ";
  234. Setpos(X+1,Y),cout<<" ";
  235. Setpos(X-1,Y-1),cout<<" ";
  236. Setpos(20,Y-1);
  237. cout<<"======";
  238. }
  239. }
  240. if(a==0) {
  241. if(Boss==1||Boss==6) {
  242. if(Bwhat1==5)Color(5),Setpos(Bx1,By1),cout<<"█",Color(0);
  243. else if(Bwhat1==4&&Bgo1[1]>6&&Bgo1[1]<11)Color(4),Setpos(Bgo1[5]-1,Bgo1[6]),cout<<"︻",Setpos(Bgo1[5],Bgo1[6]-1),cout<<"【",Setpos(Bgo1[5],Bgo1[6]+1),cout<<"】",Setpos(Bgo1[5]+1,Bgo1[6]),cout<<"︼",Color(0);
  244. else {
  245. Setpos(Bx1-1,By1-0.5),Color(0),cout<<"●●";
  246. Setpos(Bx1,By1-1);
  247. if(Bwhat1==2&&Bgo1[1]<=5)Color(1);
  248. else if(Bwhat1==3&&Bgo1[1]<=5)Color(5);
  249. else if(Bwhat1==6&&Bgo1[1]<=5)Color(8);
  250. else Color(4);
  251. if(Bwhat1==4) Setpos(Bx1,By1-0.5),cout<<"██(";
  252. else cout<<")██(";
  253. Setpos(Bx1+1,By1-0.5),cout<<"……";
  254. Color(0);
  255. }
  256. }
  257. if(Boss==2||Boss==6) {
  258. Setpos(Bx2-1,By2-1);
  259. Color(0),cout<<"\\ ";
  260. Color(0);
  261. cout<<"●";
  262. Setpos(Bx2,By2-1);
  263. Color(3);
  264. cout<<"◥";
  265. Color(5),cout<<"JJJ";
  266. Color(0),cout<<">";
  267. Color(3);
  268. Setpos(Bx2+1,By2-1),cout<<"◢█◣";
  269. Color(0);
  270. }
  271. if(Boss==3||Boss==6) {
  272. Setpos(Bx3-1,By3-0.5);
  273. if(Bwhat3==3||Bwhat3==9) Color(1);
  274. else if(Bwhat3==4||Bwhat3==10) Color(4);
  275. else if(Bwhat3==5||Bwhat3==11) Color(5);
  276. if(Bwhat3==11)cout<<' ';
  277. else if(Bwhat3==6) Color(3);
  278. else Color(2);
  279. cout<<"●-";
  280. Setpos(Bx3,By3);
  281. if(Bwhat3==11)cout<<"/";
  282. else cout<<"┃";
  283. Color(0);
  284. Setpos(Bx3+1,By3-1),cout<<"●●●";
  285. }
  286. if(X<0)return;
  287. if(Ren==2) Color(12);
  288. if(Ren==3) Color(1);
  289. if(Ren==4) Color(3);
  290. if(Ren==5) Color(4);
  291. if(Ren==6) Color(2);
  292. if(Drug!=0&&T%5!=0) Color(11);
  293. if(Drug!=0&&T%5==0) Color(11);
  294. if(Ice!=0) Color(6);
  295. if(b==1) Color(8);
  296. if(Li!=0) Color(5);
  297. if(Ren==1&&Killb>0&&T%4<2) Color(13);
  298. if(Wind>0&&T%4<=1) Color(1);
  299. if(Wind>0&&T%4>=2) Color(0);
  300. if(Thun>0&&T%4<=1) Color(1);
  301. if(Thun>0&&T%4>=2) Color(6);
  302. if(X>=17&&X<=19) {
  303. Setpos(X-1,Y);
  304. cout<<"●";
  305. Setpos(X,Y-1);
  306. cout<<"━/";
  307. if(T%10<3) Setpos(X+1,Y-1),cout<<"┛╲";
  308. else if(T%10<6) Setpos(X+1,Y-1),cout<<"┦ ";
  309. else Setpos(X+1,Y-1),cout<<"╯>";
  310. if(Wind>0&&T%3==0) Setpos(X+1,Y-1),cout<<"┛╲";
  311. else if(Wind>0&&T%3==1) Setpos(X+1,Y-1),cout<<"┦ ";
  312. else if(Wind>0&&T%3==2)Setpos(X+1,Y-1),cout<<"╯>";
  313. } else if(X<=23&&X>=21) {
  314. Setpos(X+1,Y);
  315. cout<<"●";
  316. Setpos(X,Y-1);
  317. cout<<"━\\";
  318. if(T%10<3) Setpos(X-1,Y-1),cout<<"┓╱";
  319. else if(T%10<6) Setpos(X-1,Y-1),cout<<"┪ ";
  320. else Setpos(X-1,Y-1),cout<<"╮>";
  321. if(Wind>0&&T%3==0) Setpos(X-1,Y-1),cout<<"┓╱";
  322. else if(Wind>0&&T%3==1) Setpos(X-1,Y-1),cout<<"┪ ";
  323. else if(Wind>0&&T%3==2)Setpos(X-1,Y-1),cout<<"╮>";
  324. } else if(X>23) {
  325. Setpos(X,Y-1);
  326. cout<<"━ ●";
  327. Setpos(X-1,Y-0.5),cout<<"│>";
  328. } else if(X<17&&Upt!=0) {
  329. Setpos(X,Y-1);
  330. cout<<"━ ●";
  331. Setpos(X+1,Y-1.5),cout<<"╱ >";
  332. } else if(X<17) {
  333. Setpos(X,Y-1);
  334. cout<<"━ ●";
  335. Setpos(X+1,Y-0.5),cout<<"│>";
  336. }
  337. if(Thun>0) {
  338. Setpos(X-2,Y-1),cout<<"▄▄";
  339. Setpos(X+2,Y-1),cout<<"▄▄";
  340. Setpos(X,Y+2),cout<<"▌";
  341. Setpos(X,Y-2.5),cout<<"▌";
  342. Setpos(X-1,Y+1),cout<<"█";
  343. Setpos(X+1,Y+1),cout<<"█";
  344. Setpos(X-1,Y-2),cout<<"█";
  345. Setpos(X+1,Y-2),cout<<"█";
  346. }
  347. if(Magne>0&&T%7<2)Setpos(X,Y),Color(5),cout<<"★";
  348. if(Wind>1) {
  349. if(T%6<2)Color(1);
  350. else Color(0);
  351. if(T%8<=1) {
  352. Setpos(X+1,Y-5);
  353. cout<<"---- --";
  354. Setpos(X,Y-5);
  355. cout<<"- --- -";
  356. Setpos(X-1,Y-5);
  357. cout<<"--- - --";
  358. } else if(T%8<=3) {
  359. Setpos(X+1,Y-5);
  360. cout<<"------ ";
  361. Setpos(X,Y-5);
  362. cout<<" -- ---";
  363. Setpos(X-1,Y-5);
  364. cout<<"----- - ";
  365. } else if(T%8<=5) {
  366. Setpos(X+1,Y-5);
  367. cout<<" ------";
  368. Setpos(X,Y-5);
  369. cout<<"-- -- -";
  370. Setpos(X-1,Y-5);
  371. cout<<"- ----- ";
  372. } else if(T%8<=7) {
  373. Setpos(X+1,Y-5);
  374. cout<<"-- ----";
  375. Setpos(X,Y-5);
  376. cout<<" --- -- ";
  377. Setpos(X-1,Y-5);
  378. cout<<"- - ----";
  379. }
  380. }
  381. if(Water!=0) {
  382. Color(1);
  383. if(T%20<5) {
  384. Setpos(X+2,Y-3);
  385. cout<<"■";
  386. Setpos(X+1,Y-3.5);
  387. cout<<"■";
  388. Setpos(X-1,Y-2.5);
  389. cout<<"■";
  390. Setpos(X-2,Y-3);
  391. cout<<"■";
  392. } else if(T%20<10||T%20>=15) {
  393. Setpos(X+2,Y-3);
  394. cout<<"■";
  395. Setpos(X,Y-4);
  396. cout<<"■■";
  397. Setpos(X-2,Y-3);
  398. cout<<"■";
  399. } else if(T%20<15) {
  400. Setpos(X+2,Y-3.5);
  401. cout<<"■";
  402. Setpos(X+1,Y-3);
  403. cout<<"■";
  404. Setpos(X-1,Y-3.5);
  405. cout<<"■";
  406. Setpos(X-2,Y-3);
  407. cout<<"■";
  408. }
  409. }
  410. if(Fire!=0) {
  411. if(T%6<3)Color(4);
  412. else Color(5);
  413. if(Fir>=1)Setpos(X,Y+1),cout<<"●";
  414. if(Fir>=2)Setpos(X+1,Y),cout<<"●";
  415. if(Fir>=3)Setpos(X-1,Y-1),cout<<"●";
  416. }
  417. }
  418. if(a==1||a==3) {
  419. if(B[b].what==1) {
  420. Nor;
  421. Setpos(B[b].x,B[b].y-1);
  422. if(ti(B[b].x)==20)cout<<"======";
  423. else cout<<" ";
  424. if(B[b].life!=0) {
  425. B[b].y-=B[b].vy;
  426. Setpos(B[b].x,B[b].y);
  427. if(B[b].How<=1) Color(13);
  428. else Color(4);
  429. cout<<"●";
  430. if(a==1) Pan(1,B[b].x,B[b].y,b);
  431. }
  432. }
  433. if(B[b].what==2) {
  434. Nor;
  435. Setpos(B[b].x-1,B[b].y-1);
  436. if(ti(B[b].x-1)==20)cout<<"======";
  437. else cout<<" ";
  438. Setpos(B[b].x,B[b].y-1);
  439. if(ti(B[b].x)==20)cout<<"======";
  440. else cout<<" ";
  441. Setpos(B[b].x+1,B[b].y-1);
  442. if(ti(B[b].x+1)==20)cout<<"======";
  443. else cout<<" ";
  444. if(B[b].life!=0) {
  445. B[b].y-=B[b].vy;
  446. Setpos(B[b].x,B[b].y);
  447. Color(5);
  448. if(B[b].How==0) {
  449. Setpos(B[b].x-1,B[b].y),cout<<"↑";
  450. Setpos(B[b].x,B[b].y-1),cout<<"←┼ →";
  451. Setpos(B[b].x+1,B[b].y),cout<<"↓";
  452. } else if(B[b].How==1) {
  453. Setpos(B[b].x-1,B[b].y-1),cout<<"↖ ↗";
  454. Setpos(B[b].x,B[b].y),cout<<"╳";
  455. Setpos(B[b].x+1,B[b].y-1),cout<<"↙ ↘";
  456. }
  457. if(a==1) Pan(2,B[b].x,B[b].y,b);
  458. }
  459. }
  460. if(B[b].what==3||B[b].what==5) {
  461. Nor;
  462. Setpos(B[b].x,B[b].y);
  463. if(ti(B[b].x)==20)cout<<"==";
  464. else cout<<" ";
  465. if(B[b].life!=0) {
  466. B[b].y-=B[b].vy;
  467. B[b].x-=B[b].vx;
  468. Setpos(B[b].x,B[b].y);
  469. if(B[b].How==1) Color(5);
  470. else Color(4);
  471. cout<<"◎";
  472. }
  473. }
  474. if(B[b].what==4) {
  475. Nor;
  476. Setpos(B[b].x,fmax((float)0,B[b].y-8));
  477. if(ti(B[b].x)==20) {
  478. for(int i=max(0,(int)B[b].y-8); i<=B[b].y; i++)cout<<"==";
  479. } else {
  480. for(int i=max(0,(int)B[b].y-8); i<=B[b].y; i++)cout<<" ";
  481. }
  482. if(B[b].life!=0) {
  483. B[b].y-=B[b].vy;
  484. Setpos(B[b].x,fmax((float)0,B[b].y-8));
  485. Color(6);
  486. for(int i=max(0,(int)B[b].y-8); i<=B[b].y; i++)cout<<"═";
  487. if(a==1) Pan(4,B[b].x,B[b].y,b);
  488. }
  489. }
  490. if(B[b].what==6||B[b].what==8||B[b].what==9) {
  491. Nor;
  492. Setpos(B[b].x-1,B[b].y);
  493. if(ti(B[b].x)-1==20)cout<<"==";
  494. else cout<<" ";
  495. Setpos(B[b].x+1,B[b].y);
  496. if(ti(B[b].x)+1==20)cout<<"==";
  497. else cout<<" ";
  498. Setpos(B[b].x,B[b].y-1);
  499. if(ti(B[b].x)==20)cout<<"======";
  500. else cout<<" ";
  501. if(B[b].life!=0) {
  502. B[b].y-=B[b].vy;
  503. B[b].x-=B[b].vx;
  504. Setpos(B[b].x,B[b].y-1);
  505. if(B[b].what==6) {
  506. if(B[b].How<=1) Color(1);
  507. else Color(6);
  508. }
  509. if(B[b].what==9) {
  510. if(B[b].How<=1) Color(4);
  511. else Color(8);
  512. }
  513. if(B[b].what==8)Color(5);
  514. Setpos(B[b].x-1,B[b].y);
  515. cout<<"︹";
  516. Setpos(B[b].x+1,B[b].y);
  517. cout<<"︺";
  518. Setpos(B[b].x,B[b].y-1);
  519. if(B[b].How%2==1) cout<<"〔●〕";
  520. else cout<<"﹝○﹞";
  521. if(a==1) Pan(6,B[b].x,B[b].y,b);
  522. }
  523. }
  524. if(B[b].what==7) {
  525. Nor;
  526. Setpos(B[b].x,B[b].y);
  527. if(B[b].How<0) for(int i=19; i>=20+B[b].How; i--) {
  528. Setpos(i,B[b].y);
  529. cout<<" ";
  530. }
  531. if(B[b].How>0) for(int i=21; i<=20+B[b].How; i++) {
  532. Setpos(i,B[b].y);
  533. cout<<" ";
  534. }
  535. if(B[b].life!=0) {
  536. B[b].y-=B[b].vy;
  537. if(B[b].How<0) for(int i=19; i>=20+B[b].How; i--) {
  538. Setpos(i,B[b].y);
  539. cout<<"║";
  540. if(a==1) Pan(7,i,B[b].y,b);
  541. }
  542. if(B[b].How>0) for(int i=21; i<=20+B[b].How; i++) {
  543. Setpos(i,B[b].y);
  544. cout<<"║";
  545. if(a==1) Pan(7,i,B[b].y,b);
  546. }
  547. }
  548. }
  549. if(B[b].what==10||B[b].what==11||B[b].what==12) {
  550. Nor;
  551. Setpos(B[b].x,B[b].y);
  552. if(ti(B[b].x)==20)cout<<"==";
  553. else cout<<" ";
  554. if(B[b].life!=0) {
  555. B[b].x-=B[b].vx;
  556. B[b].y-=B[b].vy;
  557. if(B[b].How==1) {
  558. B[b].vy-=0.2;
  559. } else B[b].vx-=0.35;
  560. if(B[b].x>=25) B[b].x=25,B[b].vx*=-0.8;
  561. if(B[b].what==11&&B[b].y<=1) B[b].y=1,B[b].vy*=-1;
  562. if(B[b].what==12&&B[b].y<=1) B[b].y=1,B[b].vx=0,B[b].vy=-0.5,B[b].How=1;
  563. Setpos(B[b].x,B[b].y);
  564. if(B[b].what==11)Color(1);
  565. else if(B[b].what==12)Color(5);
  566. else Color(0);
  567. if(B[b].t%4<2)cout<<"▃";
  568. else cout<<"▍";
  569. if(a==1) Pan(B[b].what,B[b].x,B[b].y,b);
  570. }
  571. }
  572. if(B[b].what>=13&&B[b].what<=17) {
  573. Nor;
  574. Setpos(B[b].x,B[b].y);
  575. if(ti(B[b].x)==20)cout<<"====";
  576. else cout<<" ";
  577. if(B[b].life!=0) {
  578. B[b].x-=B[b].vx;
  579. B[b].y-=B[b].vy;
  580. Setpos(B[b].x,B[b].y);
  581. if(B[b].what==14) Color(1);
  582. else if(B[b].what==15) Color(4);
  583. else if(B[b].what==16) Color(5);
  584. else if(B[b].what==17) Color(3);
  585. else Color(2);
  586. cout<<"●";
  587. if(B[b].what==14)cout<<"*";
  588. if(B[b].what==15)cout<<"";
  589. if(B[b].what==16)cout<<"<";
  590. if(B[b].what==17)cout<<"X";
  591. }
  592. if(a==1) Pan(1,B[b].x,B[b].y,b);
  593. }
  594. if(B[b].what==98&&B[b].life!=0) {
  595. B[b].y-=B[b].vy;
  596. Setpos(B[b].x,B[b].y);
  597. if(ti(B[b].x==20))cout<<"==";
  598. else cout<<" ";
  599. if(B[b].y<=3)B[b].life=0;
  600. }
  601. if(B[b].what>=99) {
  602. if(B[b].y<=3)B[b].life=0;
  603. if(B[b].life!=0) {
  604. B[b].y-=B[b].vy;
  605. Setpos(B[b].x,B[b].y);
  606. Color(5);
  607. if(B[b].what==99)cout<<"█";
  608. if(B[b].what>=100&&B[b].what<200) {
  609. if(B[b].what%5==0)cout<<"ZYR";
  610. if(B[b].what%5==1)cout<<"0821";
  611. if(B[b].what%5==2)cout<<"太";
  612. if(B[b].what%5==3)cout<<"帅";
  613. if(B[b].what%5==4)cout<<"了";
  614. }
  615. if(B[b].what>=200&&B[b].what<300) {
  616. if(B[b].what%6==0)cout<<"神";
  617. if(B[b].what%6==1)cout<<"级";
  618. if(B[b].what%6==2)cout<<"ZYR";
  619. if(B[b].what%6==3)cout<<"0821";
  620. if(B[b].what%6==4)cout<<"之";
  621. if(B[b].what%6==5)cout<<"光";
  622. }
  623. if(B[b].what>=300&&B[b].what<400) {
  624. if(B[b].what%8==0)cout<<"颤";
  625. if(B[b].what%8==1)cout<<"抖";
  626. if(B[b].what%8==2)cout<<"吧";
  627. if(B[b].what%8==3)cout<<"无";
  628. if(B[b].what%8==4)cout<<"能";
  629. if(B[b].what%8==5)cout<<"的";
  630. if(B[b].what%8==6)cout<<"人";
  631. if(B[b].what%8==7)cout<<"类";
  632. }
  633. if(B[b].what>=400&&B[b].what<500) {
  634. if(B[b].what%8==0)cout<<"还";
  635. if(B[b].what%8==1)cout<<"不";
  636. if(B[b].what%8==2)cout<<"快";
  637. if(B[b].what%8==3)cout<<"跪";
  638. if(B[b].what%8==4)cout<<"倒";
  639. if(B[b].what%8==5)cout<<"在";
  640. if(B[b].what%8==6)cout<<"朕";
  641. if(B[b].what%8==7)cout<<"前";
  642. }
  643. if(B[b].what>=500&&B[b].what<600) {
  644. if(B[b].what%8==0)cout<<"看";
  645. if(B[b].what%8==1)cout<<"懂";
  646. if(B[b].what%8==2)cout<<"这";
  647. if(B[b].what%8==3)cout<<"句";
  648. if(B[b].what%8==4)cout<<"话";
  649. if(B[b].what%8==5)cout<<"的";
  650. if(B[b].what%8==6)cout<<"是";
  651. if(B[b].what%8==7)cout<<"猪";
  652. }
  653. if(a==1) Pan(1,B[b].x,B[b].y,b);
  654. }
  655. }
  656. if(B[b].what==-1) {
  657. Nor;
  658. Setpos(B[b].x,B[b].y);
  659. if(ti(B[b].x)==20)cout<<"==";
  660. else cout<<" ";
  661. if(Boss==0) B[b].life=0;
  662. else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==10))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;
  663. if(B[b].life!=0) {
  664. if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(10-B[b].t)*1.0;
  665. if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(10-B[b].t)*1.0;
  666. if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(10-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(10-B[b].t)*1.0;
  667. Setpos(B[b].x,B[b].y);
  668. Color(7);
  669. if(B[b].t%2==0) cout<<"+";
  670. else cout<<"×";
  671. }
  672. }
  673. if(B[b].what<=-2&&B[b].what>=-9) {
  674. Nor;
  675. Setpos(B[b].x-1,B[b].y);
  676. if(ti(B[b].x)-1==20)cout<<"==";
  677. else cout<<" ";
  678. Setpos(B[b].x+1,B[b].y);
  679. if(ti(B[b].x)+1==20)cout<<"==";
  680. else cout<<" ";
  681. Setpos(B[b].x,B[b].y-1);
  682. if(ti(B[b].x)==20)cout<<"======";
  683. else cout<<" ";
  684. if(B[b].life!=0) {
  685. B[b].y-=B[b].vy;
  686. B[b].x-=B[b].vx;
  687. if(B[b].what<=-3&&B[b].what>=-7) {
  688. if(B[b].x<=7)B[b].x=7;
  689. if(B[b].x>=28)B[b].x=28;
  690. else if(B[b].x>=B[b].a+1&&B[b].How==1)B[b].How=0;
  691. else if(B[b].x<=B[b].a-1&&B[b].How==0)B[b].How=1;
  692. if(B[b].How==1&&B[b].vx>=-1)B[b].vx-=0.2;
  693. if(B[b].How==0&&B[b].vx<=1)B[b].vx+=0.2;
  694. }
  695. if(B[b].what==-2) Color(3);
  696. if(B[b].what==-3) Color(4);
  697. if(B[b].what==-4) Color(1);
  698. if(B[b].what==-5) Color(0);
  699. if(B[b].what==-6) Color(6);
  700. if(B[b].what==-7) Color(5);
  701. if(B[b].what==-8) Color(2);
  702. if(B[b].what==-9) Color(14);
  703. if(T%7<=1&&B[b].what==-5)Color(1);
  704. else if(T%7<=1)Color(0);
  705. Setpos(B[b].x-1,B[b].y);
  706. cout<<"︹";
  707. Setpos(B[b].x+1,B[b].y);
  708. cout<<"︺";
  709. Setpos(B[b].x,B[b].y-1);
  710. if(B[b].what==-2) cout<<"﹝镖﹞";
  711. if(B[b].what==-3) cout<<"﹝火﹞";
  712. if(B[b].what==-4) cout<<"﹝水﹞";
  713. if(B[b].what==-5) cout<<"﹝风﹞";
  714. if(B[b].what==-6) cout<<"﹝雷﹞";
  715. if(B[b].what==-7) cout<<"﹝磁﹞";
  716. if(B[b].what==-8) cout<<"﹝血﹞";
  717. if(B[b].what==-9) cout<<"﹝忍﹞";
  718. if(a==1) Pan(-2,B[b].x,B[b].y,b);
  719. }
  720. }
  721. if(B[b].what==-11||B[b].what==-12) {
  722. Nor;
  723. Setpos(B[b].x,B[b].y);
  724. if(ti(B[b].x)==20)cout<<"==";
  725. else cout<<" ";
  726. if(B[b].life!=0) {
  727. if(Magne>0)B[b].How++,B[b].x=B[b].x+(X-B[b].x)/(10-B[b].How)*1.0,B[b].y=B[b].y+(Y-B[b].y)/(10-B[b].How)*1.0;
  728. B[b].y-=B[b].vy;
  729. Setpos(B[b].x,B[b].y);
  730. if(B[b].what==-10) Color(5);
  731. if(B[b].what==-11) Color(7);
  732. if(T%7<=1)Color(0);
  733. cout<<"◆";
  734. if(a==1) Pan(-1,B[b].x,B[b].y,b);
  735. }
  736. }
  737. if(B[b].what==-13) {
  738. Nor;
  739. Setpos(B[b].x,B[b].y-0.5);
  740. if(ti(B[b].x)==20)cout<<"===";
  741. else cout<<" ";
  742. if(B[b].life!=0) {
  743. if(B[b].a==13880086) {
  744. if(Boss==0) B[b].life=0;
  745. else if(((Boss==1&&abs(B[b].x-Bx1)+abs(B[b].y-By1)<1.5)||(Boss==2&&abs(B[b].x-Bx2)+abs(B[b].y-By2)<1.5)||(Boss==3&&abs(B[b].x-Bx3)+abs(B[b].y-By3)<1.5)||(B[b].t==5))&&B[b].life==1) Bblo-=8+Lv*2,B[b].life=0;
  746. if(B[b].life!=0) {
  747. if(Boss==1)B[b].x=B[b].x+(Bx1-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By1-B[b].y)/(5-B[b].t)*1.0;
  748. if(Boss==2)B[b].x=B[b].x+(Bx2-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By2-B[b].y)/(5-B[b].t)*1.0;
  749. if(Boss==3)B[b].x=B[b].x+(Bx3-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(By3-B[b].y)/(5-B[b].t)*1.0;
  750. }
  751. } else {
  752. if(B[B[b].a].life==0) B[b].life=0;
  753. else if((abs(B[b].x-B[B[b].a].x)+abs(B[b].y-B[B[b].a].y)<1.5||(B[b].t==5))&&B[b].life==1) Exp+=2,B[B[b].a].life=B[b].life=0;
  754. if(B[b].life!=0) {
  755. B[b].x=B[b].x+(B[B[b].a].x-B[b].x)/(5-B[b].t)*1.0,B[b].y=B[b].y+(B[B[b].a].y-B[b].y)/(5-B[b].t)*1.0;
  756. }
  757. }
  758. Setpos(B[b].x,B[b].y-0.5);
  759. if(T%6<3)Color(5);
  760. else Color(4);
  761. cout<<"●";
  762. }
  763. }
  764. }
  765. if(br<bl) {
  766. br=-1,bl=0;
  767. memset(B,0,sizeof(B));
  768. }
  769. Color(0);
  770. }
  771. void Move() {
  772. if(X<3) X=3;
  773. if(Y<1) Y=1,Vy=0;
  774. if(Y>29) Y=29,Vy=0;
  775. if(Ice!=0) {
  776. X-=Vx/2.0;
  777. Y+=Vy/2.0;
  778. Vy=fmax(Vy-0.025,(float)0);
  779. if(T%6==0&&Up==0&&Y<Ding) Y+=0.25;
  780. if(T%6==3&&Up==0&&Y>=Ding) Y-=0.25;
  781. if(Up==0&&Y<=Ding-1.25) Vy=0.25;
  782. if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.25;
  783. if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";
  784. else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";
  785. else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";
  786. else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";
  787. else if(Down==2) Vx+=0.175;
  788. else if(Up>0&&Upt==0) Vx-=0.175;
  789. else if(Up>0&&Upt>0) {
  790. Vx=fmax(Vx-0.125,(float)0);
  791. if(Upt==1&&T%2==0)Map(-1,0);
  792. if(T%2==0)Upt--;
  793. }
  794. } else {
  795. X-=Vx;
  796. Y+=Vy;
  797. Vy=fmax(Vy-0.05,(float)0);
  798. if(Wind==0) {
  799. if(T%6==0&&Up==0&&Y<Ding) Y+=0.5;
  800. if(T%6==3&&Up==0&&Y>=Ding) Y-=0.5;
  801. } else {
  802. if(T%2==0&&Up==0&&Y<Ding) Y+=0.5;
  803. if(T%2==1&&Up==0&&Y>=Ding) Y-=0.5;
  804. }
  805. if(Up==0&&Y<=Ding-1.25) Vy=0.5;
  806. if(Up==0&&Y>=Ding+1.25&&Wind==0) Vy=-0.5;
  807. if(Up==0&&Down==0&&Vx>0&&X<=18) Up=0,Down=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";
  808. else if(Down==2&&X<=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";
  809. else if(Up==0&&Down==1&&Vx<0&&X>=22) Up=0,Down=1,Vx=0,Vy=0,X=22,Setpos(20,Y-2.5),cout<<"==========";
  810. else if(Up>0&&Down==0&&X>18) Up=0,Vx=0,Vy=0,X=18,Setpos(20,Y-2.5),cout<<"==========";
  811. else if(Down==2) Vx+=0.35;
  812. else if(Up>0&&Upt==0) Vx-=0.35;
  813. else if(Up>0&&Upt>0) {
  814. Vx=fmax(Vx-0.25,(float)0);
  815. if(Upt==1)Map(-1,0);
  816. Upt--;
  817. }
  818. }
  819. for(int i=bl; i<=br; i++) {
  820. if(B[i].what<98)if(B[i].x-B[i].vx<=5||B[i].x-B[i].vx>=30||B[i].y-B[i].vy<=0||B[i].y-B[i].vy>=30) {
  821. B[i].life=0;
  822. Map(1,i);
  823. }
  824. for(int j=0; j<20; j++)if(B[i].what>0&&B[i].life!=0&&abs(B[i].x-I[j][0])<2&&B[i].y-I[j][1]<=2) {
  825. Setpos(I[j][0],I[j][1]);
  826. if(I[j][0]==20) cout<<"===";
  827. else cout<<" ";
  828. I[j][0]=I[j][1]=-1;
  829. B[i].life=0;
  830. Exp+=2;
  831. }
  832. if(B[i].t>=100)B[i].life=0;
  833. if(B[i].life==0&&i==bl) bl++;
  834. Map(1,i);
  835. if(B[i].life==0) continue;
  836. else {
  837. B[i].t++;
  838. if(B[i].what==1) {
  839. if(B[i].y<=25&&B[i].How==0) B[i].vy=0,B[i].How=1;
  840. if(B[i].t==30) B[i].y+=1.5,B[i].How=2;
  841. if(B[i].t==35) B[i].vy=1.5,B[i].How=3;
  842. }
  843. if(B[i].what==2) {
  844. if(B[i].t%3==0) B[i].How=!B[i].How;
  845. }
  846. if(B[i].what==3||B[i].what==5) {
  847. if(B[i].what==3&&B[i].y<=20) B[i].vy=0;
  848. if(B[i].what==5&&B[i].y<=21) B[i].vy=0;
  849. if(B[i].t>30&&B[i].t%2==0) B[i].How=!B[i].How;
  850. if(B[i].what==5&&B[i].t<=30&&B[i].x<X) B[i].vx=-0.2;
  851. else if(B[i].what==5&&B[i].t<=70&&B[i].x>X) B[i].vx=0.2;
  852. else B[i].vx=0;
  853. if(B[i].t==45) {
  854. B[i].life=0;
  855. br++;
  856. B[br].what=4;
  857. B[br].x=B[i].x;
  858. B[br].y=32;
  859. B[br].vy=3;
  860. B[br].life=1;
  861. }
  862. }
  863. if(B[i].what==6||B[i].what==8||B[i].what==9) {
  864. if(B[i].vx<0.25&&B[i].vy<0.25&&B[i].t>=50) {
  865. B[i].life=0;
  866. if(B[i].life==0&&i==bl) bl++;
  867. Map(1,i);
  868. break;
  869. }
  870. if(B[i].t%5==0) B[i].How=rand()%4;
  871. if(B[i].what==9) {
  872. if(B[i].t==7) {
  873. X9:
  874. float xx=(rand()%41)/40.0,yy=(rand()%41)/40.0;
  875. if(xx<=0.5&&yy<=0.5) goto X9;
  876. for(int j=1; j<=4; j++) {
  877. br++,B[br].what=9;
  878. B[br].t=11;
  879. B[br].x=B[i].x,B[br].y=B[i].y,B[br].vx=xx,B[br].vy=yy;
  880. if(j%2==0)swap(B[br].vx,B[br].vy),B[br].vy*=-1;
  881. if(j<=2)B[br].vx*=-1,B[br].vy*=-1;
  882. B[br].life=1;
  883. }
  884. B[i].life=0;
  885. }
  886. }
  887. if(B[i].what==8) {
  888. if(B[i].x>X&&B[i].vx<1.2) B[i].vx+=fmax((float)0,0.2-B[i].t/25);
  889. if(B[i].x<X&&B[i].vx>-1.2) B[i].vx-=fmax((float)0,0.2-B[i].t/25);
  890. if(B[i].y>Y&&B[i].vy<1.2) B[i].vy+=fmax((float)0,0.2-B[i].t/25);
  891. if(B[i].y<Y&&B[i].vy>-1.2) B[i].vy-=fmax((float)0,0.2-B[i].t/25);
  892. }
  893. }
  894. if(B[i].what>=13&&B[i].what<=15&&B[i].How!=0) {
  895. if(B[i].x==B[i].How)B[i].vx=0,B[i].How=0;
  896. }
  897. if(B[i].what==16) {
  898. if(B[i].x<X&&B[i].vx>=-1) B[i].vx-=0.2;
  899. else if(B[i].x>X&&B[i].vx<=1) B[i].vx+=0.2;
  900. }
  901. }
  902. if(B[i].life==1&&B[i].a==0&&B[i].what>0) {
  903. if(B[i].y>Y&&abs(B[i].x-X)<=3&&((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis) Dis=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb=i;
  904. else if(((B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y))<Dis1) Dis1=(B[i].x-X)*(B[i].x-X)+(B[i].y-Y)*(B[i].y-Y),Disb1=i;
  905. }
  906. }
  907. }
  908. void Guai(int R,int r) {
  909. if(R==-1) {
  910. br++;
  911. B[br].what=-1;
  912. B[br].x=X+rand()%3-1;
  913. B[br].y=Y+rand()%3-1;
  914. B[br].life=1;
  915. }
  916. if(R<=-2&&R>=-11) {
  917. br++;
  918. B[br].what=R;
  919. B[br].x=B[br].a=r;
  920. B[br].y=29;
  921. if(R<=-3&&R>=-7)B[br].vx=-1;
  922. B[br].vy=1;
  923. B[br].life=1;
  924. }
  925. if(R==0) {
  926. br++;
  927. B[br].what=1;
  928. B[br].x=r;
  929. B[br].y=29;
  930. B[br].vy=1;
  931. B[br].life=1;
  932. }
  933. if(R==1) {
  934. br++;
  935. B[br].what=2;
  936. B[br].x=r;
  937. B[br].y=29;
  938. B[br].vy=1;
  939. B[br].life=1;
  940. }
  941. if(R==2||R==3) {
  942. br++;
  943. B[br].what=2*R-1;
  944. B[br].x=r;
  945. B[br].y=29;
  946. B[br].vy=1;
  947. B[br].life=1;
  948. }
  949. if(R==4) {
  950. br++;
  951. B[br].what=6;
  952. if(r<5)r=5;
  953. if(r>30)r=30;
  954. B[br].x=r;
  955. if(r==11||r==25) B[br].y=29-(rand()%20);
  956. else B[br].y=29;
  957. X4:
  958. B[br].vx=(rand()%21-10)/30.0;
  959. B[br].vy=(rand()%25)/30.0;
  960. if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X4;
  961. int rx=rand()%50;
  962. if(rx==0) B[br].vx=0;
  963. B[br].life=1;
  964. }
  965. if(R==5) {
  966. br++;
  967. B[br].How=r;
  968. B[br].what=7;
  969. if(B[br].How<0) B[br].x=19;
  970. if(B[br].How>0) B[br].x=21;
  971. B[br].y=29;
  972. B[br].vy=1;
  973. B[br].life=1;
  974. }
  975. }
  976. void CpGuai(int R,float x,float y,float xx,float yy) {
  977. if(R==4) {
  978. br++;
  979. B[br].what=6;
  980. B[br].x=x;
  981. B[br].y=y;
  982. B[br].vx=xx;
  983. B[br].vy=yy;
  984. B[br].life=1;
  985. }
  986. if(R==6||R==7||R==8) {
  987. br++;
  988. B[br].what=4+R;
  989. B[br].x=x;
  990. B[br].y=y;
  991. B[br].vx=xx;
  992. B[br].vy=yy;
  993. B[br].life=1;
  994. }
  995. }
  996. void MesGuai(int a,int rr) {
  997. int R=rand()%rr,r=-10086;
  998. if(R==0) {
  999. if(a==1) r=(5+rand()%8)*2;
  1000. if(a<=3&&a!=1) r=10+rand()%16;
  1001. if(a==4) r=rand()%75-20;
  1002. if(a==5) r=2+rand()%4;
  1003. if(r!=-10086) Guai(a,r);
  1004. }
  1005. }
  1006. void NorGuai(int a,int b) {
  1007. if(a==1) {
  1008. if(b==1||b==41) Guai(0,15),Guai(0,17),Guai(0,19);
  1009. if(b==21||b==61) Guai(0,21),Guai(0,23),Guai(0,25);
  1010. if(b==81) Guai(0,11),Guai(0,13),Guai(0,15),Guai(0,17),Guai(0,19);
  1011. if(b==101||b==141) Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23),Guai(0,25);
  1012. if(b==121) Guai(0,15),Guai(0,17),Guai(0,19),Guai(0,21),Guai(0,23);
  1013. if(b>=160&&b<=260&&b%10==0) Guai(0,b/10-1);
  1014. if(b>=270&&b<=370&&b%10==0) Guai(0,52-b/10);
  1015. if(b>=460&&b<=560&&b%10==0) Guai(0,b/10-37),Guai(0,b/10-36),Guai(0,b/10-35);
  1016. if(b>=570&&b<=670&&b%10==0) Guai(0,78-b/10),Guai(0,77-b/10),Guai(0,76-b/10);
  1017. if(b>=760&&b<=960&&b%10==0) Guai(0,b/10-66),Guai(0,b/10-65),Guai(0,103-b/10),Guai(0,104-b/10);
  1018. if(b>=1000&&b<=1300) MesGuai(0,30-b/50);
  1019. }
  1020. if(a==2) {
  1021. if(b<=200&&b%30==1) {
  1022. int r=rand()%4;
  1023. if(r==1) r=0;
  1024. for(int i=0; i<4; i++) if(i!=r) Guai(1,i*4+9);
  1025. }
  1026. if(b>200&&b<=220&&b%5==1) Guai(1,18);
  1027. if(b>220&&b<=300&&b%7==1) Guai(1,b/5-26);
  1028. if(b>350&&b<=370&&b%5==1) Guai(1,22);
  1029. if(b>370&&b<=450&&b%7==1) Guai(1,96-b/5);
  1030. if(b==461||b==501||b==541) Guai(1,13),Guai(1,17),Guai(1,21);
  1031. if(b==481||b==521||b==561) Guai(1,17),Guai(1,21),Guai(1,25);
  1032. if(b>=561&&b<=861&&b%20==1) Guai(1,b/40+5);
  1033. if(b>=561&&b<=861&&b%20==11) Guai(1,35-b/40);
  1034. if(b>=801&&b<=961&&b%15==1) Guai(1,20);
  1035. if(b>=1000&&b<=1300) MesGuai(1,30-b/50);
  1036. }
  1037. if(a==3) {
  1038. if(b==1||b==61) Guai(3,15),Guai(2,17),Guai(2,19);
  1039. if(b==31||b==91) Guai(2,21),Guai(2,23),Guai(3,25);
  1040. if(b>=120&&b<=220&&b%10==0) Guai(2,b/10+3);
  1041. if(b>=240&&b<=340&&b%10==0) Guai(2,49-b/10);
  1042. if(b>=360&&b<=460&&b%20==0) Guai(2,b/10-21),Guai(2,61-b/10);
  1043. if(b>=480&&b<=580&&b%20==0) Guai(3,b/10-33),Guai(3,73-b/10);
  1044. if(b>=600&&b<750&&b%30==0) {
  1045. for(int i=0; i<5; i++) Guai(3,i*3+10);
  1046. }
  1047. if(b>=750&&b<830&&b%10==0) if(b<=200&&b%40==1) Guai(2,X);
  1048. if(b>=830&&b<910&&b%20==0) Guai(2,X);
  1049. if(b>=910&&b<980&&b%10==0) Guai(2,X);
  1050. if(b>=1000&&b<=1300) MesGuai(rand()%2+2,40-b/50);
  1051. }
  1052. if(a==4) {
  1053. if(b==1) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.65);
  1054. if(b==41) CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);
  1055. if(b==81) CpGuai(4,5,20,-0.4,0.35),CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,30,20,0.25,0.4),CpGuai(4,21,29,0,0.65);
  1056. if(b==121) CpGuai(4,5,20,-0.2,0.35),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,30,20,0.4,0.4),CpGuai(4,18,29,0,0.65);
  1057. if(b==161) CpGuai(4,10,29,-0.4,0.7),CpGuai(4,14,29,-0.2,0.7),CpGuai(4,21,29,0,0.6),CpGuai(4,10,29,-0.2,0.7),CpGuai(4,14,29,-0.1,0.7),CpGuai(4,18,29,0,0.65);
  1058. if(b>=200&&b<=500&&b%40==1) {
  1059. float r=0,rr;
  1060. for(int i=1; i<=5; i++) {
  1061. X5:
  1062. rr=0.7+(rand()%5)/10.0;
  1063. if(rr==r)goto X5;
  1064. r=rr;
  1065. CpGuai(4,i*3+7,29,0,0.5+(rand()%50)/80.0);
  1066. }
  1067. }
  1068. if(b>540&&b<=565&&b%5==1) CpGuai(4,5,8,-2,0.2);
  1069. if(b>590&&b<=615&&b%5==1) CpGuai(4,30,8,1.5,0.2);
  1070. if(b>640&&b<=665&&b%5==1) CpGuai(4,5,8,-1.5,0.3);
  1071. if(b>690&&b<=715&&b%5==1) CpGuai(4,30,8,2,0.3);
  1072. if(b>=750&&b<=950&&b%20==1) {
  1073. float r=0,rr;
  1074. for(int i=1; i<=3; i++) {
  1075. X6:
  1076. rr=0.7+(rand()%5)/10.0;
  1077. if(rr==r)goto X6;
  1078. r=rr;
  1079. CpGuai(4,i*5+7+(rand()%3),29,0,0.5+(rand()%50)/200.0);
  1080. }
  1081. }
  1082. if(b>=1000&&b<=1300) MesGuai(4,5);
  1083. }
  1084. }
  1085. void RandGood() {
  1086. if(Biao>0) {
  1087. Biao--;
  1088. Guai(-1,0);
  1089. }
  1090. if(Gd[1]==0) {
  1091. Gd[1]=rand()%1000+1;
  1092. if(Win==7)Gd[1]=10086;
  1093. Gd[3]=rand()%16+8;
  1094. } else if(Gd[1]<=5) {
  1095. Guai(-2-Gd[1],Gd[3]);
  1096. memset(Gd,0,sizeof(Gd));
  1097. } else if(Gd[1]>=20&&Gd[1]<27) {
  1098. Guai(-8,Gd[3]);
  1099. memset(Gd,0,sizeof(Gd));
  1100. } else if(Gd[1]>=30&&Gd[1]<37) {
  1101. Guai(-9,Gd[3]);
  1102. memset(Gd,0,sizeof(Gd));
  1103. } else if(Gd[1]>=40&&Gd[1]<70) {
  1104. Gd[2]++;
  1105. if(Gd[2]%2==1)Guai(-10,Gd[3]);
  1106. if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));
  1107. } else if(Gd[1]>=70&&Gd[1]<100) {
  1108. Gd[2]++;
  1109. if(Gd[2]%2==1)Guai(-11,Gd[3]);
  1110. if(Gd[2]>=9)memset(Gd,0,sizeof(Gd));
  1111. } else if(Boss!=0&&Gd[1]>=450&&Gd[1]<=500) {
  1112. Guai(-2,Gd[3]);
  1113. memset(Gd,0,sizeof(Gd));
  1114. } else Gd[1]=0;
  1115. for(int i=0; i<20; i++) {
  1116. if(I[i][0]==-1) continue;
  1117. Setpos(I[i][0],I[i][1]);
  1118. Color(0);
  1119. if(I[i][0]==20) cout<<"===";
  1120. else cout<<" ";
  1121. I[i][1]++;
  1122. if(I[i][0]>=28||I[i][0]<=0||I[i][1]>=29) I[i][0]=I[i][1]=-1;
  1123. else Color(1),Setpos(I[i][0],I[i][1]),cout<<"■";
  1124. Color(0);
  1125. }
  1126. }
  1127. void Panboss(int bx,int by) {
  1128. float Nox[4],Noy[4];
  1129. Nox[0]=X,Noy[0]=Y;
  1130. if(Down==1&&X==22) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
  1131. else if(Down==2) Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
  1132. else if(Down==1||X<18) Nox[1]=X-1,Noy[1]=Y-0.5,Nox[2]=-10,Noy[2]=-10;
  1133. else Nox[1]=X+1,Noy[1]=Y-0.5,Nox[2]=X-1,Noy[2]=Y-0.5;
  1134. for(int i=0; i<3; i++) {
  1135. if((Boss==1||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo1[4]==0) Blo-=20,Bgo1[4]=1,Killb=20,Kill=1;
  1136. if((Boss==2||Boss==6)&&Wind==0&&Thun==0&&abs(Nox[i]-bx)<1&&abs(Noy[i]-by)<1&&Bgo2[8]==0) Blo-=20,Bgo2[8]=1,Killb=20,Kill=1;
  1137. }
  1138. }
  1139. void Boss1() {
  1140. for(int j=0; j<20; j++)if(abs(Bx1-I[j][0])<2&&By1-I[j][1]<=2) {
  1141. Setpos(I[j][0],I[j][1]);
  1142. if(I[j][0]==20) cout<<"===";
  1143. else cout<<" ";
  1144. I[j][0]=I[j][1]=-1;
  1145. Bblo-=8+Lv*2;
  1146. Exp+=2;
  1147. }
  1148. if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
  1149. for(int i=1; i<=3+(Bbl-Bbr)/5; i++)if(Bbr<Bbl) {
  1150. Setpos(Bway[Bbr][0],Bway[Bbr][1]);
  1151. if(Bway[Bbr][0]==20) cout<<"==";
  1152. else cout<<" ";
  1153. Bbr++;
  1154. }
  1155. if(Bwhat1==5) {
  1156. int bx,by;
  1157. Color(5);
  1158. for(int i=0; i<10; i++) {
  1159. bx=Bx1-i*Bvx1/10.0;
  1160. by=By1-i*Bvy1/10.0;
  1161. Setpos(bx,by),cout<<"█";
  1162. Bbl++;
  1163. Bway[Bbl][0]=bx;
  1164. Bway[Bbl][1]=by;
  1165. }
  1166. Color(0);
  1167. }
  1168. Bx1-=Bvx1;
  1169. By1-=Bvy1;
  1170. if(Bwhat1==0) {
  1171. X2:
  1172. Bwhat1=rand()%7;
  1173. if(Bwhat1==2||Bwhat1==3) {
  1174. if(By1<=10||By1>25) goto X2;
  1175. }
  1176. if(Bwhat1==4) {
  1177. if(By1<=15||Bx1<20) goto X2;
  1178. Bgo1[2]=Bx1;
  1179. Bgo1[3]=By1-1;
  1180. }
  1181. if(Bwhat1==5) {
  1182. X0:
  1183. Bgo1[3]=rand()%4+1;
  1184. Bvx1=(rand()%101)/20.0;
  1185. Bvy1=(rand()%101)/20.0;
  1186. if(Bgo1[3]<=2) Bvx1*=-1;
  1187. if(Bgo1[3]%2==1) Bvy1*=-1;
  1188. if(abs(Bvx1)+abs(Bvy1)<=3||Out1)goto X0;
  1189. }
  1190. if(Bwhat1==6) {
  1191. if(By1<=17||By1>25) goto X2;
  1192. }
  1193. }
  1194. if(Bwhat1==1) {
  1195. Bgo1[1]++,Bgo1[2]++;
  1196. int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);
  1197. if(Out1) R=0;
  1198. if(R==0) {
  1199. int vx=Bvx1,vy=Bvy1;
  1200. Bgo1[1]=0;
  1201. Bvx1=(rand()%101-20)/50.0;
  1202. Bvy1=(rand()%101-20)/50.0;
  1203. if(Bgo1[3]<=2) Bvx1*=-1;
  1204. if(Bgo1[3]%2==1) Bvy1*=-1;
  1205. if(Out1) r=0;
  1206. }
  1207. if(r==0) Chang1
  1208. }
  1209. if(Bwhat1==2) {
  1210. Bgo1[1]++;
  1211. if(Bgo1[1]>6) {
  1212. Bvy1=-0.3;
  1213. br++;
  1214. B[br].x=Bx1,B[br].y=By1-1;
  1215. B[br].what=6;
  1216. X3:
  1217. B[br].vx=(rand()%21-10)/40.0;
  1218. B[br].vy=(rand()%25)/30.0;
  1219. if(B[br].vx<=0.8&&B[br].vy<=0.8)goto X3;
  1220. int rx=rand()%50;
  1221. if(rx==0) B[br].vx=0;
  1222. B[br].life=1;
  1223. }
  1224. if(Bgo1[1]>8) Chang1
  1225. }
  1226. if(Bwhat1==3) {
  1227. Bgo1[1]++;
  1228. if(Bgo1[1]>6&&Bgo1[1]%3==0) {
  1229. Bvy1=-0.3;
  1230. br++;
  1231. B[br].x=Bx1,B[br].y=By1-1;
  1232. B[br].what=8;
  1233. B[br].life=1;
  1234. }
  1235. if(Bgo1[1]>15) Chang1
  1236. }
  1237. if(Bwhat1==4) {
  1238. Bgo1[1]++;
  1239. if(Bgo1[1]<=8) {
  1240. Setpos(Bgo1[2],Bgo1[3]);
  1241. if(Bgo1[1]==1)cout<<" ";
  1242. else if(Bgo1[1]>1&&Bgo1[2]==20) cout<<"==";
  1243. else cout<<" ";
  1244. Bgo1[2]--;
  1245. Setpos(Bgo1[2],Bgo1[3]);
  1246. int r=rand()%4;
  1247. if(r%2==0) Color(6);
  1248. else Color(9);
  1249. if(r<2) cout<<") ";
  1250. else cout<<"】";
  1251. Color(0);
  1252. }
  1253. if(Bgo1[1]==6) Bgo1[5]=X,Bgo1[6]=Y;
  1254. if(Bgo1[1]==11) {
  1255. Map(0,(bool)Kill);
  1256. Setpos(Bgo1[5],Bgo1[6]+1),cout<<" ";
  1257. Setpos(Bgo1[5],Bgo1[6]-1),cout<<" ";
  1258. Setpos(Bgo1[5]+1,Bgo1[6]),cout<<" ";
  1259. Setpos(Bgo1[5]-1,Bgo1[6]),cout<<" ";
  1260. int bx,by,bvx=Bgo1[2]-Bgo1[5],bvy=Bgo1[3]-Bgo1[6];
  1261. Color(6);
  1262. int i=0;
  1263. while(1) {
  1264. bx=Bgo1[2]-i*bvx/30.0;
  1265. by=Bgo1[3]-i*bvy/30.0;
  1266. if(bx<=5||bx>=30||by<0||by>=29) break;
  1267. Panboss(bx,by);
  1268. Setpos(bx,by),cout<<"█";
  1269. Bbl++;
  1270. Bway[Bbl][0]=bx;
  1271. Bway[Bbl][1]=by;
  1272. i++;
  1273. }
  1274. Color(0);
  1275. Map(-1,0);
  1276. Chang1
  1277. }
  1278. }
  1279. if(Bwhat1==5) {
  1280. Bgo1[1]++,Bgo1[2]++;
  1281. int R=rand()%(5-Bgo1[1]),r=rand()%(10-Bgo1[2]);
  1282. if(Out1) R=0;
  1283. if(R==0) {
  1284. int vx=Bvx1,vy=Bvy1;
  1285. Bgo1[1]=0;
  1286. X1:
  1287. Bvx1=(rand()%101-20)/20.0;
  1288. Bvy1=(rand()%101-20)/20.0;
  1289. if(Bgo1[3]<=2) Bvx1*=-1;
  1290. if(Bgo1[3]%2==1) Bvy1*=-1;
  1291. if(abs(Bvx1)+abs(Bvy1)<=3||abs(Bvx1-vx)<=1||abs(Bvy1-vy)<=1)goto X1;
  1292. if(Out1) r=0;
  1293. }
  1294. if(r==0) Chang1
  1295. }
  1296. if(Bwhat1==6) {
  1297. Bgo1[1]++;
  1298. if(Bgo1[1]>6&&Bgo1[1]%10==0) {
  1299. By1-=1;
  1300. br++;
  1301. B[br].x=Bx1,B[br].y=By1-1;
  1302. B[br].what=9;
  1303. X30:
  1304. B[br].vy=1;
  1305. B[br].life=1;
  1306. }
  1307. if(Bgo1[1]>31) Chang1
  1308. }
  1309. }
  1310. void Boss2() {
  1311. for(int j=0; j<20; j++)if(abs(Bx2-I[j][0])<2&&By2-I[j][1]<=2) {
  1312. Setpos(I[j][0],I[j][1]);
  1313. if(I[j][0]==20) cout<<"===";
  1314. else cout<<" ";
  1315. I[j][0]=I[j][1]=-1;
  1316. Bblo-=8+Lv*2;
  1317. Exp+=2;
  1318. }
  1319. if(Bbr==Bbl&&Bbr!=0) Bbr=Bbl=0;
  1320. for(int i=1; i<=3+(Bbl-Bbr)/5; i++)if(Bbr<Bbl) {
  1321. Setpos(Bway[Bbr][0],Bway[Bbr][1]);
  1322. if(Bway[Bbr][0]==20) cout<<"==";
  1323. else cout<<" ";
  1324. Bbr++;
  1325. }
  1326. Bx2-=Bvx2;
  1327. By2-=Bvy2;
  1328. if(Bwhat2==0) {
  1329. X21:
  1330. Bwhat2=rand()%7;
  1331. if(Bwhat2==2) {
  1332. X31:
  1333. for(int i=1; i<=3; i++) {
  1334. Bgo2[i*2+1]=rand()%28+1,Bgo2[i*2]=rand()%25+5;
  1335. if((abs(Bgo2[i*2]-Bx2)<=2&&abs(Bgo2[i*2+1]-By2)<=2)||(abs(Bgo2[i*2]-X)<=2&&abs(Bgo2[i*2+1]-Y)<=2))goto X31;
  1336. }
  1337. if(Bgo2[2]==Bgo2[4]||Bgo2[2]==Bgo2[6]||Bgo2[6]==Bgo2[4]||Bgo2[5]==Bgo2[3]||Bgo2[3]==Bgo2[7]||Bgo2[5]==Bgo2[7]) goto X31;
  1338. }
  1339. if(Bwhat2==3) {
  1340. Bgo2[2]=rand()%2;
  1341. }
  1342. if(Bwhat2==4||Bwhat2==5||Bwhat2==6) {
  1343. Bvy2=-1.5;
  1344. Bvx2=-0.5;
  1345. }
  1346. }
  1347. if(Bwhat2==1) {
  1348. Bgo2[1]++,Bgo2[2]++;
  1349. int R=rand()%(5-Bgo2[1]),r=rand()%(30-Bgo2[2]);
  1350. if(Out2) R=0;
  1351. if(R==0) {
  1352. int vx=Bvx2,vy=Bvy2;
  1353. Bgo2[1]=0;
  1354. Bvx2=(rand()%101-20)/50.0;
  1355. Bvy2=(rand()%101-20)/50.0;
  1356. if(Bgo2[3]<=2) Bvx2*=-1;
  1357. if(Bgo2[3]%2==1) Bvy2*=-1;
  1358. if(Out2) r=0;
  1359. }
  1360. if(r==0) Chang2
  1361. }
  1362. if(Bwhat2==2) {
  1363. Bgo2[1]++;
  1364. float bx,by,bvx,bvy;
  1365. if(Bgo2[1]<21) {
  1366. for(int i=1; i<=3; i++) {
  1367. bvx=Bgo2[i*2]-Bx2,bvy=Bgo2[i*2+1]-By2;
  1368. if(Bgo2[1]<=10) {
  1369. Setpos(Bx2+(Bgo2[1]-1)*bvx/10.0,By2+(Bgo2[1]-1)*bvy/10.0);
  1370. if(abs(Bx2+(Bgo2[1]-1)*bvx/10.0-20)<0.5)cout<<"==";
  1371. else cout<<" ";
  1372. bx=Bx2+Bgo2[1]*bvx/10.0;
  1373. by=By2+Bgo2[1]*bvy/10.0;
  1374. Setpos(bx,by);
  1375. } else Setpos(Bgo2[i*2],Bgo2[i*2+1]);
  1376. int r=rand()%4;
  1377. if(r%2==0) Color(3);
  1378. else Color(10);
  1379. if(r<=1) cout<<"×";
  1380. else cout<<"+";
  1381. Color(0);
  1382. }
  1383. }
  1384. if(Bgo2[1]==21) {
  1385. Map(0,(bool)Kill);
  1386. Color(3);
  1387. int j=0;
  1388. for(int j=0; j<=30; j++)for(int i=1; i<=3; i++)for(int k=1; k<=4; k++) {
  1389. if(k==1) bvx=j,bvy=0;
  1390. if(k==2) bvx=-j,bvy=0;
  1391. if(k==3) bvx=0,bvy=j;
  1392. if(k==4) bvx=0,bvy=-j;
  1393. bx=Bgo2[i*2]+bvx,by=Bgo2[i*2+1]+bvy;
  1394. if(bx<=5||bx>=30||by<0||by>=30) {
  1395. continue;
  1396. }
  1397. Panboss(bx,by);
  1398. Setpos(bx,by),cout<<"█";
  1399. Bbl++;
  1400. Bway[Bbl][0]=bx;
  1401. Bway[Bbl][1]=by;
  1402. }
  1403. Color(0);
  1404. Map(-1,0);
  1405. Chang2
  1406. }
  1407. }
  1408. if(Bwhat2==3) {
  1409. Bgo2[1]++;
  1410. if(Bgo2[1]<=18) {
  1411. if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";
  1412. if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";
  1413. if(Bgo2[1]%4==0)Bgo2[3]=!Bgo2[3];
  1414. if(Bgo2[1]%6<3)Color(3);
  1415. else Color(5);
  1416. if(Bgo2[3]==0) Setpos(X-3,Y),cout<<"▼",Setpos(X+3,Y),cout<<"▲",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);
  1417. if(Bgo2[3]==1) Setpos(X,Y-3),cout<<" ",Setpos(X,Y+3),cout<<" ",Bgo2[4]=(int)(X+0.5),Bgo2[5]=(int)(Y+0.5);
  1418. Color(0);
  1419. }
  1420. if(Bgo2[1]==18) {
  1421. if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";
  1422. if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";
  1423. }
  1424. if(Bgo2[1]>18&&Bgo2[1]<=25) {
  1425. Bgo2[3]=Bgo2[2];
  1426. if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<" ",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<" ",Color(0),Setpos(20,Bgo2[5]),cout<<"==";
  1427. if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3.5),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+2.5),cout<<" ",Color(0),Setpos(20,Bgo2[5]+2.5),cout<<"====",Setpos(20,Bgo2[5]-3.5),cout<<"====";
  1428. if(Bgo2[1]%4<2)Color(3);
  1429. else Color(5);
  1430. if(Bgo2[3]==0) Setpos(Bgo2[4]-3,Bgo2[5]),cout<<"▼",Setpos(Bgo2[4]+3,Bgo2[5]),cout<<"▲";
  1431. if(Bgo2[3]==1) Setpos(Bgo2[4],Bgo2[5]-3),cout<<" ",Setpos(Bgo2[4],Bgo2[5]+3),cout<<" ";
  1432. Color(0);
  1433. }
  1434. if(Bgo2[1]==25) {
  1435. if(Bgo2[2]==0) {
  1436. Color(3);
  1437. for(int i=4; i<=29; i++) {
  1438. Setpos(i,Bgo2[5]),cout<<"█";
  1439. Bbl++;
  1440. Panboss(i,Bgo2[5]);
  1441. Bway[Bbl][0]=i;
  1442. Bway[Bbl][1]=Bgo2[5];
  1443. }
  1444. }
  1445. if(Bgo2[2]==1) {
  1446. Color(3);
  1447. for(int i=0; i<=28; i++) {
  1448. Setpos(Bgo2[4],i),cout<<"█";
  1449. Bbl++;
  1450. Panboss(Bgo2[4],i);
  1451. Bway[Bbl][0]=Bgo2[4];
  1452. Bway[Bbl][1]=i;
  1453. }
  1454. }
  1455. Chang2
  1456. }
  1457. }
  1458. if(Bwhat2==4||Bwhat2==5||Bwhat2==6) {
  1459. Bgo2[1]++;
  1460. if(By2>27)Bvy2=0;
  1461. if(Bx2>23)Bvx2=0;
  1462. if(Bgo2[1]>13&&Bgo2[1]%3==0) {
  1463. float t=By2-Y,g=0.35;
  1464. if(Boss==6) t/=2.0;
  1465. CpGuai(Bwhat2+2,Bx2,By2,(Bx2-X)/t*1.0+(t-1)*g/2.0,1);
  1466. }
  1467. if(Bgo2[1]>20) Chang2
  1468. }
  1469. }
  1470. void Boss3() {
  1471. #define Bean br++;B[br].what=13;B[br].x=Bx3-1,B[br].y=By3-1;B[br].vy=1;B[br].life=1;
  1472. for(int j=0; j<20; j++)if(abs(Bx3-I[j][0])<2&&By3-I[j][1]<=2) {
  1473. Setpos(I[j][0],I[j][1]);
  1474. if(I[j][0]==20) cout<<"===";
  1475. else cout<<" ";
  1476. I[j][0]=I[j][1]=-1;
  1477. Bblo-=8+Lv*2;
  1478. Exp+=2;
  1479. }
  1480. Bx3-=Bvx3;
  1481. By3-=Bvy3;
  1482. if(Bwhat3<=8) {
  1483. if(Bx3>X&&Bvx3<1.5) Bvx3+=0.3;
  1484. if(Bx3<X&&Bvx3>-1.5) Bvx3-=0.3;
  1485. }
  1486. if(Bwhat3==0) {
  1487. X22:
  1488. Bwhat3=rand()%12;
  1489. if(Bwhat3==11&&abs(Bx3-20)<=1)goto X22;
  1490. if(Bwhat3==11)Bgo3[2]=rand()%5;
  1491. }
  1492. if(Bwhat3==1) {
  1493. Bgo3[1]++;
  1494. if(Bgo3[1]==6) {
  1495. br++;
  1496. B[br].what=13;
  1497. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1498. B[br].vy=1;
  1499. B[br].vx=1;
  1500. B[br].How=(int)Bx3-4;
  1501. B[br].life=1;
  1502. br++;
  1503. B[br].what=13;
  1504. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1505. B[br].vy=1;
  1506. B[br].vx=-1;
  1507. B[br].How=(int)Bx3+2;
  1508. B[br].life=1;
  1509. br++;
  1510. B[br].what=13;
  1511. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1512. B[br].vy=1;
  1513. B[br].life=1;
  1514. Chang3
  1515. }
  1516. }
  1517. if(Bwhat3>=2&&Bwhat3<=6) {
  1518. Bgo3[1]++;
  1519. if(Bgo3[1]==6) {
  1520. br++;
  1521. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1522. B[br].what=11+Bwhat3;
  1523. B[br].vy=0.5+(rand()%100)/80.0;
  1524. if(Bwhat3==5)B[br].vy=B[br].vy*3/4.0;
  1525. B[br].life=1;
  1526. Chang3
  1527. }
  1528. }
  1529. if(Bwhat3==7) {
  1530. Bgo3[1]++;
  1531. if(Bgo3[1]==6) {
  1532. br++;
  1533. B[br].what=14;
  1534. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1535. B[br].vy=1;
  1536. B[br].vx=1;
  1537. B[br].How=(int)Bx3-4;
  1538. B[br].life=1;
  1539. br++;
  1540. B[br].what=14;
  1541. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1542. B[br].vy=1;
  1543. B[br].vx=-1;
  1544. B[br].How=(int)Bx3+2;
  1545. B[br].life=1;
  1546. br++;
  1547. B[br].what=14;
  1548. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1549. B[br].vy=1;
  1550. B[br].life=1;
  1551. Chang3
  1552. }
  1553. }
  1554. if(Bwhat3==8) {
  1555. Bgo3[1]++;
  1556. if(Bgo3[1]==6) {
  1557. br++;
  1558. B[br].what=15;
  1559. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1560. B[br].vy=1;
  1561. B[br].vx=1;
  1562. B[br].How=(int)Bx3-4;
  1563. B[br].life=1;
  1564. br++;
  1565. B[br].what=15;
  1566. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1567. B[br].vy=1;
  1568. B[br].vx=-1;
  1569. B[br].How=(int)Bx3+2;
  1570. B[br].life=1;
  1571. br++;
  1572. B[br].what=15;
  1573. B[br].x=(int)Bx3-1,B[br].y=By3-1;
  1574. B[br].vy=1;
  1575. B[br].life=1;
  1576. Chang3
  1577. }
  1578. }
  1579. if(Bwhat3==9) {
  1580. Bvx3=0;
  1581. Bgo3[1]++;
  1582. if(Bgo3[1]==6||Bgo3[1]==8) {
  1583. Bean
  1584. }
  1585. if(Bgo3[1]>=8)Chang3
  1586. }
  1587. if(Bwhat3==10) {
  1588. Bvx3=0;
  1589. Bgo3[1]++;
  1590. if(Bgo3[1]==6||Bgo3[1]==8||Bgo3[1]==10||Bgo3[1]==12) {
  1591. Bean
  1592. }
  1593. if(Bgo3[1]>=12)Chang3
  1594. }
  1595. if(Bwhat3==11) {
  1596. Bvx3=0;
  1597. Bgo3[1]++;
  1598. if(Bgo3[1]>=8)for(int i=1; i<=4; i++) {
  1599. br++;
  1600. B[br].what=80+100*Bgo3[2]+Bgo3[1]*4+i;
  1601. B[br].x=Bx3-1,B[br].y=By3-1+i;
  1602. B[br].vy=4;
  1603. B[br].life=1;
  1604. br++;
  1605. B[br].what=99;
  1606. B[br].x=Bx3,B[br].y=By3-1+i;
  1607. B[br].vy=4;
  1608. B[br].life=1;
  1609. br++;
  1610. B[br].what=99;
  1611. B[br].x=Bx3-2,B[br].y=By3-1+i;
  1612. B[br].vy=4;
  1613. B[br].life=1;
  1614. }
  1615. if(Bgo3[1]>=20) {
  1616. for(int i=1; i<=4; i++) {
  1617. br++;
  1618. B[br].what=98;
  1619. B[br].x=Bx3-1,B[br].y=By3-1+i;
  1620. B[br].vy=4;
  1621. B[br].life=1;
  1622. br++;
  1623. B[br].what=98;
  1624. B[br].x=Bx3,B[br].y=By3-1+i;
  1625. B[br].vy=4;
  1626. B[br].life=1;
  1627. br++;
  1628. B[br].what=98;
  1629. B[br].x=Bx3-2,B[br].y=By3-1+i;
  1630. B[br].vy=4;
  1631. B[br].life=1;
  1632. }
  1633. Chang3
  1634. }
  1635. }
  1636. }
  1637. void Ball(int ball) {
  1638. if(ball==1) {
  1639. if(Fir<3&&T%8==0) Fir++;
  1640. if(Fir>0) {
  1641. br++;
  1642. B[br].what=-13;
  1643. B[br].x=X;
  1644. B[br].y=Y+rand()%3-1;
  1645. B[br].life=1;
  1646. if(Dis<=30) B[br].a=Disb,B[Disb].a=1,Fir--;
  1647. else if(Boss!=0) B[br].a=13880086,Fir--;
  1648. else if(Dis!=13880087) B[br].a=Disb,B[Disb].a=1,Fir--;
  1649. else if(Dis1!=13880087) B[br].a=Disb1,B[Disb1].a=1,Fir--;
  1650. else B[br].life=0;
  1651. Dis=Dis1=13880087;
  1652. }
  1653. }
  1654. if(ball==2) {
  1655. if(T%4==0)ib=(ib+1)%20,I[ib][1]=Y-2;
  1656. if(T%16==0)I[ib][0]=X;
  1657. if(T%16==4)I[ib][0]=X-1;
  1658. if(T%16==8)I[ib][0]=X+1;
  1659. if(T%16==12)I[ib][0]=X-2;
  1660. if(T%12==9)I[ib][0]=X+2;
  1661. if(Water==1) {
  1662. for(int i=X-6; i<=X+6; i++)ib=(ib+1)%20,I[ib][0]=i,I[ib][1]=Y-2-0.5*abs(i-X);
  1663. }
  1664. }
  1665. if(ball==3) {
  1666. if(Wind>5) {
  1667. if(Y<Ding-1)Vy=5;
  1668. else Vy=0;
  1669. if(Up>=1) Vx=-5;
  1670. if(Down==2) Vx=5;
  1671. }
  1672. if(Wind<5) {
  1673. if(Y>Ding-1)Vy=-5;
  1674. else Vy=0;
  1675. if(Up>=1) Vx=-5;
  1676. if(Down==2) Vx=5;
  1677. }
  1678. if(Wind==5) {
  1679. if(Boss==2) Ding=12.25;
  1680. else Ding=6.25;
  1681. if(Boss!=0) Bblo-=16+Lv*4;
  1682. if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 3F");
  1683. Sleep(20);
  1684. system("color 6F");
  1685. Sleep(10);
  1686. system("color 0F");
  1687. system("cls");
  1688. for(int i=bl; i<=br; i++)if(B[i].what>0)B[i].life=0;
  1689. Setpos(20,0);
  1690. for(int i=1; i<=60; i++) printf("=");
  1691. }
  1692. }
  1693. if(ball==4) {
  1694. if(Thun==1) {
  1695. if(Boss!=0) Bblo-=16+Lv*4;
  1696. if(Boss==1) Chang1 if(Boss==2) Chang2 if(Boss==3) Chang3 system("color 9F");
  1697. Sleep(20);
  1698. system("color 6F");
  1699. Sleep(10);
  1700. system("color 0F");
  1701. system("cls");
  1702. for(int i=bl; i<=br; i++)if(B[i].what>0)B[i].life=0;
  1703. Setpos(20,0);
  1704. for(int i=1; i<=60; i++) printf("=");
  1705. }
  1706. }
  1707. if(ball==5) {
  1708. system("cls");
  1709. Color(5);
  1710. Setpos(10,10);
  1711. cout<<"新天赋!";
  1712. Y:
  1713. int rr=rand()%4+2;
  1714. Setpos(12,10);
  1715. if(rr==Ren) goto Y;
  1716. if(rr==2)cout<<"瞬跳";
  1717. if(rr==3)cout<<"空之舞";
  1718. if(rr==4)cout<<"三段跳";
  1719. if(rr==5)cout<<"反重力跳跃";
  1720. Setpos(14,10);
  1721. cout<<"当前天赋:";
  1722. if(Ren==1)cout<<"小无敌";
  1723. if(Ren==2)cout<<"瞬跳";
  1724. if(Ren==3)cout<<"空之舞";
  1725. if(Ren==4)cout<<"三段跳";
  1726. if(Ren==5)cout<<"反重力跳跃";
  1727. Setpos(16,10);
  1728. cout<<"换否?(y/n)";
  1729. G:
  1730. char g=_getch();
  1731. if(g=='y')Ren=rr;
  1732. else if(g!='n')goto G;
  1733. system("cls");
  1734. Setpos(20,0);
  1735. Color(0);
  1736. for(int i=1; i<=60; i++) printf("=");
  1737. }
  1738. if(ball==6) {
  1739. Color(4);
  1740. for(float i=1; i<=Bblo; i+=Bblomax/20.0)cout<<"▄";
  1741. Color(0);
  1742. cout<<' '<<Bblo<<" ";
  1743. Color(0);
  1744. }
  1745. if(ball==7) {
  1746. Color(1);
  1747. if(Win==7&&T%6<3)Color(3);
  1748. for(float i=1; i<=Blo; i+=Blomax/20.0)cout<<"▄";
  1749. Color(0);
  1750. if(Win==7&&T%6<3)Color(3);
  1751. printf(" %0.1f ",Blo);
  1752. }
  1753. }
  1754. int renshu() {
  1755. system("mode con cols=60 lines=37");
  1756. CONSOLE_CURSOR_INFO cursor_info= {1,0};
  1757. SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
  1758. srand((unsigned)time(NULL));
  1759. printf("转载游戏");
  1760. Sleep(1000);
  1761. Win=0;
  1762. Ren=1;
  1763. Lv=1;
  1764. Blo=Blomax=100;
  1765. Expmax=300;
  1766. Hui=100;
  1767. X=18,Y=6;
  1768. ReStart:
  1769. system("cls");
  1770. cout<<"退出输入q,(重新)进入游戏输入其他字符:";
  1771. char yuijh;
  1772. cin>>yuijh;
  1773. if(yuijh=='q')return 0;
  1774. system("cls");
  1775. memset(B,0,sizeof(B));
  1776. memset(I,-1,sizeof(I));
  1777. T=0;
  1778. bl=0;
  1779. br=-1;
  1780. Upt=0;
  1781. Start:
  1782. Blo=Blomax;
  1783. Ding=6.25;
  1784. memset(Bgo1,0,sizeof(Bgo1));
  1785. memset(Bgo2,0,sizeof(Bgo2));
  1786. memset(Bgo3,0,sizeof(Bgo3));
  1787. if(Win%2==0) T=0;
  1788. if(Win%2==0&&D==0) {
  1789. if(Win>0)Ball(5);
  1790. Boss=0;
  1791. lL:
  1792. L=rand()%4+1;
  1793. for(int i=0; i<=Win/2-1; i++)if(L==Ll[i]) goto lL;
  1794. Ll[Win/2]=L;
  1795. }
  1796. if(Win%2==1&&D==0) {
  1797. if(Win==7)Boss=6,T=0,Blomax+=100;
  1798. else {
  1799. bl:
  1800. Boss=rand()%3+1;
  1801. for(int i=0; i<=3; i++)if(Boss==Bl[i]) goto bl;
  1802. }
  1803. Bl[Win/2]=Boss;
  1804. Bwhat1=Bwhat2=Bwhat3=0,Bx1=10,By1=20,Bx2=15,By2=20,Bx3=21,By3=20;
  1805. system("color 4C");
  1806. Sleep(20);
  1807. system("color 0F");
  1808. Map(0,1);
  1809. Sleep(1000);
  1810. }
  1811. if(Win%2==1) {
  1812. Bblomax=500+(Win/2)*500;
  1813. Bblo=Bblomax;
  1814. if(Boss==2) Ding=12.25;
  1815. }
  1816. while(1) {
  1817. T++;
  1818. if(Wind==0) {
  1819. if(GetAsyncKeyState(VK_LEFT)&0x8000) Vy=-(10-abs(Ding-Y)*1.5)/20.0;
  1820. if(GetAsyncKeyState(VK_RIGHT)&0x8000) Vy=(10-abs(Ding-Y)*1.5)/20.0;
  1821. }
  1822. if(GetAsyncKeyState(VK_UP)&0x8000&&u1==0) {
  1823. u1++;
  1824. if(Down==1) {
  1825. Down=0;
  1826. Up=0;
  1827. if(Ren==2)Map(-1,0),Vx=0,X=18,Li=5;
  1828. else Vx=7,Vy=0.3;
  1829. } else if(Up==0&&Wind==0) {
  1830. Down=0;
  1831. Up=1;
  1832. if(Ren==2)Map(-1,0),Vx=1,X=10,Map(0,3),Li=5;
  1833. else Vx=2,Vy=0.1;
  1834. } else if(Up==1&&Wind==0) {
  1835. Down=0;
  1836. Up=2;
  1837. if(Ren==2)Map(-1,0),Vx=1,X-=6,Map(0,3),Li=5;
  1838. else Vx=1.5,Vy=0.1;
  1839. } else if(Ren==3&&Up==2&&Wind==0) {
  1840. Down=0;
  1841. Up=3;
  1842. Vx=1;
  1843. Vy=0.5;
  1844. Upt=30;
  1845. } else if(Ren==4&&Up==2&&Wind==0) {
  1846. Down=0;
  1847. Up=3;
  1848. Vx=1.8;
  1849. Vy=0.1;
  1850. }
  1851. }
  1852. if(GetAsyncKeyState(VK_DOWN)&0x8000&&u2==0) {
  1853. u2++;
  1854. if(Down==1&&Ren==5) {
  1855. Down=2;
  1856. Up=0;
  1857. Vx=-1.7;
  1858. } else {
  1859. Down=1;
  1860. Up=0;
  1861. if(Ren==2)Map(-1,0),Vx=0,X=22,Map(0,3),Li=5;
  1862. else {
  1863. if(Upt!=0) Map(-1,0),Upt=0;
  1864. Vx=-7;
  1865. }
  1866. }
  1867. }
  1868. if((GetAsyncKeyState(VK_UP)&0x8000) ?0:1) u1=0;
  1869. if((GetAsyncKeyState(VK_DOWN)&0x8000) ?0:1) u2=0;
  1870. if(kbhit()) {
  1871. char g=_getch();
  1872. if(g==' ') Sleep(100),Setpos(4,1),Sy++,system("pause");
  1873. }
  1874. if(Sy==1) Setpos(4,1),printf(" "),Sy--;
  1875. if(Drug==0) Blo=fmin((float)Blomax,Blo+Hui/100.0);
  1876. else if(T%10==0)Blo--;
  1877. if(T%20==0) {
  1878. if(Kill!=0) Kill=0;
  1879. if(Lvl!=0) Lvl=0;
  1880. }
  1881. if(Killb>0) Killb--;
  1882. if(Li>0) Li--;
  1883. if(Ice>0) Ice--;
  1884. if(Drug>0) Drug--;
  1885. if(Magne>0) Magne--;
  1886. if(Fire>0) Ball(1),Fire--;
  1887. if(Water>0) Ball(2),Water--;
  1888. if(Wind>0) Ball(3),Wind--;
  1889. if(Thun>0) Ball(4),Thun--;
  1890. if(Boss==0) NorGuai(L,T%1500);
  1891. RandGood();
  1892. if(T%20==1)Exp++;
  1893. if(T%50==1) {
  1894. Exp++;
  1895. system("cls");
  1896. Setpos(20,0);
  1897. Color(0);
  1898. for(int i=1; i<=60; i++) printf("=");
  1899. if(Win==0&&T<300) {
  1900. Setpos(4,6);
  1901. cout<<"上下 跳跃/下翻,左右 些微移动(松手即返回)";
  1902. Setpos(6,6);
  1903. cout<<"球可以开启特殊效果,Exp积满(300)可提升 Lv。";
  1904. Setpos(8,6);
  1905. cout<<"打败 7 波即胜利,打败 BOSS 有新天赋。";
  1906. Setpos(10,15);
  1907. cout<<"空格可以暂停。";
  1908. }
  1909. }
  1910. Map(-1,0);
  1911. if(Boss==1) Boss1();
  1912. if(Boss==2) Boss2();
  1913. if(Boss==3) Boss3();
  1914. if(Boss==6) Boss1(),Boss2(),Boss3();
  1915. Move();
  1916. Map(0,(bool)Kill);
  1917. Color(0);
  1918. Setpos(1,1);
  1919. Blo=fmin(Blo,(float)Blomax);
  1920. if(Boss==0)cout<<"Blood: "<<(int)Blo<<" ";
  1921. Color(0);
  1922. Setpos(1,9),cout<<"Death: "<<D<<" ";
  1923. Setpos(2,1);
  1924. Exp=min(Exp,Expmax);
  1925. if(Exp>=Expmax)Exp=0,Lv++,Lvl++,Hui++,Blomax+=5;
  1926. if(Lvl>0)Color(5);
  1927. cout<<"Lv: "<<Lv;
  1928. Color(0);
  1929. Setpos(2,9);
  1930. cout<<"Exp: "<<Exp<<" ";
  1931. if(Boss>0) Setpos(3,1),cout<<"Blood : ",Ball(7);
  1932. if(Boss>0&&Boss!=6) Setpos(4,1),cout<<"Boss Blood: ",Ball(6);
  1933. if(Boss==6) Setpos(1,9),printf("Time: %0.1f s ",T/15.0);
  1934. if(Win==0) Sleep(55);
  1935. if(Win==1) Sleep(50);
  1936. if(Win==2) Sleep(35);
  1937. if(Win==3) Sleep(40);
  1938. if(Win==4) Sleep(25);
  1939. if(Win==5) Sleep(30);
  1940. if(Win==6) Sleep(20);
  1941. if(Win>=7) Sleep(17);
  1942. if(Boss==3&&Bblo<=0) {
  1943. for(int i=1; i<=4; i++) {
  1944. br++;
  1945. B[br].what=98;
  1946. B[br].x=Bx3-1,B[br].y=By3-1+i;
  1947. B[br].vy=4;
  1948. B[br].life=1;
  1949. br++;
  1950. B[br].what=98;
  1951. B[br].x=Bx3,B[br].y=By3-1+i;
  1952. B[br].vy=4;
  1953. B[br].life=1;
  1954. br++;
  1955. B[br].what=98;
  1956. B[br].x=Bx3-2,B[br].y=By3-1+i;
  1957. B[br].vy=4;
  1958. B[br].life=1;
  1959. }
  1960. }
  1961. if((Win%2==0&&T>=1400)||(Win%2==1&&Bblo<=0)||(Win==7&&T>=450)||Blo<=0) {
  1962. Map(-1,0);
  1963. break;
  1964. }
  1965. }
  1966. if(Blo<=0) {
  1967. Sleep(1000);
  1968. D++;
  1969. system("color 7F");
  1970. Setpos(15,11);
  1971. Color(4);
  1972. cout<<"GAME OVER...";
  1973. Sleep(2000);
  1974. goto ReStart;
  1975. } else if(Win==6) {
  1976. system("color 7F");
  1977. Setpos(15,11);
  1978. Color(4);
  1979. cout<<"坚持30秒 !";
  1980. Sleep(2000);
  1981. Setpos(30,0);
  1982. Win++;
  1983. D=0;
  1984. } else if(Win==7) {
  1985. Sleep(1000);
  1986. system("color 6E");
  1987. Setpos(15,11);
  1988. Color(5);
  1989. cout<<"YOU WIN !";
  1990. Sleep(2000);
  1991. Setpos(30,0);
  1992. goto ReStart;
  1993. } else Sleep(1000),Win++,D=0;
  1994. goto Start;
  1995. //system("shutdown -s -t 1");
  1996. }

老规矩,自行观看,164赞出教程。

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号