;
;	y炢J[\z
;
;	ҁFҊ_@J
;
;
;	@
;
;	Ԃlp`FX^[g
;	lp`FS[
;
;	Ԃlp`ɃJ[\ƃQ[X^[g܂B
;	J[\FȊOɂԂȂ悤
;	F̃S[ڎw܂傤I
;
;	GNXgXe[Wł́AꖡႤ[
;	Q[vCł܂I
;

#include "hgimg3.as"
hgini
dmmini


onexit goto *tsuji
//y//
dmmload "bgm_maoudamashii_cyber07.ogg",1
dmmloop 1,0

dmmload "se_maoudamashii_onepoint15.wav",2
dmmload "se_maoudamashii_onepoint14.wav",3

//摜//
celload "ka01.png",1
celload "ka02.png",2
celload "ka03.png",3
celload "ka04.png",4
celload "ka05.png",5

celload "ka06.png",6
celload "ka07.png",7
celload "ka08.png",8
celload "ka09.png",9

celload "ka11.png",11
celload "ka12.png",12
celload "ka13.png",13
celload "ka14.png",14
celload "ka15.png",15

celload "ka17.png",17

celload "ex01.png",30
celload "ex02.png",31
celload "ex03.png",32
celload "ex04.png",33
celload "ex05.png",34
celload "ex06.png",35
celload "ex07.png",36
celload "ex08.png",37


celload "ugoku1.png",100
celload "ugoku2.png",101
celload "ugoku3.png",102
celload "ugoku4.png",103
celload "ugoku5.png",104

celload "ele1.png",110
celload "ele2.png",111

celload "takogamisama_l.png",200
celload "takogamisama_r.png",201

celload "l_139.jpg",300
celload "taitle1.png",301
celload "syber1.png",302

celload "1245.png",400	//
celload "1245_l.png",401

celload "raito1.png",500
celdiv 500,,,50,50

celload "ka00.png",600

celload "mite01.png",701
celload "mite02.png",702
celload "mite03.png",703
celload "mite04.png",704
celload "mite05.png",705
celload "mite06.png",706
celload "mite07.png",707
celload "mite08.png",708
celload "mite09.png",709
celload "mite10.png",710
celload "mite11.png",711
celload "mite12.png",712
celload "mite13.png",713
celload "mite14.png",714
celload "mite15.png",715
celload "mite16.png",716

//EBhETCY//
screen 0,1200,700

//^Cg//
title "炢J[\"

//l//
hu=5



lmax=100
ttmax=100

dim itx,10
dim ity,10
dim ttx,10
dim tty,10
dim lx,lmax
dim ly,lmax

repeat 10
itx(cnt)=0
ity(cnt)=0
loop

repeat ttmax
ttx1(cnt)=0
tty1(cnt)=0
ttx2(cnt)=0
tty2(cnt)=0
loop

randomize

repeat lmax
lx(cnt)=rnd(120)*10
ly(cnt)=700+(rnd(100)*10)
loop

thp=500
ahp1=200
ahp2=200
tttx=350
ttty=-200
bimu=0

mojiy1=10
mojiy2=10
mojiugoke=0

tkesu=0

////////////////////////////////////////////////////////////////////////////////////////////////////

notesel score

exist "score.txt"

if strsize=-1 :notesave "score.txt"

noteload "score.txt",-1

if strsize=0 {
	sk1=1000
	sk2=1000
	sk3=1000
	sk4=1000
	sk5=1000
	sk6=1000
	sk7=1000
	sk8=1000
	sk9=1000
	sk10=1000
	sk11=1000
	sk12=1000
	sk13=1000
	sk14=1000
	sk15=1000
	sk16=0
	hosi1=0
	hosi2=0
	hosi3=0
	hosi4=0
	hosi5=0
	hosi6=0
	hosi7=0
	hosi8=0
	hosi9=0
	hosi10=0
	hosi11=0
	hosi12=0
	hosi13=0
	hosi14=0
	hosi15=0
	hosi16=0
}
else {
	noteget sk1_n,0
	noteget sk2_n,1
	noteget sk3_n,2
	noteget sk4_n,3
	noteget sk5_n,4
	noteget sk6_n,5
	noteget sk7_n,6
	noteget sk8_n,7
	noteget sk9_n,8
	noteget sk10_n,9
	noteget sk11_n,10
	noteget sk12_n,11
	noteget sk13_n,12
	noteget sk14_n,13
	noteget sk15_n,14
	noteget sk16_n,15
	noteget hosi1_n,16
	noteget hosi2_n,17
	noteget hosi3_n,18
	noteget hosi4_n,19
	noteget hosi5_n,20
	noteget hosi6_n,21
	noteget hosi7_n,22
	noteget hosi8_n,23
	noteget hosi9_n,24
	noteget hosi10_n,25
	noteget hosi11_n,26
	noteget hosi12_n,27
	noteget hosi13_n,28
	noteget hosi14_n,29
	noteget hosi15_n,30
	noteget hosi16_n,31
	
	sk1=int(sk1_n)
	sk2=int(sk2_n)
	sk3=int(sk3_n)
	sk4=int(sk4_n)
	sk5=int(sk5_n)
	sk6=int(sk6_n)
	sk7=int(sk7_n)
	sk8=int(sk8_n)
	sk9=int(sk9_n)
	sk10=int(sk10_n)
	sk11=int(sk11_n)
	sk12=int(sk12_n)
	sk13=int(sk13_n)
	sk14=int(sk14_n)
	sk15=int(sk15_n)
	sk16=int(sk16_n)
	hosi1=int(hosi1_n)
	hosi2=int(hosi2_n)
	hosi3=int(hosi3_n)
	hosi4=int(hosi4_n)
	hosi5=int(hosi5_n)
	hosi6=int(hosi6_n)
	hosi7=int(hosi7_n)
	hosi8=int(hosi8_n)
	hosi9=int(hosi9_n)
	hosi10=int(hosi10_n)
	hosi11=int(hosi11_n)
	hosi12=int(hosi12_n)
	hosi13=int(hosi13_n)
	hosi14=int(hosi14_n)
	hosi15=int(hosi15_n)
	hosi16=int(hosi16_n)
}


tdx=1
tdy=1

	////////////////////////////////////////

*menu
	
	dmmplay 1
	wait 50
	
	repeat
	redraw 0
	color 255,255,255 : boxf
	color 0,0,0
	
	pos 0,0 : celput 300,,0.29,0.32
	
	gosub *kaku
	
	getkey ka1,1
	
	////////////////////////////////////////
	
	color cr,0,cb : boxf 150,en1,180,600
	color cr,0,cb : boxf 210,en2,240,600
	color cr,0,cb : boxf 270,en3,300,600
	color cr,0,cb : boxf 330,en4,360,600
	color cr,0,cb : boxf 390,en5,420,600
	
	color cr,0,cb : boxf 780,en6,810,600
	color cr,0,cb : boxf 840,en7,870,600
	color cr,0,cb : boxf 900,en8,930,600
	color cr,0,cb : boxf 960,en9,990,600
	color cr,0,cb : boxf 1020,en10,1050,600
	
	if (ens=0)||(ens=4)||(ens=8)||(ens=12)||(ens=16)||(ens=20)||(ens=24)||(ens=28)||(ens=32)||(ens=36)||(ens=40){
	en1=rnd(300)+300
	en2=rnd(350)+250
	en3=rnd(400)+200
	en4=rnd(450)+150
	en5=rnd(500)+100
	en6=rnd(400)+100
	en7=rnd(450)+150
	en8=rnd(400)+200
	en9=rnd(350)+250
	en10=rnd(300)+300
	}
		
	ens=ens+1
	if ens>=41 : ens=0
	
	if crp=0 : if cr>=250 : crp=1
	if crp=1 : if cr<=1 : crp=0
	
	if crp=0 : cr=cr+1 : cb=cb-1
	if crp=1 : cr=cr-1 : cb=cb+1
	
	////////////////////////////////////////
	
	color 0,0,100 : boxf 480,255,730,325
	color 0,0,200 : boxf 475,250,725,320
	if (mousex>=475&&mousex<735)&&(mousey>=250&&mousey<330) : if ka1=1 : gosub *select
	
	color 0,0,100 : boxf 480,455,730,525
	color 0,0,200 : boxf 475,450,725,520
	if (mousex>=475&&mousex<735)&&(mousey>=445&&mousey<530) : if ka1=1 : end
	
	color 250,80,0 : font "MS SVbN",50 : pos 553,263 : mes "Start"
	color 250,80,0 : font "MS SVbN",50 : pos 553,468 : mes "Exit"
	
	color 250,250,0 : font "MS SVbN",50 : pos 550,260 : mes "Start"
	color 250,250,0 : font "MS SVbN",50 : pos 550,465 : mes "Exit"
	
	pos 50,50 : gmode 2 : celput 301,,1,1
	
	redraw 1
	await 2
	loop
	
	////////////////////////////////////////

	
*select
	
	wait 15
	
	ste=0
	s=0
	cl=0
	time=0
	
	kioku=1
	
	ens=0
	crp=0
	
	zidori=0
	
	
	///////////////////////////////////////
	notesel score
	
	noteload "score.txt",-1
	
	noteadd ""+sk1,0,1
	noteadd ""+sk2,1,1
	noteadd ""+sk3,2,1
	noteadd ""+sk4,3,1
	noteadd ""+sk5,4,1
	noteadd ""+sk6,5,1
	noteadd ""+sk7,6,1
	noteadd ""+sk8,7,1
	noteadd ""+sk9,8,1
	noteadd ""+sk10,9,1
	noteadd ""+sk11,10,1
	noteadd ""+sk12,11,1
	noteadd ""+sk13,12,1
	noteadd ""+sk14,13,1
	noteadd ""+sk15,14,1
	noteadd ""+sk16,15,1
	
	noteadd ""+hosi1,16,1
	noteadd ""+hosi2,17,1
	noteadd ""+hosi3,18,1
	noteadd ""+hosi4,19,1
	noteadd ""+hosi5,20,1
	noteadd ""+hosi6,21,1
	noteadd ""+hosi7,22,1
	noteadd ""+hosi8,23,1
	noteadd ""+hosi9,24,1
	noteadd ""+hosi10,25,1
	noteadd ""+hosi11,26,1
	noteadd ""+hosi12,27,1
	noteadd ""+hosi13,28,1
	noteadd ""+hosi14,29,1
	noteadd ""+hosi15,30,1
	noteadd ""+hosi16,31,1
	
	notesave "score.txt"
	
	
	
	///////////////////////////////////////
	
	repeat
	redraw 0
	color 255,255,255 : boxf
	color 0,0,0
	
	pos 0,0 : celput 300,,0.29,0.32
	
	
	////////////////////////////////////////
	
	color cr,0,cb : boxf 150,en1,180,600
	color cr,0,cb : boxf 210,en2,240,600
	color cr,0,cb : boxf 270,en3,300,600
	color cr,0,cb : boxf 330,en4,360,600
	color cr,0,cb : boxf 390,en5,420,600
	
	color cr,0,cb : boxf 780,en6,810,600
	color cr,0,cb : boxf 840,en7,870,600
	color cr,0,cb : boxf 900,en8,930,600
	color cr,0,cb : boxf 960,en9,990,600
	color cr,0,cb : boxf 1020,en10,1050,600
	
	if (ens=0)||(ens=4)||(ens=8)||(ens=12)||(ens=16)||(ens=20)||(ens=24)||(ens=28)||(ens=32)||(ens=36)||(ens=40){
	en1=rnd(300)+300
	en2=rnd(350)+250
	en3=rnd(400)+200
	en4=rnd(450)+150
	en5=rnd(500)+100
	en6=rnd(400)+100
	en7=rnd(450)+150
	en8=rnd(400)+200
	en9=rnd(350)+250
	en10=rnd(300)+300
	}
		
	ens=ens+1
	if ens>=41 : ens=0
	
	if crp=0 : if cr>=250 : crp=1
	if crp=1 : if cr<=1 : crp=0
	
	if crp=0 : cr=cr+1 : cb=cb-1
	if crp=1 : cr=cr-1 : cb=cb+1
	
	
	
	
	
	////////////////////////////////////////
	
	//̐
	
	pos 110,150 : color 0,0,0 : gmode 4,,,200 : celput 302,,0.45,2.4
	
	if lvl!=3 : color 255,255,0 : font "MS SVbN",30 : pos 130,250 : mes "- őL^ -"
	if lvl=3  : color 255,255,0 : font "MS SVbN",30 : pos 130,250 : mes "- ŒL^ -"
	color 255,255,0 : font "MS SVbN",30 : pos 130,370 : mes "- N -"
	color 255,105,0
	font "MS SVbN",30 : pos 130,420 : mes ""
	font "MS SVbN",30 : pos 130,460 : mes ""
	font "MS SVbN",30 : pos 130,500 : mes ""
	color 255,255,0
	pos 130,420 : mes ""
	pos 130,460 : mes ""
	pos 130,500 : mes ""
	color 255,255,0 : font "MS SVbN",30 : pos 380,320 : mes "b"
	
	//E̐
	
	pos 730,150 : color 0,0,0 : gmode 4,,,200 : celput 302,,0.45,2.4
	if lvl!=3{
	color 255,255,0 : font "MS SVbN",30 : pos 750,250 : mes "- Փx -"
	color 255,255,0 : font "MS SVbN",30 : pos 750,370 : mes "- }bv -"
	}
	if lvl=3{
	color 255,255,0 : font "MS SVbN",30 : pos 750,250 : mes "- [ -"
	color 255,255,0 : font "MS SVbN",30 : pos 750,370 : mes "- }bv -"

	}
	
	////////////////////////////////////////
	
	
	gosub *kaku
	
	getkey ka2,1
	
	pos 425,50 : gmode 2 :  celput 401,,lll,lll
	if (mousex>=450&&mousex<550)&&(mousey>=50&&mousey<120) : yl=1 : yr=0 : if ka2=1 : lvl=lvl-1
	
	pos 710,50 : gmode 2 : celput 400,,rrr,rrr
	if (mousex>=700&&mousex<800)&&(mousey>=50&&mousey<120) : yr=1 : yl=0 : if ka2=1 : lvl=lvl+1
	
	if yl=1 : yr=0 : lll=0.4 : rrr=0.3
	if yr=1 : yl=0 : lll=0.3 : rrr=0.4
	if yr=0 : if yl=0 : lll=0.3 : rrr=0.3
	
	if lvl>=4 : lvl=0
	if lvl<0  : lvl=3
	if ka2=1 : wait 10
	
	////////////////////////////////////////
	
	color 100,0,100 : boxf 1005,605,1105,655
	color 200,0,200 : boxf 1000,600,1100,650
	if (mousex>=1000&&mousex<1100)&&(mousey>=620&&mousey<670) : if ka2=1 : gosub *menu
	color 255,255,0 : font "MS SVbN",30 : pos 1020,610 : mes "߂"
	
	////////////////////////////////////////
	
	color 0,200,0 : boxf 105,55,305,105
	color 0,250,0 : boxf 100,50,300,100
	if (mousex>=100&&mousex<300)&&(mousey>=50&&mousey<100) : setu=100 : if ka2=1 : ste=100 : gosub *main
	
	color 255,120,0 : font "MS SVbN",35
	pos 130,60 : mes ""
	
	////////////////////////////////////////
	
	gosub *setumei
	
	if lvl=0{
	
	color 0,100,0 : font "MS SVbN",40 : pos 532,72 : mes "xP"
	color 0,200,0 : font "MS SVbN",40 : pos 530,70 : mes "xP"
		
	color 0,200,0 : boxf 500,150,700,200
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : if ka2=1 : ste=1 : gosub *main
	
	color 0,200,0 : boxf 500,250,700,300
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : if ka2=1 : ste=2 : gosub *main
	
	color 0,200,0 : boxf 500,350,700,400
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : if ka2=1 : ste=3 : gosub *main
	
	color 0,200,0 : boxf 500,450,700,500
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : if ka2=1 : ste=4 : gosub *main
	
	color 0,200,0 : boxf 500,550,700,600
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : if ka2=1 : ste=5 : gosub *main
	
	color 255,255,0 : font "MS SVbN",35 : pos 800,280
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : setu=1
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : setu=2
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : setu=3
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : setu=4
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : setu=5
	
	color 255,255,0 : font "MS SVbN",35
	pos 530,160 : mes "Stage 01"
	pos 530,260 : mes "Stage 02"
	pos 530,360 : mes "Stage 03"
	pos 530,460 : mes "Stage 04"
	pos 530,560 : mes "Stage 05"
	
	
	color 255,105,0 : font "MS SVbN",35
	
	if hosi1=0 : pos 480,120 : mes ""
	if hosi1=1 : pos 480,120 : mes ""
	if hosi1=2 : pos 480,120 : mes ""
	if hosi1=3 : pos 480,120 : mes ""
	
	if hosi2=0 : pos 480,220 : mes ""
	if hosi2=1 : pos 480,220 : mes ""
	if hosi2=2 : pos 480,220 : mes ""
	if hosi2=3 : pos 480,220 : mes ""
	
	if lvl!=3{
	if hosi3=0 : pos 480,320 : mes ""
	if hosi3=1 : pos 480,320 : mes ""
	if hosi3=2 : pos 480,320 : mes ""
	if hosi3=3 : pos 480,320 : mes ""

	if hosi4=0 : pos 480,420 : mes ""
	if hosi4=1 : pos 480,420 : mes ""
	if hosi4=2 : pos 480,420 : mes ""
	if hosi4=3 : pos 480,420 : mes ""
	
	if hosi5=0 : pos 480,520 : mes ""
	if hosi5=1 : pos 480,520 : mes ""
	if hosi5=2 : pos 480,520 : mes ""
	if hosi5=3 : pos 480,520 : mes ""
	
	}
	}
	
	
	////////////////////////////////////////
	
	if lvl=1{
	
	color 0,0,100 : font "MS SVbN",40 : pos 532,72 : mes "xQ"
	color 0,0,200 : font "MS SVbN",40 : pos 530,70 : mes "xQ"
	
		
	color 0,0,200 : boxf 500,150,700,200
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : if ka2=1 : ste=6 : gosub *main
	
	color 0,0,200 : boxf 500,250,700,300
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : if ka2=1 : ste=7 : gosub *main
	
	color 0,0,200 : boxf 500,350,700,400
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : if ka2=1 : ste=8 : gosub *main
	
	color 0,0,200 : boxf 500,450,700,500
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : if ka2=1 : ste=10 : gosub *main
	
	color 0,0,200 : boxf 500,550,700,600
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : if ka2=1 : ste=9 : gosub *main
	
	color 255,255,0 : font "MS SVbN",35 : pos 800,280
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : setu=6
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : setu=7
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : setu=8
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : setu=9
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : setu=10
	
	color 255,255,0 : font "MS SVbN",35
	pos 530,160 : mes "Stage 06"
	pos 530,260 : mes "Stage 07"
	pos 530,360 : mes "Stage 08"
	pos 530,460 : mes "Stage 09"
	pos 530,560 : mes "Stage 10"
	
	///
	
	color 255,105,0 : font "MS SVbN",35
	
	if hosi6=0 : pos 480,120 : mes ""
	if hosi6=1 : pos 480,120 : mes ""
	if hosi6=2 : pos 480,120 : mes ""
	if hosi6=3 : pos 480,120 : mes ""
	
	if hosi7=0 : pos 480,220 : mes ""
	if hosi7=1 : pos 480,220 : mes ""
	if hosi7=2 : pos 480,220 : mes ""
	if hosi7=3 : pos 480,220 : mes ""
	
	if hosi8=0 : pos 480,320 : mes ""
	if hosi8=1 : pos 480,320 : mes ""
	if hosi8=2 : pos 480,320 : mes ""
	if hosi8=3 : pos 480,320 : mes ""
	
	if hosi9=0 : pos 480,420 : mes ""
	if hosi9=1 : pos 480,420 : mes ""
	if hosi9=2 : pos 480,420 : mes ""
	if hosi9=3 : pos 480,420 : mes ""
	
	if hosi10=0 : pos 480,520 : mes ""
	if hosi10=1 : pos 480,520 : mes ""
	if hosi10=2 : pos 480,520 : mes ""
	if hosi10=3 : pos 480,520 : mes ""
	}
	
	////////////////////////////////////////
	
	if lvl=2{
	
	color 100,0,100 : font "MS SVbN",40 : pos 532,72 : mes "xR"
	color 200,0,200 : font "MS SVbN",40 : pos 530,70 : mes "xR"
	
		
	color 200,0,200 : boxf 500,150,700,200
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : if ka2=1 : ste=11 : gosub *main
	
	color 200,0,200 : boxf 500,250,700,300
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : if ka2=1 : ste=12 : gosub *main
	
	color 200,0,200 : boxf 500,350,700,400
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : if ka2=1 : ste=13 : gosub *main
	
	color 200,0,200 : boxf 500,450,700,500
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : if ka2=1 : ste=14 : gosub *main
	
	color 200,0,200 : boxf 500,550,700,600
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : if ka2=1 : ste=15 : gosub *main
	
	color 255,255,0 : font "MS SVbN",35 : pos 800,280
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : setu=11
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : setu=12
	if (mousex>=500&&mousex<700)&&(mousey>=350&&mousey<400) : setu=13
	if (mousex>=500&&mousex<700)&&(mousey>=450&&mousey<500) : setu=14
	if (mousex>=500&&mousex<700)&&(mousey>=550&&mousey<600) : setu=15
	
	color 255,255,0 : font "MS SVbN",35
	pos 530,160 : mes "Stage 11"
	pos 530,260 : mes "Stage 12"
	pos 530,360 : mes "Stage 13"
	pos 530,460 : mes "Stage 14"
	pos 530,560 : mes "Stage 15"
	
	///
	
	color 255,105,0 : font "MS SVbN",35
	
	if hosi11=0 : pos 480,120 : mes ""
	if hosi11=1 : pos 480,120 : mes ""
	if hosi11=2 : pos 480,120 : mes ""
	if hosi11=3 : pos 480,120 : mes ""
	
	if hosi12=0 : pos 480,220 : mes ""
	if hosi12=1 : pos 480,220 : mes ""
	if hosi12=2 : pos 480,220 : mes ""
	if hosi12=3 : pos 480,220 : mes ""
	
	if hosi13=0 : pos 480,320 : mes ""
	if hosi13=1 : pos 480,320 : mes ""
	if hosi13=2 : pos 480,320 : mes ""
	if hosi13=3 : pos 480,320 : mes ""
	
	if hosi14=0 : pos 480,420 : mes ""
	if hosi14=1 : pos 480,420 : mes ""
	if hosi14=2 : pos 480,420 : mes ""
	if hosi14=3 : pos 480,420 : mes ""
	
	if hosi15=0 : pos 480,520 : mes ""
	if hosi15=1 : pos 480,520 : mes ""
	if hosi15=2 : pos 480,520 : mes ""
	if hosi15=3 : pos 480,520 : mes ""
	}
	
	////////////////////////////////////////
	
	if lvl=3{
	
	color 0,0,0 : font "MS SVbN",40 : pos 522,72 : mes "GNXg"
	color 50,50,50 : font "MS SVbN",40 : pos 520,70 : mes "GNXg"
		
	color 100,100,100 : boxf 500,150,700,200
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : if ka2=1 : ste=16 : gosub *main
	
	/*
	color 200,0,200 : boxf 500,250,700,300
	if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : if ka2=1 : ste=17 : gosub *main
	*/
	
	color 255,255,0 : font "MS SVbN",35
	pos 505,160 : mes "[ՁI"
	
	if (mousex>=500&&mousex<700)&&(mousey>=150&&mousey<200) : setu=16
	;if (mousex>=500&&mousex<700)&&(mousey>=250&&mousey<300) : setu=17
	}
	
	color 255,255,0
	pos 480,120 : mes ""
	if lvl!=3{
	pos 480,220 : mes ""
	pos 480,320 : mes ""
	pos 480,420 : mes ""
	pos 480,520 : mes ""
	}
	
	redraw 1
	await 2
	loop
	
	////////////////////////////////////////

*setumei
	
	if (setu!=16)&(setu!=17){
	if setu=1{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk1
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "7`10b"
		pos 280,460 : mes "4`6b"
		pos 280,500 : mes "0`3b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 01"
	
		color 255,200,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 701,,0.2,0.2
	}
	
	if setu=2{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk2
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "9`12b"
		pos 280,460 : mes "5`8b"
		pos 280,500 : mes "0`4b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 02"
	
		color 255,200,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 702,,0.2,0.2
	}
	
	if setu=3{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk3
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "16`20b"
		pos 280,460 : mes "8`15b"
		pos 280,500 : mes "0`7b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 03"
	
		color 255,200,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 703,,0.2,0.2
	}
	
	if setu=4{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk4
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "7`10b"
		pos 280,460 : mes "4`6b"
		pos 280,500 : mes "0`3b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 04"
	
		color 255,200,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 704,,0.2,0.2
	}
	
	if setu=5{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk5
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "30`40b"
		pos 280,460 : mes "20`29b"
		pos 280,500 : mes "0`19b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 05"
	
		color 255,150,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 705,,0.2,0.2
	}
	
	if setu=6{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk6
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "11`15b"
		pos 280,460 : mes "6`10b"
		pos 280,500 : mes "0`5b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 06"
	
		color 255,150,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 706,,0.2,0.2
	}
	
	if setu=7{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk7
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "16`20b"
		pos 280,460 : mes "11`15b"
		pos 280,500 : mes "0`10b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 07"
	
		color 255,150,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 707,,0.2,0.2
	}
	
	if setu=8{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk8
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "11`15b"
		pos 280,460 : mes "6`10b"
		pos 280,500 : mes "0`5b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 08"
	
		color 255,150,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 708,,0.2,0.2
	}
	
	if setu=9{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk9
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "26`30b"
		pos 280,460 : mes "21`25b"
		pos 280,500 : mes "0`20b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 09"
	
		color 255,100,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 709,,0.2,0.2
	}
	
	if setu=10{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk10
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "11`15b"
		pos 280,460 : mes "6`10b"
		pos 280,500 : mes "0`5b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 10"
	
		color 255,100,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 710,,0.2,0.2
	}
	
	if setu=11{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk11
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "30`40b"
		pos 280,460 : mes "20`29b"
		pos 280,500 : mes "0`19b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 11"
	
		color 255,50,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 711,,0.2,0.2
	}
	
	if setu=12{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk12
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "60`70b"
		pos 280,460 : mes "50`59b"
		pos 280,500 : mes "0`49b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 12"
	
		color 255,50,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 712,,0.2,0.2
	}
	
	if setu=13{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk13
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "50`60b"
		pos 280,460 : mes "40`49b"
		pos 280,500 : mes "0`39b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 13"
	
		color 255,50,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 713,,0.2,0.2
	}
	
	if setu=14{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk14
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "60`30b"
		pos 280,460 : mes "20`29b"
		pos 280,500 : mes "0`19b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 14"
	
		color 255,50,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 714,,0.2,0.2
	}
	
	if setu=15{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk15
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "80`100b"
		pos 280,460 : mes "60`79b"
		pos 280,500 : mes "0`59b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 15"
	
		color 255,0,0 : font "MS SVbN",60
		pos 750,290 : mes ""
	
		pos 790,405 : celput 715,,0.2,0.2
	}
	}
	
	if setu=16{
		color 255,255,0 : font "MS SVbN",60
		pos 200,290 : mes sk16
		
		color 255,255,0 : font "MS SVbN",30
		pos 280,420 : mes "60`80b"
		pos 280,460 : mes "81`100b"
		pos 280,500 : mes "101`b"
	
		color 255,50,0 : font "MS SVbN",45
		pos 215,175 : mes "Stage 16"
	
		pos 790,405 : celput 716,,0.2,0.2
	
		color 255,255,0 : font "MS SVbN",35 : pos 800,280
		color 255,255,0 : font "MS SVbN",25 : pos 750,300 : mes "ÂȂ镔"
		color 255,255,0 : font "MS SVbN",25 : pos 750,330 : mes "瓦ÂI"
	}
	
	return

