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

<!-- ********************************************************************* -->
<!-- *** 中ボス戦１回目                                                      *** -->
<!-- ***                                                               *** -->

<!-- 暫定 -->
<!-- ボススコア、タイマー -->
<!-- ボスの周りのリング -->
<!-- start boss bullet -->

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

	<!-- *** boss バリアフラグ初期化 *** -->
	<global name="boss_barrier">0</global>

	<!-- *** boss パーツフラグ初期化 *** -->
	<global name="boss_parts">0</global>

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<!-- ｘ座標、y座標、体力、スコア、タイムボーナス、abs -->
	<createRef label="enemy_create_middle_boss_1">
		<p>650+12</p>
		<p>90</p>
		<p>14000</p>
<!--		<p>14000</p> -->
		<p>30000</p>
		<p>100000+5000*$_difficulty</p>
		<p>500000</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_1">
	<speed>0</speed><dir>0</dir>
	<cx>$1</cx><cy>$2</cy>
	<vital>$3</vital>
	<inv>0</inv>
	<score>0</score>
	<prate>$6</prate>
	<flag>128</flag>
	<enemyRef label="enemy_middle_boss_1"><p>$5</p><p>$4</p></enemyRef>  <!-- score渡す -->
</create>

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

	<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>

	<!-- *** ダミーボス作成 *** -->
	<createRef label="enemy_create_boss_dummy"></createRef>

	<!-- タイマー差分初期化 -->
	<global name="end_flag">0</global>
	<!-- *** タイマー開始 *** -->
	<global name="boss_timer_start">0</global>
	<!-- *** ダミータイマー *** -->
	<cRef label="stage_boss_timer_create0"/>

	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<eval name="boss_time">3160</eval>
		<revengeRef label="stage_middle_boss_1_01_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_middle_boss_1_01_action"><p>$boss_time</p></actionRef> 
	</repeat>

</enemy>


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

<action  label="stage_middle_boss_1_01_action">
	<changeSpeed>
		<speed>3</speed><tm>0</tm>
	</changeSpeed>
	<changeDirection>
		<dir type="abs">-105</dir><tm>0</tm>
	</changeDirection>

	<w>1</w>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>25</radius></collision>

	<!-- 弾幕開始 -->
	<aRef label="start_boss_bullet"><p>$1</p></aRef>

<!--	<wait>80</wait> -->
	<repeat><times>($_difficulty-eq0)</times>
		<aRef l="stage_middle_boss_01_act00"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="stage_middle_boss_01_act01"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq3)</times>
		<aRef l="stage_middle_boss_01_act02"></aRef>
	</repeat>

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

	<wait>60</wait>
<!--
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>25</radius></collision>
-->

<repeat><times>4</times>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>


	<repeat><times>($_difficulty-eq0)</times>
		<aRef l="stage_middle_boss_1_01_act00"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="stage_middle_boss_1_01_act01"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq3)</times>
		<aRef l="stage_middle_boss_1_01_act02"></aRef>
	</repeat>
	<w>45</w>

	<repeat><times>($_difficulty-eq0)</times>
		<aRef l="stage_middle_boss_1_02_act00"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="stage_middle_boss_1_02_act01"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq3)</times>
		<aRef l="stage_middle_boss_1_02_act02"></aRef>
	</repeat>
	
	<w>10</w>
	<aRef label="boss_random_move_50_stage5"/>
	<w>5</w>

	<repeat><times>2</times>
	<repeat><times>($_difficulty-eq0)</times>
		<aRef l="stage_middle_boss_01_act00"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="stage_middle_boss_01_act01"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq3)</times>
		<aRef l="stage_middle_boss_01_act02"></aRef>
	</repeat>
	<w>35</w>
	</repeat>

	<w>10</w>
	<aRef label="boss_random_move_50_stage5"/>
	<w>15</w>

	<global name="temp_grank">$__grank</global>
</repeat>

</action>


<a l="stage_middle_boss_01_act00">

	<eval name="t_sp">4.1+$__temp_grank*0.1-($_self_cy-gt150)*0.3</eval>
	<eval name="t_sp_offset">0</eval>

<repeat><times>2</times>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>

	<fRef l="enemy_fire_mb01"><p>19</p><p>$t_sp-$t_sp_offset</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb01s"><p>53</p><p>$t_sp-$t_sp_offset</p></fRef>
	</repeat>
	<w>2</w>
	<repeat><times>6</times>
		<repeat><times>7</times>
			<fRef l="enemy_fire_mb01s"><p>53</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<w>1</w>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
		<repeat><times>7</times>
			<fRef l="enemy_fire_mb01s"><p>53</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<w>1</w>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
	</repeat>
	<w>13</w>
</repeat>

</a>

<a l="stage_middle_boss_01_act01">

	<eval name="t_sp">4.3+$__temp_grank*0.1-($_self_cy-gt150)*0.3</eval>
	<eval name="t_sp_offset">0</eval>

<repeat><times>2</times>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>

	<fRef l="enemy_fire_mb01"><p>17</p><p>$t_sp-$t_sp_offset</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb01s"><p>46</p><p>$t_sp-$t_sp_offset</p></fRef>
	</repeat>
	<w>2</w>
	<repeat><times>8</times>
		<repeat><times>7</times>
			<fRef l="enemy_fire_mb01s"><p>46</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<w>1</w>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
		<repeat><times>7</times>
			<fRef l="enemy_fire_mb01s"><p>46</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<w>1</w>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
	</repeat>
	<w>5</w>
</repeat>

</a>
<a l="stage_middle_boss_01_act02">
	<eval name="t_sp">4.6+$__temp_grank*0.1-($_self_cy-gt150)*0.2</eval>
	<eval name="t_sp_offset">0</eval>
<repeat><times>2</times>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>

	<fRef l="enemy_fire_mb01"><p>17</p><p>$t_sp-$t_sp_offset</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_mb01s"><p>39</p><p>$t_sp-$t_sp_offset</p></fRef>
	</repeat>
	<w>2</w>
	<repeat><times>11</times>
		<repeat><times>9</times>
			<fRef l="enemy_fire_mb01s"><p>39</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<w>1</w>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
		<repeat><times>9</times>
			<fRef l="enemy_fire_mb01s"><p>39</p><p>$t_sp-$t_sp_offset</p></fRef>
		</repeat>
		<evaladd name="t_sp_offset">0.06</evaladd>
		<w>1</w>
	</repeat>
	<w>4</w>
</repeat>


</a>


