<?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+$__temp_grank*400</p>
		<p>0</p>
		<p>160000+($__temp_grank-gt2)*20000+($__temp_grank-gt3)*20000+($__temp_grank-gt4)*20000</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>
F
</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">264</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">230</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">110</eval>
		<revengeRef label="stage_middle_boss_03_revenge"><p>$cross_over</p></revengeRef>

		<global name="timer">12</global>
		<global name="timerwait">215</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">272</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">272</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>3.6</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>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01d"><p>0</p><p>1</p></fRef>
	<w>80</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01d"><p>0</p><p>-1</p></fRef>
	<w>80</w>

	<w>60</w>
	<eval name="mv_dir1">$_player_cx%2</eval>
	<eval name="mv_dir2">$_player_cy%2</eval>
	<eval name="mv_dir">90-180*$dir1+(15-30*$dir2)</eval>
	<w>5</w>
	<chS><sp>3</sp><tm>10</tm></chS>
	<chD><dir type="abs">$mv_dir</dir><tm>1</tm></chD>
	<w>30</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>40</w>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>

	<eval name="wt_tm">96</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01_2d"><p>0</p><p>$wt_tm</p></fRef>
	<fRef l="enemy_fire_mb_01_2d"><p>180</p><p>$wt_tm</p></fRef>
	<repeat><times>8</times>
	<w>16</w>
	<evaladd name="wt_tm">-12</evaladd>
	<fRef l="enemy_fire_mb_01_2d"><p>0</p><p>$wt_tm</p></fRef>
	<fRef l="enemy_fire_mb_01_2d"><p>180</p><p>$wt_tm</p></fRef>
	</repeat>

	<w>90</w>
	<eval name="mv_dir">-90+180*$dir1+(7.5-15*$dir2)</eval>

	<chS><sp>5</sp><tm>10</tm></chS>
	<chD><dir type="abs">$mv_dir</dir><tm>1</tm></chD>
	<w>36</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>120</w>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>

	<eval name="wt_tm">96</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb_01_2d"><p>0</p><p>$wt_tm</p></fRef>
	<fRef l="enemy_fire_mb_01_2d"><p>180</p><p>$wt_tm</p></fRef>
	<repeat><times>8</times>
	<w>16</w>
	<evaladd name="wt_tm">-12</evaladd>
	<fRef l="enemy_fire_mb_01_2d"><p>0</p><p>$wt_tm</p></fRef>
	<fRef l="enemy_fire_mb_01_2d"><p>180</p><p>$wt_tm</p></fRef>
	</repeat>

	<w>90</w>
	<eval name="mv_dir">90-180*$dir1</eval>

	<chS><sp>3.06</sp><tm>10</tm></chS>
	<chD><dir type="abs">$mv_dir</dir><tm>1</tm></chD>
	<w>30</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>120</w>


	<!-- タイマーチェック -->
	<eval name="time_check2">$_stageplayframe-$time_check1</eval>
	<debugstr><string>midbossEX</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>


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