*main
	
	masi=0
	
	time=0
	s=0
	
	uy1=0
	uy2=300
	uy3=600
	
	ux1=1000
	ux2=700
	ux3=200
	
	ux4=250
	ux5=500
	ux6=750
	ux7=1000
	
	uy91=500
	uy92=100
	uy93=300
	uy94=100
	uy95=500
	
	stx9=850
	sty9=111
	stx92=850
	sty92=111
	stx93=550
	sty93=261
	stx94=480
	sty94=261
	stx95=190
	sty95=400
	stx96=110
	sty96=411
	st9st9=0
	
	st11x=1200
	st112y=142
	st113y=750
	go11=0
	go112=0
	go113=0
	
	
	tx=100
	ty=100
	
	ame1=0
	ame2=80
	ame3=160
	ame4=240
	ame5=320
	ame6=400
	
	if ste=14{
	
	ame1=70
	ame2=140
	ame3=210
	ame4=280
	ame5=350
	ame6=420
	ame7=490
	ame8=560
	ame9=630
	ame10=700
	
	ame11=70
	ame12=140
	ame13=210
	ame14=280
	ame15=350
	ame16=420
	ame17=490
	ame18=560
	ame19=630
	ame20=700
	
	
	amer1=100
	amer2=150
	amer3=200
	amer4=250
	amer5=300
	amer6=350
	amer7=400
	amer8=450
	amer9=500
	amer10=550
	
	amer11=125
	amer12=175
	amer13=225
	amer14=275
	amer15=325
	amer16=375
	amer17=425
	amer18=475
	amer19=525
	amer20=575
	
	}
	
	hayo=0
	hayoike=0
	ey1=300
	ey2=500
	amesto=0
	hasamu=0
	samisto=0
	sami=0
	
	asi1x=0
	asi2x=650
	
	mojiy1=10
	mojiy2=10
	mojiugoke=0
	
	repeat
	redraw 0
	color 255,255,255 : boxf
	color 0,0,0
	
	if zidori=0 : if (s=1)||(ste=100) : gosub *zikanmae
	if zidori=1 : if (s=1)||(ste=100) : gosub *zikan
	stick key4,0
	if key4&128 : gosub *select
	getkey masi,18
	
	//Xe[W//
	
	if ste=1 : gosub *sss1
	if ste=2 : gosub *sss2
	if ste=3 : gosub *sss3
	if ste=4 : gosub *sss4
	if ste=5 : gosub *sss5
	if ste=6 : gosub *sss6
	if ste=7 : gosub *sss7
	if ste=8 : gosub *sss8
	if ste=9 : gosub *sss9
	if ste=10 : gosub *sss10
	if ste=11 : gosub *sss11
	if ste=12 : gosub *sss12
	if ste=13 : gosub *sss13
	if ste=14 : gosub *sss14
	if ste=15 : gosub *sss15
	if ste=16 : gosub *sss16
	;if ste=17 : gosub *sss17
	if ste=100 : gosub *tuto
	
	////////////////////////////////////////
	
	
	if ste!=100 : pget mousex,mousey : if@key4&256 : if (ginfo_r=250) : s=1
	
	//X^[g
	if masi=0 : if s=1 : pget mousex,mousey : if (ginfo_b=250) : s=0 : gosub *clear
	//S[
	if s=1 : pget mousex,mousey : if (ginfo_r!=250)&&(ginfo_g!=50)&&(ginfo_b!=200)&&((ginfo_r!=255)&&(ginfo_g!=255)&&(ginfo_b!=255)) : gosub *noc
	if ste=13 : if s=1 : pget mousex+600,mousey : if (ginfo_r!=250)&&(ginfo_g!=50)&&(ginfo_b!=200)&&((ginfo_r!=255)&&(ginfo_g!=255)&&(ginfo_b!=255)) : gosub *noc
	
	if s=1{
	if mousex<=0    : gosub *noc
	if mousex>=1200 : gosub *noc
	if mousey<=0    : gosub *noc
	if mousey>=700  : gosub *noc
	if masi=1 : gosub *noc
	}
	
	if s=1 : if ste=13 : if mousex>=600 : gosub *noc
	if ste=16 : s=1
	
	
	gosub *kakunin
	gosub *kaku
	
	redraw 1
	await 2
	loop
	
	////////////////////////////////////////
	