<!-- easy -->
<action l="stage_middle_boss_1_01_act00">

		<eval name="rotate">0</eval>
		<eval name="OvalParam1">0.2</eval>
		<eval name="OvalParam2">30-($_player_cx*23+$_player_cy*39)%60</eval>
		<eval name="OvalAdd">10*(1-2*($_player_cx%2))</eval>
		<eval name="t_sp">3.3+$__temp_grank*0.1</eval>
		<w>1</w>
		<!--円は少し曲がる-->
			<actionRef label="stage5_bossTmp00_subAction00">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>0</p>
			</actionRef>
			<wait>15</wait>
			<actionRef label="stage5_bossTmp00_subAction00">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>3</p>
			</actionRef>
			<evalAdd name="rotate">15.0</evalAdd>
			<evalAdd name="OvalParam1">0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>15</wait>

			<actionRef label="stage5_bossTmp00_subAction00">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>-5</p>
			</actionRef>
			<wait>15</wait>
			<actionRef label="stage5_bossTmp00_subAction00">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>9</p>
			</actionRef>
			<evalAdd name="rotate">-15.0</evalAdd>
			<evalAdd name="OvalParam1">-0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>15</wait>
</action>

<!--
	P1:rotate
	P2:楕円（小円の大きさ)
	P3:楕円（オフセット角度)
-->
<action label="stage5_bossTmp00_subAction00">
	<!--基本は自機狙いの40方向弾＋楕円状の小弾-->
	<eval name="WAITT">10</eval>
	<eval name="OFFSET">$3</eval>
	<eval name="DIVIDE">32</eval>
	<w>1</w>
	<fireRef label="stage5_bossTmp00_fire00A"><p>$5</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<wait>1</wait>
	<repeat><times>7</times>
		<evalAdd name="WAITT">-1</evalAdd>
		<evalAdd name="OFFSET">-360*8/$DIVIDE</evalAdd>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<wait>1</wait>
	</repeat>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<wait>6</wait>
</action>

<!-- normal -->
<action l="stage_middle_boss_1_01_act01">
		<eval name="rotate">0</eval>
		<eval name="OvalParam1">0.2</eval>
		<eval name="OvalParam2">30-($_player_cx*23+$_player_cy*39)%60</eval>
		<eval name="OvalAdd">10*(1-2*($_player_cx%2))</eval>
		<eval name="t_sp">3.6+$__temp_grank*0.1</eval>
		<w>1</w>
		<!--円は少し曲がる-->
			<actionRef label="stage5_bossTmp00_subAction01">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>0</p>
			</actionRef>
			<wait>15</wait>
			<actionRef label="stage5_bossTmp00_subAction01">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>3</p>
			</actionRef>
			<evalAdd name="rotate">15.0</evalAdd>
			<evalAdd name="OvalParam1">0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>15</wait>

			<actionRef label="stage5_bossTmp00_subAction01">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>-5</p>
			</actionRef>
			<wait>15</wait>
			<actionRef label="stage5_bossTmp00_subAction01">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>9</p>
			</actionRef>
			<evalAdd name="rotate">-15.0</evalAdd>
			<evalAdd name="OvalParam1">-0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>15</wait>
</action>

<!--
	P1:rotate
	P2:楕円（小円の大きさ)
	P3:楕円（オフセット角度)
-->
<action label="stage5_bossTmp00_subAction01">
	<!--基本は自機狙いの40方向弾＋楕円状の小弾-->
	<eval name="WAITT">10</eval>
	<eval name="OFFSET">$3</eval>
	<eval name="DIVIDE">40</eval>
	<w>1</w>
	<fireRef label="stage5_bossTmp00_fire00A"><p>$5</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<wait>1</wait>
	<repeat><times>9</times>
		<evalAdd name="WAITT">-1</evalAdd>
		<evalAdd name="OFFSET">-360*8/$DIVIDE</evalAdd>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<wait>1</wait>
	</repeat>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<wait>4</wait>
</action>

<!-- hard -->
<action l="stage_middle_boss_1_01_act02">
		<eval name="rotate">0</eval>
		<eval name="OvalParam1">0.2</eval>
		<eval name="OvalParam2">30-($_player_cx*23+$_player_cy*39)%60</eval>
		<eval name="OvalAdd">10*(1-2*($_player_cx%2))</eval>
		<eval name="t_sp">4.0+$__temp_grank*0.1</eval>
		<w>1</w>
		<!--円は少し曲がる-->
			<actionRef label="stage5_bossTmp00_subAction02">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>0</p>
			</actionRef>
			<wait>10</wait>
			<actionRef label="stage5_bossTmp00_subAction02">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>3</p>
			</actionRef>
			<evalAdd name="rotate">15.0</evalAdd>
			<evalAdd name="OvalParam1">0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>10</wait>

			<actionRef label="stage5_bossTmp00_subAction02">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>-5</p>
			</actionRef>
			<wait>10</wait>
			<actionRef label="stage5_bossTmp00_subAction02">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>9</p>
			</actionRef>
			<evalAdd name="rotate">-15.0</evalAdd>
			<evalAdd name="OvalParam1">-0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>10</wait>

			<actionRef label="stage5_bossTmp00_subAction02">
			<p>$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>-5</p>
			</actionRef>
			<wait>10</wait>
			<actionRef label="stage5_bossTmp00_subAction02">
			<p>-1*$rotate</p><p>$OvalParam1</p><p>$OvalParam2</p><p>$t_sp</p><p>9</p>
			</actionRef>
			<evalAdd name="rotate">15.0</evalAdd>
			<evalAdd name="OvalParam1">0.02</evalAdd>
			<evalAdd name="OvalParam2">$OvalAdd</evalAdd>
			<wait>10</wait>
</action>

<!--
	P1:rotate
	P2:楕円（小円の大きさ)
	P3:楕円（オフセット角度)
-->
<action label="stage5_bossTmp00_subAction02">
	<!--基本は自機狙いの40方向弾＋楕円状の小弾-->
	<eval name="WAITT">13</eval>
	<eval name="OFFSET">$3</eval>
	<eval name="DIVIDE">52</eval>
	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage5_bossTmp00_fire00A"><p>$5</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
	<wait>1</wait>
	<repeat><times>12</times>
		<evalAdd name="WAITT">-1</evalAdd>
		<evalAdd name="OFFSET">-360*8/$DIVIDE</evalAdd>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-2*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-4*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<fireRef label="stage5_bossTmp00_fire00B"><p>360/$DIVIDE</p><p>$4</p><p>$1</p><p>$2</p><p>$OFFSET-6*360/$DIVIDE</p><p>$WAITT</p></fireRef>
		<wait>1</wait>
	</repeat>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<wait>1</wait>
