#O[otO------------------------------------------------------

#100	݂NA
#101	NA
#102	NA
#103	NA
#104	NA
#105	䂸NA
#106	ӂNA
#107	ЂNA

#110	݂//NA
#111	݂///䂸//NA
#112	Ђ胋[gȊOׂẴLNA
#113	ׂẴLNA

#120	Ƃ肠GfBO݂
#121	ׂẴGfBO݂

#130	v[O

#GfBO
label	ending
@bg_black
money_close
minimoney_close
date_close

@bg_black

#pay_debts = 1		#؋ԂH(fobOp)

#X^bt[
if mikan_end_flag=0 and ichigo_end_flag=0 and karin_end_flag=0 and hikari_end_flag=0 then gosub	staffroll
#X^bt[TRUE
if mikan_end_flag=1 or ichigo_end_flag=1 or karin_end_flag=1 or hikari_end_flag=1 then  gosub	staffroll2


GLOBAL(120)=1		#Ƃ肠GfBO

#ED
if suika_end_flag=1 then GLOBAL(103)=1
#ED
if zakuro_end_flag=1 then GLOBAL(104)=1
#䂸ED
if yuzu_end_flag=1 then GLOBAL(105)=1
#݂ED
if mikan_end_flag=1 then GLOBAL(100)=1
#ED
if ichigo_end_flag=1 then GLOBAL(101)=1
#ED
if karin_end_flag=1 then GLOBAL(102)=1
#ЂED
if hikari_end_flag=1 then GLOBAL(107)=1

#110	݂//NA
if GLOBAL(100)=1 and GLOBAL(101)=1 and GLOBAL(102)=1 then GLOBAL(110)=1

#݂ED
if mikan_end_flag=1 then gosub mikan_end
#ED
if ichigo_end_flag=1 then gosub ichigo_end
#ED
if karin_end_flag=1 then gosub karin_end
#ЂED
if hikari_end_flag=1 then gosub hikari_end

#[gGfBȌꍇ

if mikan_end_flag=1 or ichigo_end_flag=1 or karin_end_flag=1 or hikari_end_flag=1 then goto ending_skip1



###############################################################################
#Sdc
###############################################################################
@bg_white
waitms		500
#text_04
cg	"event\text_04.png",0,-120
waitms		1000
@bg_white

gosub	ending_mini

#ED
if suika_end_flag=1 then gosub suika_end;@bg_black
#ED
if zakuro_end_flag=1 then gosub zakuro_end;@bg_black
#䂸ED
if yuzu_end_flag=1 then gosub yuzu_end;@bg_black

bg	"cg\bg\gameover2.png",0,-240

keywait

#gameover2̌ɗGs[O
if mikan_kekkonend_flag=1 then gosub after_kekkon_mikan		#݂ƌꍇ
if karin_kekkonend_flag=1 then gosub after_kekkon_karin		#ƌꍇ
if ichigo_kekkonend_flag=1 then gosub after_kekkon_ichigo	#ƌꍇ
if mikan_kekkonend_flag=1 and karin_kekkonend_flag=1 and ichigo_kekkonend_flag=1 then gosub after_sanjyukon	#Olƌꍇ

if mikan_normalend_flag=1 then gosub	after_nomal_mikan	#m[}GhA݂
if karin_normalend_flag=1 then gosub	after_nomal_karin	#m[}GhA
if ichigo_normalend_flag=1 then gosub	after_nomal_ichigo	#m[}GhA
if mikan_normalend_flag=1 and karin_normalend_flag=1 and ichigo_normalend_flag=1 then gosub after_all_nomal	#OlƂm[}Ghꍇ

reset

label	ending_skip1

bgm	""
@gameover2
#^Cgɖ߂
waitms	2000
@bg_black
reset

#X^bt[
label	staffroll
advmenuoff
layerLoad	0,"cg\ending\staffroll.png"
bgm	"sound\bgm\end.ogg",play_once
ScreenBlackinMS	2000
layer_move	0,282000,0,0,0,-12518+720,passtype_tcb
kwait		282000/15

kwait		5000/15
ScreenBlackoutMS	4000
waitms		4000
@bg_black
ScreenBlackin	60
bgm	""
advmenuon
return

#X^bt[
label	staffroll2
advmenuoff
layerLoad	0,"cg\ending\staffroll2.png"
#bgm	"sound\bgm\end.ogg",play_once
@bgm13
ScreenBlackinMS	2000
layer_move	0,282000,0,0,0,-12518+720,passtype_tcb
kwait	282000/15

kwait		5000/15
ScreenBlackoutMS	4000
waitms		4000
@bg_black
ScreenBlackin	60
bgm	""
advmenuon
return


label	ending_mini

#Gh###################################
#@1000ȏ@tEn[hAdR}hsȂ

gosub	miniend_mikan
gosub	miniend_karin
gosub	miniend_ichigo

return




#gameover2̌ɗGs[O
#label	after_kekkon_mikan	#݂ƌꍇ
#label	after_kekkon_karin	#ƌꍇ
#label	after_kekkon_ichigo	#ƌꍇ
#label	after_sanjyukon	#Olƌꍇ


#Gb`nGh###################################################

#wGh###################################
#@t30ȏ@݂傭800ȏ@


#SMlGh###################################
#@n[h20ȏ@݂傭500ȏ@


#zXeXGh###################################
#@100ȏ@݂傭400ȏ@


#############
#@̃A_grfI𔄂Ă܂@񖣗600ȏ@toL@


#m[}Gh###################################################