<action  label="stage_middle_boss_02_action">

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

	<changePosition type="center">
		<x>320</x><y>200</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>

	<eval name="count">1</eval>

	<createRef label="stageEX_sensor_U"><p>180</p><p>320</p><p>$_self_cy</p></createRef>
	<w>4</w>
	<eval name="sp">1.8+($__temp_grank*0.2)</eval>
	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_mb_02_10"><p>0</p><p>$sp</p><p>6</p></fireRef>
	<repeat><times>9</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>6</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>5</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>4</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>2</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>6</p><p>$sp</p><p>1</p></fireRef>
	</repeat>
	<w>50</w>
	<evaladd name="count">1</evaladd>


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

	<createRef label="stageEX_sensor_U"><p>180</p><p>320</p><p>-2</p></createRef>
	<w>36</w>
	<createRef label="stageEX_sensor_L"><p>90</p><p>138</p><p>240</p></createRef>
	<w>90</w>

	<eval name="sp">1.8+($__temp_grank*0.2)</eval>
	<w>1</w>
	<repeat><times>($__temp_grank-gt3)</times>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_mb_02_10"><p>0</p><p>$sp</p><p>6</p></fireRef>
	<repeat><times>9</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>6</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>5</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>4</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>2</p></fireRef>
	</repeat>
	<w>1</w>
	</repeat>
	<repeat><times>1-($judge-gt0)</times>
	<w>5</w>
	</repeat>


	<createRef label="stageEX_sensor_R"><p>-90</p><p>502</p><p>240</p></createRef>
	<w>60</w>
	<repeat><times>$__temp_grank-gt0</times>
		<createRef label="stageEX_sensor_D"><p>0</p><p>320</p><p>482</p></createRef>
	</repeat>
	<w>89</w>

	<eval name="judge">($__temp_grank-gt2)+($__temp_grank-gt1)*($count%2)</eval>
	<eval name="sp">1.8+($__temp_grank*0.2)</eval>
	<w>1</w>
	<repeat><times>$judge-gt0</times>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_mb_02_10"><p>0</p><p>$sp</p><p>6</p></fireRef>
	<repeat><times>9</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>6</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>5</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>4</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fireRef l="enemy_fire_mb_02_10s"><p>7.2</p><p>$sp</p><p>2</p></fireRef>
	</repeat>
	<w>1</w>
	</repeat>
	<repeat><times>1-($judge-gt0)</times>
	<w>5</w>
	</repeat>
	<w>25</w>
	<evaladd name="count">1</evaladd>

	<!-- タイマーチェック -->
	<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>320</x><y>160</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"/>
	<eval name="vital">16</eval>

	<wait>1</wait>

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

	<eval name="sp">4</eval>
	<eval name="dir1">0</eval>
	<eval name="dir2">0</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<!-- 左へ -->
	<eval name="dir0">1.75-($__temp_grank-lt4)*0.05-($__temp_grank-lt3)*0.05-($__temp_grank-lt2)*0.05</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<!-- 中央に戻す -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<!-- 狭める -->
	<repeat><times>3</times>
	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<eval name="dir0">1.75-($__temp_grank-lt4)*0.05-($__temp_grank-lt3)*0.05-($__temp_grank-lt2)*0.05</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>
	<evaladd name="dir2">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50-$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50-$dir2*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>
	<evaladd name="dir2">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50-$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50-$dir2*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>
	</repeat>

	<evaladd name="vital">24</evaladd>

	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<!-- 右へ -->
	<eval name="dir0">1.75-($__temp_grank-lt4)*0.05-($__temp_grank-lt3)*0.05-($__temp_grank-lt2)*0.05</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>
	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<!-- 中央に戻す -->
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50+$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50+$dir1*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>

	<!-- 狭める -->
	<eval name="dir0">1.75-($__temp_grank-lt4)*0.05-($__temp_grank-lt3)*0.05-($__temp_grank-lt2)*0.05</eval>
	<repeat><times>3</times>
	<cRef l="enemy_create_mb03ab"><p>100</p><p>$vital</p></cRef>
	<cRef l="enemy_create_mb03ab"><p>-100</p><p>$vital</p></cRef>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">$dir0</evaladd>
	<evaladd name="dir2">-1*$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50-$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50-$dir2*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>15</times>
	<evaladd name="dir1">-1*$dir0</evaladd>
	<evaladd name="dir2">$dir0</evaladd>

	<fRef l="enemy_fire_mb_03ab"><p>150+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-150+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>120+$dir1</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-120+$dir2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>50-$dir1*2</p><p>$sp</p></fRef>
	<fRef l="enemy_fire_mb_03ab"><p>-50-$dir2*2</p><p>$sp</p></fRef>
	<w>2</w>
	</repeat>
	</repeat>
	<evaladd name="vital">24</evaladd>

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

</repeat>
<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>
<createRef label="stage1_boss_et2"></createRef>