</action>


<a l="stage_middle_boss_1_02_act00">

	<eval name="t_sp">4.4</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<fRef l="enemy_fire_mb01_3ab"><p>110</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>24</times>
	<w>1</w>
	<eval name="t_sp">4.4</eval>
	<fRef l="enemy_fire_mb01_3s"><p>3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>47</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">4.4</eval>
	<fRef l="enemy_fire_mb01_3ab"><p>250</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>24</times>
	<w>1</w>
	<eval name="t_sp">4.4</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>47</w>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">4.1</eval>
	<fRef l="enemy_fire_mb01_3"><p>143</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>20</times>
	<w>1</w>
	<eval name="t_sp">4.1</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-14</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>21</w>

</a>

<a l="stage_middle_boss_1_02_act01">

	<eval name="t_sp">4.6</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<fRef l="enemy_fire_mb01_3ab"><p>110</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>26</times>
	<w>1</w>
	<eval name="t_sp">4.6</eval>
	<fRef l="enemy_fire_mb01_3s"><p>3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>45</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">4.6</eval>
	<fRef l="enemy_fire_mb01_3ab"><p>250</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>26</times>
	<w>1</w>
	<eval name="t_sp">4.6</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>45</w>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">4.3</eval>
	<fRef l="enemy_fire_mb01_3"><p>142.5</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>28</times>
	<w>1</w>
	<eval name="t_sp">4.3</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-10</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>13</w>

</a>

<a l="stage_middle_boss_1_02_act02">

	<eval name="t_sp">5.0</eval>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<fRef l="enemy_fire_mb01_3ab"><p>110</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>27</times>
	<w>1</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>2</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>10</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>3</times>
	<w>1</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>

	<w>39</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3ab"><p>250</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>27</times>
	<w>1</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>2</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-10</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>3</times>
	<w>1</w>
	<eval name="t_sp">5.0</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-3</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>

	<w>39</w>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>1</w>
	<eval name="t_sp">4.7</eval>
	<fRef l="enemy_fire_mb01_3"><p>133</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	<repeat><times>35</times>
	<w>1</w>
	<eval name="t_sp">4.7</eval>
	<fRef l="enemy_fire_mb01_3s"><p>-8</p><p>$t_sp</p></fRef>
	<repeat><times>5</times>
		<evaladd name="t_sp">-0.4</evaladd>
		<fRef l="enemy_fire_mb01_3s"><p>0</p><p>$t_sp</p></fRef>
	</repeat>
	</repeat>
	<w>6</w>

</a>



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

<revenge label="stage_middle_boss_1_01_revenge">
	<actionRef l="enemy_explosion_create_action_03"></actionRef>

	<!-- ナノマシン、クリスタル、速攻値 -->
	<!-- スコア初期化 -->
	<eval name="localcounter">$_counter-$__counter_tmp</eval>
	<repeat><times>$localcounter-gt$1</times>
		<eval name="localcounter">$1</eval>
	</repeat>
	<eval name="nano">38</eval>
	<eval name="score_dat">0</eval>
	<eval name="percent">0</eval>
	<eval name="crystal_num">12</eval>

	<debugval><num>$_counter</num></debugval>
	<debugval><num>$localcounter</num></debugval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>
	<changeColor>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue><term>1</term>
	</changeColor>
	<w>1</w>

	<!-- 爆発アクション -->
<!-- 未実装 -->
<!--
	<actionRef label="boss_revenge_present_1"></actionRef>
	<presentRef label="stage_middle_boss_revnege_present_01"></presentRef>
-->
	<wait>1</wait>


	<!-- *** スコア加算 *** -->
	<!-- *** 弾幕のアイテム化 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<eval name="percent">1-($localcounter/$1)</eval>
		<eval name="score_dat">(($2*$percent)%30000000)</eval>
		<actionRef l="boss_score_add_action"><p>$3</p><p>$score_dat</p></actionRef>

		<!-- クリスタル -->
		<repeat><times>(($percent*100)-lt70)</times>
			<eval name="crystal_num">((($percent*20)%100)-2)*(($percent*100)-gt10)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+1+($__grank-gt0)</eval>

		<cRef label="timer_per_fig_action_create"><p>$2</p><p>$percent*10000</p></cRef>
		<cRef label="crystal_fig_action_create"><p>$crystal_num</p></cRef>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<cRef label="timer_per_fig_action_create"><p>$2</p><p>0</p></cRef>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>400</cx><cy>300</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<debugval><num>$percent</num></debugval>
	<debugval><num>$score_dat</num></debugval>
	<!-- スコア保存 -->
	<global name="mboss_score">$score_dat</global>

	<!-- *** アイテムの出現 *** -->
	<repeat><times>$_revenge_state-eq1</times>

		<!-- ナノマシン -->
		<eval name="temp_x">($_self_cx-5+($_self_cy%11))%90</eval>
		<repeat><times>$nano</times>
			<w>1</w>
			<createRef label="item_create_02_big"><p>$temp_x</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x/2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*3</p></createRef>
			<evaladd name="temp_x">($temp_x+3)%7</evaladd>
		</repeat>

		<debugval><num>$crystal_num</num></debugval>

		<aRef l="boss_item"><p>$crystal_num</p></aRef>

	</repeat>
<!--
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-100000</num></addRank>
	</repeat>
-->
	<wait>60</wait>

	<!-- *** 逃げる *** -->
	<aRef label="stage_middle_boss_1_final_revenge_action"/>

</revenge>


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

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

<!-- 未実装
	<targetRevenge label="namebox"></targetRevenge>
	<actionRef l="bg_midbossend_action"></actionRef>
-->

	<!-- テンションアップ -->
	<createRef label="item_create_03"><p>45</p></createRef>

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

	<!-- *** 終了 *** -->
	<chD><dir type="abs">30-60*($_self_cx-lt400)</dir><tm>1</tm></chD>
	<chS><sp>6</sp><tm>10</tm></chS>

</action>




<!-- ********************************************************************* -->
<!-- *** 中ボス戦  ２回目                                              *** -->
<!-- ***                                                               *** -->

<!-- 暫定 -->
<!-- ボススコア、タイマー -->
<!-- ボスの周りのリング -->
<!-- start boss bullet -->

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

	<!-- *** boss バリアフラグ初期化 *** -->
	<global name="boss_barrier">0</global>

	<!-- *** boss パーツフラグ初期化 *** -->
	<global name="boss_parts">0</global>

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<!-- ｘ座標、y座標、体力、スコア、タイムボーナス、abs -->
	<createRef label="enemy_create_middle_boss">
		<p>400</p>
		<p>-12</p>
		<p>17500</p>
