Randomize:xsc=640:ysc=480:screen 0,xsc,ysc,0,10,10:font "メイリオ",20,1:slev=0 //画面サイズ kb = 90,88,37,38,39,40,1,2:dim k,length(kb):dim pk,length(kb) //キー *gtop slev++:bkxl=18:bkyl=25:dim bkdt,bkxl*bkyl:gosub *stageing:blcs=20 //ブロック dim cr,blcs:dim cg,blcs:dim cb,blcs:repeat blcs:cr(cnt)=rnd(255):cg(cnt)=rnd(255):cb(cnt)=rnd(255):loop itmsuu=20:dim itm,itmsuu,10:itnm = "","Long","Big","Pir","Up","Cntl","Plus","Inf","Wall":dim iton,length(itnm) //アイテムの効果セット barsiz = 40:balsiz=7:balpwr=1:gravi = 0.02:balmax=50 ddim bald,balmax,10:gosub *blset:swit=0:barsiz = 70 repeat color 0,0,0:boxf:color 255,255,255:boxf 5,5,xsc-5,ysc-5:mby=0 repeat bkxl:mbx=5+35*cnt:t1=cnt:repeat bkyl b1 = bkdt(t1*bkyl+cnt):if(b1==0){continue} mby = 5+15*cnt:color cr(b1),cg(b1),cb(b1):boxf mbx+1,mby+1,mbx+35+-1,mby+15-1 loop:loop if(mby=0){swit++}:barx = mouseX:color 0,0,0:boxf barx-barsiz,ysc-20,barx+barsiz,ysc-10 //バー color 255,100,100:circle mouseX-7,mouseY-7,mouseX+7,mouseY+7,1 color 100+balpwr*30,255-balpwr*30,100:if(iton(5)>0){color 100,100,255} repeat balmax:if(bald(cnt,5)>0){circle bald(cnt,0)-balsiz,bald(cnt,1)-balsiz,bald(cnt,0)+balsiz,bald(cnt,1)+balsiz,1 bald(cnt,0)+=bald(cnt,2):bald(cnt,1)+=bald(cnt,3) if(iton(5)>0){ if(mouseX>bald(cnt,0)){bald(cnt,2)+=0.06}:if(mouseXbald(cnt,1)){bald(cnt,3)+=0.06}:if(mouseYysc){bald(cnt,5)=0.00:continue} if(bald(cnt,1)+bald(cnt,3)+balsiz>=ysc-20 && bald(cnt,1)+balsiz<=ysc-20){ if(absf(mouseX-bald(cnt,0))0){if(bald(cnt,0)+bald(cnt,2)+balsiz>5+35*bkxl){bald(cnt,2)=-absf(bald(cnt,2))} else{ if(bald(cnt,1)>5 && bald(cnt,1)-5<15*bkyl){ ox1=(int(bald(cnt,0)+bald(cnt,2)+balsiz-5)/35)*bkyl+int(bald(cnt,1)-5)/15 if(bkdt(ox1)>0){bkdt(ox1)-=balpwr if(bkdt(ox1)<0){bkdt(ox1)=0}else{bald(cnt,2)=-absf(bald(cnt,2))}:if(bkdt(ox1)=0){gosub *itmst}} } } } //右衝突 if(bald(cnt,2)<0){if(bald(cnt,0)+bald(cnt,2)-balsiz<5){bald(cnt,2)=absf(bald(cnt,2))} else{ if(bald(cnt,1)>5 && bald(cnt,1)-5<15*bkyl){ ox1=(int(bald(cnt,0)+bald(cnt,2)-balsiz-5)/35)*bkyl+int(bald(cnt,1)-5)/15 if(bkdt(ox1)>0){bkdt(ox1)-=balpwr if(bkdt(ox1)<0){bkdt(ox1)=0}else{bald(cnt,2)=absf(bald(cnt,2))}:if(bkdt(ox1)=0){gosub *itmst}} } } } //左衝突 if(bald(cnt,3)<0){if(bald(cnt,1)+bald(cnt,3)-balsiz<5){bald(cnt,3)=absf(bald(cnt,3))} else{ if(bald(cnt,1)+bald(cnt,3)-balsiz-5<15*bkyl){ ox1=(int(bald(cnt,0)-5)/35)*bkyl+int(bald(cnt,1)+bald(cnt,3)-balsiz-5)/15 if(bkdt(ox1)>0){bkdt(ox1)-=balpwr if(bkdt(ox1)<0){bkdt(ox1)=0}else{bald(cnt,3)=absf(bald(cnt,3))}:if(bkdt(ox1)=0){gosub *itmst}} } } } //上衝突 if(bald(cnt,3)>0){ if(bald(cnt,1)+bald(cnt,3)+balsiz<5+15*bkyl){ ox1=(int(bald(cnt,0)-5)/35)*bkyl+int(bald(cnt,1)+bald(cnt,3)+balsiz-5)/15 if(bkdt(ox1)>0){bkdt(ox1)-=balpwr if(bkdt(ox1)<0){bkdt(ox1)=0}else{bald(cnt,3)=-absf(bald(cnt,3))}:if(bkdt(ox1)=0){gosub *itmst}} } } //下衝突 }:loop color 255,100,100:repeat itmsuu:if(itm(cnt,0)>0){pos itm(cnt,1),itm(cnt,2):mes itnm(itm(cnt,0)) itm(cnt,2)++:if(itm(cnt,2)>ysc-40 && abs(mouseX-itm(cnt,1))ysc){itm(cnt,0)=0}}:loop //アイテム描写 if((pk(6)==0 && k(6)==1) || k(7)==1){gosub *blset}:gosub *stwait:if(swit>0){swit++:if(swit>100){break}} loop:gosub *stageing:goto *gtop *stageing repeat slev+3 md = 1+rnd(2+slev/2)\(blcs-1),rnd(bkyl+bkxl) if(md(1)0){iton(cnt)--}:loop if(iton(1)=99){barsiz+=20} if(iton(2)>0){balsiz=17}else{balsiz=7} if(iton(3)>0){balpwr=5}else{balpwr=1} if(iton(4)>0){gravi=-0.1:repeat balmax:if(bald(cnt,3)<-5.0){bald(cnt,3)=-5.0}:loop }else{gravi=0.02}:if(iton(6)=99){gosub *blset}:if(iton(7)>0 && iton(7)\4==0){gosub *blset} if(iton(8)=99){barsiz+=xsc*2}:return *blset //ボールのセット repeat balmax if(bald(cnt,5)<0.1){ bald(cnt,5)=1.00:bald(cnt,0)=0.00+mouseX:bald(cnt,1)=0.00+ysc-25:balrad = deg2rad(170+rnd(20)) bald(cnt,2)= 5.00*sin(balrad):bald(cnt,3)= 5.00*cos(balrad):break}:loop:return *stwait repeat length(kb):if(k(cnt)==0){pk(cnt)=0}else{pk(cnt) += 1}:getkey k(cnt),kb(cnt):loop redraw 1:await 15:redraw 0:playtime++:gosub *itdw:return