¥¹¥ì¥Ã¥É¤Ê¤É¤ò»²¹Í¤Ëºî¤ê¤Þ¤·¤¿¡£
¶µ¤¨¤Æ¤¤¤¿¤À¤¤¿¤¤¤Î¤Ï¡¢
¡¥é¥¤¥Õ¤Îɽ¼¨
¢Å¨¤Ë¾×Æͤ·¤¿ºÝ¡¢¼«µ¡¤ò°ì½ÖÀÖ¤¯¤·¤ÆºÆ¤Ó½é´ü°ÌÃÖ¤«¤é¤ä¤êľ¤·¤Æ¥¹¥¿¡¼¥È¤µ¤»¤ë¤ä¤êÊý
£¥¢¥¤¥Æ¥à¤ò20É÷вᤴ¤È¤Ë½Ð¤·¡¢¼èÆÀ¤¹¤ë¤Þ¤Ç¥Ð¥ê¥¢¤«¥é¥¤¥Õ¤ÎÁ´²óÉü¤«¤ï¤«¤é¤Ê¤¤¥¢¥¤¥Æ¥à
¤Ç¤¹¡£
¡¤Î¥é¥¤¥Õ¤Ï¥×¥í¥°¥é¥à¤òºî¤Ã¤¿¤Ï¤º¤Ê¤Î¤Ç¤¹¤¬¡¢¤Ê¤¼¤«É½¼¨¤µ¤ì¤º¡¢²¿¤¬Â¤ê¤Ê¤¤¤«ÃΤꤿ¤¤¤Ç¤¹¡£
£¤Ï¥Ð¥ê¥¢¤Î¤ßºî¤ê¤Þ¤·¤¿¡£
¤É¤ì¤«£±¤Ä¤Ç¤â¤ï¤«¤ë¤â¤Î¤¬¤¢¤ì¤Ð¤´¶µ¼ø¤¤¤¿¤À¤¤¿¤¤¤Ç¤¹¡£
¤è¤í¤·¤¯¤ª´ê¤¤¤¤¤¿¤·¤Þ¤¹¡£
wx=400:wy=600 ; ²èÌÌ¥µ¥¤¥º
screen 0,wx,wy
color 0,150,150:boxf 0,0,400,600
dim fight ;¼«µ¡¤Î»Äµ¡¿ô
dim blast ;¼«µ¡¤ÎÇúȯ¥«¥¦¥ó¥¿
;¼«µ¡¤Î½é´ü²½
x=(400-30)/2
y=(600-30)-16
fight=3
blast=0
mx=200:my=300 ; ¥×¥ì¥¤¥ä¡¼¤ÎºÂɸ
msp=4 ; ¥×¥ì¥¤¥ä¡¼¤Î°ÜÆ°¥¹¥Ô¡¼¥É
ms=20 ; ¾×ÆÍȽÄê¤Î¤·¤¤¤ÃͤǤ¢¤ëȾ·Â
mfs=30 ; ¼«µ¡¤Î¥Õ¥©¥ó¥È¥µ¥¤¥º
mf=1 ;¼«µ¡¤ÎÀ¸Â¸¥Õ¥é¥°
itm=0 ;1°Ê¾å¤Ç¥Ð¥ê¥¢
;¥¢¥¤¥Æ¥à
itx=-fs/2 ;¥¢¥¤¥Æ¥à¤Î½é´üx
ity=wy/2 ;¥¢¥¤¥Æ¥à¤Î½é´üy
itf=0 ;¥¢¥¤¥Æ¥à¤¬Â¸ºß¤¹¤ë¤«
itsp=2;¥¢¥¤¥Æ¥à¤Î¥¹¥Ô¡¼¥É
;120ÉôÖ
countermax=120*60
counter=1
cf=1:ct=-1
frame=0
fs=30 ;¥Õ¥©¥ó¥È¥µ¥¤¥º
*start
redraw 0 ; ²èÌ̹¹¿·³«»Ï
color 0,200,200:boxf 0,0,400,600
;¼«µ¡
if blast==0{
stick key,%11111 ; ¥¡¼ÆþÎÏ
;limit p1,p2,p3(°ìÄêÈÏ°ÏÆâ¤ÎÀ°¿ô¤òÊÖ¤¹) ÂоݤȤʤëÃÍ,ºÇ¾®ÃÍ¡¤ºÇÂçÃÍ
if key&1 : mx=limit( mx-msp, 0, wx ) ; º¸°ÜÆ°
if key&4 : mx=limit( mx+msp, 0, wx ) ; ±¦°ÜÆ°
if key&2 : my=limit( my-msp, 0, wy ) ; ¾å°ÜÆ°
if key&8 : my=limit( my+msp, 0, wy ) ; ²¼°ÜÆ°
if itm > 0 : itm--
pos mx-mfs/2,my-mfs/2
if itm : color 0,0,255 : else color
font"£Í£Ó ¥´¥·¥Ã¥¯",mfs:mes "¡ü"
}else:if (blast>1){
blast--
}else:if (fight>0){ ;»Äµ¡¿ô
fight-- ;»Äµ¡¿ô--
blast=0 ;¼«µ¡¤ÎÇúȯ¥«¥¦¥ó¥¿
mx=(200-30)/2 ;¼«µ¡¤ÎÉü³è
my=(300-30)-16
}else{
mf=0 ;»Äµ¡0¤Ê¤é¼«µ¡¤ÎÀ¸Â¸¥Õ¥é¥°¤Ê¤·
}
;¢¥
if cf {
dist=abs(cx-mx)+abs(cy-my)
if dist<(ms*2) {
if itm == 0 { goto *gameover }; ¥Ð¥ê¥¢¤Ç¤Ï¤Ê¤¤¾ì¹ç*gameover
else { cf=0 : ct=3*60 };3É÷вá¸åºÆ¤Ó½Ð¤Æ¤¯¤ë
}
;¿·¤·¤¤ºÂɸ=aline(¸½ºß¤ÎºÂɸ,Äɤ¤¤«¤±¤ëºÂɸ)
cx=alien(cx,mx)
cy=alien(cy,my)
gsel 0
pos cx-fs/2,cy-fs/2
color 255,255,255:gmode 4,0,0,256 ;²èÁüÇطʤÎÆ©ÌÀ²½
color
mes "¢¥"
}
;¥¢¥¤¥Æ¥à¤Î½Ð¸½
if frame=60*5 : itf=1
if itf { ;¥¢¥¤¥Æ¥à¤¬Â¸ºß
itx+=itsp
if itx>wx : itf=0 ;²èÌ̳°¤Ë½Ð¤¿¤é¾Ã¤¨¤ë
dist=abs(itx-mx)+abs(ity-my) ; Ũ¤È¤Îµ÷Î¥
if dist<(ms*2) : itm=10*60 : itf=0 ;10Éô֥Хꥢ¤Ç¤¤ë
pos itx-fs/2,ity-fs/2
mes "¡©"
}
if ct==0 {
cf=1
}else{
if ct>0 {
ct--
}
}
;¥¿¥¤¥Þ¡¼
color 0,0,0
pos 0,580:font"MS¡¡¥´¥·¥Ã¥¯",20:mes "TIME:"+(counter/60)
redraw 1
await 1000/60
if countermax<=counter{
gosub *gameover
}
counter++
frame++
goto *start
*life
msg=""
repeat fight
msg+="¡ü"
loop
font MSGOTHIC,30,1
color 255,0,0:pos 330,30-30:mes msg
font MSGOTHIC,50
return
*gameover
color 0,150,150:boxf 0,0,400,600
font msgothic,50
color 0,0,0:pos 100,300
mes "GAME OVER"
redraw 1
stop
;¢¥
#defcfunc alien int value1, int value2
csp=2 ; Ũ¤Î°ÜÆ°¥¹¥Ô¡¼¥É
res=limit( value2-value1, -csp, csp )
return value1+res