<!--		<p>17500</p> -->
		<p>40000</p>
		<p>110000+5000*$_difficulty+$__mboss_score</p>
		<p>500000</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>0</inv>
	<score>0</score>
	<prate>$6</prate>
	<flag>128</flag>
	<enemyRef label="enemy_middle_boss"><p>$5</p><p>$4</p></enemyRef>  <!-- score渡す -->
</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>

	<!-- *** ダミーボス作成 *** -->
	<createRef label="enemy_create_boss_dummy"></createRef>

	<!-- タイマー差分初期化 -->
	<global name="end_flag">0</global>
	<!-- *** タイマー開始 *** -->
	<global name="boss_timer_start">0</global>
	<!-- *** ダミータイマー *** -->
	<cRef label="stage_boss_timer_create0"/>

	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<eval name="boss_time">3560</eval>
		<revengeRef label="stage_middle_boss_01_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_middle_boss_01_action"><p>$boss_time</p></actionRef> 
	</repeat>

	<repeat><times>$__boss_state-eq2</times>
		<!-- ランク計算 -->
		<aRef label="calc_rank_action_stage4"/>

		<eval name="boss_time">3160</eval>
		<revengeRef label="stage_middle_boss_02_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_middle_boss_02_action"><p>$boss_time</p></actionRef> 
	</repeat>


</enemy>


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

<action  label="stage_middle_boss_01_action">
	<changeSpeed>
		<speed>3.4</speed><tm>0</tm>
	</changeSpeed>
	<changeDirection>
		<dir type="abs">180</dir><tm>0</tm>
	</changeDirection>
	<wait>15+20</wait>

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

	<wait>40</wait>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>25</radius></collision>

	<!-- 弾幕開始 -->
	<aRef label="start_boss_bullet"><p>$1</p></aRef>


	<repeat><times>$_difficulty-eq0</times>
		<aRef l="stage_middle_boss_01_action_act00"></aRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="stage_middle_boss_01_action_act01"></aRef>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<aRef l="stage_middle_boss_01_action_act02"></aRef>
	</repeat>

</action>

<a l="stage_middle_boss_01_action_act00">
<eval name="t_sp2">2.6</eval>

<repeat><times>6</times>
	<eval name="move_dir">88-196*($_player_cy%2)</eval>

	<w>1</w>
	<chS><sp>0.1</sp><tm>1</tm></chS>
	<chD><dir type="abs">$move_dir</dir><tm>1</tm></chD>

	<eval name="t_sp">4.3+$__temp_grank*0.1</eval>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>96</p><p>1.4</p><p>$t_sp</p><p>($_player_cy%6)</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>264</p><p>1.4</p><p>$t_sp</p><p>($_player_cx%6)</p></fRef>
	<w>10</w>
<!--
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
	</repeat>
-->
	<w>30</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>98</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>262</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>40</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>106</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>254</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>40</w>

	<chD><dir type="rel">180</dir><tm>1</tm></chD>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>95</p><p>1.4</p><p>$t_sp</p><p>1</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>265</p><p>1.4</p><p>$t_sp</p><p>9</p></fRef>
	<w>40</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>99</p><p>1.4</p><p>$t_sp</p><p>62</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>261</p><p>1.4</p><p>$t_sp</p><p>68</p></fRef>
	<w>10</w>
<!--
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
	</repeat>
-->
	<w>30</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_easy"><p>105</p><p>1.4</p><p>$t_sp</p><p>6</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_easy"><p>255</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>40</w>
	<chS><sp>0</sp><tm>1</tm></chS>

	<cRef label="enemy_create_mb02_child_obj"><p>180</p><p>16</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>102</p><p>38</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>252</p><p>60</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>324</p><p>82</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>30</p><p>104</p></cRef>

	<w>30</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_mb02_3s"><p>72</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>6</w>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>10.1</p><p>$t_sp2</p></fRef>
		<repeat><times>4</times>
			<fRef l="enemy_fire_mb02_3s"><p>72</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>10.1</p><p>$t_sp2</p></fRef>
		<repeat><times>4</times>
			<fRef l="enemy_fire_mb02_3s"><p>72</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>10.1</p><p>$t_sp2</p></fRef>
		<repeat><times>4</times>
			<fRef l="enemy_fire_mb02_3s"><p>72</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>10.1</p><p>$t_sp2</p></fRef>
		<repeat><times>4</times>
			<fRef l="enemy_fire_mb02_3s"><p>72</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>
		
	<w>46</w>
	<!-- 220 -->

	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

	<global name="temp_grank">$__grank</global>
</repeat>

</a>

<a l="stage_middle_boss_01_action_act01">
<eval name="t_sp2">2.6</eval>

<repeat><times>6</times>
	<eval name="move_dir">88-196*($_player_cy%2)</eval>

	<w>1</w>
	<chS><sp>0.1</sp><tm>1</tm></chS>
	<chD><dir type="abs">$move_dir</dir><tm>1</tm></chD>

	<eval name="t_sp">4.6+$__temp_grank*0.1</eval>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>96</p><p>1.4</p><p>$t_sp</p><p>($_player_cy%6)</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>264</p><p>1.4</p><p>$t_sp</p><p>($_player_cx%6)</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>30</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>98</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>262</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>40</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>106</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>254</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>10</w>
<!--
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
	</repeat>
-->
	<w>30</w>

	<chD><dir type="rel">180</dir><tm>1</tm></chD>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>95</p><p>1.4</p><p>$t_sp</p><p>1</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>265</p><p>1.4</p><p>$t_sp</p><p>9</p></fRef>
	<w>40</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>99</p><p>1.4</p><p>$t_sp</p><p>62</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>261</p><p>1.4</p><p>$t_sp</p><p>68</p></fRef>
	<w>10</w>
	<repeat><times>$__temp_grank-gt0</times>
		<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
		<repeat><times>5</times>
			<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
		</repeat>
	</repeat>
	<w>30</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab"><p>105</p><p>1.4</p><p>$t_sp</p><p>6</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab"><p>255</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>40</w>

	<chS><sp>0</sp><tm>1</tm></chS>

	<cRef label="enemy_create_mb02_child_obj"><p>180</p><p>16</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>102</p><p>38</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>252</p><p>60</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>324</p><p>82</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>30</p><p>104</p></cRef>

	<w>30</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>6</w>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>8.1</p><p>$t_sp2</p></fRef>
		<repeat><times>5</times>
			<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>8.1</p><p>$t_sp2</p></fRef>
		<repeat><times>5</times>
			<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>8.1</p><p>$t_sp2</p></fRef>
		<repeat><times>5</times>
			<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>8.1</p><p>$t_sp2</p></fRef>
		<repeat><times>5</times>
			<fRef l="enemy_fire_mb02_3s"><p>60</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>
		
	<w>46</w>
	<!-- 220 -->

	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

	<global name="temp_grank">$__grank</global>
