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

<!-- ********************************************************************* -->
<!-- *** 中ボス戦                                                      *** -->
<!-- ***                                                               *** -->

<action label="stage_middle_boss_action">

	<!-- *** 第 N 形態 *** -->
	<global name="boss_state">1</global>
	
	<!-- *** ボスの初期ライフ *** -->
	<global name="boss_life">3</global>

	<!-- *** デバッグ用secret *** -->
<!--
	<global name="boss_secret">0</global>
-->
	<!-- *** 最初のボスオブジェクト作成 *** -->
	<!-- ｘ座標、y座標、体力、inv、スコア、侵食率 -->
	<createRef label="enemy_create_middle_boss">
		<p>320</p>
		<p>-12</p>
		<p>12000+$__grank*400</p>
		<p>0</p>
		<p>125000+$__grank*2000</p>
		<p>$__middle_boss_prate</p>
	</createRef>
	<wait>1</wait>

	<!-- *** ボスのライフ表示オブジェクト作成 *** -->
	<createRef label="boss_life_create"></createRef>

	<!-- *** ボス戦が終わるまで待機                  *** -->	
	<!-- *** 最終形態が終わると Lock 10 が開放される *** -->
	<setLock><num>10</num></setLock>
	<waitLock><num>10</num></waitLock>

</action>

<!-- ********************************************************************* -->
<!-- *** 中ボスオブジェクト作成                                        *** -->
<!-- ***                                                               *** -->
<create label="enemy_create_middle_boss">
	<speed>0</speed><dir>0</dir>
	<cx>$1</cx><cy>$2</cy>
	<vital>$3</vital>
	<inv>$4</inv>
	<score>$5</score>
	<prate>$6</prate>
	<enemyRef label="enemy_middle_boss"></enemyRef>
</create>

<!-- ********************************************************************* -->
<!-- *** 中ボスオブジェクト                                            *** -->
<enemy label="enemy_middle_boss">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>
	<presentRef label="stage_middle_boss_present_01"></presentRef>

	<!-- *** VITAL ゲージはボスの子オブジェクトなのでここで作成 *** -->
	<createRef label="boss_vital_create"></createRef>

	<!-- *** 画面下のボス表示を作成 *** -->
	<createRef label="boss_underbar_create"></createRef>

	<!-- タイマー差分初期化 -->
	<global name="end_offset">0</global>
	<global name="end_flag">0</global>
<!--
	<debugstr><string>ecrystal2</string></debugstr>
	<debugval><num>$_ecrystal2</num></debugval>
-->
	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<eval name="cross_over">80</eval>
		<revengeRef label="stage_middle_boss_01_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">12</global>
		<global name="timerwait">235</global>
		<actionRef  label="create_timer0"></actionRef>
		<actionRef  label="stage_middle_boss_01_action"><p>$cross_over</p></actionRef> 
	</repeat>

	<repeat><times>$__boss_state-eq2</times>
		<aRef l="p_avrage_add"/>
		<eval name="cross_over">100</eval>
		<revengeRef label="stage_middle_boss_02_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">12</global>
		<global name="timerwait">237</global>
<!--		<actionRef  label="create_timer"></actionRef> -->
		<actionRef  label="stage_middle_boss_02_action"><p>$cross_over</p></actionRef> 
	</repeat>

	<repeat><times>$__boss_state-eq3</times>
		<aRef l="p_avrage_add"/>
		<eval name="cross_over">100</eval>
		<revengeRef label="stage_middle_boss_03_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">6</global>
		<global name="timerwait">208</global>
<!--		<actionRef  label="create_timer"></actionRef> -->
		<actionRef  label="stage_middle_boss_03_action"><p>$cross_over</p></actionRef> 
	</repeat>

	<repeat><times>$__boss_state-eq4</times>
		<aRef l="p_avrage_add"/>
		<eval name="cross_over">110</eval>
		<revengeRef label="stage_middle_boss_04_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">12</global>
		<global name="timerwait">234</global>
<!--		<actionRef  label="create_timer"></actionRef> -->
		<actionRef  label="stage_middle_boss_04_action"><p>$cross_over</p></actionRef> 
	</repeat>

	<repeat><times>$__boss_state-eq5</times>
		<aRef l="p_avrage_add"/>
		<eval name="cross_over">110</eval>
		<revengeRef label="stage_middle_boss_05_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">12</global>
		<global name="timerwait">220</global>
<!--		<actionRef  label="create_timer"></actionRef> -->
		<actionRef  label="stage_middle_boss_05_action"><p>$cross_over</p></actionRef> 
	</repeat>

</enemy>


<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第１形態　                                *** -->
<!-- ***                                                               *** -->

