<?xml version="1.0" encoding="shift-jis"?>

<exbulletml>

<!-- *********************************************************************************** -->
<!-- ***** ステージ終了時アクション **************************************************** -->
<!-- *********************************************************************************** -->
<action label="stageend_action">

	<changeTargetVolume label="bgm"> 
		<num>-1200</num><term>45</term>	
	</changeTargetVolume>

	<w>60</w>

	<system><command>disablecollision</command></system>
	<actionRef label="stageend_blackbg_create_action"></actionRef>
	
	<!-- *** ボーナス表示とかいろいろ *** -->

	<aRef l="stage_bonus"><p>40</p></aRef>
	<w>30</w>
	<aRef l="nomiss_bonus"><p>80+30</p></aRef>
	<w>6</w>
	<aRef l="nomiss_bonus_fig"><p>110+30</p></aRef>
	<w>12</w>
	<copyBigNum bigname="nomiss_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

	<aRef l="difficulty_bonus"><p>160+30</p></aRef>
	<w>6</w>
	<aRef l="difficulty_bonus_fig"><p>190+30</p></aRef>
	<w>12</w>
	<copyBigNum bigname="difficulty_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

	<aRef l="rank_bonus"><p>240+30</p></aRef>
	<w>6</w>
	<aRef l="rank_bonus_fig"><p>270+30</p></aRef>
	<w>12</w>
	<copyBigNum bigname="rank_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

	<aRef l="nanomachine_bonus"><p>320+30</p></aRef>
	<w>6</w>
	<aRef l="nanomachine_bonus_fig"><p>350+30</p></aRef>
	<w>30</w>
	<copyBigNum bigname="nanomachine_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

	<aRef l="subtotal_bonus"><p>390+30</p></aRef>
	<w>6</w>

	<setBigNum bigname="subtotal_bonus_fig_big"><num>0</num><exp>0</exp></setBigNum>	
	<addBigNumBigNum bigname="subtotal_bonus_fig_big" n="nomiss_bonus_fig_big"></addBigNumBigNum>
	<addBigNumBigNum bigname="subtotal_bonus_fig_big" n="difficulty_bonus_fig_big"></addBigNumBigNum>
	<addBigNumBigNum bigname="subtotal_bonus_fig_big" n="rank_bonus_fig_big"></addBigNumBigNum>
	<addBigNumBigNum bigname="subtotal_bonus_fig_big" n="nanomachine_bonus_fig_big"></addBigNumBigNum>

	<aRef l="subtotal_bonus_fig"><p>390+30</p></aRef>
	<w>6</w>
	<aRef l="subtotal_bonus_rate_fig"><p>450+30</p><p>28</p></aRef>	
	<w>30</w>

	<copyBigNum bigname="total_bonus_fig_big" n="subtotal_bonus_fig_big"></copyBigNum>	
	<mulBigNumBigNum bigname="total_bonus_fig_big" n="_rate"></mulBigNumBigNum>


	<aRef l="total_bonus"><p>480+30</p></aRef>
	<w>6</w>
	<aRef l="total_bonus_fig"><p>480+30</p></aRef>
	<w>30</w>

	<addBigNumToRawScore bigname="total_bonus_fig_big"></addBigNumToRawScore>

	<!-- 最後まで動いているのはおかしいので、一度止める -->
	<system><command>playermovedisable</command></system>


	<!-- 最終ステージクリアボーナス  -->

	<!-- コンティニューしている場合には、クリアボーナスなし -->
	<rep><ts>($_stagenum-eq6)+($_stagenum-eq7)</ts>
	<rep><ts>1-($_continuenum-eq0)</ts>
		<!-- ここでボタン待ち(または480フレームで遷移）になるとうれしい -->
		<!-- 暫定でwait140 -->
		<changeTargetVolume label="bgm"> 
			<num>-10000</num><term>120</term>	
		</changeTargetVolume>
		<wait>80</wait>
		<targetVanish label="bgm"></targetVanish>

		<!-- 黒でステージボーナスを隠す -->
<!--
		<actionRef label="clearbonus_blackbg_create_action"></actionRef>
		<w>30</w>
-->
	</rep>
	<rep><ts>($_continuenum-eq0)</ts>
		<rep><ts>($_practice_mode-eq0)*($_stagenum-eq6)+($__boss_secret-eq0)*($_stagenum-eq7)</ts>

			<!-- ここでボタン待ち(または480フレームで遷移）になるとうれしい -->
			<!-- 暫定でwait140 -->
			<w>60</w>
			<repeat><times>($_stagenum-eq6)</times>
				<changeTargetVolume label="bgm"> 
					<num>-10000</num><term>80</term>	
				</changeTargetVolume>
				<wait>80</wait>
				<targetVanish label="bgm"></targetVanish>
			</repeat>
			<repeat><times>1-($_stagenum-eq6)</times>
				<wait>80</wait>
			</repeat>


			<!-- 黒でステージボーナスを隠す -->
			<actionRef label="clearbonus_blackbg_create_action"></actionRef>
			<w>30</w>
			<!-- クリアボーナス文字 -->
			<aRef l="clear_bonus"><p>40</p></aRef>
			<w>30</w>
			<!-- ライフライン文字 -->
			<aRef l="lifeline_bonus"><p>170</p></aRef>
			<w>6</w>
			<!-- ライフライン数値 -->
			<aRef l="lifeline_bonus_fig"><p>200</p></aRef>
			<w>30</w>

			<!-- 計算 -->
			<copyBigNum bigname="lifeline_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	
			<mulBigNumBigNum bigname="lifeline_bonus_fig_big" n="_rate"></mulBigNumBigNum>

			<!-- 倍率 -->
			<aRef l="subtotal_bonus_rate_fig"><p>240</p><p>31</p></aRef>	

			<!-- 下線 -->
			<eval name="i">0</eval>
			<repeat><times>24</times>
				<createRef l="str_create_green_24x24"><p>170+20*$i</p><p>280</p><p>104</p><p>31</p></createRef>
				<evaladd name="i">1</evaladd>
			</repeat>	
			<w>6</w>

			<!-- 合計 -->
			<createRef l="stagebonus_jstr_create"><p>200</p><p>320</p><p>4</p><p>6</p><p>2</p><p>1</p><p>31</p></createRef>
			<w>30</w>

			<!-- ボーナス合計の桁数を取得 -->
			<getBigFigure n="fignum" bigname="lifeline_bonus_fig_big"></getBigFigure>

			<!-- 各桁の数字を表示-->
			<eval n="i">0</eval>
			<eval n="j">0</eval>
			<rep><ts>$fignum</ts>
				<repeat><times>(($i-gt0)*(($i%4)-eq0))</times>
					<evaladd n="j">2</evaladd>
					<createRef l="score_suffix"><p>650-14-13*($i+$j-1.5)</p><p>322</p><p>$j/2-1</p><p>31</p></createRef>
					<w>1</w>
				</repeat>
				<getBigNumFigNum n="numfignum" bigname="lifeline_bonus_fig_big"><num>$i</num></getBigNumFigNum>
				<createRef l="str_create_24x24"><p>650-14-13*($i+$j)</p><p>320</p><p>(48+$numfignum)</p><p>31</p></createRef>
				<evaladd n="i">1</evaladd>
				<w>1</w>
			</rep>

			<!-- 加算 -->
			<addBigNumToRawScore bigname="lifeline_bonus_fig_big"></addBigNumToRawScore>

		</rep>

		<rep><ts>(1-($__boss_secret-eq0))*($_stagenum-eq7)</ts>

			<!-- ここでボタン待ち(または480フレームで遷移）になるとうれしい -->
			<!-- 暫定でwait140 -->
			<w>60</w>
			<repeat><times>($_stagenum-eq6)</times>
				<changeTargetVolume label="bgm"> 
					<num>-10000</num><term>80</term>	
				</changeTargetVolume>
				<wait>80</wait>
				<targetVanish label="bgm"></targetVanish>
			</repeat>
			<repeat><times>1-($_stagenum-eq6)</times>
				<wait>80</wait>
			</repeat>


			<!-- 黒でステージボーナスを隠す -->
			<actionRef label="clearbonus_blackbg_create_action"></actionRef>
			<w>30</w>
			<!-- クリアボーナス文字 -->
			<aRef l="clear_bonus"><p>40</p></aRef>
			<w>30</w>
			<!-- ライフライン文字 -->
			<aRef l="lifeline_bonus"><p>170</p></aRef>
			<w>6</w>
			<!-- ライフライン数値 -->
			<aRef l="lifeline_bonus_fig"><p>200</p></aRef>
			<w>12</w>

			<!-- 計算 -->
			<copyBigNum bigname="lifeline_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

			<!-- secret文字 -->
			<aRef l="secret_bonus"><p>250</p></aRef>
			<w>6</w>
			<!-- secret数値 -->
			<aRef l="secret_bonus_fig"><p>280</p></aRef>
			<w>30</w>

			<!-- 計算 -->
			<copyBigNum bigname="secret_bonus_fig_big" n="bonus_fig_big"></copyBigNum>	

			<!-- 下線 -->
			<eval name="i">0</eval>
			<repeat><times>24</times>
				<createRef l="str_create_green_24x24"><p>170+20*$i</p><p>320</p><p>104</p><p>31</p></createRef>
				<evaladd name="i">1</evaladd>
			</repeat>	
			<w>6</w>

			<setBigNum bigname="subtotal_ex_bonus_fig_big"><num>0</num><exp>0</exp></setBigNum>	
			<addBigNumBigNum bigname="subtotal_ex_bonus_fig_big" n="lifeline_bonus_fig_big"></addBigNumBigNum>
			<addBigNumBigNum bigname="subtotal_ex_bonus_fig_big" n="secret_bonus_fig_big"></addBigNumBigNum>

			<createRef l="stagebonus_jstr_create"><p>200+36*2</p><p>350</p><p>0</p><p>5</p><p>6</p><p>1</p><p>31</p></createRef>

			<!-- サブトータルボーナス合計の桁数を取得 -->
			<getBigFigure n="fignum" bigname="subtotal_ex_bonus_fig_big"></getBigFigure>

			<!-- 各桁の数字を表示-->
			<eval n="i">0</eval>
			<rep><ts>$fignum</ts>
				<getBigNumFigNum n="numfignum" bigname="subtotal_ex_bonus_fig_big"><num>$i</num></getBigNumFigNum>
				<createRef l="str_create"><p>650-14-13*$i</p><p>350</p><p>(48+$numfignum)</p><p>31</p></createRef>
				<evaladd n="i">1</evaladd>
				<w>1</w>
			</rep>

			<!-- 倍率 -->
			<aRef l="subtotal_bonus_rate_fig"><p>390</p><p>31</p></aRef>	

			<!-- 下線 -->
			<eval name="i">0</eval>
			<repeat><times>24</times>
				<createRef l="str_create_green_24x24"><p>170+20*$i</p><p>430</p><p>104</p><p>31</p></createRef>
				<evaladd name="i">1</evaladd>
			</repeat>	
			<w>6</w>


			<!-- 合計 -->
			<createRef l="stagebonus_jstr_create"><p>200</p><p>470</p><p>4</p><p>6</p><p>2</p><p>1</p><p>31</p></createRef>
			<w>30</w>

			<copyBigNum bigname="total_ex_bonus_fig_big" n="subtotal_ex_bonus_fig_big"></copyBigNum>	
			<mulBigNumBigNum bigname="total_ex_bonus_fig_big" n="_rate"></mulBigNumBigNum>


			<!-- ボーナス合計の桁数を取得 -->
			<getBigFigure n="fignum" bigname="total_ex_bonus_fig_big"></getBigFigure>

			<!-- 各桁の数字を表示-->
			<eval n="i">0</eval>
			<eval n="j">0</eval>
			<rep><ts>$fignum</ts>
				<repeat><times>(($i-gt0)*(($i%4)-eq0))</times>
					<evaladd n="j">2</evaladd>
					<createRef l="score_suffix"><p>650-14-13*($i+$j-1.5)</p><p>502</p><p>$j/2-1</p><p>31</p></createRef>
					<w>1</w>
				</repeat>
				<getBigNumFigNum n="numfignum" bigname="total_ex_bonus_fig_big"><num>$i</num></getBigNumFigNum>
				<createRef l="str_create_24x24"><p>650-14-13*($i+$j)</p><p>500</p><p>(48+$numfignum)</p><p>31</p></createRef>
				<evaladd n="i">1</evaladd>
				<w>1</w>
			</rep>

			<!-- 加算 -->
			<addBigNumToRawScore bigname="total_ex_bonus_fig_big"></addBigNumToRawScore>

		</rep>


	</rep>
	</rep>

	<!-- *** フラグ・スコア保存 *** -->
	<system><command>updategameflag</command></system>
	<system><command>commitstagescore</command></system>

	<rep><ts>1-($_difficulty-eq4)</ts>
		<actionRef label="stageend_nextstage_check_action"></actionRef>
	</rep>


	<!-- SEQUEL EPILOGUE -->
	<rep><ts>$_difficulty-eq4</ts>

		<!-- *** ボーナス表示時間 *** -->
		<w>90</w>
		<!-- *** 自動で次の画面に進むまでの待ち時間 *** -->
		<eval n="nextwait">480</eval>

		<create>
			<x>0</x><y>0</y>
			<cursor l="cursor_stageend">
				<decidedRef    label="cursor_stageend_decided"></decidedRef>
				<selectedRef   label="cursor_stageend_selected"></selectedRef>
				<actionRef	   label="cursor_stageend_action"></actionRef>
			</cursor>
		</create>
		
		<create>
			<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction><x>0</x><y>0</y>
			<selectableRef label="selectable_sequel_stageend"></selectableRef>
		</create>	
		<wait>$nextwait</wait>

		<system><command>clearselectable</command></system>
		<actionRef label="selectable_sequel_stageend_decided_action"></actionRef>
	</rep>



</action>	


<a l="common_bonus_fig_calc_and_display_action">
	<!-- ボーナスベースにボーナス倍を掛けたものをボーナス合計に -->
	<copyBigNum bigname="bonus_fig_big" n="bonus_base_big"></copyBigNum>
	<mulBigNum  bigname="bonus_fig_big"><num>$2</num></mulBigNum>

	<!-- ボーナスベースの桁数を取得 -->
  <getBigFigure n="basefignum" bigname="bonus_base_big"></getBigFigure>

	<!-- ボーナスベース各桁の数字を表示-->
	<eval n="i">0</eval>
	<rep><ts>$basefignum</ts>
		<getBigNumFigNum n="numfignum" bigname="bonus_base_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create"><p>380-14-13*$i</p><p>$1</p><p>(48+$numfignum)</p><p>28</p></createRef>
		<evaladd n="i">1</evaladd>
	</rep>

	<eval name="bonus_rate">$2</eval>
	<!-- *** ウェイト *** -->
	<w>1</w>


	<!-- x の表示 -->
	<createRef l="str_create"><p>250+12+13*10</p><p>$1</p><p>108</p><p>28</p></createRef>


	<!-- N = の表示 -->
	<rep><ts>$bonus_rate-lt10</ts>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+$bonus_rate</p><p>28</p></createRef>
	</rep>
	<rep><ts>(1-($bonus_rate-lt10))*($bonus_rate-lt100)</ts>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>28</p></createRef>
	</rep>
	<rep><ts>(1-($bonus_rate-lt100))*($bonus_rate-lt1000)</ts>
		<createRef l="str_create"><p>250+12+12*13</p><p>$1</p><p>48+(($bonus_rate/100)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>28</p></createRef>
	</rep>
	<rep><ts>1-($bonus_rate-lt1000)</ts>
		<createRef l="str_create"><p>250+12+11*13</p><p>$1</p><p>48+(($bonus_rate/1000)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+12*13</p><p>$1</p><p>48+(($bonus_rate/100)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>28</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>28</p></createRef>
	</rep>

	<createRef l="str_create"><p>250+12+13*16</p><p>$1</p><p>61</p><p>28</p></createRef>

	<!-- *** ウェイト *** -->
	<w>1</w>

	<!-- ボーナス合計の桁数を取得 -->
  <getBigFigure n="fignum" bigname="bonus_fig_big"></getBigFigure>

	<!-- 各桁の数字を表示-->
	<eval n="i">0</eval>
	<rep><ts>$fignum</ts>
		<getBigNumFigNum n="numfignum" bigname="bonus_fig_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create"><p>650-14-13*$i</p><p>$1</p><p>(48+$numfignum)</p><p>28</p></createRef>
		<evaladd n="i">1</evaladd>
	</rep>

</a>



<create l="stagebonus_jstr_create">
	<dir type="abs">0</dir><speed type="abs">0</speed>
	<cx>$1</cx><cy>$2</cy>
	<object label="str_object">
		<imgRef label="stagebonus_img"><p>$3</p><p>$4</p><p>$5</p><p>$6</p></imgRef>	
		<setDrawLevel><num>$7</num></setDrawLevel>
	</object>	
</create>

<img type="normal" l="stagebonus_img">
	<file type="dds">stagebonus</file>
	<left>$1*36</left><top>$2*36</top><right>$1*36+$3*36</right><bottom>$2*36+$4*36</bottom>
	<width>$3*36</width><height>$4*36</height>
	<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
</img>


<a l="stage_bonus">
	<createRef l="stagebonus_jstr_create"><p>400</p><p>$1</p><p>0</p><p>0</p><p>7</p><p>2</p><p>28</p></createRef>
</a>

<a l="nomiss_bonus">
	<createRef l="stagebonus_jstr_create"><p>220</p><p>$1</p><p>4</p><p>2</p><p>3</p><p>1</p><p>28</p></createRef>
	<createRef l="stagebonus_jstr_create"><p>220+36*3</p><p>$1</p><p>0</p><p>2</p><p>3</p><p>1</p><p>28</p></createRef>

</a>


<a l="nomiss_bonus_fig">

	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--     100000 = 1 x 10^5        -->
	<repeat><times>1-($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>
	<repeat><times>($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>

	<!-- ２）ボーナス倍-->
	<repeat><times>$_stagemisscount-eq0</times>

		<!--  1 = 1 x 10^0  -->
		<setBigNum bigname="bonus_rate_big"><num>1</num><exp>0</exp></setBigNum>
		<eval n="bonus_rate">1</eval>
	</repeat>

	<repeat><times>1-($_stagemisscount-eq0)</times>

		<!--  0 = 0 x 10^0  -->
		<setBigNum bigname="bonus_rate_big"><num>0</num><exp>0</exp></setBigNum>
		<eval n="bonus_rate">0</eval>
	</repeat>

	<aRef l="common_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>

</a>


<a l="difficulty_bonus">
	<createRef l="stagebonus_jstr_create"><p>220</p><p>$1</p><p>0</p><p>3</p><p>3</p><p>1</p><p>28</p></createRef>
	<createRef l="stagebonus_jstr_create"><p>220+36*2</p><p>$1</p><p>0</p><p>2</p><p>3</p><p>1</p><p>28</p></createRef>


	<rep><ts>$_difficulty-eq0</ts>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*0</p><p>$1</p><p>69</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*1</p><p>$1</p><p>65</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*2</p><p>$1</p><p>83</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*3</p><p>$1</p><p>89</p><p>28</p></createRef>
	</rep>

	<rep><ts>$_difficulty-eq1</ts>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*0</p><p>$1</p><p>78</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*1</p><p>$1</p><p>79</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*2</p><p>$1</p><p>82</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*3</p><p>$1</p><p>77</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*4</p><p>$1</p><p>65</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*5</p><p>$1</p><p>76</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*6</p><p>$1</p><p>45</p><p>28</p></createRef>
	</rep>

	<rep><ts>$_difficulty-eq2</ts>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*0</p><p>$1</p><p>78</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*1</p><p>$1</p><p>79</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*2</p><p>$1</p><p>82</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*3</p><p>$1</p><p>77</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*4</p><p>$1</p><p>65</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*5</p><p>$1</p><p>76</p><p>28</p></createRef>
	</rep>

	<rep><ts>$_difficulty-eq3</ts>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*0</p><p>$1</p><p>72</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*1</p><p>$1</p><p>65</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*2</p><p>$1</p><p>82</p><p>28</p></createRef>
	  <createRef l="str_create_green_24x24"><p>220+36*4+10+12+16*3</p><p>$1</p><p>68</p><p>28</p></createRef>
	</rep>
</a>

<a l="difficulty_bonus_fig">
	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--     50000 = 5 x 10^4        -->
	<repeat><times>1-($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>
	<repeat><times>($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>


	<!-- ２）ボーナス倍-->
	<!--   (1 + $_difficulty) x 10^0  -->
	<setBigNum bigname="bonus_rate_big"><num>1+$_difficulty</num><exp>0</exp></setBigNum>
	<eval n="bonus_rate">1+$_difficulty</eval>

	<aRef l="common_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>
</a>


<a l="rank_bonus">
	<createRef l="stagebonus_jstr_create"><p>220</p><p>$1</p><p>4</p><p>3</p><p>3</p><p>1</p><p>28</p></createRef>
	<createRef l="stagebonus_jstr_create"><p>220+36*2</p><p>$1</p><p>0</p><p>2</p><p>3</p><p>1</p><p>28</p></createRef>

	<repeat><times>$__grank-eq0</times>
		<createRef l="str_create_green_24x24"><p>200+36*5+10</p><p>$1</p><p>66</p><p>28</p></createRef>
	</repeat>
	<repeat><times>$__grank-eq1</times>
		<createRef l="str_create_green_24x24"><p>200+36*5+10</p><p>$1</p><p>65</p><p>28</p></createRef>
	</repeat>
	<repeat><times>$__grank-eq2</times>
		<createRef l="str_create_green_24x24"><p>200+36*5+10</p><p>$1</p><p>83</p><p>28</p></createRef>
	</repeat>
</a>

<a l="rank_bonus_fig">
	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--     50000 = 5 x 10^4        -->
	<repeat><times>1-($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>
	<repeat><times>($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_base_big"><num>$_stagenum*$_stagenum*$_stagenum*$_stagenum*2</num><exp>4</exp></setBigNum>
	</repeat>

	<!-- ２）ボーナス倍-->
	<!--   $__grank x 10^0  -->
	<setBigNum bigname="bonus_rate_big"><num>$__grank</num><exp>0</exp></setBigNum>
	<eval n="bonus_rate">$__grank</eval>

	<aRef l="common_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>
</a>


<a l="nanomachine_bonus">
	<createRef l="stagebonus_jstr_create"><p>220+36*1.5</p><p>$1</p><p>0</p><p>4</p><p>6</p><p>1</p><p>28</p></createRef>
</a>


<a l="nanomachine_bonus_fig">
	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--     ナノマシン数 x 10^0        -->
	<setBigNum bigname="bonus_base_big"><num>$_nmachine</num><exp>0</exp></setBigNum>

	<!-- ２）ボーナス倍-->
	<!--   10 = 1 * 10^2  -->
	<repeat><times>1-($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_rate_big"><num>$_stagenum*$_stagenum*$_stagenum*2</num><exp>1</exp></setBigNum>
		<eval n="bonus_rate">20*$_stagenum*$_stagenum*$_stagenum</eval>
	</repeat>

	<repeat><times>($_stagenum-eq7)</times>
		<setBigNum bigname="bonus_rate_big"><num>$_stagenum*$_stagenum*2</num><exp>1</exp></setBigNum>
		<eval n="bonus_rate">20*$_stagenum*$_stagenum</eval>
	</repeat>

	<aRef l="common_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>
</a>


<a l="subtotal_bonus">
	<eval name="i">0</eval>
	<repeat><times>24</times>
		<createRef l="str_create_green_24x24"><p>170+20*$i</p><p>$1</p><p>104</p><p>28</p></createRef>
		<evaladd name="i">1</evaladd>
	</repeat>	
	<w>6</w>

	<createRef l="stagebonus_jstr_create"><p>200+36*2</p><p>$1+30</p><p>0</p><p>5</p><p>6</p><p>1</p><p>28</p></createRef>

</a>

<a l="subtotal_bonus_fig">

	<!-- ボーナス合計の桁数を取得 -->
  <getBigFigure n="fignum" bigname="subtotal_bonus_fig_big"></getBigFigure>

	<!-- 各桁の数字を表示-->
	<eval n="i">0</eval>
	<rep><ts>$fignum</ts>
		<getBigNumFigNum n="numfignum" bigname="subtotal_bonus_fig_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create"><p>650-14-13*$i</p><p>$1+30</p><p>(48+$numfignum)</p><p>28</p></createRef>
		<evaladd n="i">1</evaladd>
		<w>1</w>
	</rep>

</a>


<a l="subtotal_bonus_rate_fig">
	<eval name="local_i">0</eval>
	<rep><ts>10</ts>
		<rep><ts>$_scorerate_figure-gt$local_i</ts>
			<sysvar name="_arg0">$local_i</sysvar>
			<eval name="localnum">$_scorerate_numfignum</eval>
			<createRef l="str_create"><p>650-14-13*$local_i</p><p>$1</p><p>48+$localnum</p><p>$2</p></createRef>
		</rep>
		<evaladd name="local_i">1</evaladd>
		<w>1</w>
	</rep>

	<createRef l="stagebonus_jstr_create"><p>200</p><p>$1</p><p>0</p><p>6</p><p>3</p><p>1</p><p>$2</p></createRef>

	<createRef l="str_create"><p>650-14-13*$_scorerate_figure</p><p>$1</p><p>108</p><p>$2</p></createRef>
</a>

<a l="total_bonus">
	<eval name="i">0</eval>
	<repeat><times>24</times>
		<createRef l="str_create_green_24x24"><p>170+20*$i</p><p>$1</p><p>104</p><p>28</p></createRef>
		<evaladd name="i">1</evaladd>
	</repeat>	
	<w>6</w>

	<createRef l="stagebonus_jstr_create"><p>200</p><p>$1+30</p><p>4</p><p>6</p><p>2</p><p>1</p><p>28</p></createRef>
</a>

<a l="total_bonus_fig">

	<!-- ボーナス合計の桁数を取得 -->
  <getBigFigure n="fignum" bigname="total_bonus_fig_big"></getBigFigure>

	<!-- 各桁の数字を表示-->
	<eval n="i">0</eval>
	<eval n="j">0</eval>
	<rep><ts>$fignum</ts>
		<repeat><times>(($i-gt0)*(($i%4)-eq0))</times>
			<evaladd n="j">2</evaladd>
			<createRef l="score_suffix"><p>650-14-13*($i+$j-1.5)</p><p>$1+32</p><p>$j/2-1</p><p>28</p></createRef>
			<w>1</w>
		</repeat>
		<getBigNumFigNum n="numfignum" bigname="total_bonus_fig_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create_24x24"><p>650-14-13*($i+$j)</p><p>$1+30</p><p>(48+$numfignum)</p><p>28</p></createRef>
		<evaladd n="i">1</evaladd>
		<w>1</w>
	</rep>

</a>


<a l="lifeline_bonus_fig">

	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--     100000 = 1 x 10^5        -->
	<setBigNum bigname="bonus_base_big"><num>$_difficulty+2-($_difficulty-eq4)*2</num><exp>7</exp></setBigNum>

	<!-- ２）ボーナス倍-->

	<!--  1 = 1 x 10^0  -->
	<setBigNum bigname="bonus_rate_big"><num>$_tension</num><exp>0</exp></setBigNum>
	<eval n="bonus_rate">$_tension</eval>

	<aRef l="common_clear_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>

</a>

<a l="secret_bonus_fig">

	<!-- ***************************************************************************** -->
	<!-- ボーナス設定に必要な処理                                                      -->
	<!-- １）ボーナスベースを   M * 10^N   の形式で設定する                            -->
	<!-- ２）ボーナス倍　　を   M * 10^N   の形式、及び通常の変数に設定する            -->

	<!-- １）ボーナスベース  -->
	<!--      3 x 10^8        -->
	<setBigNum bigname="bonus_base_big"><num>3</num><exp>8</exp></setBigNum>

	<!-- ２）ボーナス倍-->

	<!--  1 = 1 x 10^0  -->
	<setBigNum bigname="bonus_rate_big"><num>$__boss_secret</num><exp>0</exp></setBigNum>
	<eval n="bonus_rate">$__boss_secret</eval>

	<aRef l="common_clear_bonus_fig_calc_and_display_action"><p>$1</p><p>$bonus_rate</p></aRef>

</a>


<a l="common_clear_bonus_fig_calc_and_display_action">
	<!-- ボーナスベースにボーナス倍を掛けたものをボーナス合計に -->
	<copyBigNum bigname="bonus_fig_big" n="bonus_base_big"></copyBigNum>
	<mulBigNum  bigname="bonus_fig_big"><num>$2</num></mulBigNum>

	<!-- ボーナスベースの桁数を取得 -->
  <getBigFigure n="basefignum" bigname="bonus_base_big"></getBigFigure>

	<!-- ボーナスベース各桁の数字を表示-->
	<eval n="i">0</eval>
	<rep><ts>$basefignum</ts>
		<getBigNumFigNum n="numfignum" bigname="bonus_base_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create"><p>380-14-13*$i</p><p>$1</p><p>(48+$numfignum)</p><p>31</p></createRef>
		<evaladd n="i">1</evaladd>
	</rep>

	<eval name="bonus_rate">$2</eval>

	<!-- *** ウェイト *** -->
	<w>1</w>


	<!-- x の表示 -->
	<createRef l="str_create"><p>250+12+13*10</p><p>$1</p><p>108</p><p>31</p></createRef>


	<!-- N = の表示 -->
	<rep><ts>$bonus_rate-lt10</ts>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+$bonus_rate</p><p>31</p></createRef>
	</rep>
	<rep><ts>(1-($bonus_rate-lt10))*($bonus_rate-lt100)</ts>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>31</p></createRef>
	</rep>
	<rep><ts>(1-($bonus_rate-lt100))*($bonus_rate-lt1000)</ts>
		<createRef l="str_create"><p>250+12+12*13</p><p>$1</p><p>48+(($bonus_rate/100)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>31</p></createRef>
	</rep>
	<rep><ts>1-($bonus_rate-lt1000)</ts>
		<createRef l="str_create"><p>250+12+11*13</p><p>$1</p><p>48+(($bonus_rate/1000)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+12*13</p><p>$1</p><p>48+(($bonus_rate/100)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+13*13</p><p>$1</p><p>48+(($bonus_rate/10)%10)</p><p>31</p></createRef>
		<createRef l="str_create"><p>250+12+14*13</p><p>$1</p><p>48+($bonus_rate%10)</p><p>31</p></createRef>
	</rep>

	<createRef l="str_create"><p>250+12+13*16</p><p>$1</p><p>61</p><p>31</p></createRef>

	<!-- *** ウェイト *** -->
	<w>1</w>

	<!-- ボーナス合計の桁数を取得 -->
  <getBigFigure n="fignum" bigname="bonus_fig_big"></getBigFigure>

	<!-- 各桁の数字を表示-->
	<eval n="i">0</eval>
	<rep><ts>$fignum</ts>
		<getBigNumFigNum n="numfignum" bigname="bonus_fig_big"><num>$i</num></getBigNumFigNum>
		<createRef l="str_create"><p>650-14-13*$i</p><p>$1</p><p>(48+$numfignum)</p><p>31</p></createRef>
		<evaladd n="i">1</evaladd>
	</rep>

</a>

<create l="clearbonus_jstr_create">
	<dir type="abs">0</dir><speed type="abs">0</speed>
	<cx>$1</cx><cy>$2</cy>
	<object label="str_object">
		<imgRef label="clearbonus_img"><p>$3</p><p>$4</p><p>$5</p><p>$6</p></imgRef>	
		<setDrawLevel><num>$7</num></setDrawLevel>
	</object>	
</create>

<img type="normal" l="clearbonus_img">
	<file type="dds">clearbonus</file>
	<left>$1*36</left><top>$2*36</top><right>$1*36+$3*36</right><bottom>$2*36+$4*36</bottom>
	<width>$3*36</width><height>$4*36</height>
	<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
</img>


<a l="clear_bonus">
	<createRef l="clearbonus_jstr_create"><p>400</p><p>$1</p><p>0</p><p>0</p><p>7</p><p>2</p><p>31</p></createRef>
</a>
<a l="lifeline_bonus">
	<createRef l="clearbonus_jstr_create"><p>220</p><p>$1</p><p>0</p><p>2</p><p>4</p><p>1</p><p>31</p></createRef>
</a>
<a l="secret_bonus">
	<createRef l="clearbonus_jstr_create"><p>220</p><p>$1</p><p>0</p><p>3</p><p>4</p><p>1</p><p>31</p></createRef>
</a>


<!-- *********************************************************************************** -->
<!-- ***** 次のステージ判定アクション ************************************************** -->
<!-- *********************************************************************************** -->
<action label="stageend_nextstage_check_action">

	<eval name="gonextstageflag">0</eval>

	<!-- ******************************************************************* -->
	<!-- ***   $gonextstageflag 設定                                     *** -->
	<!-- ***                                                             *** -->
	<!-- ***   0 : 次のステージに進む                                    *** -->
	<!-- ***   1 : リプレイを保存してタイトルに戻る                      *** -->	
	<!-- ***   2 : リプレイ選択画面に戻る                                *** -->	
	<!-- ***   3 : リプレイから再開でリプレイ保存してタイトルに戻る      *** -->	
	<!-- ***   4 : デモ用タイトルに戻る                                  *** -->	
	<!-- ******************************************************************* -->


	<!-- *** プラクティスなら次の面に進まない *** -->
	<repeat><times>$_practice_mode-eq1</times>
		<repeat><times>1-($_replay_mode-eq1)</times>
			<eval name="gonextstageflag">1</eval>
		</repeat>	
		<repeat><times>$_replay_mode-eq1</times>
			<eval name="gonextstageflag">2</eval>
		</repeat>	
	</repeat>

	<!-- *** リプレイで６面ならエピローグに進まない *** -->
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_replay_mode-eq1</times>
			<repeat><times>$_stagenum-eq6</times>
				<eval name="gonextstageflag">2</eval>		
			</repeat>
		</repeat>	
	</repeat>
	
	<!-- *** 他人のリプレイ再開で６面ならエピローグに進まずリプレイ保存 *** -->
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>1-($_ending_disable-eq0)</times>
			<repeat><times>$_stagenum-eq6</times>
				<eval name="gonextstageflag">3</eval>		
			</repeat>
		</repeat>	
	</repeat>

	<!-- *** リプレイで EX ならエピローグに進まない *** -->
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_replay_mode-eq1</times>
			<repeat><times>$_stagenum-eq7</times>
				<eval name="gonextstageflag">2</eval>		
			</repeat>
		</repeat>	
	</repeat>
	
	<!-- *** リプレイで次の面データがないなら進まない *** -->
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_replay_mode-eq1</times>
			<sysvar name="_arg0">$_stagenum+1</sysvar>
			<repeat><times>$_myreplay_eachstage-eq0</times>
				<eval name="gonextstageflag">2</eval>	
			</repeat>
		</repeat>
	</repeat>

	<!-- ３面でタイトルに戻る -->
<!--
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_stagenum-eq3</times>
			<repeat><times>1-($_replay_mode-eq1)</times>
				<eval name="gonextstageflag">1</eval>
			</repeat>
			<repeat><times>$_replay_mode-eq1</times>
				<eval name="gonextstageflag">2</eval>
			</repeat>
		</repeat>
	</repeat>
-->

	<!-- ６面でタイトルに戻る（暫定。本来は別処理） -->
<!--
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_stagenum-eq6</times>
			<repeat><times>1-($_replay_mode-eq1)</times>
				<eval name="gonextstageflag">1</eval>
			</repeat>
		</repeat>
	</repeat>
-->

	<!-- SEQUEL ならタイトルに戻る -->
	<repeat><times>$_practice_mode-eq0</times>
		<repeat><times>$_stagenum-eq7</times>
			<repeat><times>1-($_replay_mode-eq1)</times>
				<eval name="gonextstageflag">1</eval>
			</repeat>
		</repeat>
	</repeat>


	<!-- ***** プラクティスでないなら NEXT STAGE 表示 ***** -->
	<rep><ts>1-($_practice_mode-eq1)</ts>
		<actionRef label="stageend_nextstage_display_action"></actionRef>
	</rep>

	<!-- ***** 次のステージ移動アクション ***** -->
	<actionRef label="stageend_nextstage_go_action"><p>$gonextstageflag</p></actionRef>

</action>


<!-- *********************************************************************************** -->
<!-- ***** NEXT STAGE 表示アクション  ************************************************** -->
<!-- *********************************************************************************** -->
<action label="stageend_nextstage_display_action">

	<wait>30</wait>
	<actionRef label="common_scenetrans_nextstage_judge"></actionRef>

	<!-- *** 普通は表示するが... *** -->
	<eval n="nextstagedisplayon">1</eval>

	<!-- *** ６面なら表示しない *** -->
	<rep><ts>$_stagenum-eq6</ts>
			<eval n="nextstagedisplayon">0</eval>
	</rep>

	<!-- *** SEQUEL なら表示しない *** -->
	<rep><ts>$_stagenum-eq7</ts>
			<eval n="nextstagedisplayon">0</eval>
	</rep>

	<!-- 未実装 -->
	<!--
	<rep><ts>$nextstagedisplayon</ts>
		<wait>90</wait>
		<actionRef label="stageend_nextstage_create_action"><param>140+360-12*14-24</param><param>480-16</param></actionRef>
		<sound type="se">
			<track><file type="ogg">cursor_sel</file></track>
			<play><flag>0</flag><loop>0</loop></play>
		</sound>  
	</rep>
	-->

</action>

<!-- *********************************************************************************** -->
<!-- ***** 次のステージ移動アクション ************************************************** -->
<!-- *********************************************************************************** -->
<action label="stageend_nextstage_go_action">
	
	<!-- *** gonextstageflag は パラメータ渡しされる *** -->
	<eval n="gonextstageflag">$1</eval>

	<!-- *** ボーナス表示時間 *** -->
	<w>90</w>
	<!-- *** 自動で次の画面に進むまでの待ち時間 *** -->
	<eval n="nextwait">480</eval>


	<!-- ********************************** -->
	<!-- *** 次のステージに進まない場合 *** -->
	<!-- ********************************** -->
	<repeat><times>1-($gonextstageflag-eq0)</times>

		<create>
			<x>0</x><y>0</y>
			<cursor>
				<decidedRef    label="cursor_stageend_decided"></decidedRef>
				<selectedRef   label="cursor_stageend_selected"></selectedRef>
				<actionRef	   label="cursor_stageend_action"></actionRef>
			</cursor>
		</create>
		
		<!-- ***   1 : リプレイを保存してタイトルに戻る                      *** -->	
		<repeat><times>$gonextstageflag-eq1</times>
			<create>
				<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction><x>0</x><y>0</y>
				<selectableRef label="selectable_practice_stageend"></selectableRef>
			</create>	
			<wait>$nextwait</wait>
			<actionRef label="selectable_practice_stageend_decided_action"></actionRef>
			<repeat><times>-1</times>
				<wait>60</wait>
			</repeat>
		</repeat>
		

		<!-- ***   2 : リプレイ選択画面に戻る                                *** -->	
		<repeat><times>$gonextstageflag-eq2</times>
			<create>
				<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction>
				<x>0</x><y>0</y>
				<selectableRef label="selectable_replay_stageend"></selectableRef>
			</create>

			<wait>$nextwait</wait>
			<actionRef    label="selectable_replay_stageend_decided_action"></actionRef>
			<repeat><times>-1</times>
				<wait>60</wait>
			</repeat>
		</repeat>
				
		<!-- ***   3 : リプレイから再開でリプレイ保存                        *** -->	
		<repeat><times>$gonextstageflag-eq3</times>
<!--			<wait>$nextwait</wait> -->
			<w>120</w>
			<actionRef label="stageend_all_blackbg_create_action"></actionRef>

			<!-- コンティニュー回数ゼロならリプレイ保存可能 -->
			<repeat><times>$_continuenum-eq0</times>
				<system><command>switchpause</command></system>
				<actionRef label="gameover_practice_savereplay_string_create_action"></actionRef>
				<actionRef label="gameover_practice_savereplay_selectable_create_action"></actionRef>
			</repeat>
			<repeat><times>1-($_continuenum-eq0)</times>
				<system><command>endreplay</command></system>
				<system><command>clearreplay</command></system>

				<wait>$nextwait</wait>
				<actionRef    label="common_scenetrans_goto_title_action"></actionRef>
				<repeat><times>-1</times>
					<wait>60</wait>
				</repeat>
			</repeat>


			<repeat><times>-1</times>
				<wait>60</wait>
			</repeat>
		</repeat>

		<!-- ***   4 : デモ用タイトルに戻る                                  *** -->	
		<repeat><times>$gonextstageflag-eq4</times>
			<create>
				<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction>
				<x>0</x><y>0</y>
				<selectableRef label="selectable_trial_stageend"></selectableRef>
			</create>

			<wait>$nextwait</wait>
			<actionRef    label="selectable_trial_stageend_decided_action"></actionRef>
			<repeat><times>-1</times>
				<wait>60</wait>
			</repeat>
		</repeat>
	</repeat>
	
	<!-- ************************** -->
	<!-- *** 次のステージに進む *** -->
	<!-- ************************** -->
	<create>
		<x>0</x><y>0</y>
		<cursor>
			<decidedRef    label="cursor_stageend_decided"></decidedRef>
			<selectedRef   label="cursor_stageend_selected"></selectedRef>
			<actionRef	   label="cursor_stageend_action"></actionRef>
		</cursor>
	</create>

	<rep><ts>1-($_difficulty-eq4)</ts>
		<create>
			<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction>
			<x>0</x><y>0</y>
			<selectableRef label="selectable_stageend"></selectableRef>
		</create>
	</rep>
	<rep><ts>$_difficulty-eq4</ts>
		<create>
			<cx>0</cx><cy>0</cy><speed>0</speed><direction>0</direction>
			<x>0</x><y>0</y>
			<selectableRef label="selectable_sequel_stageend"></selectableRef>
		</create>
	</rep>


	<wait>$nextwait</wait>
	<actionRef    label="selectable_stageend_decided_action"></actionRef>
	<repeat><times>-1</times>
		<wait>60</wait>
	</repeat>

</action>


<!-- *********************************************************************************** -->
<!-- ***** 最終ステージ終了時アクション ************************************************ -->
<!-- *********************************************************************************** -->
<action label="allstageend_action">
</action>



<!-- *********************************************************************************** -->
<!-- ***** ダミー・カーソル ************************************************************ -->
<!-- *********************************************************************************** -->
<action   label="cursor_stageend_action"></action>
<selected label="cursor_stageend_selected"></selected>
<decided  label="cursor_stageend_decided"><vanish></vanish></decided>


<!-- *********************************************************************************** -->
<!-- ***** ダミー選択肢 **************************************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_stageend">
	<decidedRef    label="selectable_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_stageend_decided">
	<actionRef    label="selectable_stageend_decided_action"></actionRef>
</decided>

<selected   label="selectable_stageend_selected"></selected>
<unselected label="selectable_stageend_unselected"></unselected>

<revenge	label="selectable_stageend_revenge">
	<vanish></vanish>
</revenge>
<action	    label="selectable_stageend_action"></action>

<action    label="selectable_stageend_decided_action">
	<system><command>onlyoneinstance</command></system>

	<changeTargetVolume label="bgm">
		<num>-10000</num><term>60</term>
	</changeTargetVolume>
	
	<wait>10</wait>

	<!-- ***** リプレイ終了 ***** -->
	<system><command>disablepause</command></system>
	<system><command>endreplay</command></system>
	
	<actionRef label="stageend_all_blackbg_create_action"></actionRef>

	<!-- ************************************************************** -->
	<!-- ***** 実績表示 *********************************************** -->
	<!-- ************************************************************** -->
	<rep><ts>($_practice_mode-eq0)*($_replay_mode-eq0)</ts>
		<create>
			<cx>320</cx><cy>240</cy><speed>0</speed><dir>0</dir>
			<object>
				<repeat><times>$_stagenum-lt6</times>
					<actionRef label="check_new_collection_stageend_action"></actionRef>
				</repeat>
				<actionRef label="common_scenetrans_stage_async_action"></actionRef>
				<wait>30</wait>
				<actionRef label="common_scenetrans_stage_action"></actionRef>
			</object>
		</create>
	</rep>

	<rep><ts>1-($_practice_mode-eq0)*($_replay_mode-eq0)</ts>
		<create>
			<cx>320</cx><cy>240</cy><speed>0</speed><dir>0</dir>
			<object>
				<actionRef label="common_scenetrans_stage_async_action"></actionRef>
				<wait>30</wait>
				<actionRef label="common_scenetrans_stage_action"></actionRef>
			</object>
		</create>
	</rep>

	<vanish></vanish>


</action>

<!-- *********************************************************************************** -->
<!-- ***** SEQUEL ダミー選択肢 エピローグ前 ******************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_sequel_stageend">
	<decidedRef    label="selectable_sequel_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_sequel_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_sequel_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_sequel_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_sequel_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_sequel_stageend_decided">
	<actionRef    label="selectable_sequel_stageend_decided_action"></actionRef>
</decided>

<selected   label="selectable_sequel_stageend_selected"></selected>
<unselected label="selectable_sequel_stageend_unselected"></unselected>

<revenge	label="selectable_sequel_stageend_revenge">
	<vanish></vanish>
</revenge>
<action	    label="selectable_sequel_stageend_action">
</action>

<action    label="selectable_sequel_stageend_decided_action">
	<system><command>onlyoneinstance</command></system>
<!--
	<changeTargetVolume label="bgm">
		<num>-10000</num><term>60</term>
	</changeTargetVolume>
-->	
	<wait>10</wait>

	<!-- ***** リプレイ終了 ***** -->
	<system><command>disablepause</command></system>
	<system><command>endreplay</command></system>

	<create>
		<cx>400</cx><cy>300</cy><speed>0</speed>
		<object>
			<actionRef label="stage_end_comm_text_main_epilogue_action"></actionRef>
		</object>
	</create>

	<vanish></vanish>
</action>

<!-- *********************************************************************************** -->
<!-- ***** SEQUEL ダミー選択肢 エピローグ後 ******************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_sequel_epilogue_stageend">
	<decidedRef    label="selectable_sequel_epilogue_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_sequel_epilogue_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_sequel_epilogue_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_sequel_epilogue_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_sequel_epilogue_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_sequel_epilogue_stageend_decided">
	<actionRef    label="selectable_sequel_epilogue_stageend_decided_action"></actionRef>
</decided>

<selected   label="selectable_sequel_epilogue_stageend_selected"></selected>
<unselected label="selectable_sequel_epilogue_stageend_unselected"></unselected>

<revenge	label="selectable_sequel_epilogue_stageend_revenge">
	<vanish></vanish>
</revenge>
<action	    label="selectable_sequel_epilogue_stageend_action"></action>

<action    label="selectable_sequel_epilogue_stageend_decided_action">

<!-- リプレイの再生の場合 -->
<repeat><times>$_replay_mode-eq1</times>
		<create>
			<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
			<object>
					<actionRef label="stageend_all_blackbg_create_action"></actionRef>
						<create>
							<cx>320</cx><cy>240</cy><speed>0</speed><dir>0</dir>
							<object>
								<system><command>clearreplay</command></system>
								<actionRef label="common_scenetrans_goto_title_action"></actionRef>
							</object>
						</create>
			</object>
		</create>
</repeat>

<!-- リプレイの再生でない場合 -->
<repeat><times>1-($_replay_mode-eq1)</times>

	<repeat><times>$_continuenum-eq0</times>
		<create>
			<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
			<object>
				<pause>1</pause>

				<repeat><times>$_continuenum-eq0</times>

        		    <!-- ハイスコアプレイは Userdata/hiscorereplay に強制リプレイ採取 -->
		            <system><command>commithiscorereplay</command></system>


					<actionRef label="stageend_savereplay_blackbg_create_action"></actionRef>
					<actionRef label="gameover_practice_savereplay_string_create_action"></actionRef>
					<actionRef label="gameover_practice_savereplay_selectable_create_action"></actionRef>
				</repeat>
			</object>
		</create>
		<system><command>switchpause</command></system>
	</repeat>

	<repeat><times>1-($_continuenum-eq0)</times>
		<create>
			<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
			<object>
					<actionRef label="stageend_all_blackbg_create_action"></actionRef>

					<!-- ************************************************************** -->
					<!-- ***** 実績表示 *********************************************** -->
					<!-- ************************************************************** -->
					<rep><ts>($_practice_mode-eq0)*($_replay_mode-eq0)</ts>
						<create>
							<cx>320</cx><cy>240</cy><speed>0</speed><dir>0</dir>
							<object>
								<pause>1</pause>
								<system><command>switchpause</command></system>
								<actionRef label="check_new_collection_gototitle_action"></actionRef>
								<w>30</w>
								<system><command>clearreplay</command></system>
								<actionRef label="common_scenetrans_goto_title_action"></actionRef>
							</object>
						</create>
					</rep>

			</object>
		</create>
	</repeat>
</repeat>


	<vanish></vanish>

</action>

<!-- *********************************************************************************** -->
<!-- ***** プラクティス用ダミー選択肢 ************************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_practice_stageend">
	<decidedRef    label="selectable_practice_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_practice_stageend_decided">
	<actionRef    label="selectable_practice_stageend_decided_action"></actionRef>
</decided>

<action    label="selectable_practice_stageend_decided_action">
	<system><command>onlyoneinstance</command></system>

	<changeTargetVolume label="bgm">
		<num>-10000</num><term>60</term>
	</changeTargetVolume>
	<wait>10</wait>

	<!-- ***** リプレイ終了 ***** -->
	<system><command>endreplay</command></system>
	<system><command>disablepause</command></system>

	<actionRef label="stageend_all_blackbg_create_action"></actionRef>


	<repeat><times>$_continuenum-eq0</times>

		<!-- ハイスコアプレイは Userdata/hiscorereplay に強制リプレイ採取 -->
		<system><command>commithiscorereplay</command></system>

		<create>
			<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
			<object>
				<pause>1</pause>

				<repeat><times>$_continuenum-eq0</times>
					<actionRef label="stageend_savereplay_blackbg_create_action"></actionRef>
					<actionRef label="gameover_practice_savereplay_string_create_action"></actionRef>
					<actionRef label="gameover_practice_savereplay_selectable_create_action"></actionRef>
				</repeat>
			</object>
		</create>
		<system><command>switchpause</command></system>
	</repeat>

	<repeat><times>1-($_continuenum-eq0)</times>
		<create>
			<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
			<object>

				<!-- SEQUEL でコンティニュー有りなら、ここで実績表示 -->
				<rep><ts>$_stagenum-eq7</ts>
					<actionRef label="stageend_all_blackbg_create_action"></actionRef>

					<!-- ************************************************************** -->
					<!-- ***** 実績表示 *********************************************** -->
					<!-- ************************************************************** -->
					<rep><ts>($_practice_mode-eq0)*($_replay_mode-eq0)</ts>
						<create>
							<cx>320</cx><cy>240</cy><speed>0</speed><dir>0</dir>
							<object>
								<pause>1</pause>
								<system><command>switchpause</command></system>
								<actionRef label="check_new_collection_gototitle_action"></actionRef>
								<w>30</w>
								<system><command>clearreplay</command></system>
								<actionRef label="common_scenetrans_goto_title_action"></actionRef>
							</object>
						</create>
					</rep>
				</rep>

				<!-- SEQUEL 以外の場合タイトルへ -->
				<rep><ts>1-($_stagenum-eq7)</ts>
					<system><command>clearreplay</command></system>
					<actionRef label="common_scenetrans_goto_title_action"></actionRef>
				</rep>
			</object>
		</create>
	</repeat>

	<vanish></vanish>
</action>


<!-- *********************************************************************************** -->
<!-- ***** リプレイ用ダミー選択肢 ****************************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_replay_stageend">
	<decidedRef    label="selectable_replay_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_replay_stageend_decided">
	<actionRef    label="selectable_replay_stageend_decided_action"></actionRef>
</decided>

<action    label="selectable_replay_stageend_decided_action">
	<system><command>onlyoneinstance</command></system>

	<changeTargetVolume label="bgm">
		<num>-10000</num><term>60</term>
	</changeTargetVolume>
	<wait>10</wait>

	<!-- ***** リプレイ終了 ***** -->
	<system><command>endreplay</command></system>
	<system><command>disablepause</command></system>

	<actionRef label="stageend_all_blackbg_create_action"></actionRef>
	<wait>30</wait>
	<actionRef label="common_scenetrans_goto_replay_back_action"></actionRef>
</action>


<!-- *********************************************************************************** -->
<!-- ***** 体験版用ダミー選択肢 ******************************************************** -->
<!-- *********************************************************************************** -->
<selectable label="selectable_trial_stageend">
	<decidedRef    label="selectable_trial_stageend_decided"></decidedRef>
	<selectedRef   label="selectable_stageend_selected"></selectedRef>
	<unselectedRef label="selectable_stageend_unselected"></unselectedRef>
	<revengeRef	   label="selectable_stageend_revenge"></revengeRef>
	<actionRef	   label="selectable_stageend_action"></actionRef>
</selectable>

<decided    label="selectable_trial_stageend_decided">
	<actionRef    label="selectable_trial_stageend_decided_action"></actionRef>
</decided>

<action    label="selectable_trial_stageend_decided_action">
	<system><command>onlyoneinstance</command></system>

	<changeTargetVolume label="bgm">
		<num>-10000</num><term>60</term>
	</changeTargetVolume>
	<wait>10</wait>

	<!-- ***** リプレイ終了 ***** -->
	<system><command>endreplay</command></system>
	<system><command>disablepause</command></system>

	<create>
		<speed>0</speed><direction>0</direction><cx>320</cx><cy>240</cy>
		<object>
			<pause>1</pause>
			
				<system><command>clearreplay</command></system>
				<actionRef label="common_scenetrans_goto_title_action"></actionRef>

		</object>
	</create>
	
	<repeat><times>$_continuenum-eq0</times>
		<system><command>switchpause</command></system>
	</repeat>
	
	<vanish></vanish>
</action>



<!-- *********************************************************************************** -->
<!-- ***** 背景を暗くする ************************************************************** -->
<!-- *********************************************************************************** -->
<action label="stageend_all_blackbg_create_action">
	<create>
		<direction type="absolute">0</direction>
		<speed type="absolute">0</speed>
		<cx>400</cx><cy>300</cy>
		<object>
			<pause>$_pausemode</pause>
			<eval n="displaywidth">802</eval>

			<img type="normal">
				<file type="dds">rectwhite</file>
				<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
				<width>$displaywidth</width><height>602</height>
				<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
			</img>

			<setDrawLevel><num>33</num></setDrawLevel>
			<changeColor>
				<alpha>255</alpha><red>0</red><green>0</green><blue>0</blue><term>30</term>			
			</changeColor>
		</object>
	</create>

	<wait>30</wait>

</action>

<action label="stageend_blackbg_create_action">
	<create>
		<direction type="absolute">0</direction>
		<speed type="absolute">0</speed>
		<cx>400</cx><cy>300</cy>
		<object>

			<eval n="displaywidth">500</eval>

			<img type="normal">
				<file type="dds">rectwhite</file>
				<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
				<width>$displaywidth</width><height>602</height>
				<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
			</img>

			<setDrawLevel><num>1</num></setDrawLevel>
			<changeColor>
				<alpha>255</alpha><red>0</red><green>0</green><blue>0</blue><term>30</term>			
			</changeColor>
		</object>
	</create>
	<wait>30</wait>
</action>

<action label="stageend_savereplay_blackbg_create_action">
	<create>
		<direction type="absolute">0</direction>
		<speed type="absolute">0</speed>
		<cx>400</cx><cy>300</cy>
		<object>
			<pause>1</pause>
			<img type="normal">
				<file type="dds">rectwhite</file>
				<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
				<width>802</width><height>602</height>
				<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
			</img>
			<setDrawLevel><num>33</num></setDrawLevel>
			<changeColor>
				<alpha>255</alpha><red>0</red><green>0</green><blue>0</blue><term>30</term>			
			</changeColor>
		</object>
	</create>
	<wait>30</wait>
</action>

<action label="clearbonus_blackbg_create_action">
	<create>
		<direction type="absolute">0</direction>
		<speed type="absolute">0</speed>
		<cx>400</cx><cy>300</cy>
		<object>

			<eval n="displaywidth">500</eval>

			<img type="normal">
				<file type="dds">rectwhite</file>
				<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
				<width>$displaywidth</width><height>602</height>
				<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
			</img>

			<setDrawLevel><num>30</num></setDrawLevel>
			<changeColor>
				<alpha>255</alpha><red>0</red><green>0</green><blue>0</blue><term>30</term>			
			</changeColor>
		</object>
	</create>
	<wait>30</wait>
</action>


</exbulletml>