*tuto
	
	pos 0,0 : gmode 2 : celput 600,,1,1
	color 250,0,0 : boxf 500,68,704,168
	color 0,0,250 : boxf 500,500,704,600 
	
	if (time>=0)&&(time<4){
		pos 220,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,1,1
		pos 250,180 : mes "炢J[\ւ悤I"	
	}
	
	if (time>=5)&&(time<9){
		pos 220,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,1,1
		pos 250,180 : mes "ł͊{Iȑ܂B"	
	}
	
	if (time>=10)&&(time<15){
		pos 220,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,1,1
		pos 250,180 : mes "ԂX^[gAǂɐG炸"
		pos 250,220 : mes "ɓƃS[łBꂾłB"
	}
	
	if (time>=16)&&(time<19){
		pos 220,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,1,1
		pos 250,180 : mes "ł͎ۂɃvCĂ݂܂傤B"
	}
	
	if (time>=20)&&(time<24){
		pos 20,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,0.6,2.5
		pos 50,180 : mes "J[\ԐF"
		pos 50,220 : mes "͈͂ɓĂB"
	}
	
	if (time>=25)&&(time<28){
		pos 20,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,0.6,2.5
		pos 50,180 : mes "͈̔͂ŃNbN"
		pos 50,220 : mes "ƃX^[głI"
		pget mousex,mousey : if@key4&256 : if (ginfo_r=250) : s=1
	}
	
	if (time>=29)&&(time<33){
		pos 20,100 : color 0,0,0 : gmode 4,,,200 : celput 302,,0.6,2.5
		pos 50,180 : mes "ł́A"
		pos 50,220 : mes "ǂɓȂ悤"
		pos 50,260 : mes "Fڎw܂傤I"
	}
	
	return
	