</repeat>

</a>


<a l="stage_middle_boss_01_action_act02">
<eval name="t_sp2">3.1</eval>

<repeat><times>6</times>
	<eval name="move_dir">88-196*($_player_cy%2)</eval>

	<w>1</w>
	<chS><sp>0.1</sp><tm>1</tm></chS>
	<chD><dir type="abs">$move_dir</dir><tm>1</tm></chD>

	<eval name="t_sp">5.0+$__temp_grank*0.1</eval>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>96</p><p>1.4</p><p>$t_sp</p><p>($_player_cy%6)</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>264</p><p>1.4</p><p>$t_sp</p><p>($_player_cx%6)</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>20</w>
	<fRef l="enemy_fire_mb02_3s"><p>20</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>10</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>98</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>262</p><p>1.4</p><p>$t_sp</p><p>67</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>20</w>
	<fRef l="enemy_fire_mb02_3s"><p>20</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>10</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>106</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>254</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>20</w>
	<fRef l="enemy_fire_mb02_3s"><p>20</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>10</w>

	<chD><dir type="rel">180</dir><tm>1</tm></chD>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>95</p><p>1.4</p><p>$t_sp</p><p>1</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>265</p><p>1.4</p><p>$t_sp</p><p>9</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>20</w>
	<fRef l="enemy_fire_mb02_3s"><p>20</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>10</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>99</p><p>1.4</p><p>$t_sp</p><p>62</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>261</p><p>1.4</p><p>$t_sp</p><p>68</p></fRef>
	<w>10</w>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>20</w>
	<fRef l="enemy_fire_mb02_3s"><p>20</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>10</w>

	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02ab_hard"><p>105</p><p>1.4</p><p>$t_sp</p><p>6</p></fRef>
	<w>20</w>
	<fRef l="enemy_fire_mb02ab_hard"><p>255</p><p>1.4</p><p>$t_sp</p><p>3</p></fRef>
	<w>40</w>
	<chS><sp>0</sp><tm>1</tm></chS>

	<cRef label="enemy_create_mb02_child_obj"><p>180</p><p>16</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>102</p><p>38</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>252</p><p>60</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>324</p><p>82</p></cRef>
	<cRef label="enemy_create_mb02_child_obj"><p>30</p><p>104</p></cRef>

	<w>30</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb02_3"><p>0</p><p>$t_sp2</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
	</repeat>
	<w>6</w>
	<repeat><times>5</times>
		<fRef l="enemy_fire_mb02_3s"><p>6.1</p><p>$t_sp2</p></fRef>
		<repeat><times>8</times>
			<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>6.1</p><p>$t_sp2</p></fRef>
		<repeat><times>8</times>
			<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>6.1</p><p>$t_sp2</p></fRef>
		<repeat><times>8</times>
			<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb02_3s"><p>6.1</p><p>$t_sp2</p></fRef>
		<repeat><times>8</times>
			<fRef l="enemy_fire_mb02_3s"><p>40</p><p>$t_sp2</p></fRef>
		</repeat>
		<w>6</w>
	</repeat>
		
	<w>46</w>
	<!-- 220 -->

	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

	<global name="temp_grank">$__grank</global>
</repeat>

</a>


<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　第２形態　                                *** -->
<!-- ***                                                               *** -->
<action  label="stage_middle_boss_02_action">

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

	<changePosition type="center">
		<x>400</x><y>180</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>25</radius></collision>

	<!-- 弾幕開始 -->
	<aRef label="start_boss_bullet"><p>$1</p></aRef>

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

<repeat><times>11</times>
	<cRef label="enemy_create_mb03_child_obj"><p>1</p><p>0</p><p>$t_counter</p></cRef>
	<cRef label="enemy_create_mb03_child_obj"><p>-1</p><p>1</p><p>$t_counter</p></cRef>
	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<w>30</w>
	</repeat>
	<w>27</w>
	<eval name="t_counter">($t_counter+1)%6</eval>

	<cRef label="enemy_create_mb03_child_obj"><p>1</p><p>0</p><p>$t_counter</p></cRef>
	<cRef label="enemy_create_mb03_child_obj"><p>-1</p><p>1</p><p>$t_counter</p></cRef>
	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<w>30</w>
	</repeat>
	<w>27</w>
	<eval name="t_counter">($t_counter+1)%6</eval>

	<w>40</w>
	<cRef label="enemy_create_mb03_1_child_obj"><p>1</p><p>0</p><p>$t_counter</p></cRef>
	<cRef label="enemy_create_mb03_1_child_obj"><p>-1</p><p>1</p><p>$t_counter</p></cRef>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<w>27</w>
	<repeat><times>$_difficulty-eq3</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	</repeat>
	<w>20</w>
	<eval name="t_counter">($t_counter+1)%6</eval>

	<global name="temp_grank">$__grank</global>
	<debugval><num>$_counter</num></debugval>
</repeat>

	<cRef label="enemy_create_mb03_child_obj"><p>1</p><p>0</p><p>$t_counter</p></cRef>
	<cRef label="enemy_create_mb03_child_obj"><p>-1</p><p>1</p><p>$t_counter</p></cRef>
	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<w>30</w>
	</repeat>
	<w>27</w>
	<eval name="t_counter">($t_counter+1)%6</eval>

	<cRef label="enemy_create_mb03_child_obj"><p>1</p><p>0</p><p>$t_counter</p></cRef>
	<cRef label="enemy_create_mb03_child_obj"><p>-1</p><p>1</p><p>$t_counter</p></cRef>
	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<w>30</w>
	</repeat>
	<w>27</w>
	<eval name="t_counter">($t_counter+1)%6</eval>

	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

</action>


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