<action  label="stage_middle_boss_01_action">
	<changeSpeed>
		<speed>4</speed><tm>0</tm>
	</changeSpeed>
	<changeDirection>
		<dir type="abs">180</dir><tm>0</tm>
	</changeDirection>
	<wait>23</wait>

	<changeSpeed>
		<speed>0</speed><tm>40</tm>
	</changeSpeed>
	<wait>45</wait>

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

	<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>
	<eval name="ch_vital">200</eval>
	<eval name="ad_vital">250</eval>
	<eval name="ad_count">0</eval>
	<eval name="ch_dir">1</eval>
	<w>2</w>


<repeat><times>3</times>

	<debugstr><string>midboss1_place1</string></debugstr>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>

	<!-- タイマーチェック -->
	<eval name="time_check1">$_stageplayframe</eval>
	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>


	<!-- シャボンダマ ×⇒● -->
	<eval name="dir_jud">1-2*(($plyaer_cx+$_player_cy)%2)</eval>

	<repeat><times>$__temp_grank-lt2</times>
		<aRef l="mb_01_act1"><p>$dir_jud</p></aRef>
	</repeat>
	<repeat><times>$__temp_grank-eq2</times>
		<aRef l="mb_01_act2"><p>$dir_jud</p></aRef>
	</repeat>
	<repeat><times>$__temp_grank-eq3</times>
		<aRef l="mb_01_act3"><p>$dir_jud</p></aRef>
	</repeat>
	<repeat><times>$__temp_grank-eq4</times>
		<aRef l="mb_01_act4"><p>$dir_jud</p></aRef>
	</repeat>
	<repeat><times>$__temp_grank-eq5</times>
		<aRef l="mb_01_act5"><p>$dir_jud</p></aRef>
	</repeat>

	<w>180</w>

	<cRef l="enemy_create_mb01"><p>45</p><p>$ch_vital</p><p>($ad_count%2)</p><p>$ch_dir</p></cRef>
	<w>2</w>
	<cRef l="enemy_create_mb01s"><p>90</p><p>$ch_vital</p><p>(($ad_count+1)%2)</p><p>$ch_dir</p></cRef>
	<w>2</w>
	<cRef l="enemy_create_mb01s"><p>90</p><p>$ch_vital</p><p>0</p><p>$ch_dir</p></cRef>
	<w>2</w>
	<cRef l="enemy_create_mb01s"><p>90</p><p>$ch_vital</p><p>0</p><p>$ch_dir</p></cRef>
	<w>2</w>
	<eval name="ch_vital">320+($_ad_count*$ad_vital)</eval>
	<evaladd name="ad_count">1</evaladd>
	<eval name="ch_dir">-1*$ch_dir</eval>

	<w>60</w>

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">31*$dir_jud</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>90</w>

	<cRef l="enemy_fire_mb_01_3d"><p>1</p></cRef>
	<w>2</w>
	<cRef l="enemy_fire_mb_01_3d"><p>-1</p></cRef>

	<w>200</w>

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">180</dir><tm>1</tm></chD>
	<w>16</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>86</w>

	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe-$time_check1</eval>
	<debugstr><string>midbossE1</string></debugstr>
	<debugval><num>$time_check2</num></debugval>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>

</repeat>
<global name="end_flag">1</global>
<wait>120</wait>

</action>

<a l="mb_01_act0">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-20</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-20</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>

	<w>72</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-20</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-16</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>
</a>



<a l="mb_01_act1">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-20</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-20</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>

	<w>72</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-20</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-16</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>
</a>


<a l="mb_01_act2">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-16</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>5</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-16</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>

	<w>60</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-16</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>9</w>
	<repeat><times>5</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-16</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>9</w>
	</repeat>
</a>

<a l="mb_01_act3">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-14</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>7</w>
	<repeat><times>6</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-14</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>7</w>
	</repeat>

	<w>62</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-14</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>7</w>
	<repeat><times>6</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>80</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>95</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-14</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>7</w>
	</repeat>
	<w>2</w>
</a>

<a l="mb_01_act4">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>70</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-12</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>6</w>
	<repeat><times>7</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>70</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-12</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>6</w>
	</repeat>

	<w>60</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">85</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>70</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-12</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>7</w>
	<repeat><times>7</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>70</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>100</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-12</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>7</w>
	</repeat>
</a>