*sss1
	
	color 250,0,0 : boxf 400,0,500,100 
	color 0,0,250 : boxf 700,600,800,700
	pos 0,0 : gmode 2 : celput 1,,1,1
	
	return
	
*sss2
	
	color 250,0,0 : boxf 800,0,900,100 
	color 0,0,250 : boxf 200,600,300,700
	pos 0,0 : gmode 2 : celput 2,,1,1
	
	return
	
*sss3
	
	color 250,0,0 : boxf 1000,0,1100,100 
	color 0,0,250 : boxf 300,300,400,400
	pos 0,0 : gmode 2 : celput 3,,1,1
	
	return
	
*sss4
	
	color 250,0,0 : boxf 1097,250,1200,450 
	color 0,0,250 : boxf 0,250,101,450
	pos 0,0 : gmode 2 : celput 4,,1,1
	
	return
	
*sss5
	
	color 250,0,0 : boxf 0,0,103,200 
	color 0,0,250 : boxf 1097,590,1200,700
	pos 0,0 : gmode 2 : celput 5,,1,1
	
	return
	
*sss6
	
	color 250,0,0 : boxf 1092,250,1200,450 
	color 0,0,250 : boxf 0,250,107,450
	pos 0,0 : gmode 2 : celput 6,,1,1
	
	pos 201,uy1 : gmode 2 : celput 100,,0.5,1
	pos 550,uy2 : gmode 2 : celput 100,,0.5,1
	pos 900,uy3 : gmode 2 : celput 100,,0.5,1
	
	if uy1up=0 : uy1=uy1+10
	if uy1up=1 : uy1=uy1-10
	if uy1>=520 : uy1up=1
	if uy1<=0 : uy1up=0
	
	if uy2up=0 : uy2=uy2+10
	if uy2up=1 : uy2=uy2-10
	if uy2>=520 : uy2up=1
	if uy2<=0 : uy2up=0
	
	if uy3up=0 : uy3=uy3+10
	if uy3up=1 : uy3=uy3-10
	if uy3>=520 : uy3up=1
	if uy3<=0 : uy3up=0
	
	return
	