<revenge label="stage_middle_boss_01_revenge">
	<actionRef l="enemy_explosion_create_action_03"></actionRef>

	<!-- ナノマシン、クリスタル、速攻値 -->
	<!-- スコア初期化 -->
	<eval name="localcounter">$_counter-$__counter_tmp</eval>
	<repeat><times>$localcounter-gt$1</times>
		<eval name="localcounter">$1</eval>
	</repeat>
	<eval name="nano">44</eval>
	<eval name="score_dat">0</eval>
	<eval name="percent">0</eval>
	<eval name="crystal_num">12</eval>

	<debugval><num>$_counter</num></debugval>
	<debugval><num>$localcounter</num></debugval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>
	<changeColor>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue><term>1</term>
	</changeColor>
	<w>1</w>

	<!-- 爆発アクション -->
<!-- 未実装 -->
<!--
	<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>
	<wait>1</wait>


	<!-- *** スコア加算 *** -->
	<!-- *** 弾幕のアイテム化 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<eval name="percent">1-($localcounter/$1)</eval>
		<eval name="score_dat">(($2*$percent)%30000000)</eval>
		<actionRef l="boss_score_add_action"><p>$3</p><p>$score_dat</p></actionRef>

		<!-- クリスタル -->
		<repeat><times>(($percent*100)-lt70)</times>
			<eval name="crystal_num">((($percent*20)%100)-2)*(($percent*100)-gt10)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+1+($__grank-gt0)</eval>

		<cRef label="timer_per_fig_action_create"><p>$2</p><p>$percent*10000</p></cRef>
		<cRef label="crystal_fig_action_create"><p>$crystal_num</p></cRef>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<cRef label="timer_per_fig_action_create"><p>$2</p><p>0</p></cRef>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>400</cx><cy>300</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<debugval><num>$percent</num></debugval>
	<debugval><num>$score_dat</num></debugval>

	<!-- *** アイテムの出現 *** -->
	<repeat><times>$_revenge_state-eq1</times>

		<!-- ナノマシン -->
		<eval name="temp_x">($_self_cx-5+($_self_cy%11))%90</eval>
		<repeat><times>$nano</times>
			<w>1</w>
			<createRef label="item_create_02_big"><p>$temp_x</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x/2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*3</p></createRef>
			<evaladd name="temp_x">($temp_x+3)%7</evaladd>
		</repeat>

		<debugval><num>$crystal_num</num></debugval>

		<aRef l="boss_item"><p>$crystal_num</p></aRef>

	</repeat>
<!--
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-100000</num></addRank>
	</repeat>
-->
	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_middle_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>16000</p><p>42000</p><p>110000+5000*$_difficulty+$score_dat</p><p>500000</p>
	</createRef>

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


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

<revenge label="stage_middle_boss_02_revenge">
	<actionRef l="enemy_explosion_create_action_03"></actionRef>


	<!-- ナノマシン、クリスタル、速攻値 -->
	<!-- スコア初期化 -->
	<eval name="localcounter">$_counter-$__counter_tmp</eval>
	<repeat><times>$localcounter-gt$1</times>
		<eval name="localcounter">$1</eval>
	</repeat>
	<eval name="nano">48</eval>
	<eval name="score_dat">0</eval>
	<eval name="percent">0</eval>
	<eval name="crystal_num">12</eval>
	<debugval><num>$_counter</num></debugval>
	<debugval><num>$localcounter</num></debugval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>
	<changeColor>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue><term>1</term>
	</changeColor>
	<w>1</w>

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

	<!-- *** スコア加算 *** -->
	<!-- *** 弾幕のアイテム化 or 自爆で弾消 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<eval name="percent">1-($localcounter/$1)</eval>
		<eval name="score_dat">(($2*$percent)%30000000)</eval>
		<actionRef l="boss_score_add_action"><p>$3</p><p>$score_dat</p></actionRef>
		<!-- クリスタル -->
		<repeat><times>(($percent*100)-lt70)</times>
			<eval name="crystal_num">((($percent*20)%100)-2)*(($percent*100)-gt10)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+1+($__grank-gt0)</eval>

		<cRef label="timer_per_fig_action_create"><p>$2</p><p>$percent*10000</p></cRef>
		<cRef label="crystal_fig_action_create"><p>$crystal_num</p></cRef>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<cRef label="timer_per_fig_action_create"><p>$2</p><p>0</p></cRef>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>400</cx><cy>300</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<debugval><num>$percent</num></debugval>
	<debugval><num>$score_dat</num></debugval>
	<!-- スコア保存 -->
	<global name="mboss_score">$score_dat</global>

	<wait>1</wait>

	<!-- *** アイテムの出現 *** -->
	<repeat><times>$_revenge_state-eq1</times>

		<!-- ナノマシン -->
		<eval name="temp_x">($_self_cx-5+($_self_cy%11))%90</eval>
		<repeat><times>$nano</times>
			<w>1</w>
			<createRef label="item_create_02_big"><p>$temp_x</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x/2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*3</p></createRef>
			<evaladd name="temp_x">($temp_x+3)%7</evaladd>
		</repeat>

		<debugval><num>$crystal_num</num></debugval>

		<aRef l="boss_item"><p>$crystal_num</p></aRef>

	</repeat>
<!--
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-100000</num></addRank>
	</repeat>
-->

	<w>60</w>

	<!-- *** 終了アクションへ *** -->
	<actionRef label="stage_middle_boss_final_revenge_action"></actionRef>
</revenge>



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

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

<!-- 未実装
	<targetRevenge label="namebox"></targetRevenge>
	<actionRef l="bg_midbossend_action"></actionRef>
-->

	<!-- テンションアップ -->
	<createRef label="item_create_03"><p>-135</p></createRef>

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

	<!-- *** 終了 *** -->
	<chD><dir type="abs">30-60*($_self_cx-lt400)</dir><tm>1</tm></chD>
	<chS><sp>6</sp><tm>10</tm></chS>

</action>




<!-- ********************************************************************* -->
<!-- *** 中ボス戦３回目                                                      *** -->
<!-- ***                                                               *** -->

<!-- 暫定 -->
<!-- ボススコア、タイマー -->
<!-- ボスの周りのリング -->
<!-- start boss bullet -->

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

	<!-- *** boss バリアフラグ初期化 *** -->
	<global name="boss_barrier">0</global>

	<!-- *** boss パーツフラグ初期化 *** -->
	<global name="boss_parts">0</global>

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<!-- ｘ座標、y座標、体力、スコア、タイムボーナス、abs -->
	<createRef label="enemy_create_middle_boss_2">
		<p>400</p>
		<p>-12</p>
		<p>15500</p>