<a l="mb_01_act5">

	<chS><sp>2</sp><tm>10</tm></chS>
	<chD><dir type="abs">78*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">78</eval>
	<eval name="wt_tm">40</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>74</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-11</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>6</w>
	<repeat><times>7</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>74</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-11</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>6</w>
	</repeat>

	<w>60</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90*$1</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>13</w>

	<eval name="mv_tm">78</eval>
	<eval name="wt_tm">60</eval>
	<eval name="count">0</eval>
	<w>2</w>

	<!-- 角度、停止までの時間、停止から破裂までの時間、方向、速度調整 -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01dd"><p>-135</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>74</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<w>1</w>
	<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
	<add name="mv_tm">-11</add>
	<add name="wt_tm">15</add>
	<add name="count">1</add>
	<w>7</w>
	<repeat><times>7</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_01dds"><p>90</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>0</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>74</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<w>1</w>
		<fRef l="enemy_fire_mb_01dds"><p>98</p><p>$mv_tm</p><p>$wt_tm</p><p>1</p><p>$count</p></fRef>
		<add name="mv_tm">-11</add>
		<add name="wt_tm">15</add>
		<add name="count">1</add>
		<w>7</w>
	</repeat>
</a>



<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第２形態　                                *** -->
<!-- ***                                                               *** -->

<action  label="stage_middle_boss_02_action">

<!-- センターポイントへ移動 -->
	<changeSpeed>
		<speed type="absolute">2</speed><term>25</term>
	</changeSpeed>

	<changePosition type="center">
		<x>320</x><y>140</y>
	</changePosition>
	<changeSpeed>
		<speed type="absolute">0</speed><term>2</term>
	</changeSpeed>

	<wait>2</wait>

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

	<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>

	<wait>1</wait>


<repeat><times>15</times>
<!--
	<debugstr><string>midboss1_place1</string></debugstr>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
-->
	<!-- タイマーチェック -->
	<eval name="time_check1">$_stageplayframe</eval>
	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>


	<eval name="rp_tm">3+($__temp_grank-gt0)+($__temp_grank-gt1)+($__temp_grank-gt2)+($__temp_grank-gt3)+($__temp_grank-gt4)+$__temp_grank</eval>
	<eval name="rad">360/$rp_tm</eval>
	<eval name="wt_tm">40-(($rp_tm-5)*4)</eval>
	<eval name="sp1">1.7</eval>
	<eval name="sp2">1.7+($__temp_grank-gt2)*0.2+($__temp_grank-gt3)*0.4+($__temp_grank-gt4)*0.2</eval>

	<w>4</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_02"><p>0</p><p>$sp1</p></fRef>
	<w>4</w>
	<fRef l="enemy_fire_mb_02s"><p>183</p><p>$sp1</p></fRef>
	<repeat><times>$rp_tm-1</times>
		<w>4</w>
		<fRef l="enemy_fire_mb_02s"><p>$rad</p><p>$sp1</p></fRef>
	</repeat>
	<w>$wt_tm</w>
	<chS><sp>1.2</sp><tm>10</tm></chS>
	<chD><dir type="abs">85-170*($_player_cx%2)</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>5</w>

	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_02"><p>95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-95</p><p>$sp1</p></fRef>
	</repeat>
	<repeat><times>$__temp_grank-gt4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_02"><p>95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>115</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-115</p><p>$sp1</p></fRef>
	</repeat>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_02"><p>0</p><p>$sp2</p></fRef>
	<w>4</w>
	<fRef l="enemy_fire_mb_02s"><p>171</p><p>$sp2</p></fRef>
	<repeat><times>$rp_tm-1</times>
		<w>4</w>
		<fRef l="enemy_fire_mb_02s"><p>$rad</p><p>$sp2</p></fRef>
	</repeat>
	<w>$wt_tm</w>

	<chS><sp>1.2</sp><tm>10</tm></chS>
	<chD><dir type="rel">180</dir><tm>1</tm></chD>
	<w>15</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>5</w>

	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_02"><p>95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-95</p><p>$sp1</p></fRef>
	</repeat>
	<repeat><times>$__temp_grank-gt4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_mb_02"><p>95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-95</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>115</p><p>$sp1</p></fRef>
		<fRef l="enemy_fire_mb_02"><p>-115</p><p>$sp1</p></fRef>
	</repeat>
	<w>5</w>

	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe-$time_check1</eval>
	<debugstr><string>midbossE1_2</string></debugstr>
	<debugval><num>$time_check2</num></debugval>

</repeat>
<global name="end_flag">1</global>
<wait>120</wait>
</action>



<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第３形態　                                *** -->
<!-- ***                                                               *** -->

<action  label="stage_middle_boss_03_action">

<!-- センターポイントへ移動 -->
	<changeSpeed>
		<speed type="absolute">2</speed><term>25</term>
	</changeSpeed>

	<changePosition type="center">
		<x>345</x><y>190</y>
	</changePosition>
	<changeSpeed>
		<speed type="absolute">0</speed><term>2</term>
	</changeSpeed>

	<wait>2</wait>

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

	<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>

	<wait>1</wait>


<!--
	<debugstr><string>midboss1_place1</string></debugstr>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