*sss7
	
	color 250,0,0 : boxf 1000,600,1100,700 
	color 0,0,250 : boxf 100,0,200,100
	pos 0,0 : gmode 2 : celput 7,,1,1
	
	pos ux1,100 : gmode 2 : celput 100,,0.47,0.47
	pos ux2,300 : gmode 2 : celput 100,,0.5,0.5
	pos ux3,500 : gmode 2 : celput 100,,0.5,0.5
	
	if ux1up=0 : ux1=ux1+8
	if ux1up=1 : ux1=ux1-8
	if ux1>=1010 : ux1up=1
	if ux1<=550 : ux1up=0
	
	if ux2up=0 : ux2=ux2+8
	if ux2up=1 : ux2=ux2-8
	if ux2>=700 : ux2up=1
	if ux2<=390 : ux2up=0
	
	if ux3up=0 : ux3=ux3+8
	if ux3up=1 : ux3=ux3-8
	if ux3>=550 : ux3up=1
	if ux3<=100 : ux3up=0
	
	return
	
*sss8
	
	color 250,0,0 : boxf 1100,0,1200,700 
	color 0,0,250 : boxf 0,0,100,700
	pos 0,0 : gmode 2 : celput 8,,1,1
	
	pos ux4,0 : gmode 2 : celput 100,,0.2,1.9
	pos ux5,350 : gmode 2 : celput 100,,0.2,1.9
	
	pos ux6,0 : gmode 2 : celput 100,,0.2,1.9
	pos ux7,350 : gmode 2 : celput 100,,0.2,1.9
	
	if ux4up=0 : ux4=ux4+6
	if ux4up=1 : ux4=50
	if ux4>=1050 : ux4up=1 : ux4=80
	if ux4up=1 : if ux4>=50 : ux4up=0
	
	if ux5up=0 : ux5=ux5+6
	if ux5up=1 : ux5=50
	if ux5>=1050 : ux5up=1 : ux5=80
	if ux5up=1 : if ux5>=50 : ux5up=0
	
	if ux6up=0 : ux6=ux6+6
	if ux6up=1 : ux6=50
	if ux6>=1050 : ux6up=1 : ux6=80
	if ux6up=1 : if ux6>=50 : ux6up=0
	
	if ux7up=0 : ux7=ux7+6
	if ux7up=1 : ux7=50
	if ux7>=1050 : ux7up=1 : ux7=80
	if ux7up=1 : if ux7>=50 : ux7up=0
	
	return
	
*sss9
	
	pos 0,0 : gmode 2 : celput 8,,1,1
	color 250,0,0 : boxf 1100,0,1200,700 
	color 0,0,250 : boxf 0,0,100,700
	
	pos 100,uy91 : gmode 2 : celput 100,,1,1
	pos 300,uy92 : gmode 2 : celput 100,,1,1
	pos 500,uy93 : gmode 2 : celput 100,,1,1
	pos 700,uy94 : gmode 2 : celput 100,,1,1
	pos 900,uy95 : gmode 2 : celput 100,,1,1
	
	pos 100,uy91+400 : gmode 2 : celput 100,,1,1
	pos 300,uy92+400 : gmode 2 : celput 100,,1,1
	pos 500,uy93+400 : gmode 2 : celput 100,,1,1
	pos 700,uy94+400 : gmode 2 : celput 100,,1,1
	pos 900,uy95+400 : gmode 2 : celput 100,,1,1
	
	if uy91<=-200   : uy91up=1
	if uy91>=300 : uy91up=0
	if uy91up=1  : uy91=uy91+5
	if uy91up=0  : uy91=uy91-5
	
	if uy92<=-200   : uy92up=1
	if uy92>=300 : uy92up=0
	if uy92up=1  : uy92=uy92+5
	if uy92up=0  : uy92=uy92-5
	
	if uy93<=-200   : uy93up=1
	if uy93>=300 : uy93up=0
	if uy93up=1  : uy93=uy93+5
	if uy93up=0  : uy93=uy93-5
	
	if uy94<=-200   : uy94up=1
	if uy94>=300 : uy94up=0
	if uy94up=1  : uy94=uy94+5
	if uy94up=0  : uy94=uy94-5
	
	if uy95<=-200   : uy95up=1
	if uy95>=300 : uy95up=0
	if uy95up=1  : uy95=uy95+5
	if uy95up=0  : uy95=uy95-5
	
	return
	
*sss10
	
	color 0,162,232 : boxf 0,0,1200,700 
		
	color 250,0,0 : boxf 1090,10,1190,110 
	color 0,0,250 : boxf 10,590,110,690
	
	color 255,255,255 : boxf stx9,sty9,stx9+120,sty9+120
	color 255,255,255 : boxf stx92,sty92,stx92+120,sty92+120
	color 255,255,255 : boxf stx93,sty93,stx93+120,sty93+120
	color 255,255,255 : boxf stx94,sty94,stx94+120,sty94+120
	color 255,255,255 : boxf stx95,sty95,stx95+120,sty95+120
	color 255,255,255 : boxf stx96,sty96,stx96+120,sty96+120
	
	if stx9>=1090 : st9st9=1
	if stx9<=700  : st9st9=0
	
	if st9st9=0{
	stx9=stx9+3
	sty92=sty92+3
	stx93=stx93+3
	sty94=sty94+3
	stx95=stx95+3
	sty96=sty96+3
	}
	
	if st9st9=1{
	stx9=stx9-3
	sty92=sty92-3
	stx93=stx93-3
	sty94=sty94-3
	stx95=stx95-3
	sty96=sty96-3
	}
	
	return
	
*sss11
	
	pos 0,0 : gmode 2 : celput 11,,1,1
	color 250,0,0 : boxf 1000,100,1100,200
	color 0,0,250 : boxf 90,470,210,610
	
	pos st11x,290 : gmode 2 : celput 103,,0.5,0.6
	
	pos 380,st112y : celput 104,,0.6,0.65
	pos 580,st113y : celput 104,,0.6,0.65
	
	if zidori=1{
	if go11!=2 : if ((mousex>=100)&&(mousex<=200)&&(mousey>=300)&&(mousey<=400)) : go11=1
	if go11!=2 : if go11=1 : st11x=st11x-30
	if go11!=2 : if go11=1 : if st11x<=90 : go11=2
	if go11=2 : st11x=st11x+3
	
	if ((mousex>=390)&&(mousex<=520)&&(mousey>=100)&&(mousey<=200)) : go112=1
	if go112=1 : st112y=st112y-8
	
	if ((mousex>=600)&&(mousex<=700)&&(mousey>=200)&&(mousey<=300)) : go113=1
	if go113=1 : st113y=st113y-24
	if st113y<=222 : go113=0 : st113y=222
	
	if ((mousex>=490)&&(mousex<=620)&&(mousey>=100)&&(mousey<=200)) : mojiugoke=1
	if mojiugoke=1 : mojiy1=mojiy1+5 : mojiy2=mojiy2+5
	if mojiugoke=1 : if mojiy1>=650  : mojiy1=650 : mojiy2=650
	if ((mousex>=490)&&(mousex<=620)&&(mousey>=500)&&(mousey<=600)) : mojiugoke=2
	if mojiugoke=2 : mojiy1=mojiy1-5 : mojiy2=mojiy2-5
	if mojiugoke=2 : if mojiy1<=600 :  mojiugoke=0 : mojiy1=600 : mojiy2=600
	}
	
	return
	
*sss12
	
	pos 0,0: celput 103,,6,4
	
	if s=1 : pos mousex,mousey : gmode 2 : celput 500,,2.5,2.5
	
	pos 0,0 : gmode 2 : celput 12,,1,1
	
	color 250,0,0 : boxf 1040,10,1090,52 
	color 0,0,250 : boxf 104,640,160,695
	
	return
	
*sss13
	
	pos 0,0 : gmode 2 : celput 13,,1,1
	
	color 250,0,0 : boxf 250,620,350,670 
	color 0,0,250 : boxf 500,7,590,95
	
	return
	