<!--		<p>13500</p> -->
		<p>45000</p>
		<p>120000+10000*$_difficulty+$__mboss_score</p>
		<p>500000</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_2">
	<speed>0</speed><dir>0</dir>
	<cx>$1</cx><cy>$2</cy>
	<vital>$3</vital>
	<inv>0</inv>
	<score>0</score>
	<prate>$6</prate>
	<flag>128</flag>
	<enemyRef label="enemy_middle_boss_2"><p>$5</p><p>$4</p></enemyRef>  <!-- score渡す -->
</create>

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

	<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>

	<!-- *** ダミーボス作成 *** -->
	<createRef label="enemy_create_boss_dummy"></createRef>

	<!-- タイマー差分初期化 -->
	<global name="end_flag">0</global>
	<!-- *** タイマー開始 *** -->
	<global name="boss_timer_start">0</global>
	<!-- *** ダミータイマー *** -->
	<cRef label="stage_boss_timer_create0"/>

	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<eval name="boss_time">5600</eval>
		<revengeRef label="stage_middle_boss_04_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_middle_boss_04_action"><p>$boss_time</p></actionRef> 
	</repeat>


</enemy>

<!-- ********************************************************************* -->
<!-- *** 中ボスのアクション　最終形態　                                *** -->
<!-- ***                                                               *** -->
<action  label="stage_middle_boss_04_action">

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

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

	<wait>2</wait>

	<!-- バリア作成 背景黒は暫定 -->
	<cRef label="boss_bg_black_create"/>
	<w>1</w>

	<!-- カットイン -->
	<aRef l="mboss_cutin_action"/>
	<w>1</w>
	<aRef l="player_cutin_action"/>
	<w>1</w>
	<aRef l="supporter_cutin_action"/>
	<w>1</w>
	<cRef l="mboss_barrier_create"><p>13000</p><p>30000</p><p>256</p><p>25</p></cRef>
	<cRef l="boss_barrier_create_dummy"><p>256</p></cRef>
	<w>110</w>

	<cRef l="enemy_create_mb10_child"><p>1.4</p><p>66</p><p>1</p><p>1</p></cRef>
	<cRef l="enemy_create_mb10_child"><p>1.4</p><p>-66</p><p>25</p><p>-1</p></cRef>

	<w>70</w>

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

	<!-- 弾幕開始 -->
	<aRef label="start_boss_bullet"><p>$1</p></aRef>

	<eval name="save_cx">$_self_cx</eval>
	<eval name="save_cy">$_self_cy</eval>
	<eval name="t_count">1</eval>

	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

	<!-- 本体攻撃用object作成 -->
	<cRef l="mboss_04_object_create"></cRef>

	<!-- パーツ全破壊後攻撃用 -->
	<cRef l="mboss_04_object_create3"></cRef>

	<eval name="flag">0</eval>
	<repeat><times>-1</times>
		<repeat><times>($__boss_barrier-eq1)*($flag-eq0)</times>
			<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>25</radius></collision>
			<soundtrack><file type="ogg">enemy_barrier</file></soundtrack>	
			<eval name="flag">1</eval>
			<cRef l="mboss_04_object_create2"></cRef>
		</repeat>
		<w>6</w>
		<global name="temp_grank">$__grank</global>
	</repeat>

</action>

<!-- 通常 -->
<create label="mboss_04_object_create">
	<speed>0</speed>
	<dir>0</dir>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<child>1</child>
	<objectRef l="mboss_04_object"></objectRef>
</create>

<object l="mboss_04_object">

	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>

	<a>

		<repeat><times>$_difficulty-eq0</times>
			<aRef l="mboss_04_object_act00"/>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<aRef l="mboss_04_object_act01"/>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<aRef l="mboss_04_object_act02"/>
		</repeat>


	</a>
</object>

<a l="mboss_04_object_act00">
	<eval name="t_sp">2.6+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>4</times>
		<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>21</w>

		<cRef l="enemy_create_nano5_attacks"><p>72+29.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>4</times>
			<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>21</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>72+29.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>4</times>
			<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>21</w>
		</repeat>
	</repeat>
</a>

<a l="mboss_04_object_act01">
	<eval name="t_sp">2.8+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>5</times>
		<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>15</w>

		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>15</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>15</w>
		</repeat>
	</repeat>

</a>

<a l="mboss_04_object_act02">
	<eval name="t_sp">3.1+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>5</times>
		<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>12</w>

		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>12</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>12</w>
		</repeat>
	</repeat>
</a>

<!-- バリア破壊後 -->
<create label="mboss_04_object_create2">
	<speed>0</speed>
	<dir>0</dir>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<child>1</child>
	<objectRef l="mboss_04_object2"></objectRef>
</create>

<object l="mboss_04_object2">

	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>

	<a>

		<w>45</w>
		<repeat><times>$_difficulty-eq0</times>
			<aRef l="mboss_04_object2_act00"/>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<aRef l="mboss_04_object2_act01"/>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<aRef l="mboss_04_object2_act02"/>
		</repeat>

	</a>
</object>



<a l="mboss_04_object2_act00">
	<eval name="t_sp">2.8+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>4</times>
		<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>18</w>

		<cRef l="enemy_create_nano5_attacks"><p>72+29.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>4</times>
			<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>18</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>72+29.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>4</times>
			<cRef l="enemy_create_nano5_attacks"><p>72</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>18-$__boss_parts</w>
		</repeat>
	</repeat>

</a>

<a l="mboss_04_object2_act01">
	<eval name="t_sp">3.0+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>5</times>
		<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>13</w>

		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>13</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>13-$__boss_parts</w>
		</repeat>
	</repeat>

</a>

<a l="mboss_04_object2_act02">
	<eval name="t_sp">3.2+$__temp_grank*0.05</eval>
	<w>1</w>
		
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<cRef l="enemy_create_nano5_attack"><p>-90</p><p>$t_sp</p></cRef>
	<w>1</w>
	<repeat><times>5</times>
		<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
		<w>1</w>
	</repeat>
	<w>9</w>

		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>9</w>

	<repeat><times>-1</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>2</times>
		<cRef l="enemy_create_nano5_attacks"><p>60+23.5</p><p>$t_sp</p></cRef>
		<w>1</w>
		<repeat><times>5</times>
			<cRef l="enemy_create_nano5_attacks"><p>60</p><p>$t_sp</p></cRef>
			<w>1</w>
		</repeat>
		<w>9-$__boss_parts</w>
		</repeat>
	</repeat>
</a>



<!-- パーツ全破壊後 -->
<create label="mboss_04_object_create3">
	<speed>0</speed>
	<dir>0</dir>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<child>1</child>
	<objectRef l="mboss_04_object3"></objectRef>