-->
	<!-- タイマーチェック -->
	<eval name="time_check1">$_stageplayframe</eval>
	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>

	<w>5</w>	
	<eval name="bul1">0+($__temp_grank-gt1)</eval>
	<eval name="bul2">0+($__temp_grank-gt2)</eval>
	<eval name="bul3">0+($__temp_grank-gt0)</eval>
	<eval name="bul4">0+($__temp_grank-gt3)</eval>
	<w>5</w>	

	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy-60</p><p>1</p><p>30</p><p>0</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+42.3</p><p>$_self_cy-42.3</p><p>0</p><p>45</p><p>45</p><p>$bul1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+60</p><p>$_self_cy</p><p>0</p><p>25</p><p>90</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+42.3</p><p>$_self_cy+42.3</p><p>1</p><p>39</p><p>135</p><p>$bul4</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy+60</p><p>0</p><p>34</p><p>180</p><p>$bul2</p></cRef>
	<w>15</w>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-42.3</p><p>$_self_cy+42.3</p><p>0</p><p>55</p><p>225</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-60</p><p>$_self_cy</p><p>0</p><p>32</p><p>270</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-42.3</p><p>$_self_cy-42.3</p><p>1</p><p>37</p><p>315</p><p>$bul3</p></cRef>

	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy-90</p><p>0</p><p>45</p><p>0</p><p>$bul3</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+63.5</p><p>$_self_cy-63.5</p><p>0</p><p>39</p><p>45</p><p>1</p></cRef>
	<w>15</w>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+90</p><p>$_self_cy</p><p>0</p><p>30</p><p>90</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+63.5</p><p>$_self_cy+63.5</p><p>1</p><p>135</p><p>60</p><p>$bul1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy+90</p><p>0</p><p>25</p><p>180</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-63.5</p><p>$_self_cy+63.5</p><p>0</p><p>39</p><p>225</p><p>$bul4</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-90</p><p>$_self_cy</p><p>0</p><p>34</p><p>270</p><p>$bul2</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-63.5</p><p>$_self_cy-63.5</p><p>1</p><p>55</p><p>315</p><p>1</p></cRef>
	<w>15</w>

	<w>100</w>
	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="enemy_mb02_act2"/>
		<w>13</w>
	</repeat>
	<repeat><times>1-($__temp_grank-gt3)</times>
		<w>200</w>
	</repeat>

	<repeat><times>1-($__temp_grank-gt3)</times>
		<aRef l="middle_boss_03_act1"/>
	</repeat>
	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="middle_boss_03_act12"/>
	</repeat>

	<chS><sp>1.5</sp><tm>10</tm></chS>
	<chD><dir type="abs">-90</dir><tm>1</tm></chD>
	<w>30</w>
	<chS><sp>0</sp><tm>10</tm></chS>

	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>

	<w>5</w>	
	<eval name="bul1">0+($__temp_grank-gt1)</eval>
	<eval name="bul2">0+($__temp_grank-gt2)</eval>
	<eval name="bul3">0+($__temp_grank-gt0)</eval>
	<eval name="bul4">0+($__temp_grank-gt3)</eval>
	<w>5</w>	

	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy-60</p><p>1</p><p>30</p><p>0</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+42.3</p><p>$_self_cy-42.3</p><p>0</p><p>45</p><p>45</p><p>$bul1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+60</p><p>$_self_cy</p><p>0</p><p>25</p><p>90</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+42.3</p><p>$_self_cy+42.3</p><p>1</p><p>39</p><p>135</p><p>$bul4</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy+60</p><p>0</p><p>34</p><p>180</p><p>$bul2</p></cRef>
	<w>15</w>
	<cRef label="mahoujin_create_mb02h"><p>$_self_cx-42.3</p><p>$_self_cy+42.3</p><p>0</p><p>55</p><p>225</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-60</p><p>$_self_cy</p><p>0</p><p>32</p><p>270</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-42.3</p><p>$_self_cy-42.3</p><p>1</p><p>37</p><p>315</p><p>$bul3</p></cRef>

	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy-90</p><p>0</p><p>45</p><p>0</p><p>$bul3</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+63.5</p><p>$_self_cy-63.5</p><p>0</p><p>39</p><p>45</p><p>1</p></cRef>
	<w>15</w>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+90</p><p>$_self_cy</p><p>0</p><p>30</p><p>90</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx+63.5</p><p>$_self_cy+63.5</p><p>1</p><p>135</p><p>60</p><p>$bul1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx</p><p>$_self_cy+90</p><p>0</p><p>25</p><p>180</p><p>1</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-63.5</p><p>$_self_cy+63.5</p><p>0</p><p>39</p><p>225</p><p>$bul4</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-90</p><p>$_self_cy</p><p>0</p><p>34</p><p>270</p><p>$bul2</p></cRef>
	<cRef label="mahoujin_create_mb02"><p>$_self_cx-63.5</p><p>$_self_cy-63.5</p><p>1</p><p>55</p><p>315</p><p>1</p></cRef>

	<w>15</w>
	<w>100</w>

	<repeat><times>$__temp_grank-gt4</times>
		<aRef l="enemy_mb02_act2"/>
		<w>13</w>
	</repeat>
	<repeat><times>1-($__temp_grank-gt4)</times>
		<w>200</w>
	</repeat>

	<repeat><times>2</times>
		<repeat><times>1-($__temp_grank-gt3)</times>
			<aRef l="middle_boss_03_act1"/>
		</repeat>
		<repeat><times>($__temp_grank-gt3)</times>
			<aRef l="middle_boss_03_act12"/>
		</repeat>
		<w>20</w>

		<repeat><times>1-($__temp_grank-gt3)</times>
			<aRef l="middle_boss_03_act2"/>
		</repeat>
		<repeat><times>($__temp_grank-gt3)</times>
			<aRef l="middle_boss_03_act22"/>
		</repeat>
		<w>20</w>
	</repeat>

	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe-$time_check1</eval>
	<debugstr><string>midbossE1_2</string></debugstr>
	<debugval><num>$time_check2</num></debugval>