*sss14
	
	pos 0,0 : gmode 2 : celput 14,,1,1
	
	color 250,0,0 : boxf 1000,500,1100,600
	color 0,0,250 : boxf 100,100,200,200
	
	//J
	pos 200+amer1,ame1  : celput 103,,0.25,0.25
	pos 200+amer2,ame2  : celput 103,,0.25,0.25
	pos 200+amer3,ame3  : celput 103,,0.25,0.25
	pos 200+amer4,ame4  : celput 103,,0.25,0.25
	pos 200+amer5,ame5  : celput 103,,0.25,0.25
	pos 200+amer6,ame6  : celput 103,,0.25,0.25
	pos 200+amer7,ame7  : celput 103,,0.25,0.25
	pos 200+amer8,ame8  : celput 103,,0.25,0.25
	pos 200+amer9,ame9  : celput 103,,0.25,0.25
	pos 200+amer10,ame10  : celput 103,,0.25,0.25
	
	pos 200+amer11,ame11  : celput 103,,0.25,0.25
	pos 200+amer12,ame12  : celput 103,,0.25,0.25
	pos 200+amer13,ame13  : celput 103,,0.25,0.25
	pos 200+amer14,ame14  : celput 103,,0.25,0.25
	pos 200+amer15,ame15  : celput 103,,0.25,0.25
	pos 200+amer16,ame16  : celput 103,,0.25,0.25
	pos 200+amer17,ame17  : celput 103,,0.25,0.25
	pos 200+amer18,ame18  : celput 103,,0.25,0.25
	pos 200+amer19,ame19  : celput 103,,0.25,0.25
	pos 200+amer20,ame20  : celput 103,,0.25,0.25
	
	ame1=ame1+4
	ame2=ame2+4
	ame3=ame3+4
	ame4=ame4+4
	ame5=ame5+4
	ame6=ame6+4
	ame7=ame7+4
	ame8=ame8+4
	ame9=ame9+4
	ame10=ame10+4
	
	ame11=ame11-4
	ame12=ame12-4
	ame13=ame13-4
	ame14=ame14-4
	ame15=ame15-4
	ame16=ame16-4
	ame17=ame17-4
	ame18=ame18-4
	ame19=ame19-4
	ame20=ame20-4
	
	if ame1>=700  : ame1=0
	if ame2>=700  : ame2=0
	if ame3>=700  : ame3=0
	if ame4>=700  : ame4=0
	if ame5>=700  : ame5=0
	if ame6>=700  : ame6=0
	if ame7>=700  : ame7=0
	if ame8>=700  : ame8=0
	if ame9>=700  : ame9=0
	if ame10>=700 : ame10=0
	
	if ame11<=0 : ame11=700
	if ame12<=0 : ame12=700
	if ame13<=0 : ame13=700
	if ame14<=0 : ame14=700
	if ame15<=0 : ame15=700
	if ame16<=0 : ame16=700
	if ame17<=0 : ame17=700
	if ame18<=0 : ame18=700
	if ame19<=0 : ame19=700
	if ame20<=0 : ame20=700
	
	if ame1=0  : amer1=rnd(750)
	if ame2=0  : amer2=rnd(750)
	if ame3=0  : amer3=rnd(750)
	if ame4=0  : amer4=rnd(750)
	if ame5=0  : amer5=rnd(750)
	if ame6=0  : amer6=rnd(750)
	if ame7=0  : amer7=rnd(750)
	if ame8=0  : amer8=rnd(750)
	if ame9=0  : amer9=rnd(750)
	if ame10=0 : amer10=rnd(750)
	
	if ame11=700 : amer11=rnd(750)
	if ame12=700 : amer12=rnd(750)
	if ame13=700 : amer13=rnd(750)
	if ame14=700 : amer14=rnd(750)
	if ame15=700 : amer15=rnd(750)
	if ame16=700 : amer16=rnd(750)
	if ame17=700 : amer17=rnd(750)
	if ame18=700 : amer18=rnd(750)
	if ame19=700 : amer19=rnd(750)
	if ame20=700 : amer20=rnd(750)

	
	return
	
*sss15
	
	pos 0,597: celput 103,,3,1
	pos 0,0: celput 103,,0.52,4
	
	if zidori=1{
	pos mousex,mousey : gmode 2 : celput 500,,0.8,0.8
	}
	
	pos 0,0 : gmode 2 : celput 15,,1,1
	
	color 250,0,0 : boxf 1000,10,1090,90 
	color 0,0,250 : boxf 105,5,296,60
	
	//Gx[^[
	pos 1000,ey1 : gmode 2 : celput 110,,1,1
	pos 900,ey2 : gmode 2 : celput 111,,1,1
	
	if eyu=0 : ey1=ey1+1
	if eyu=0 : ey2=ey2-1
	
	if eyu=1 : ey1=ey1-1
	if eyu=1 : ey2=ey2+1
	
	if eyu=0 : if ey1>=400 : eyu=1
	if eyu=1 : if ey1<=200   : eyu=0
	
	//͂悢
	pos 696,750-hayoike: celput 103,,0.6,10
	if hayo=1 : hayoike=hayoike+2
	if hayoike>=1000 : hayo=0
	if zidori=1 : if ((mousex>=700)&&(mousex<=800)&&(mousey>=600)&&(mousey<=700)) : hayo=1
	
	//sXg
	pos 350+b1,100: celput 103,,0.5,0.5
	pos 500+b1,100: celput 103,,0.5,0.5
	if b1d=0  : b1=b1+1
	if b1d=1  : b1=b1-1
	if b1d=0 : if b1>=50 : b1d=1
	if b1d=1 : if b1<=0  : b1d=0
	
	pos 380+b2,255 : celput 103,,0.5,0.5
	pos 530-b2,255 : celput 103,,0.5,0.5
	if b2d=0  : b2=b2+1
	if b2d=1  : b2=b2-1
	if b2d=0 : if b2>=50 : b2d=1
	if b2d=1 : if b2<=0  : b2d=0
	
	pos 410-b3,402 : celput 103,,0.5,0.5
	pos 540-b3,402 : celput 103,,0.5,0.5
	if b3d=0  : b3=b3+1
	if b3d=1  : b3=b3-1
	if b3d=0 : if b3>=50 : b3d=1
	if b3d=1 : if b3<=0  : b3d=0
	
	//J
	if zidori=1 : if ((mousex>=100)&&(mousex<=300)&&(mousey>=220)&&(mousey<=280)) : amesto=1
	
	pos 100+amer1,50+ame1: celput 103,,0.2,0.2
	pos 100+amer2,50+ame2: celput 103,,0.2,0.2
	pos 100+amer3,50+ame3: celput 103,,0.2,0.2
	pos 100+amer4,50+ame4: celput 103,,0.2,0.2
	pos 100+amer5,50+ame5: celput 103,,0.2,0.2
	pos 100+amer6,50+ame6: celput 103,,0.2,0.2
	
	ame1=ame1+3
	ame2=ame2+3
	ame3=ame3+3
	ame4=ame4+3
	ame5=ame5+3
	ame6=ame6+3
	
	if amesto=0 : if ame1>=480 : ame1=0
	if amesto=0 : if ame2>=480 : ame2=0
	if amesto=0 : if ame3>=480 : ame3=0
	if amesto=0 : if ame4>=480 : ame4=0
	if amesto=0 : if ame5>=480 : ame5=0
	if amesto=0 : if ame6>=480 : ame6=0
	
	if ame1=0 : amer1=rnd(170)
	if ame2=0 : amer2=rnd(170)
	if ame3=0 : amer3=rnd(170)
	if ame4=0 : amer4=rnd(170)
	if ame5=0 : amer5=rnd(170)
	if ame6=0 : amer6=rnd(170)
	
	if amesto=0 : pos 0,50: celput 103,,2,0.15
	
	if zidori=1 : if ((mousex>=100)&&(mousex<=300)&&(mousey>=100)&&(mousey<=180)) : hasamu=1
	
	if hasamu=1{
	pos 100,50+sami  : celput 103,,1,0.15
	pos 100,200-sami : celput 103,,1,0.15
	if samisto=0 : hasa=hasa+1
	if hasa>=3 : sami=sami+1 : hasa=0
	if sami=70 : samisto=1
	}
	
	return

	////////////////////////////////////////
	
