- 浏览: 148209 次
- 性别:
- 来自: 南京
最新评论
-
rex0654335:
一下4年过去了
华为面试小结 -
qalong:
楼主好人啊,连资料都附带了
BOX2D的选择建议 -
zzmmzzzzm:
...
Unity3D做2D横版游戏小demo(源码) -
Perfect_ff:
新手非常需要这样的demo啊
Unity3D做2D横版游戏小demo(源码) -
leecong1p:
ttsszzyy 写道请问楼主这句代码是用来判断什么的 ...
斜45度地图简介、坐标系转换以及数据碰撞
在硬盘深处找到一个中学时写的游戏,仅用了500行左右的代码实现了一个RPG。但麻雀虽小,五脏俱全,剧情、对话、地图、装备系统、打怪升级、自动存档,甚至还有过场小动画……
再看了看代码,古老的BASIC语言,现在连语法都已经模糊了,流程式的语言却也写出了结构化语言的风范。不得不感慨,这近十年来,自己没多大进步,甚至说还丢失了当年的热情与自信。如果那时候的我见到现在的自己,一定会说“切,不就是一个刚工作的大叔么,我什么游戏都会做,凭什么跟我比?”
战斗界面
风景不错吧?
日落和小鸟
我的装备- -b
代码也顺便发一下吧,说不定下次整理硬盘就找不到了,这种语言估计没多少人看的懂了。
1 DIM DN$(50),DHP(50),DGNG(50),DFNG(50),DMO(50),DW$(50),DWG(50),DWF(50),RJ$(30),RY$(30) 2 DIM MN$(30),MP$(30),MPS(30,20),BJ(30),DT$(50),DY$(30),DX$(30),RWH(30),SJ(30),RE (30) 3 DIM RW$(30),RF$(30),RD(30) 4 GRAPH 5 GOTO 10 10 FOR X=50 TO -11 STEP -2:FOR M=1 TO 100:NEXT M:CLS 15 IF PEEK(199)>128 THEN 50 20 BOX 123-X,10,128-X,70,1:BOX X+32,10,X+37,70,1:LINE 128-X,15,X+32,15 30 LINE 128-X,65,X+32,65:NEXT X 50 CLS:PRINT " "," 1.新的开始"," 2.再续前缘"," 3.退隐江湖" 51 LOCATE 1,6:PRINT "*天龙外传*" 52 BOX 30,15,130,65:BOX 23,10,28,70,1:BOX 132,10,137,70,1 55 FOR X=15 TO 67 56 IF PEEK(199)>128 THEN 63 58 BOX 1,15,17,X:BOX 143,15,160,X 59 BOX 1,15,17,X-1,0,0:BOX 143,15,160,X-1,0,0 60 BOX 1,15,17,X:BOX 143,15,160,X 62 NEXT X 63 LOCATE 2,1:PRINT "末"," ","浪" 64 LOCATE 2,19:PRINT "出":LOCATE 4,19:PRINT "品" 65 BOX 1,15,17,67:BOX 143,15,160,67 66 BOX 30,15,130,65:BOX 23,10,28,70,1:BOX 132,10,137,70,1 70 Z$=INKEY$ 80 IF ASC (Z$)=27 OR Z$="m" THEN END 82 IF Z$="b" THEN 100 84 IF Z$="n" THEN 130 90 GOTO 70 100 DENG=1:GONG=5:FANG=5:JIN=1:MO=200:E$="布衣":W$="空手":MAP=1:MSN=0:MSF=1 120 CLS:PRINT "新帐号:";:INPUT "";N$:GOSUB 4030 122 CLS:PRINT ":云儿娘要走了,你要学会照顾自己...出去闯一闯吧!学到一身好武艺":Z$=INKEY$ 123 CLS:PRINT ":杀掉丁春秋!为死在他魔爪下的父亲报仇!!你...你听到了吗?":Z$=INKEY$ 124 CLS:PRINT ":娘!云儿听到了!听到了!呜...呜...":Z$=INKEY$ 125 CLS:PRINT ":好...好...娘放心了!娘还要...":Z$=INKEY$ 126 CLS:PRINT ":娘!娘!娘...":Z$=INKEY$ 127 CLS:PRINT "(热泪):娘,你放心...孩儿不会让你失望的...":Z$=INKEY$ :GOTO 140 130 CLS:PRINT "帐号:";:INPUT "";N$:GOSUB 4000 140 CLS:GOSUB 5200:LOCATE 3,6:PRINT "Loading...":GOSUB 4200:GOSUB 4080:GOSUB 5400 145 X=1:Y=65:TOPJIN=DENG*DENG*7+DENG*45+10:TOPHP=DENG*5+20:HP=TOPHP:MP=DENG*5:TOPMP=MP 150 IF MN$(MAP)="NO" THEN 155 153 CLS:LOCATE 3,7:PRINT MN$(MAP):Z$=INKEY$ 155 CLS:GOSUB 4900 158 IF JIN>TOPJIN THEN 1320 160 ON BJ(MAP)GOSUB 5200,5230,5250,5277,5325,5312,5322,5323,5324,5370 170 LOCATE 4,1:PRINT MP$(MAP) 172 O=O+1:N=RND(1)*3:M=O+N 173 IF O>30 THEN O=0 174 IF M>31 AND SJ(MAP)>0 THEN A=X:O=0:EM=SJ(MAP):DTP=DHP(EM):DHP=DTP:GOTO 840 180 IF PEEK(191)=127 AND X>8 THEN X=X-8:BOX 1,65,160,80,1,0:GOSUB 5025:GOTO 170 185 IF PEEK(191)=247 AND X<152 THEN X=X+8:BOX 1,65,160,80,1,0:GOSUB 4900:GOTO 170 190 IF PEEK(191)=127 AND X<9 THEN MAP=MPS(MAP,1)/-1:X=152:GOTO 150 195 IF PEEK(191)=247 AND X>151 THEN MAP=MPS(MAP,19)/-1:X=1:GOTO 150 250 Z$=INKEY$ 280 IF ASC (Z$)=27 THEN LOCATE 3,6:PRINT "<末浪出品>":END 285 IF ASC (Z$)=20 THEN BOX 1,65,160,80,1,0:GOSUB 5136 290 IF ASC (Z$)=20 AND MPS(MAP,X/8)<>0 THEN 450 300 IF ASC (Z$)=28 THEN 500 310 IF ASC (Z$)=29 THEN 550 315 IF ASC (Z$)=31 THEN 600 320 IF ASC (Z$)=30 THEN 420 400 GOTO 170 410 GOTO 170 420 CLS:PRINT " 记事 ","";RJ$(MSN) 422 IF MSF=0 THEN Z$="尚未完成": ELSE Z$="已经完成" 426 LOCATE 4,3:PRINT Z$:BOX 1,15,160,80:Z$=INKEY$ :CLS:GOTO 155 449 REM 对MPS判断 450 IF MPS(MAP,X/8)=-101 THEN 1400 451 IF MPS(MAP,X/8)=-102 THEN 1460 452 IF MPS(MAP,X/8)=-200 THEN 2800 455 IF MPS(MAP,X/8)<0 THEN MAP=MPS(MAP,X/8)/-1:GOTO 470 460 IF MPS(MAP,X/8)>0 THEN 700 470 FOR Y=65 TO 58 STEP -1:BOX 1,65,160,80,1,0:GOSUB 5136:NEXT :Y=65:GOTO 150 500 FOR I=1 TO 80 STEP 3:BOX 1,1,I,I,1,1:NEXT I:BOX 1,1,80,80,1,0:LOCATE 4,1:PRINT " " 505 LOCATE 1,1:PRINT DENG;"级","升级:";(TOPJIN-JIN),"银两:";MO,"HP:";HP,"MP:";MP; 510 BOX 1,1,80,80:Z$=INKEY$ 515 FOR I=80 TO 2 STEP -3:BOX 1,1,I,I,0,0:BOX 1,1,I-1,I-1,0,0:NEXT I:CLS:GOTO 155 550 FOR I=0 TO 80 STEP 3:BOX 1,1,I,I,1,1:NEXT I:BOX 1,1,80,80,1,0 555 LOCATE 1,1:PRINT "武器:";W$,"防具:";E$,"攻:";DENG*5;"/";GONG,"防:";DENG*5;"/";FANG 560 BOX 1,1,80,80:Z$=INKEY$ 565 FOR I=80 TO 2 STEP -3:BOX 1,1,I,I,0,0:BOX 1,1,I-1,I-1,0,0:NEXT I:CLS:GOTO 155 600 FOR I=0 TO 80 STEP 2:BOX 1,1,I,I,1,1:NEXT I:BOX 1,1,80,80,1,0 605 LOCATE 2,1:PRINT "- ①储存 -","- ②物品 -","- ③药物 -","- ④格斗 -"; 610 BOX 1,1,80,80:Z$=INKEY$ 620 IF Z$="b" THEN GOSUB 4030:LOCATE 3,3:PRINT "OK!!":FOR I=1 TO 1300:NEXT :GOTO 155 632 IF Z$="p" THEN INPUT "";N$:GOTO 155 635 IF Z$="m" THEN 685 638 IF Z$="n" THEN 650 639 IF Z$="g" THEN LOCATE 3,1:PRINT "对方号: ";:INPUT "";EN$:GOSUB 5460:GOTO 840 640 GOTO 155 650 CLS:PRINT "";WP$,"攻击力:";WPG,"防御力:";WPF,"[U]使用":BOX 1,1,160,80 655 Z$=INKEY$ 657 IF Z$="u" AND WPG>0 THEN 670 658 IF Z$="u" AND WPF>0 THEN 680: ELSE 150 670 SWAP WP$,W$:I=GONG-DENG*5:GONG=DENG*5+WPG:WPG=I:GOTO 650 680 SWAP WP$,E$:I=FANG-DENG*5:FANG=DENG*5+WPF:WPF=I:GOTO 650 685 LOCATE 2,1:PRINT " ⑴:";HPY;" "," ⑵:";MPY;" ":LOCATE 4,1:PRINT " " 687 Z$=INKEY$ 688 IF Z$="b" AND HPY>0 THEN HPY=HPY-1:HP=HP+50 689 IF Z$="n" AND MPY>0 THEN MPY=MPY-1:MP=MP+50 690 IF Z$<>"n" AND Z$<>"b" THEN 155 692 IF HP>TOPHP THEN HP=TOPHP 694 IF MP>TOPMP THEN MP=TOPMP 696 GOTO 685 700 IF X<80 THEN K=160:L=112:GOTO 703: ELSE K=48:L=1 703 FOR I=0 TO 80 STEP 2:BOX K,1,L,I,1:NEXT I 705 BOX K,1,L,80,1,0 708 IF X>80 THEN 713 710 LOCATE 2,16:PRINT "交谈":LOCATE 3,16:PRINT "查看" 712 LOCATE 4,15:PRINT " 战斗 ":GOTO 715 713 LOCATE 2,2:PRINT "交谈":LOCATE 3,2:PRINT "查看" 714 LOCATE 4,1:PRINT " 战斗 " 715 BOX K,1,L,80,1,2 720 BOX K-2,2,L+1,77,0,0:XZ=1 725 BOX L+7,XZ*16,K-7,XZ*16+16,0,2:Z$=INKEY$ 730 IF ASC (Z$)=20 AND XZ>1 THEN BOX L+7,XZ*16,K-7,XZ*16+16,0,2:XZ=XZ-1:GOTO 725 735 IF ASC (Z$)=21 AND XZ<3 THEN BOX L+7,XZ*16,K-7,XZ*16+16,0,2:XZ=XZ+1:GOTO 725 740 IF ASC (Z$)=13 THEN 750 745 FOR I=80 TO 0 STEP -4:BOX K,1,L,80,1,0:BOX K,1,L,I,1:NEXT I:GOTO 155 750 REM 判断输入 755 IF XZ=1 THEN 770 756 IF XZ=2 THEN 790 757 IF XZ=3 THEN 830 770 LOCATE 4,1:PRINT " " 773 BOX 1,47,160,80,1,0:LOCATE 4,1:PRINT DT$(MPS(MAP,X/8));":";DY$(MPS(MAP,X/8)); 774 IF X>80 THEN BOX 33,1,49,16,1,2 776 BOX 1,47,160,80:Z$=INKEY$ 778 IF RWH(MPS(MAP,X/8))=MSN+1 AND MSF=1 THEN MSN=MSN+1:MSF=0:GOTO 780: ELSE 815 780 BOX 1,47,160,80,1,0:LOCATE 4,1:PRINT MID$(RY$(MSN),1,38);:BOX 1,47,160,80:Z$=INKEY$ 782 BOX 1,47,160,80,1,0:LOCATE 4,1:PRINT MID$(RY$(MSN),39,69);:BOX 1,47,160,80:Z$=INKEY$ 784 GOTO 155 790 LOCATE 4,1:PRINT " " 792 IF DGNG(MPS(MAP,X/8))<GONG THEN Z$="攻击力低于你...":GOTO 800 793 IF DGNG(MPS(MAP,X/8))>GONG+120 THEN Z$="攻击力极高,少惹为妙!":GOTO 800 794 IF DGNG(MPS(MAP,X/8))>GONG+70 THEN Z$="攻击力较高,很难对付!":GOTO 800 795 IF DGNG(MPS(MAP,X/8))>GONG+35 THEN Z$="攻击力不低,打败他危险!":GOTO 800 796 IF DGNG(MPS(MAP,X/8))>GONG THEN Z$="攻击力不比你高多少!" 800 BOX 1,47,160,80,1,0:LOCATE 4,1:PRINT DN$(MPS(MAP,X/8));":";Z$;"带着";DW$(MPS(MAP,X/8)); 805 IF X>80 THEN BOX 33,1,49,16,1,2 810 BOX 1,47,160,80:Z$=INKEY$ :GOTO 155 815 IF MPS(MAP,X/8)=RE(MSN)/-1 AND MSF=0 THEN 818: ELSE 155 818 Z$=INKEY$ 820 GOTO 1330 830 REM 战斗 835 EM=MPS(MAP,X/8):DTP=DHP(EM):DHP=DTP 840 CLS:X=8:Y=1:GOSUB 4900:LOCATE 1,19:PRINT DT$(EM) 845 IF DHP<0 THEN DHP=0 850 BOX 30,3,70,7:BOX 30,5,INT((HP/(DENG*5+20))*40+30),7,1 852 BOX 30,10,INT((MP/(DENG*5))*40+30),11,1 860 BOX 100,3,140,7:BOX 100,5,INT((DHP/DTP)*40+100),7,1 870 LINE 1,16,160,16 880 LOCATE 3,5:PRINT "攻 技 物 逃":BOX 28,28,124,50,1,2 890 BOX 30,30,122,48,0,0:XZ=1 900 BOX (XZ-1)*24+31,31,(XZ-1)*24+47,47,1,2 910 Z$=INKEY$ 920 IF ASC (Z$)=23 AND XZ>1 THEN GOSUB 980:XZ=XZ-1:GOTO 900 925 IF ASC (Z$)=22 AND XZ<4 THEN GOSUB 980:XZ=XZ+1:GOTO 900 930 IF ASC (Z$)=13 THEN 1000 950 GOSUB 980:GOTO 900 980 BOX (XZ-1)*24+31,31,(XZ-1)*24+47,47,1,2:RETURN 1000 IF XZ=4 AND EM<>25 THEN 1060 1020 IF XZ=3 AND EM<>49 THEN 1800 1030 IF XZ=2 AND EM<>49 THEN 2000 1040 IF XZ=1 THEN 1100 1045 GOTO 910 1060 N=RND(1)*100-(DFNG(EM)-FANG)/2 1062 IF N>40 THEN Y=65:X=A:GOTO 155: ELSE PRINT "逃跑失败!":Z$=INKEY$ 1063 LOCATE 3,1:PRINT " "," ":GOTO 1155 1100 BOX 1,17,160,80,1,0:Y=32:X=5:LOCATE 3,17:PRINT DT$(EM):GOSUB 4900 1110 FOR X=5 TO 105 STEP 10:BOX 1,32,120,80,1,0:GOSUB 4900:NEXT 1120 CIRCLE 132,40,6,1,2 1130 FOR X=105 TO 5 STEP -12:BOX 1,32,120,80,1,0:GOSUB 5025:NEXT 1140 IF GONG>DFNG(EM) THEN DHP=DHP-(GONG-DFNG(EM)) 1150 IF DHP<1 THEN 1300 1155 N=RND(1)*100-(DGNG(EM)-FANG) 1160 IF N<70 THEN 1165: ELSE 840 1165 IF MSN=7 OR MSN=12 OR MSN=13 THEN 1170: ELSE 1200 1170 LOCATE 3,7:PRINT " " 1171 BOX 1,17,80,160,1,0:Y=30:X=3:GOSUB 4900:LOCATE 3,19:PRINT DT$(EM) 1172 FOR W=1 TO 15 STEP 0.15:LOCATE 4,W:PRINT " ":NEXT 1174 LOCATE 3,19:PRINT "☆":GOSUB 4900 1175 FOR W=15 TO 1 STEP -0.15:LOCATE 4,W:PRINT " ":NEXT 1180 DHP=DHP-GONG-DENG*2+DFNG(EM) 1200 BOX 1,17,80,160,1,0 1210 Y=32:X=5:DX=17:GOSUB 4900:LOCATE 3,4:PRINT " " 1220 FOR DX=17 TO 4 STEP -0.15:LOCATE 3,DX:PRINT DT$(EM)+" ":NEXT 1230 CIRCLE 10,40,5,1,0 1240 FOR DX=4 TO 17 STEP 0.2:LOCATE 3,DX:PRINT " "+DT$(EM):NEXT 1250 IF DGNG(EM)>FANG THEN HP=HP-(DGNG(EM)-FANG) 1260 IF HP<1 THEN 1350 1270 GOTO 840 1300 CLS:PRINT " 胜利! "," 得经验:";DMO(EM)," 得金钱:";DMO(EM)-5 1302 Y=65:X=1:BOX 1,15,160,80:JIN=JIN+DMO(EM):MO=MO+DMO(EM)-5:Z$=INKEY$ 1305 IF EM=RE(MSN) AND MSF=0 THEN 1330 1307 IF WP$=RW$(MSN) AND MSF=0 THEN 1330 1308 IF JIN>TOPJIN THEN 1320 1309 N=RND(1)*100:IF N<50 THEN 155 1310 LOCATE 4,3:PRINT "得[";DW$(EM);"]":WP$=DW$(EM):WPG=DWG(EM):WPF=DWF(EM) 1315 BOX 1,15,160,80:Z$=INKEY$ 1319 GOTO 155 1320 CLS:PRINT " 升级! "," 攻+5 防+5"," 体+5 气+3":BOX 1,15,160,80 1322 DENG=DENG+1:GONG=GONG+5:FANG=FANG+5:Z$=INKEY$ 1325 TOPJIN=DENG*DENG*7+DENG*45+10:JIN=0:TOPHP=DENG*5+20:HP=TOPHP:GOTO 155 1330 CLS:PRINT "你完成了[";RJ$(MSN);"]任务!奖励经验";MSN*MSN*60:BOX 1,0,160,80 1332 Z$=INKEY$ :CLS:PRINT RF$(MSN);:BOX 1,0,160,80:Z$=INKEY$ 1334 IF RD(MSN)>0 THEN I=RD(MSN):PRINT "得"DW$(I);:WP$=DW$(I):WPG=DWG(I):WPF=DWF(I) 1340 Z$=INKEY$ :JIN=JIN+MSN*MSN*60:MSF=1 1345 IF RD(MSN)<0 THEN MAP=RD(MSN)/-1 1348 GOTO 150 1350 IF EM=49 THEN CLS:PRINT "格斗失败!":Z$=INKEY$ :Y=65:GOTO 155 1352 IF EM=25 AND MP=5 THEN 2860 1353 IF EM=25 THEN 2840 1355 CLS:GOSUB 5230:LOCATE 3,7:PRINT "出师未捷":BOX 1,1,160,80,1,2 1360 JIN=JIN-DMO(EM)*2:GOSUB 4030:END 1399 REM 药店 1400 CLS:GOSUB 5322:X=1:GOSUB 4900 1410 LOCATE 3,1:PRINT "要点什么?","A.金创药(500)";HPY,"B.还疡伞(1000)";MPY; 1428 BOX 1,32,160,80 1430 Z$=INKEY$ 1435 IF Z$="a" AND MO>499 THEN MO=MO-499:HPY=HPY+1:GOTO 1410 1440 IF Z$="b" AND MO>999 THEN MO=MO-999:MPY=MPY+1:GOTO 1410 1450 GOTO 155 1460 CLS:GOSUB 5323:X=1:GOSUB 4900 1470 LOCATE 3,1:PRINT "要点什么?","A.短剑500 B.精剑2K","C.龙泉8K D.蚀血20K"; 1475 IF DENG>25 THEN 1530 1488 BOX 1,32,160,80 1490 Z$=INKEY$ 1500 IF Z$="a" AND MO>499 THEN MO=MO-500:WP$="短剑":WPG=15:WPF=0:GOTO 1700 1510 IF Z$="b" AND MO>1999 THEN MO=MO-1000:WP$="精剑":WPG=25:WPF=0:GOTO 1700 1515 IF Z$="c" AND MO>7999 THEN MO=MO-8000:WP$="龙泉":WPG=40:WPF=0:GOTO 1700 1520 IF Z$="d" AND MO>19999 THEN MO=MO-20000:WP$="蚀血":WPG=60:WPF=0:GOTO 1700 1525 GOTO 155 1530 LOCATE 3,1:PRINT "要点什么?","1.真红25K 2.金蛇40K","3龙纹60K 4倚天150K"; 1538 BOX 1,32,160,80:Z$=INKEY$ 1540 IF Z$="b" AND MO>24999 THEN MO=MO-25000:WP$="真红":WPG=80:WPF=0:GOTO 1700 1542 IF Z$="n" AND MO>39999 THEN MO=MO-40000:WP$="金蛇":WPG=100:WPF=0:GOTO 1700 1544 IF Z$="m" AND MO>59999 THEN MO=MO-60000:WP$="龙纹":WPG=140:WPF=0:GOTO 1700 1546 IF Z$="g" AND MO>149999 THEN MO=MO-150000:WP$="倚天":WPG=180:WPF=0:GOTO 1700 1690 GOTO 155 1700 LOCATE 5,1:PRINT " ---- 已经购买 ----";:Z$=INKEY$ :GOTO 155 1800 LOCATE 4,1:PRINT "1.金创药:";HPY,"2.还疡伞";MPY; 1810 BOX 1,47,160,80:Z$=INKEY$ 1820 IF Z$="b" AND HPY>0 THEN HPY=HPY-1:HP=HP+50:GOTO 1900 1825 IF Z$="n" AND MPY>0 THEN MPY=MPY-1:MP=MP+50:GOTO 1900 1850 GOTO 840 1900 IF HP>TOPHP THEN HP=TOPHP 1902 IF MP>TOPMP THEN MP=TOPMP 1920 BOX 1,20,160,80,1,0:LOCATE 3,1:PRINT " ";SPC(19):Y=30 1921 LOCATE 4,1:PRINT " ";SPC(19) 1922 LOCATE 5,1:PRINT " ";SPC(18); 1925 LOCATE 3,19:PRINT DT$(EM):GOSUB 4900:FOR I=1 TO 16 STEP 0.05 1930 CIRCLE 25,38,I,0,2:NEXT 1932 LOCATE 3,1:PRINT " ";SPC(19) 1933 LOCATE 4,1:PRINT " ";SPC(19) 1934 LOCATE 5,1:PRINT " ";SPC(18); 1950 GOSUB 4900:GOTO 1155 1999 REM 绝技 2000 BOX 1,20,160,80,1,0 2002 IF DENG>6 THEN LOCATE 3,1:PRINT "①气疗" 2004 IF DENG>12 THEN LOCATE 3,11:PRINT "②残剑" 2006 IF DENG>23 THEN LOCATE 4,1:PRINT "③北瞑神功" 2008 IF DENG>29 THEN LOCATE 4,11:PRINT "④六脉神剑" 2100 Z$=INKEY$ 2101 LOCATE 3,1:PRINT " ";SPC(19):LOCATE 4,1:PRINT "";SPC(20) 2102 Y=30:X=2:GOSUB 4900:LOCATE 3,19:PRINT DT$(EM) 2105 IF Z$="b" AND DENG>6 AND MP>29 THEN MP=MP-29:GOTO 2210 2110 IF Z$="n" AND DENG>12 AND MP>19 THEN MP=MP-20:GOTO 2230 2115 IF Z$="g" AND DENG>30 AND MP>99 THEN MP=MP-100:GOTO 2310 2120 IF Z$="m" AND DENG>23 AND MP>34 THEN MP=MP-35:GOTO 2270 2200 GOTO 1155 2209 REM 气疗 2210 FOR I=1 TO 16 STEP 0.05 2212 CIRCLE 25,38,I,0,2:NEXT 2215 HP=TOPHP*0.5+HP 2220 IF HP>TOPHP THEN HP=TOPHP 2223 GOTO 1155 2229 REM 残剑 2230 FOR JX=22 TO 120 2235 GOSUB 2260 2240 NEXT :BOX 36,27,41,62,1:DHP=DHP-INT((GONG-DFNG(EM))*1.3) 2250 FOR W=1 TO 1000:NEXT :GOTO 1155 2260 BOX JX,40,JX+15,47,1:RETURN 2269 REM 北瞑 2270 Y=30:X=2:GOSUB 4900:LOCATE 3,19:PRINT DT$(EM) 2280 FOR W=1 TO 30 STEP 0.5:CIRCLE 140,30,W,1,2:NEXT 2282 FOR W=30 TO 1 STEP -2:CIRCLE 140,30,W,1,2:NEXT 2290 DHP=DHP-GONG+DFNG(EM):HP=HP+GONG-DFNG(EM) 2292 IF DHP<0 THEN DHP=0 2294 IF HP>TOPHP THEN HP=TOPHP 2296 FOR W=1 TO 500:NEXT :CLS:GOTO 1155 2309 REM 六脉神剑 2310 Y=30:X=2:GOSUB 4900:LOCATE 3,19:PRINT DT$(EM) 2320 FOR W=5 TO 16 STEP 0.2:LOCATE 4,W:PRINT " →":NEXT 2322 FOR W=5 TO 16 STEP 0.3:LOCATE 3,W:PRINT " →":NEXT 2324 FOR W=5 TO 16 STEP 0.5:LOCATE 4,W:PRINT " →":NEXT 2326 FOR W=5 TO 16 STEP 0.2:LOCATE 3,W:PRINT " →":NEXT 2330 DHP=DHP-INT((GONG-DFNG(EM))*1.8) 2332 IF DHP<0 THEN DHP=0 2340 FOR W=1 TO 500:NEXT :CLS:GOTO 1155 2800 CLS:PRINT "(怒):丁春秋,我要给我爹娘报仇!受死吧!":Z$=INKEY$ 2802 CLS:PRINT "你提剑冲向他,这时,墓碑两边突然冒出十余人,杀了过来!":Z$=INKEY$ 2804 CLS:PRINT ":可恶,中计了!":Z$=INKEY$ 2806 CLS:PRINT "那十余人一跃到半空中,洒下许多黄色粉状物!你来不及躲避":Z$=INKEY$ 2808 CLS:PRINT ":臭小子!你已经中了[蝎蛊毒],舒服吧?去死吧!哈哈哈...":Z$=INKEY$ 2810 CLS:PRINT "丁春秋杀了过来...":Z$=INKEY$ 2820 HP=5:HPY=0:MPY=0:TOPMP=100:MP=1:GOSUB 4030:EM=25:DTP=DHP(25):DHP=DTP:GOTO 840 2840 CLS:PRINT ":呃...呃...可恶!我...我不会放过你的...":Z$=INKEY$ 2842 CLS:PRINT ":哼!你现在连蚂蚁也杀不死!放心,我不杀你,我要你痛苦得自杀!":Z$=INKEY$ 2844 CLS:PRINT ":你就死在这荒郊野岭吧!我走咯...":Z$=INKEY$ 2846 CLS:PRINT ":回来!混蛋...你修想逃!我...我...要报仇!":Z$=INKEY$ 2848 CLS:PRINT ":不自量力!":Z$=INKEY$ 2850 HP=10:HPY=0:MPY=0:TOPMP=100:MP=5:GOSUB 4030:EM=25:DTP=DHP(25):DHP=DTP:GOTO 840 2860 CLS:FOR W=1 TO 80 STEP 6:CIRCLE 80,40,W,1:NEXT 2870 CLS:LOCATE 3,8:PRINT "你死了":BOX 1,1,160,80,1,2:Z$=INKEY$ :END 4000 OPEN N$ FOR INPUT AS#1 4010 INPUT #1,DENG,GONG,FANG,JIN,MO,E$,W$,MAP,MSN,MSF 4020 CLOSE #1:RETURN 4030 OPEN N$ FOR OUTPUT AS#1 4040 ?1,DENG,GONG,FANG,JIN,MO,E$,W$,MAP,MSN,MSF 4050 CLOSE #1:RETURN 4080 OPEN "TLDAT"FOR INPUT AS#1 4090 FOR I=1 TO 29 4100 INPUT #1,DN$(I),DHP(I),DGNG(I),DFNG(I),DMO(I),DW$(I),DWG(I),DWF(I),DT$(I),DY$(I),DX$(I) 4105 INPUT #1,RWH(I) 4110 NEXT I:CLOSE #1:RETURN 4200 OPEN "TLMAP"FOR INPUT AS#1 4210 FOR I=1 TO 26 4220 INPUT #1,MP$(I),MN$(I),BJ(I),SJ(I) 4230 FOR K=1 TO 19 4240 INPUT #1,MPS(I,K) 4250 NEXT K 4260 NEXT I 4270 CLOSE #1:RETURN 4862 CLS:LOCATE 3,8:PRINT "你死了":BOX 1,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+12:LINE X+7,Y+12,X+9,Y+12:DRAW X+2,Y+13:DRAW X+6,Y+13 5142 DRAW X+10,Y+13:LINE X+2,Y+14,X+10,Y+14:DRAW X+2,Y+1,0 5143 DRAW X+10,Y+1,0:DRAW X+4,Y+3,0:DRAW X+8,Y+3,0 5145 RETURN 5199 REM 1景 5200 CIRCLE 140,15,4,1:LINE 50,25,10,40:LINE 50,25,70,30 5210 LINE 90,22,60,53:LINE 90,22,130,38 5212 LOCATE 1,5:PRINT "":LOCATE 2,10:PRINT "" 5220 RETURN 5225 REM 2景 5230 CIRCLE 84,27,20,1:BOX 54,32,114,47,1,0:LOCATE 2,4:PRINT "" 5235 LINE 80,45,90,45:LINE 70,40,100,40:LINE 1,32,160,32 5238 RETURN 5245 REM 3景 5250 LOCATE 2,2:PRINT "":LOCATE 2,4:PRINT "":LOCATE 2,6:PRINT "" 5255 CIRCLE 142,13,6,1:LINE 1,30,160,30 5265 RETURN 5275 REM 4景 5277 LOCATE 1,6:PRINT "":LOCATE 2,14:PRINT "" 5285 LINE 1,16,70,16:LINE 70,16,60,27:LINE 60,27,60,45:LINE 20,29,20,40:LINE 40,21,40,42 5295 LINE 90,29,160,29:LINE 90,29,105,37:LINE 105,37,105,45:LINE 118,37,118,45 5298 LINE 131,31,131,45:LINE 143,38,143,42 5308 RETURN 5310 REM 景5 5312 LOCATE 2,5:PRINT "":LOCATE 2,9:PRINT "":LOCATE 3,15:PRINT "" 5313 LINE 20,45,30,30:LINE 40,45,30,30:LINE 42,16,55,2:LINE 68,16,55,2:LINE 75,30,65,45 5315 LINE 75,30,85,45:LINE 78,20,90,5:LINE 90,5,100,17:LINE 80,36,110,10 5318 LINE 110,10,140,45 5320 RETURN 5321 REM 景6 5322 L$="药":TT$="":GOTO 5326 5323 L$="武":TT$="":GOTO 5326 5324 L$="宿":TT$="":GOTO 5326 5326 LOCATE 2,11:PRINT TT$ 5328 BOX 20,15,41,36:BOX 18,13,43,38:LINE 20,26,41,26:LINE 31,15,31,36:BOX 71,33,101,35 5338 LINE 78,35,78,45:LINE 94,35,94,45:LINE 71,35,71,45:LINE 101,35,101,45 5342 LINE 71,45,101,45:BOX 126,14,144,32:LINE 135,8,126,14:LINE 135,8,144,14 5352 LOCATE 2,17:PRINT L$:LINE 78,33,82,30:LINE 94,33,90,30 5354 RETURN 5369 REM 少林景 5370 LOCATE 1,1:PRINT " "," ", 5375 RETURN 5400 OPEN "TLJS"FOR INPUT AS#1 5410 FOR I=1 TO 13 5420 INPUT #1,RJ$(I),RY$(I),RE(I),RW$(I),RF$(I),RD(I) 5430 NEXT I 5440 CLOSE #1 5450 RETURN 5460 EM=49:OPEN EN$ FOR INPUT AS#1 5470 INPUT #1,W,DGNG(EM),DFNG(EM),I,I,Z$,DW$(EM) 5480 CLOSE #1 5490 DHP=W*5+20:DMO(EM)=W*W:DWG(EM)=DGNG(EM)-W*5:DT$(EM)="":DTP=DHP:DWF(EM)=0 5500 RETURN
相关推荐
八数码游戏,又称九宫格,是一种经典的智力游戏,深受逻辑思维爱好者和人工智能研究者的喜爱。游戏的目标是通过空格移动数字方块,使得初始乱序的数字排列成预设的有序序列。在计算机科学领域,这种游戏被广泛用于...
社交游戏,尤其是结合了移动设备的社交游戏,在2010年经历了一个快速发展但同时也伴随着众多争议的过程。一方面,社交游戏因其独特的互动性和便捷性受到了广大用户的喜爱;另一方面,它也面临着来自传统游戏界及部分...
而任天堂以其独特的创新和市场定位,成功挽救了全球游戏行业,但中国游戏行业需要找到自己的救世主,寻找适合自身发展的道路。 游戏的未来可能来自多个方向:手游的新领域或许是对主机和PC游戏的继承与创新;独立...
这六百个精选网名,不仅仅使玩家在游戏中独一无二,更是推动了游戏社区文化的发展,使得每一个玩家都能在这个虚拟世界中找到属于自己的位置,体验到游戏的快乐和竞争的刺激。随着《绝地求生》等大逃杀游戏的流行,...
八、"温度计"是一个简单的气氛检测游戏,每个成员给出的"温度"反映了他们对团队当前状态的满意度,有助于识别和解决潜在问题。 九、"大混战"游戏通过模拟冲突,让团队在安全的环境中学习如何在竞争中保持边界,打破...
八数码问题,又称滑动拼图或九宫格游戏,是计算机科学中一个经典的搜索问题。玩家需要通过最少的移动次数,将初始状态的九宫格恢复到目标状态。在这个过程中,IDA*(Iterative Deepening A*)算法因其高效性和准确性...
1. **思想的转变**:游戏并非单纯的娱乐工具,而是一个集合了音乐、美术、技术与创意的艺术品。要想深入了解游戏编程,首先要改变对游戏的传统认知,将其视为一种综合艺术形式。这种认知的转变是进入游戏行业的基础...
- 接下来,主持人随机选择身体的一个部位作为接触点,例如“左脚心”。 - 参与者需快速两两配对,并按指定部位接触。未找到搭档者被淘汰。 - 若台上人数变为偶数,则主持人加入成为其中一员,保持奇数状态。 - 最终...
九、课外阅读:这个部分提供了一个寓言故事,让学生理解故事内容并进行判断,如太阳并非公鸡叫出来的,而是自然升起。 十、看图写话:考察学生的观察能力和创造力,要求他们根据图片描绘场景并编写故事。 这些题目...
资源管理是游戏中的另一个重要方面,涉及到水和食物的购买、运输和消耗。正确的资源管理策略包括在起点购买足够到达下一个村庄的食物和水,以及在矿山和村庄进行资源补充的决策。由于食物单价高,所以策略上会考虑在...
2. 另一个问题涉及到在网格中找到能够使得三角形面积为1的格点C,这需要理解三角形面积的计算方法和格点的特性。通过分析,我们可以找出符合条件的格点C的比例,从而计算概率。 3. "定理"这个单词中有7个不同的字母...
8. 汉字的轴对称性:第八题探讨汉字的轴对称性,要求写出具有类似性质的汉字,并设计了一个基于轴对称汉字的游戏。 9. 抛物线函数的解析式:第九题中,给出了一个抛物线的横截面,要求求出抛物线的函数关系式,需要...
10. **最大和游戏**:第十题是一个动态规划问题,两个玩家在填数游戏中影响最终和的最大值,需要理解游戏规则并找出最优策略。 11. **三角形的几何性质**:第十一题涉及到三角形的内心、外心和垂心,需要运用三角形...
15. “有趣三角形”:第十五道填空题提出了一个有趣的几何问题,要求找到直角三角形有趣中线的长度。 16. 圆的性质与直角三角形:第十六道填空题通过圆周角和弦长关系求解线段长度。 17. 计算题:第十七题包含三角...
- **计算机历史**: 第一台电子计算机ENIAC诞生于1946年。 - **存储器性能**: 内存访问速度最快。 - **RAM特性**: 可随机读写, 断电后数据丢失。 - **电子邮件定义**: 利用网络即时发送各种形式的信息。 #### 四、...
这篇教程将为初学者提供一个全面的C语言入门指南。 一、C语言概述 C语言由Dennis Ritchie在1972年为UNIX操作系统开发,它以其简洁、高效和灵活性著称。C语言的语法基于B语言,同时引入了结构化编程的概念,使其成为...
我关注到每个孩子的个性和需求,努力让每一个孩子都能在班级中找到归属感。 四、师德与职业素养 作为教师,我深知个人的言行对孩子的影响是深远的。因此,我始终以高尚的职业道德来要求自己,在工作中展现出爱心、...
18. 数字填圈游戏:这是一个平衡三角形和线段上数字和的问题,需要找到一组数字满足条件。 19. 帽子颜色游戏:小李根据小王和小张的帽子颜色,通过逻辑推理得出自己帽子的颜色。 20. 正方体展开图:理解正方体的...
第八集《生成服务器上的物品并拾取》涉及到了游戏中的物品系统,讲解如何在服务器上创建和管理物品,以及如何让玩家在游戏世界中找到并捡起这些物品。 第九集《同步弹道和爆炸效果》进一步提升了游戏的互动性,讲述...