<global name="end_flag">1</global>
<wait>120</wait>
</action>

<a l="middle_boss_03_act1">
	<eval name="last">-30</eval>
	<eval name="last2">0.5+($__temp_grank*0.5)-($__temp_grank-gt3)*0.5</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_03_2"><p>-60</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_mb_03_2s"><p>40</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	<repeat><times>20</times>
	<w>3</w>
	<fRef l="enemy_fire_mb_03_2s"><p>-120+$last2</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_mb_03_2s"><p>40</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	</repeat>
</a>
<a l="middle_boss_03_act2">
	<eval name="last">30</eval>
	<eval name="last2">-0.5-($__temp_grank*0.5)+($__temp_grank-gt3)*0.5</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_03_2"><p>60</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_mb_03_2s"><p>-40</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	<repeat><times>30</times>
	<w>2</w>
	<fRef l="enemy_fire_mb_03_2s"><p>120+$last2</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_mb_03_2s"><p>-40</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	</repeat>
</a>

<a l="middle_boss_03_act12">
	<eval name="last">-30</eval>
	<eval name="last2">0.5+($__temp_grank*0.5)-($__temp_grank-gt3)*0.5</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_03_2"><p>-60</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_mb_03_2s"><p>30</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	<repeat><times>20</times>
	<w>3</w>
	<fRef l="enemy_fire_mb_03_2s"><p>-120+$last2</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_mb_03_2s"><p>30</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	</repeat>
</a>
<a l="middle_boss_03_act22">
	<eval name="last">30</eval>
	<eval name="last2">-0.5-($__temp_grank*0.5)+($__temp_grank-gt3)*0.5</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_03_2"><p>60</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_mb_03_2s"><p>-30</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	<repeat><times>30</times>
	<w>2</w>
	<fRef l="enemy_fire_mb_03_2s"><p>120+$last2</p><p>1.9</p><p>$last</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_mb_03_2s"><p>-30</p><p>1.9</p><p>$last</p></fRef>
	</repeat>
	</repeat>
</a>

<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第４形態　                                *** -->
<!-- ***                                                               *** -->

<action  label="stage_middle_boss_04_action">
<!-- SECRET MAGIC 演出 0:mid enemy magic  1:mid secret magic 2:boss enemy magic 3:boss secret magic -->
<actionRef label="enemy_magic_action"><p>0</p><p>50</p><p>25</p><p>135</p><p>25</p></actionRef>

<!-- センターポイントへ移動 -->
	<changeSpeed>
		<speed type="absolute">2</speed><term>25</term>
	</changeSpeed>

	<changePosition type="center">
		<x>320</x><y>170</y>
	</changePosition>
	<changeSpeed>
		<speed type="absolute">0</speed><term>2</term>
	</changeSpeed>

	<wait>2</wait>
	<wait>55</wait>

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>

<!-- 弾のずれ初期値 -->
	<eval name="off">0</eval>
	<eval name="off2">1</eval>
	<eval name="item">0</eval>

<!-- 敵体力用 -->
	<eval name="ch_vital">48</eval>
	<eval name="ad_vital">32</eval>
	<eval name="ad_count">0</eval>

	<w>1</w>