*sss16
	
	s=1
		
	if (time>=0)&&(time<6)   : gmode 2 : pos 0,0 : celput 30,,1,1
	if (time>=6)&&(time<12)  : gmode 2 : pos 0,0 : celput 31,,1,1
	if (time>=12)&&(time<18) : gmode 2 : pos 0,0 : celput 32,,1,1
	if (time>=18)&&(time<24) : gmode 2 : pos 0,0 : celput 33,,1,1
	if (time>=24)&&(time<30) : gmode 2 : pos 0,0 : celput 34,,1,1
	
	if (time>=30)&&(time<36) : gmode 2 : pos 0,0 : celput 30,,1,1
	if (time>=36)&&(time<42) : gmode 2 : pos 0,0 : celput 31,,1,1
	if (time>=42)&&(time<48) : gmode 2 : pos 0,0 : celput 32,,1,1
	if (time>=48)&&(time<54) : gmode 2 : pos 0,0 : celput 33,,1,1
	if (time>=54)&&(time<60) : gmode 2 : pos 0,0 : celput 34,,1,1
	
	if (time>=60)&&(time<66) : gmode 2 : pos 0,0 : celput 30,,1,1
	if (time>=66)&&(time<72) : gmode 2 : pos 0,0 : celput 31,,1,1
	if (time>=72)&&(time<78) : gmode 2 : pos 0,0 : celput 32,,1,1
	if (time>=78)&&(time<84) : gmode 2 : pos 0,0 : celput 33,,1,1
	if (time>=84)&&(time<90) : gmode 2 : pos 0,0 : celput 34,,1,1
	
	if (time>=90)&&(time<96)   : gmode 2 : pos 0,0 : celput 30,,1,1
	if (time>=96)&&(time<102)  : gmode 2 : pos 0,0 : celput 31,,1,1
	if (time>=102)&&(time<108) : gmode 2 : pos 0,0 : celput 32,,1,1
	if (time>=108)&&(time<114) : gmode 2 : pos 0,0 : celput 33,,1,1
	if (time>=114)&&(time<120) : gmode 2 : pos 0,0 : celput 34,,1,1
	
	if mousex<=tx : pos tx-100-tdx*100,ty-tdx*100 : celput 200,,tdx,tdy
	if mousex>=tx : pos tx-100-tdx*100,ty-tdx*100 : celput 201,,tdx,tdy
	
	if (time>=0)&&(time<30){
	if mousex>=tx : tx=tx+2
	if mousex<=tx : tx=tx-2
	if mousey>=ty+100 : ty=ty+2
	if mousey<=ty+100 : ty=ty-2
	}
	
	if (time>=30)&&(time<60){
	if mousex>=tx : tx=tx+3
	if mousex<=tx : tx=tx-3
	if mousey>=ty+100 : ty=ty+3
	if mousey<=ty+100 : ty=ty-3
	}
	
	if (time>=60)&&(time<90){
	if mousex>=tx : tx=tx+4
	if mousex<=tx : tx=tx-4
	if mousey>=ty+100 : ty=ty+4
	if mousey<=ty+100 : ty=ty-4
	}
	
	if (time>=90)&&(time<121){
	if mousex>=tx : tx=tx+5
	if mousex<=tx : tx=tx-5
	if mousey>=ty+100 : ty=ty+5
	if mousey<=ty+100 : ty=ty-5
	}
	
	if (time>=121){
	if mousex>=tx : tx=tx+6
	if mousex<=tx : tx=tx-6
	if mousey>=ty+100 : ty=ty+6
	if mousey<=ty+100 : ty=ty-6
	tdx=tdx+1
	tdy=tdy+1
	}
	
	return
	
	/*
*sss17
	
	if s=0 : if ((mousex>=200)&&(mousex<=800)&&(mousey>=600)&&(mousey<=700)) : s=1
	
	pos 0,0 : gmode 2 : celput 17,,1,1
	stick key17,256
	
	//e
	
	repeat 10
	pos itx(cnt),ity(cnt) : gmode 2 : celput 207,,0.2,0.2
	loop
	
	if kugk=1 :gosub *kougeki
	if kugk=0 :if key17&256 :gosub *kougeki
	
	//
	
	pos asi1x+200,asi1y : gmode 2 : celput 205,,1,1.3
	pos asi2x+200,asi2y : gmode 2 : celput 208,,1,1.3
	
	if a1g=1 : asi1y=asi1y-2
	if a2g=1 : asi2y=asi2y-2
	
	//{
	
	if junbi!=1 : pos tttx,ttty : gmode 2 : celput 202,,2,2
	if junbi=1  : pos tttx,ttty : gmode 2 : celput 210,,2,2
	if (a1g=1)&&(a2g=1) : bimu=1
	if bimu=1 : gosub *bimuu
	
	//Ge
	
	repeat ttmax
	pos ttx1(cnt),tty1(cnt) : gmode 2 : celput 209,,0.4,0.4
	pos ttx2(cnt),tty2(cnt) : gmode 2 : celput 209,,0.4,0.4
	loop
	
	ttt=ttt+1
	if ttt>15 :ttt=0
	
	if ttt=0 :gosub *tkougeki
	
	//j
	
	if ahp1<=0 : a1g=1 
	if ahp2<=0 : a2g=1
	
	//
	
	if ad1=0 : asi1x=asi1x+3
	if ad1=1 : asi1x=asi1x-3
	
	if ad2=1 : asi2x=asi2x-3
	if ad2=0 : asi2x=asi2x+3
	
	if ad1=0 : if asi1x>=650 : ad1=1
	if ad2=0 : if asi2x>=650 : ad2=1
	
	if ad1=1 : if asi1x<=0 : ad1=0
	if ad2=1 : if asi2x<=0 : ad2=0
	
	color 255,,
	pos 200,0 :mes tamac
	mes thp
	mes ahp
	mes ttmax
	mes tttc
	mes ttt
	
	gosub *tama
	gosub *atari
	gosub *kaku
	
	return
	
	
*tkougeki
	
	tttc=tttc+1
	if tttc>=ttmax :tttc=0
	
	if a1g!=1{
	ttx1(tttc)=asi1x+200
	tty1(tttc)=asi1y+300
	}
	
	if a2g!=1{
	ttx2(tttc)=asi2x+200
	tty2(tttc)=asi2y+300
	}
	
	return
	
*bimuu
	
	if junbi=0{
		tttx=tttx-4
		ttty=ttty+3
	if ttty>=0 : junbi=1
	}
	
	if junbi=1{
		tttx=tttx+3
		if tttx>=600 : junbi=2
	}
	
	if junbi=2{
		tttx=tttx-4
		ttty=ttty-3
	if tttx<=350 : if ttty<=(-200) : tttx=350 : ttty=(-200) : bimu=0 : junbi=0
	}
		
	return
	
*kougeki
	
	kugk=1
	
	if kugkc=0 {
		
		tamac=tamac+1
		if tamac>=10 : tamac=0
		
		itx(tamac)=mousex
		ity(tamac)=mousey
	}
	
	kugkc=kugkc+1
	
	kakudo=(30.0*3.14*kugkc)/180.0
	
	if kugkc>15 {
		kugkc=0
		kugk=0
		kakudo=0.0
	}
	
	return
	
*tama
	
	repeat 10
	if ity(cnt1)>(-100) {
		ity(cnt1)=ity(cnt1)-4
	}
	
	cnt1=cnt1+1
	loop
	cnt1=0
	
	
	repeat ttmax
	if tty1(cnt1)<1000 {
		tty1(cnt1)=tty1(cnt1)+10
	}
	if tty2(cnt1)<1000 {
		tty2(cnt1)=tty2(cnt1)+10
	}
	
	cnt1=cnt1+1
	loop
	cnt1=0
	
	;;;;;;;;;;;;;;;;
	repeat lmax
	color 0,0,255 :line lx(cnt1),ly(cnt1),lx(cnt1),ly(cnt1)-100
	
	ly(cnt1)=ly(cnt1)-50
	
	if ly(cnt1)<(-100) :lx(cnt1)=rnd(120)*10 :ly(cnt1)=700
	cnt1=cnt1+1
	loop
	cnt1=0
	;;;;;;;;;;;;;;;;
	
	return
	
*atari

	color 0,0,200 : boxf 400,50,400+thp,70 
	color 0,0,200 : boxf 400,90,400+ahp1,110 
	color 0,0,200 : boxf 700,90,700+ahp2,110 
	
	repeat 10
	pget itx(cnt1),ity(cnt1)
	if ginfo_r=1&&ginfo_g=1&&ginfo_b=1 {
		thp=thp-10
		ity(cnt1)=(-100)
		itx(cnt1)=1300
		muteki=1
		break
	}
	
	pget itx(cnt1),ity(cnt1)
	if ginfo_r=128&&ginfo_g=0&&ginfo_b=0 {
		ahp1=ahp1-10
		ity(cnt1)=(-100)
		itx(cnt1)=1300
		muteki=1
		break
	}
	
	pget itx(cnt1),ity(cnt1)
	if ginfo_r=129&&ginfo_g=0&&ginfo_b=0 {
		ahp2=ahp2-10
		ity(cnt1)=(-100)
		itx(cnt1)=1300
		muteki=1
		break
	}
	
	if ahp1<=0 : ahp1=0
	if ahp2<=0 : ahp2=0
	if thp<=0  : thp=0
	
	cnt1=cnt1+1
	loop
	cnt1=0
	
	
	return
	
*/

*kaku
	
	color 200,50,0
	if ste!=17 : boxf mousex-hu,mousey-hu,mousex+hu,mousey+hu
	
	if ste=13 : boxf mousex-hu+600,mousey-hu,mousex+hu+600,mousey+hu
	
	if ste=17 : pos mousex,mousey : gmode 2 : celput 206,,0.4,0.4,kakudo
	
	return
	