<!-- センターポイントへ移動 -->
	<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>110</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"/>

	<w>1</w>

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

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

	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>
	<eval name="cy">$_player_cy-(($count%2)*64)*($_player_cy-gt64)</eval>
	<cRef label="mahoujin_create_mb_04"><p>146</p><p>$cy</p><p>1</p><p>0</p></cRef>

	<repeat><times>3</times>
	<repeat><times>$__temp_grank-lt2</times>
		<aRef l="mb_04_act1"/>
	</repeat>
	<repeat><times>$__temp_grank-eq2</times>
		<aRef l="mb_04_act2"/>
	</repeat>
	<repeat><times>$__temp_grank-eq3</times>
		<aRef l="mb_04_act3"/>
	</repeat>
	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="mb_04_act4"/>
	</repeat>
	</repeat>

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

	<eval name="cy">$_player_cy-(($count%2)*64)*($_player_cy-gt64)</eval>
	<cRef label="mahoujin_create_mb_04"><p>494</p><p>$cy</p><p>-1</p><p>0</p></cRef>

	<repeat><times>3</times>
	<repeat><times>$__temp_grank-lt2</times>
		<repeat><times>($count%2)-eq0</times>
		<aRef l="mb_04_act3"/>
		</repeat>
		<repeat><times>($count%2)-eq1</times>
		<w>45</w>
		</repeat>
	</repeat>
	<evaladd name="count">1</evaladd>
	<repeat><times>$__temp_grank-eq2</times>
		<aRef l="mb_04_act2"/>
	</repeat>
	<repeat><times>$__temp_grank-eq3</times>
		<aRef l="mb_04_act3"/>
	</repeat>
	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="mb_04_act4"/>
	</repeat>
	</repeat>


	<!-- タイマーチェック -->
	<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>


<a l="mb_04_act1">
	<eval name="sp">1.6+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_04"><p>0</p><p>$sp</p><p>6</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_04s"><p>8</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>8</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>8</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>8</p><p>$sp</p><p>3</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb_04s"><p>8</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<w>40</w>
</a>

<a l="mb_04_act2">
	<eval name="sp">1.6+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_04"><p>0</p><p>$sp</p><p>6</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_04s"><p>7.2</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>7.2</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>7.2</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>7.2</p><p>$sp</p><p>3</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>7.2</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<w>40</w>
</a>

<a l="mb_04_act3">
	<eval name="sp">1.6+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_04"><p>0</p><p>$sp</p><p>6</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>3</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>6</p><p>$sp</p><p>1</p></fRef>
	</repeat>
	<w>40</w>
</a>


<a l="mb_04_act4">
	<eval name="sp">1.6+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_04"><p>0</p><p>$sp</p><p>8</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>8</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>7</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>3</p></fRef>
	</repeat>

	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>2</times>
		<fRef l="enemy_fire_mb_04s"><p>5</p><p>$sp</p><p>1</p></fRef>
	</repeat>
	<w>38</w>
</a>


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

<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>
<createRef label="stage1_boss_et2"></createRef>

<!-- センターポイントへ移動 -->
	<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>110</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"/>

	<w>1</w>


	<cRef label="mahoujin_create_mb_05"><p>494</p><p>474</p><p>-0.8</p><p>0</p></cRef>
	<w>22</w>
	<cRef label="mahoujin_create_mb_05"><p>146</p><p>6</p><p>-0.8</p><p>180</p></cRef>
	<w>23</w>
	<cRef label="mahoujin_create_mb_05"><p>146</p><p>474</p><p>0.8</p><p>0</p></cRef>
	<w>22</w>
	<cRef label="mahoujin_create_mb_05"><p>494</p><p>6</p><p>0.8</p><p>180</p></cRef>
	<w>20</w>

	<cRef label="enemy_laser_create_mb_05_2"><p>45</p><p>-0.4</p></cRef>
	<cRef label="enemy_laser_create_mb_05_2s"><p>90</p><p>-0.4</p></cRef>
	<cRef label="enemy_laser_create_mb_05_2s"><p>90</p><p>-0.4</p></cRef>
	<cRef label="enemy_laser_create_mb_05_2s"><p>90</p><p>-0.4</p></cRef>

	<w>40</w>

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

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

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

	<repeat><times>$__temp_grank-lt2</times>
		<repeat><times>($count%2)-eq0</times>
		<aRef l="mb_05_act2"/>
		</repeat>
		<repeat><times>($count%2)-eq1</times>
		<w>35</w>
		</repeat>
	</repeat>
	<evaladd name="count">1</evaladd>
	<repeat><times>$__temp_grank-eq2</times>
		<aRef l="mb_05_act2"/>
	</repeat>
	<repeat><times>$__temp_grank-eq3</times>
		<aRef l="mb_05_act3"/>
	</repeat>
	<repeat><times>$__temp_grank-gt3</times>
		<aRef l="mb_05_act4"/>
	</repeat>

	<!-- タイマーチェック -->
	<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>



<a l="mb_05_act2">
	<eval name="sp">1.2+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_05"><p>0</p><p>$sp</p><p>6</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_05s"><p>7.2</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>7.2</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>7.2</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>7.2</p><p>$sp</p><p>3</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>7.2</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<w>30</w>
</a>