<repeat><times>6</times>
	<!-- タイマーチェック -->
	<eval name="time_check1">$_stageplayframe</eval>

	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>
	<eval name="off3">1.4+($__temp_grank*0.2)-($__temp_grank-gt3)*0.1-($__temp_grank-gt4)*0.2</eval>
	<eval name="off">$off3*$off2</eval>
	<eval name="off2">$off2*(-1)</eval>
	<w>3</w>

	<cRef l="enemy_fire_mb_04d"><p>0</p><p>$off</p></cRef>

	<!-- 4回雑魚 -->
	<cRef l="enemy_create_mb04ab"><p>45</p><p>3.6</p><p>$item</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb04s"><p>90</p><p>3.6</p><p>($item+1)%4</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb04s"><p>90</p><p>3.6</p><p>($item+2)%4</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb04s"><p>90</p><p>3.6</p><p>($item+3)%4</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<evaladd name="ch_vital">$ad_vital</evaladd>

	<cRef l="enemy_fire_mb_04d"><p>0</p><p>$off</p></cRef>
	<w>18</w>
	<repeat><times>4</times>
		<cRef l="enemy_fire_mb_04ds"><p>0</p><p>$off</p></cRef>
		<w>18</w>
	</repeat>
	<eval name="off">$off3*$off2*2</eval>
	<repeat><times>5</times>
		<cRef l="enemy_fire_mb_04ds"><p>0</p><p>$off</p></cRef>
		<w>18</w>
	</repeat>
	<w>15</w>
	<cRef l="enemy_fire_mb_04ds"><p>0</p><p>$off*4</p></cRef>
	<w>25</w>
	<cRef l="enemy_fire_mb_04ds"><p>0</p><p>$off*4</p></cRef>
	<w>25</w>
	<cRef l="enemy_fire_mb_04ds"><p>0</p><p>$off*4</p></cRef>
	<w>25</w>
	<evaladd name="item">1</evaladd>
	<w>120</w>

	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe</eval>
	<debugstr><string>midboss3</string></debugstr>
	<debugval><num>$time_check2-$time_check1</num></debugval>

</repeat>
<global name="end_flag">1</global>

</action>



<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第５形態　                                *** -->
<!-- ***                                                               *** -->

<action  label="stage_middle_boss_05_action">
<!-- SECRET MAGIC 演出 0:mid enemy magic  1:mid secret magic 2:boss enemy magic 3:boss secret magic -->
<actionRef label="enemy_magic_action"><p>1</p><p>50</p><p>25</p><p>135</p><p>25</p></actionRef>

<!-- センターポイントへ移動 -->
	<changeSpeed>
		<speed type="absolute">2</speed><term>25</term>
	</changeSpeed>

	<changePosition type="center">
		<x>320</x><y>130</y>
	</changePosition>
	<changeSpeed>
		<speed type="absolute">0</speed><term>2</term>
	</changeSpeed>

	<wait>2</wait>
	<wait>55</wait>

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>

<!-- 敵体力用 -->
	<eval name="ch_vital">48</eval>
	<eval name="ad_vital">24</eval>
	<eval name="ad_count">0</eval>
	<eval name="item">0</eval>
	<eval name="count">1</eval>

	<w>1</w>
<repeat><times>5</times>
	<!-- タイマーチェック -->
	<eval name="time_check1">$_stageplayframe</eval>

	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>
	<eval name="off">130+($__temp_grank-gt0)*5+($__temp_grank-gt1)*5+($__temp_grank-gt2)*5</eval>
	<eval name="off2">12-($__temp_grank-gt0)*2-($__temp_grank-gt1)-($__temp_grank-gt2)*1.5-($__temp_grank-gt3)*1.5-($__temp_grank-gt4)*1</eval>
	<eval name="count">$count*(-1)</eval>
	<w>3</w>

	<chD><dir type="abs">-85+170*($item%2)</dir><tm>1</tm></chD>
	<chS><sp>2</sp><tm>5</tm></chS>
	<w>10</w>
	<chS><sp>0</sp><tm>5</tm></chS>
	<w>10</w>

	<cRef l="enemy_fire_mb_05d"><p>0</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>
	<w>1</w>
	<cRef l="enemy_fire_mb_05ds"><p>$off2</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>

	<!-- 4回雑魚 -->
	<cRef l="enemy_create_mb05ab"><p>45</p><p>3.6</p><p>$item</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb05s"><p>90</p><p>3.6</p><p>($item+1)%4</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb05s"><p>90</p><p>3.6</p><p>($item+2)%4</p><p>$ch_vital</p></cRef>
	<w>15</w>
	<cRef l="enemy_create_mb05s"><p>90</p><p>3.6</p><p>($item+3)%4</p><p>$ch_vital</p></cRef>
	<w>10</w>
	<evaladd name="ch_vital">$ad_vital</evaladd>
	<evaladd name="item">1</evaladd>
	<w>5</w>

	<cRef l="enemy_fire_mb_05d"><p>0</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>
	<w>1</w>
	<cRef l="enemy_fire_mb_05ds"><p>$off2</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>
	<w>27</w>
	<repeat><times>11</times>
	<cRef l="enemy_fire_mb_05ds"><p>$off2+$count*3</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>
	<w>1</w>
	<cRef l="enemy_fire_mb_05ds"><p>$off2</p><p>$off</p></cRef>
	<eval name="off">-1*$off</eval>
	<w>27</w>
	</repeat>
	<w>50</w>
	<chD><dir type="rel">180</dir><tm>1</tm></chD>
	<chS><sp>2</sp><tm>5</tm></chS>
	<w>10</w>
	<chS><sp>0</sp><tm>5</tm></chS>
	<w>10</w>


	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe</eval>
	<debugstr><string>midboss3</string></debugstr>
	<debugval><num>$time_check2-$time_check1</num></debugval>

