|
(原游戏版权属于任天堂、HAL研究所 版权所有)
试图还原大乱斗
注:在模拟器上会卡住
差点就还原了大乱斗的面筋人系统。(看那一堆LOCAL)
0.1版本 可能有bug
- //CalcSMASHBros.
- FX(X,Xf,Pow)
- BEGIN
- IF Xf==0 THEN RETURN X; END;
- (X+Xf?*(.001*(Pow+1)))=X;
- RETURN X;
- END;
- FY(Y,Yf,G)
- BEGIN
- IF Yf==0 THEN RETURN Y; END;
- Y+Yf?*.01+G=Y;
- RETURN Y;
- END;
- EXPORT All;
- EXPORT Win;
- EXPORT CalcSBMain()
- BEGIN
- LOCAL Xs,JMp;
- LOCAL EX,EY,PX,PY,EFX,EFY,PFX,PFY;
- LOCAL EIT,PIT,FP1,FP2,X,Y,Sync;
- LOCAL INDE1,INDE2,INDE3,INDE4;
- LOCAL BODX1,BODY1,BODX2,BODY2;
- LOCAL ARMX1,ARMY1,ARMX2,ARMY2;
- LOCAL HADX1,HADY1,HADX2,HADY2;
- LOCAL FOTX1,FOTY1,FOTX2,FOTY2;
- RECT;
- TEXTOUT_P("任天堂",20,40,2,1);
- TEXTOUT_P("计算器大乱斗 SX",71,41,2);
- REPEAT
- TEXTOUT_P("按任意键",70,100,1,1);
- WAIT(.4);
- TEXTOUT_P("按任意键",70,100,1,3);
- WAIT(.2);
- UNTIL GETKEY()≠-1;
- 1=Sync;
- WHILE 1 DO
- RECT;
- RECT_P(130,1,160,27,0,3);
- RECT_P(100,31,130,57,0,3);
- RECT_P(70,61,100,87,0,3);
- RECT_P(40,91,70 ,117,0,3);
- TEXTOUT_P("F1 单人模式",162,17,1,0);
- TEXTOUT_P("F2 双人对战",132,47,1,2);
- TEXTOUT_P("F3 游戏设置",102,77,1,2);
- TEXTOUT_P("F4 数据",72,107,1,0);
- REPEAT
- GETKEY()=INDE1;
- UNTIL INDE1≠-1;
- IF INDE1==3 THEN
- RECT;
- TEXTOUT_P("胜利:"+Win,20,40,2);
- TEXTOUT_P("所有:"+All,20,60,2);
- TEXTOUT_P("清零: ←",80,60,1);
- REPEAT
- GETKEY()=INDE1;
- IF INDE1==20 THEN
- 0=Win;
- 0=All;
- MSGBOX("已清零")
- END;
- UNTIL INDE1≠-1;
- END;
- IF INDE1==0 THEN
- 0=PY;
- 40=PX;
- 0=EY;
- 216=EX;
- 0=X;
- 0=Y;
- CHOOSE(INDE1,"难度","练习","25%","75%","100%");
- INDE1-1=INDE1;
- TEXTOUT("INIT",0,0,2);
- WAIT(.6);
- RECT;
- TEXTOUT("GO!",0,0,2);
- WAIT(.4);
- RECT;
- REPEAT
- INDE4+Sync=INDE4;
- IF irem(INDE4,8)≥6 THEN
- TEXTOUT_P("?",200,110,2,0);
- IF JMp≥1 THEN 0=JMp END;
- RECT;
- END;
- TEXTOUT_P("?",200,110,2,3);
- TEXTOUT_P(X+"%",50,110);
- TEXTOUT_P(Y+"%",150,110);
- LINE_P(30,108,226,108);
- ARC_P(G0,PX,PY,6,0,359,INDE1);
- LINE_P(PX,PY+6,PX+BODX1,PY+BODY1); LINE_P(PX+BODX1,PY+BODY1,PX+BODX1+FOTX1,PY+BODY1+FOTY1);
- LINE_P(PX+BODX1,PY+BODY1,PX+BODX1+FOTX2,PY+BODY1+FOTY2);
- LINE_P(PX,PY+10,PX+HADX1,PY+HADY1);
- LINE_P(PX,PY+10,PX+HADX2,PY+HADY2);
- ARC_P(G0,EX,EY,6,0,359,0);
- LINE_P(EX,EY+6,EX+0,EY+24);
- LINE_P(EX+0,EY+24,EX+0+-10,EY+24+12);
- LINE_P(EX+0,EY+24,EX+0+10,EY+24+12);
- LINE_P(EX,EY+10,EX-10,EY+12);
- LINE_P(EX,EY+10,EX+10,EY+12);
- -10=HADX1;
- 12=HADY1;
- 10=HADX2;
- 12=HADY2;
- -10=FOTX1;
- 12=FOTY1;
- 10=FOTX2;
- 12=FOTY2;
- 0=BODX1;
- 24=BODY1;
- IF EX>PX THEN
- EX-RANDOM(INDE1)=EX;
- ELSE
- EX+RANDOM(INDE1)=EX;
- END;
- GETKEY()=INDE2;
- IF INDE2 == 7 AND JMp≤2 THEN
- PY-36=PY;RECT;HADY1+12=HADY1;
- WAIT(.01);
- JMp+1=JMp;
- END;
- IF PX+15≥EX AND PX-15≤EX AND EY-45≤PY AND EY+45≥PY THEN
- IF INDE2==11 THEN
- FX(EX,2,Y+.1)=EX;HADY2+32=HADY2;
- FY(EY,-2,1)-20-.005Y=EY;
- Y+12=Y;
- END;
- IF INDE2==12 THEN
- FX(EX,4,Y)=EX;FOTY1+32=HADY1;
- FY(EY,36,2)+.1Y=EY;
- Y+8=Y;
- END;
- IF INDE2==13 THEN
-
- END;
- IF ROUND(RANDOM(1),0) THEN
- FY(PY,24,1)=PY;
- X+4=X;
- END;
- END;
- IF INDE2 == 15 THEN
- HADY2+30=HADY2;PY+28=PY;
- END;
-
- IF INDE2==10 THEN
-
- Xs+1=Xs;
- FOTX1+8=FOTX1;
- END;
- IF INDE2==14 THEN
-
- Xs-1=Xs;
- FOTX2-8=FOTX2;
- END;
- Xs*.9=Xs;
- Xs+PX=PX;
- IF PY<72 OR PY>127 OR 30>PX OR PX>226 THEN
- PY+INDE1+1=PY;
- END;
- IF EY<72 OR EY>127 OR 30>EX OR EX>226 THEN
- EY+3=EY;
- END;
- IF EY>110 THEN
- EY-2-6/9=EY;
- END;
- IF INDE2==50 THEN
- TEXTOUT("PAUSE",0,0,0);WAIT; END;
- UNTIL -40>EY OR EY>127 OR -40>PY OR PY>127 OR -44>EX OR EX>300 OR -44>PX OR PX>300;
- All+1=All;
- TEXTOUT("Game!",0,0,2,0);
- IF -44>EX OR EX>300 OR -40>EY OR EY>127 THEN
- Win+1=Win;
- FOR I FROM 0 TO 64 DO
- ARC_P(EX,EY,I);WAIT(.01)END;
- TEXTOUT("+1",0,-1,1,0);
- ELSE
- FOR I FROM 0 TO 48 DO
- ARC_P(PX,PY,I);WAIT(.01)END;
- END;
- WAIT(1);
- END;
- END;
- END;
复制代码
|
|