*clear
	
	dmmplay 2
	dmmplay 1
	
	repeat
	redraw 0
	color 255,255,255 : boxf
	color 0,0,0
	
	pos 0,0 : celput 300,,0.29,0.32
	pos 180,150 : color 0,0,0 : gmode 4,,,200 : celput 302,,1.1,2
	
	cl=cl+1
	
	font "MS SVbN",70
	pos 300,300 : mes "NA^CF@@@@@b"
	pos 710,300 : mes time
	
	if hosi=1 : color 155,155,0 : font "MS SVbN",70 : pos 350,155 : mes "@@@@@@" : color 255,255,0 : font "MS SVbN",70 : pos 345,150 : mes "@@@@@@"
	if hosi=2 : color 155,155,0 : font "MS SVbN",70 : pos 350,155 : mes "@@@@@@" : color 255,255,0 : font "MS SVbN",70 : pos 345,150 : mes "@@@@@@"
	if hosi=3 : color 155,155,0 : font "MS SVbN",70 : pos 350,155 : mes "@@@@@@" : color 255,255,0 : font "MS SVbN",70 : pos 345,150 : mes "@@@@@@"
	
	/////
	
	///
	if ste=1{
	if (time<=10)&&(time>=7) : hosi=1 : hosi1=1
	if (time<=6)&&(time>=4)  : hosi=2 : hosi1=2
	if (time<=3)&&(time>=0)  : hosi=3 : hosi1=3
	}
	///
	if ste=2{
	if (time<=12)&&(time>=9) : hosi=1 : hosi2=1
	if (time<=8)&&(time>=5)  : hosi=2 : hosi2=2
	if (time<=4)&&(time>=0)  : hosi=3 : hosi2=3
	}
	///
	if ste=3{
	if (time<=20)&&(time>=16) : hosi=1 : hosi3=1
	if (time<=15)&&(time>=8)  : hosi=2 : hosi3=2
	if (time<=7)&&(time>=0)   : hosi=3 : hosi3=3
	}
	///
	if ste=4{
	if (time<=10)&&(time>=7) : hosi=1 : hosi4=1
	if (time<=6)&&(time>=5)  : hosi=2 : hosi4=2
	if (time<=4)&&(time>=0)  : hosi=3 : hosi4=3
	}
	///
	if ste=5{
	if (time<=40)&&(time>=30) : hosi=1 : hosi5=1
	if (time<=29)&&(time>=20) : hosi=2 : hosi5=2
	if (time<=19)&&(time>=0)  : hosi=3 : hosi5=3
	}
	///
	if ste=6{
	if (time<=15)&&(time>=11) : hosi=1 : hosi6=1
	if (time<=10)&&(time>=6) : hosi=2 : hosi6=2
	if (time<=5)&&(time>=0)  : hosi=3 : hosi6=3
	}
	///
	if ste=7{
	if (time<=20)&&(time>=16) : hosi=1 : hosi7=1
	if (time<=15)&&(time>=11) : hosi=2 : hosi7=2
	if (time<=10)&&(time>=0)  : hosi=3 : hosi7=3
	}
	///
	if ste=8{
	if (time<=15)&&(time>=11) : hosi=1 : hosi8=1
	if (time<=10)&&(time>=6) : hosi=2 : hosi8=2
	if (time<=5)&&(time>=0)  : hosi=3 : hosi8=3
	}
	///
	if ste=10{
	if (time<=30)&&(time>=26) : hosi=1 : hosi9=1
	if (time<=25)&&(time>=21) : hosi=2 : hosi9=2
	if (time<=20)&&(time>=0)  : hosi=3 : hosi9=3
	}
	///
	if ste=9{
	if (time<=15)&&(time>=11): hosi=1 : hosi10=1
	if (time<=10)&&(time>=6) : hosi=2 : hosi10=2
	if (time<=5)&&(time>=0)  : hosi=3 : hosi10=3
	}
	///
	if ste=11{
	if (time<=40)&&(time>=30) : hosi=1 : hosi11=1
	if (time<=29)&&(time>=20) : hosi=2 : hosi11=2
	if (time<=19)&&(time>=0)  : hosi=3 : hosi11=3
	}
	///
	if ste=12{
	if (time<=70)&&(time>=60) : hosi=1 : hosi12=1
	if (time<=59)&&(time>=50) : hosi=2 : hosi12=2
	if (time<=49)&&(time>=0)  : hosi=3 : hosi12=3
	}
	///
	if ste=13{
	if (time<=60)&&(time>=50) : hosi=1 : hosi13=1
	if (time<=49)&&(time>=40) : hosi=2 : hosi13=2
	if (time<=39)&&(time>=0)  : hosi=3 : hosi13=3
	}
	///
	if ste=14{
	if (time<=40)&&(time>=30) : hosi=1 : hosi14=1
	if (time<=29)&&(time>=20) : hosi=2 : hosi14=2
	if (time<=19)&&(time>=0)  : hosi=3 : hosi14=3
	}
	///
	if ste=15{
	if (time<=100)&&(time>=80) : hosi=1 : hosi15=1
	if (time<=79)&&(time>=60) : hosi=2 : hosi15=2
	if (time<=60)&&(time>=0)  : hosi=3 : hosi15=3
	}
	///
	if ste=16{
	if (time<=60)&&(time>=80)   : hosi=1 : hosi16=1
	if (time<=81)&&(time>=100) : hosi=2 : hosi16=2
	if time>=101  			    : hosi=3 : hosi16=3
	}
	
	//nCXRAL^
	if ste=1 : if time<sk1   : sk1=time
	if ste=2 : if time<sk2   : sk2=time
	if ste=3 : if time<sk3   : sk3=time
	if ste=4 : if time<sk4   : sk4=time
	if ste=5 : if time<sk5   : sk5=time
	if ste=6 : if time<sk6   : sk6=time
	if ste=7 : if time<sk7   : sk7=time
	if ste=8 : if time<sk8   : sk8=time
	if ste=10 : if time<sk9  : sk9=time
	if ste=9 : if time<sk10  : sk10=time
	if ste=11 : if time<sk11 : sk11=time
	if ste=12 : if time<sk12 : sk12=time
	if ste=13 : if time<sk13 : sk13=time
	if ste=14 : if time<sk14 : sk14=time
	if ste=15 : if time<sk15 : sk15=time
	
	if ste=16 : if time>sk16 : sk16=time
	
	if cl>=150 : gosub *select
	
	redraw 1
	await 2
	loop
	
*noc
	
	dmmplay 3
	dmmplay 1
	
	repeat
	redraw 0
	color 255,255,255 : boxf
	color 0,0,0
	
	pos 0,0 : celput 300,,0.29,0.32
	pos 180,150 : color 0,0,0 : gmode 4,,,200 : celput 302,,1.1,2
	
	cl=cl+1
	
	font "MS SVbN",70
	pos 500,250 : mes "s"
	
	if ste!=100{
	font "MS SVbN",70
	pos 300,400 : mes "oߎԁF@@@@@b"
	pos 710,400 : mes time
	}
	
	if ste=16 : if time>sk16 : sk16=time
	
	
	if cl>=150 : gosub *select
	
	redraw 1
	await 2
	loop
	
	
*kakunin
	
	font "MS SVbN",40
	color 255,0,0
	if ste=1  : pos 520,250 : mes "^C@F@" : pos 720,250
	
	if ste=2  : pos 550,550 : mes "^C@F@" : pos 750,550 
	
	if ste=3  : pos 500,230 : mes "^C@F@" : pos 700,230 
	
	if ste=4  : pos 520,230 : mes "^C@F@" : pos 700,230 
	
	if ste=5  : pos 500,100 : mes "^C@F@" : pos 700,100 
	
	if ste=6  : pos 350,200 : mes "^C@F@" : pos 750,200 
	
	if ste=7  : pos 300,130 : mes "^C@F@" : pos 500,130 
	
	if ste=8  : pos 500,10  : mes "^C@F@" : pos 700,10
	
	if ste=9  : pos 500,10  : mes "^C@F@" : pos 700,10 
	
	if ste=10  : pos 500,10  : mes "^C@F@" : pos 700,10 
	
	if ste=11 : pos 500,mojiy1 : mes "^C@F@" : pos 700,mojiy2
	
	if ste=12 : pos 470,260 : mes "^C@F@" : pos 670,260 
	
	if ste=13 : pos 420,530 : mes "^C@F@" : pos 620,530
	
	if ste=14 : pos 500,230 : mes "^C@F@" : pos 700,230
	
	if ste=15 : pos 320,280 : mes "^C@F@" : pos 600,280 
	
	if ste!=100 : mes time
	
	
	return
	
*zikanmae
	
	//ԂɓuԂ炷[Ƃ
	fl=gettime(7)
	fs=gettime(6)
	fm=gettime(5)
	
	zidori=1
	//ɗ
	
*zikan
	
	sm=gettime(5)
	ss=gettime(6)
	sl=gettime(7)
	
	if sl<fl : ss=ss-1 :sl=sl+1000
	millisecond=sl-fl
	
	if ss<fs : sm=sm-1 :ss=ss+60
	second=ss-fs
	
	if sm<fm : sm=sm+60
	minute=sm-fm
	
	time2=millisecond+(second*1000)+(minute*1000*60)
	time=time2/1000
	mmmtime=time2/100
	
	return
	
*tsuji

	end