</repeat>
<global name="end_flag">1</global>

</action>



<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ　第１形態                                    *** -->
<!-- ***                                                               *** -->

<revenge label="stage_middle_boss_01_revenge">
	<eval name="localcounter">$_counter</eval>
	<eval name="ttc_end">$_ttc_frame</eval>

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">1500*($_difficulty+1)</eval>
	<eval name="crystal">(16+$_difficulty*2)</eval>
	<eval name="red_crystal">50</eval>
	<eval name="multi4">1100+80*($__grank-gt2)</eval>
	<eval name="distance">$1</eval>

	<!-- 子object破壊 -->
	<targetRevenge label="enemy_bullet_mb_01d"></targetRevenge>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>

	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>

	<!-- *** 形態変数の増加 *** -->
	<global name="boss_state">$__boss_state+1</global>

	<!-- *** 表示ライフ減少 *** -->
	<global name="boss_life">$__boss_life-1</global>

	<!-- *** 弾幕のアイテム化 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>

		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-2*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>

	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_middle_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>12700+400*$__grank</p><p>0</p><p>135000+2000*$__grank</p><p>$__middle_boss_prate2</p>
	</createRef>

	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ　第２形態                                    *** -->
<!-- ***                                                               *** -->

<revenge label="stage_middle_boss_02_revenge">
	<eval name="localcounter">$_counter</eval>
	<eval name="ttc_end">$_ttc_frame</eval>

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">1500*($_difficulty+1)</eval>
	<eval name="crystal">(18+$_difficulty*2)</eval>
	<eval name="red_crystal">50</eval>
	<eval name="multi4">1000+80*($__grank-gt2)</eval>
	<eval name="distance">$1</eval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>

	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>

	<!-- *** 形態変数の増加 *** -->
	<global name="boss_state">$__boss_state+1</global>

	<!-- *** 表示ライフ減少 *** -->
	<global name="boss_life">$__boss_life-1</global>

	<!-- *** 弾幕のアイテム化 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>

		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-2*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>

	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_middle_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>6400+100*$__grank</p><p>0</p><p>140000+2000*$__grank</p><p>$__middle_boss_prate3</p>
	</createRef>

	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ　第３形態                                    *** -->
<!-- ***                                                               *** -->

<revenge label="stage_middle_boss_03_revenge">
	<eval name="localcounter">$_counter</eval>
	<eval name="ttc_end">$_ttc_frame</eval>

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">1500*($_difficulty+1)</eval>
	<eval name="crystal">(16+$_difficulty*2)</eval>
	<eval name="red_crystal">50</eval>
	<eval name="multi4">720</eval>
	<eval name="distance">$1</eval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>

	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_2"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>

	<!-- *** 形態変数の増加 *** -->
	<global name="boss_state">$__boss_state+1</global>

	<!-- *** 表示ライフ減少 *** -->
	<global name="boss_life">$__boss_life-1</global>

	<!-- *** 弾幕のアイテム化 *** -->
	<!-- *** 自爆の場合は、弾けし *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>320</cx><cy>240</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-2*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>

	<wait>60</wait>

	<!-- *** x6の数 20 より大きいで第5形態へ *** -->

	<debugstr><string>secret_debug</string></debugstr>
	<debugval><num>$__m6_count</num></debugval>

	<eval name="base">20</eval>

	<!-- *** 次の形態のボスの作成 EM *** -->
	<repeat><times>($__m6_count-gt$base)*($_stagemisscount-eq0)</times>
		<!-- *** 形態数4 secret *** -->
		<sysvar name="secret">$_secret+1</sysvar>
		<aRef l="secret_hint"><p>$base</p></aRef>
		<global name="boss_state">$__boss_state+1</global>
		<createRef label="enemy_create_middle_boss">
			<p>$_self_cx</p><p>$_self_cy</p><p>12500+500*$__grank</p><p>0</p><p>260000+2000*$__grank</p><p>$__middle_boss_prate4</p>
		</createRef>
	</repeat>
	<repeat><times>1-(($__m6_count-gt$base)*($_stagemisscount-eq0))</times>
		<!-- *** 形態数5 *** -->
		<createRef label="enemy_create_middle_boss">
			<p>$_self_cx</p><p>$_self_cy</p><p>13000+500*$__grank</p><p>0</p><p>210000+2000*$__grank</p><p>$__middle_boss_prate4</p>
		</createRef>
	</repeat>

	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ　第４形態                                    *** -->