</create>

<object l="mboss_04_object3">

	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>

	<a>


	<repeat><times>-1</times>
		<repeat><times>$__boss_parts-eq2</times>
			<repeat><times>$_difficulty-eq0</times>
				<aRef l="mboss_04_object3_act00"/>
			</repeat>
			<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
				<aRef l="mboss_04_object3_act01"/>
			</repeat>
			<repeat><times>$_difficulty-eq3</times>
				<aRef l="mboss_04_object3_act02"/>
			</repeat>
		</repeat>
	<w>6</w>
	</repeat>

	</a>
</object>

<a l="mboss_04_object3_act00">
<repeat><times>-1</times>
	<w>5</w>
	<eval name="t_sp">3.3+$__temp_grank*0.05</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb04"><p>-12</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>

	<fRef l="enemy_fire_mb04"><p>-12+120</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>

	<fRef l="enemy_fire_mb04"><p>-12-120</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-24</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>


</repeat>


</a>

<a l="mboss_04_object3_act01">
<repeat><times>-1</times>
	<w>5</w>
	<eval name="t_sp">3.5+$__temp_grank*0.05</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb04"><p>-16</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>

	<fRef l="enemy_fire_mb04"><p>-16+120</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>

	<fRef l="enemy_fire_mb04"><p>-16-120</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>


</repeat>
</a>

<a l="mboss_04_object3_act02">
<repeat><times>-1</times>
	<w>5</w>
	<eval name="t_sp">3.8+$__temp_grank*0.05</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_mb04"><p>-16</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>
	<repeat><times>7</times>
		<fRef l="enemy_fire_mb04s"><p>41</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>

	<fRef l="enemy_fire_mb04"><p>-16+120</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>
	<repeat><times>7</times>
		<fRef l="enemy_fire_mb04s"><p>41</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>

	<fRef l="enemy_fire_mb04"><p>-16-120</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_mb04s"><p>-32</p><p>$t_sp</p></fRef>
	<repeat><times>8</times>
		<fRef l="enemy_fire_mb04s"><p>4</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>
	<repeat><times>7</times>
		<fRef l="enemy_fire_mb04s"><p>41</p><p>$t_sp</p></fRef>
	</repeat>
	<w>3</w>


</repeat>
</a>

<!-- ********************************************************************* -->
<!-- *** 最終形態用　child kill                                    *** -->
<!-- ***                                                               *** -->

<a l="mboss_attack_child_revenge">
	<targetRevenge label="mboss_04_object"></targetRevenge>
	<targetRevenge label="mboss_10_child_object"></targetRevenge>
</a>


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

<revenge label="stage_middle_boss_04_revenge">
	<actionRef l="enemy_explosion_create_action_04"></actionRef>


	<!-- ナノマシン、クリスタル、速攻値 -->
	<!-- スコア初期化 -->
	<eval name="localcounter">$_counter-$__counter_tmp</eval>
	<repeat><times>$localcounter-gt$1</times>
		<eval name="localcounter">$1</eval>
	</repeat>
	<eval name="ttc_end">$_ttc_frame</eval>

	<eval name="nano">64</eval>
	<eval name="score_dat">0</eval>

	<eval name="percent">0</eval>
	<eval name="crystal_num">12</eval>

	<debugval><num>$_counter</num></debugval>
	<debugval><num>$localcounter</num></debugval>

	<!-- ノーミスノーボムチェック ＯＫなら２倍、ＮＧなら１倍 -->
	<eval name="etb_j">(($ttc_end-$__ttc_start)-eq$localcounter)*($__ttc_start-gt200)+1</eval>

	<changeSpeed>
		<speed>0</speed><tm>1</tm>
	</changeSpeed>
	<changeColor>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue><term>1</term>
	</changeColor>

<!--	<targetRevenge label="enemy_mb03_2_child"></targetRevenge>-->
	<w>1</w>

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

	<!-- *** スコア加算 *** -->
	<!-- *** 弾幕のアイテム化 or 自爆で弾消 *** -->
	<repeat><times>$_revenge_state-eq1</times>
		<eval name="percent">1-($localcounter/$1)</eval>
		<eval name="score_dat">(($2*$percent)%30000000)</eval>
		<actionRef l="boss_score_add_action"><p>$3</p><p>$score_dat*$etb_j</p></actionRef>
		<!-- クリスタル -->
		<repeat><times>(($percent*100)-lt70)</times>
			<eval name="crystal_num">((($percent*20)%100)-2)*(($percent*100)-gt10)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+1+($__grank-gt0)</eval>

		<cRef label="timer_per_fig_action_create_et"><p>$2</p><p>$percent*10000</p><p>$etb_j</p></cRef>
		<cRef label="crystal_fig_action_create_et"><p>$crystal_num</p></cRef>
		<wait>1</wait>
		<changeBulletToItem/>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<cRef label="timer_per_fig_action_create"><p>$2</p><p>0</p></cRef>
		<wait>1</wait>
		<create>
			<speed>0</speed><direction>0</direction>
			<cx>400</cx><cy>300</cy><vital>0</vital>
			<bombRef label="bomb_clearbomb"></bombRef>
		</create>
	</repeat>

	<debugval><num>$percent</num></debugval>
	<debugval><num>$score_dat</num></debugval>


	<wait>1</wait>

	<!-- *** アイテムの出現 *** -->
	<repeat><times>$_revenge_state-eq1</times>

		<!-- ナノマシン -->
		<eval name="temp_x">($_self_cx-5+($_self_cy%11))%90</eval>
		<repeat><times>$nano</times>
			<w>1</w>
			<createRef label="item_create_02_big"><p>$temp_x</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x/2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*2</p></createRef>
			<createRef label="item_create_02_big"><p>$temp_x*3</p></createRef>
			<evaladd name="temp_x">($temp_x+3)%7</evaladd>
		</repeat>

		<debugval><num>$crystal_num</num></debugval>

		<aRef l="boss_item"><p>$crystal_num</p></aRef>

	</repeat>
<!--
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-100000</num></addRank>
	</repeat>
-->
	<wait>60</wait>

	<!-- *** 終了アクションへ *** -->
	<actionRef label="stage_middle_boss_final_revenge_action_f"></actionRef>
</revenge>



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

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

<!-- 未実装
	<targetRevenge label="namebox"></targetRevenge>
	<actionRef l="bg_midbossend_action"></actionRef>
-->

	<!-- テンションアップ -->
	<createRef label="item_create_03"><p>45</p></createRef>

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

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

</action>

</exbulletml>