<a l="mb_05_act3">
	<eval name="sp">1.2+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_05"><p>0</p><p>$sp</p><p>6</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>3</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>6</p><p>$sp</p><p>1</p></fRef>
	</repeat>
	<w>30</w>
</a>


<a l="mb_05_act4">
	<eval name="sp">1.2+($__temp_grank*0.1)</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>

	<fRef l="enemy_fire_mb_05"><p>0</p><p>$sp</p><p>8</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>8</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>7</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>6</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>5</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>4</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>3</p></fRef>
	</repeat>

	<w>1</w>
	<repeat><times>10</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>2</p></fRef>
	</repeat>
	<w>1</w>
	<repeat><times>2</times>
		<fRef l="enemy_fire_mb_05s"><p>5</p><p>$sp</p><p>1</p></fRef>
	</repeat>
	<w>28</w>
</a>



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

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

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">3600</eval>
	<eval name="crystal">16+($__grank-gt2)*2+($__grank-gt3)*2+($__grank-gt4)*2</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">1120</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>-3*$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>13700+400*$__grank</p><p>0</p><p>190000+($__temp_grank-gt2)*30000+($__temp_grank-gt3)*30000+($__temp_grank-gt4)*30000</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">3600</eval>
	<eval name="crystal">18+($__grank-gt2)*2+($__grank-gt3)*2+($__grank-gt4)*2</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">960</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>-3*$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>220000+($__temp_grank-gt2)*40000+($__temp_grank-gt3)*40000+($__temp_grank-gt4)*40000</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">4000</eval>
	<eval name="crystal">12+($__grank-gt2)*2+($__grank-gt3)*2+($__grank-gt4)*2</eval>
	<eval name="red_crystal">60</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>-3*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>

	<wait>60</wait>

	<!-- *** 一定スコア以上でシークレット *** -->

	<debugstr><string>secret_debug</string></debugstr>
	<debugval><num>$_score</num></debugval>
	<sysvar name="_arg0">90</sysvar><eval name="f90">$_gameflag</eval>			

	<eval name="base">11000000+($f90-eq2)*5000000+($f90-eq3)*12000000</eval>

	<!-- *** 次の形態のボスの作成 EM *** -->
	<repeat><times>($_score-gt$base)*($_stagemisscount-eq0)</times>
		<!-- *** 形態数4 secret *** -->
		<sysvar name="secret">$_secret+1</sysvar>
		<aRef l="secret_hint"><p>$f90</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>13000+1000*($_twinstype-eq2)+500*$__grank</p><p>0</p><p>600000+($__temp_grank-gt2)*70000+($__temp_grank-gt3)*70000+($__temp_grank-gt4)*70000</p><p>$__middle_boss_prate4</p>
		</createRef>
	</repeat>
	<repeat><times>1-(($_score-gt$base)*($_stagemisscount-eq0))</times>
		<!-- *** 形態数5 *** -->
		<createRef label="enemy_create_middle_boss">
			<p>$_self_cx</p><p>$_self_cy</p><p>12500+1000*($_twinstype-eq2)+500*$__grank</p><p>0</p><p>300000+($__temp_grank-gt2)*50000+($__temp_grank-gt3)*50000+($__temp_grank-gt4)*50000</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">6000</eval>
	<eval name="crystal">28+($__grank-gt2)*2+($__grank-gt3)*2+($__grank-gt4)*2</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">1200</eval>
	<eval name="distance">$1</eval>

	<!-- Enemy Magic Break -->
	<eval name="emb_prate">-50000-($__grank-gt3)*5000-($__grank-gt4)*5000</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">300000+($__grank-gt3)*50000+($__grank-gt3)*50000+($__grank-gt4)*50000</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">7000</eval>
	<eval name="crystal">32+($__grank-gt2)*2+($__grank-gt3)*2+($__grank-gt4)*2</eval>
	<eval name="red_crystal">60</eval>
	<eval name="multi4">1200</eval>
	<eval name="distance">$1</eval>

	<!-- Enemy Magic Break -->
	<eval name="emb_prate">-70000-($__grank-gt3)*5000-($__grank-gt4)*5000</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">500000+($__grank-gt2)*70000+($__grank-gt3)*70000+($__grank-gt4)*70000</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">
	<createRef label="item_create_05"><param>0</param><param>-64</param></createRef>

	<!-- 画像の後始末 -->
	<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>