<!-- ***                                                               *** -->

<revenge label="stage_middle_boss_04_revenge">
	<eval name="localcounter">$_counter</eval>
	<eval name="ttc_end">$_ttc_frame</eval>

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">2000*($_difficulty+1)</eval>
	<eval name="crystal">(20+$_difficulty*2)</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">1000</eval>
	<eval name="distance">$1</eval>

	<!-- Enemy Magic Break -->
	<eval name="emb_prate">-13000-($__grank-gt3)*2000-($__grank-gt4)*2000</eval>
	<eval name="emb_prate_tmp1">((-1*$emb_prate)/10000)%10</eval>
	<eval name="emb_prate_tmp2">((-1*$emb_prate)/1000)%10</eval>
	<eval name="emb_score">170000+($__grank-gt3)*20000+($__grank-gt4)*20000</eval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>

	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_4"></actionRef>
	<actionRef label="bg_bossend_action"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>


	<!-- *** 弾幕のアイテム化 *** -->
	<!-- *** 自爆の場合は、弾けし *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>320</cx><cy>240</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<!-- *** ノーミスノーボムチェック *** -->
		<eval name="etb_j">(($ttc_end-$__ttc_start)-eq($localcounter-$__counter_tmp))*($__ttc_start-gt((300*$_magic_rate/100)-60))</eval>
		<repeat><times>$etb_j</times>
			<actionRef label="emb_letter"><p>$emb_prate_tmp1</p><p>$emb_prate_tmp2</p></actionRef>
			<addPRate><num>$emb_prate</num></addPRate>
			<addScore><score>$emb_score</score></addScore>
			<sysvar name="tbchain">$_tbchain+1</sysvar>
			<addRank><num>$rank_inc</num></addRank>
		</repeat>

		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-3*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>
	<wait>60</wait>

	<actionRef label="stage_middle_boss_final_revenge_action"></actionRef>
</revenge>


<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ　第５形態                                    *** -->
<!-- ***                                                               *** -->

<revenge label="stage_middle_boss_05_revenge">
	<eval name="localcounter">$_counter</eval>
	<eval name="ttc_end">$_ttc_frame</eval>

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">2400*($_difficulty+1)</eval>
	<eval name="crystal">(22+$_difficulty*2)</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">1000</eval>
	<eval name="distance">$1</eval>

	<!-- Enemy Magic Break -->
	<eval name="emb_prate">-14000-($__grank-gt3)*2000-($__grank-gt4)*2000</eval>
	<eval name="emb_prate_tmp1">((-1*$emb_prate)/10000)%10</eval>
	<eval name="emb_prate_tmp2">((-1*$emb_prate)/1000)%10</eval>
	<eval name="emb_score">190000+($__grank-gt3)*20000+($__grank-gt4)*20000</eval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>

	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_4"></actionRef>
	<actionRef label="bg_bossend_action"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>


	<!-- *** 弾幕のアイテム化 *** -->
	<!-- *** 自爆の場合は、弾けし *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>320</cx><cy>240</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<!-- *** ノーミスノーボムチェック *** -->
		<eval name="etb_j">(($ttc_end-$__ttc_start)-eq($localcounter-$__counter_tmp))*($__ttc_start-gt((300*$_magic_rate/100)-60))</eval>
		<repeat><times>$etb_j</times>
			<actionRef label="emb_letter"><p>$emb_prate_tmp1</p><p>$emb_prate_tmp2</p></actionRef>
			<addPRate><num>$emb_prate</num></addPRate>
			<addScore><score>$emb_score</score></addScore>
			<sysvar name="tbchain">$_tbchain+1</sysvar>
			<addRank><num>$rank_inc</num></addRank>
		</repeat>

		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-3*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>
	<wait>60</wait>

	<actionRef label="stage_middle_boss_final_revenge_action"></actionRef>
</revenge>


<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ・サブアクション　最終形態                    *** -->
<!-- ***                                                               *** -->
<action label="stage_middle_boss_final_revenge_action">

	<!-- 画像の後始末 -->
	<targetRevenge label="stage_boss_timer_fig"></targetRevenge>
	<targetRevenge label="namebox"></targetRevenge>

	<targetRevenge label="boss_life"></targetRevenge>
	<actionRef l="bg_midbossend_action"></actionRef>

	<!-- *** ボス戦ロックを解除 *** -->
	<releaseLock><num>10</num></releaseLock>

	<!-- *** 終了 *** -->
	<vanish></vanish>	
</action>
	



</exbulletml>