#܁{Gh###################################
#@܃x5ȏA냌x5ȏ@n[hsĂȂ


#܃Gh###################################
#@܃x5ȏA냌x4ȉ@܁AA炾̒ł܂ԍn[hsĂȂ


#炾Gh###################################
#@炾x5ȏA܁AA炾̒ł炾ԍ@n[hsĂȂ




#Gh###################################
#@냌x5ȏA܁AA炾̒ł낪ԍ@n[hsĂȂ



#gameover2̌ɗGs[O
#label	after_nomal_mikan	#m[}GhA݂
#label	after_nomal_karin	#m[}GhA
#label	after_nomal_ichigo	#m[}GhA
#label	after_all_nomal	#OlƂm[}Ghꍇ


#Gh###################################
#ǂɂĂ͂܂Ȃꍇ



label	miniend_mikan

mikan_reception_cnt=mikan_reception2_cnt+mikan_reception3_cnt+mikan_reception4_cnt


#݂
if mikan_miryoku>500 and  mikan_reception_cnt=0 then goto	ED_kekkon_mikan		#݂񌋍Gh
if mikan_miryoku>800 and mikan_reception3_cnt>40 then goto	ED_syoufu_mikan		#݂񏩕wGh
if mikan_miryoku>500 and mikan_reception4_cnt>10 then goto	ED_jyoou_mikan		#݂񏗉lGh
if mikan_miryoku>400 and mikan_reception1_cnt>70 then goto	ED_hosutes_mikan	#݂zXeXGh

if  mikan_atama_level>=8 and mikan_kokoro_level>=5 and mikan_reception4_cnt=0 then  goto	ED_atakoko_mikan		#݂񂠂܂Gh
if  mikan_atama_level>=8 and mikan_kokoro_leve<=4 and mikan_reception4_cnt=0 then  goto	ED_atama_mikan		#݂񂠂܃Gh
if  mikan_karada_level>=8 and mikan_karada_level>mikan_kokoro_level and mikan_karada_level>mikan_atama_level and mikan_reception4_cnt=0 then  goto	ED_karada_mikan			#݂񂩂炾Gh
if  mikan_kokoro_level>=8 and mikan_kokoro_level>mikan_karada_level and mikan_kokoro_level>mikan_atama_level and mikan_reception4_cnt=0 then  goto	ED_kokoro_mikan			#݂񂩂炾Gh
goto	ED_daraku_mikan			#݂񂩂炾Gh



return

#
label	miniend_karin

karin_reception_cnt=karin_reception2_cnt+karin_reception3_cnt+karin_reception4_cnt

if karin_miryoku>500 and karin_reception_cnt=0 then goto	ED_kekkon_karin		#񌋍Gh
if karin_miryoku>800 and karin_reception3_cnt>40 then goto	ED_syoufu_karin		#񏩕wGh
if karin_miryoku>500 and karin_reception4_cnt>10 then goto	ED_jyoou_karin		#񏗉lGh
if karin_miryoku>400 and karin_reception1_cnt>70 then goto	ED_hosutes_karin	#zXeXGh
if  karin_video_sell_flag=1 then goto				ED_av_karin		#AVDGh
if  karin_atama_level>8 and karin_kokoro_level>=5 and karin_reception4_cnt=0 then  goto	ED_atakoko_karin		#񂠂܂Gh
if  karin_atama_level>=8 and karin_kokoro_leve<=4 and karin_reception4_cnt=0 then  goto	ED_atama_karin		#񂠂܃Gh
if  karin_karada_level>=8 and karin_karada_level>karin_kokoro_level and karin_karada_level>karin_atama_level and karin_reception4_cnt=0 then  goto	ED_karada_karin			#񂩂炾Gh
if  karin_kokoro_level>=8 and karin_kokoro_level>karin_karada_level and karin_kokoro_level>karin_atama_level and karin_reception4_cnt=0 then  goto	ED_kokoro_karin			#񂩂炾Gh
goto	ED_daraku_karin			#񂩂炾Gh



return

#
label	miniend_ichigo

ichigo_reception_cnt=ichigo_reception2_cnt+ichigo_reception3_cnt+ichigo_reception4_cnt

if ichigo_miryoku>500 and ichigo_reception_cnt=0 then goto	ED_kekkon_ichigo	#Gh
if ichigo_miryoku>800 and ichigo_reception3_cnt>40 then goto	ED_syoufu_ichigo	#wGh
if ichigo_miryoku>500 and ichigo_reception4_cnt>10 then goto	ED_jyoou_ichigo		#lGh
if ichigo_miryoku>400 and ichigo_reception1_cnt>70 then goto	ED_hosutes_ichigo	#zXeXGh

if  ichigo_atama_level>=8 and ichigo_kokoro_level>=5 and ichigo_reception4_cnt=0 then  goto	ED_atakoko_ichigo		#܂Gh
if  ichigo_atama_level>=8 and ichigo_kokoro_leve<=4 and ichigo_reception4_cnt=0 then  goto	ED_atama_ichigo		#܃Gh
if  ichigo_karada_level>=8 and ichigo_karada_level>ichigo_kokoro_level and ichigo_karada_level>ichigo_atama_level and ichigo_reception4_cnt=0 then  goto	ED_karada_ichigo		#炾Gh
if  ichigo_kokoro_level>=8 and ichigo_kokoro_level>ichigo_karada_level and ichigo_kokoro_level>ichigo_atama_level and ichigo_reception4_cnt=0 then  goto	ED_kokoro_ichigo		#炾Gh


goto	ED_daraku_ichigo		#炾Gh

return







#CED
