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

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

	<!-- *** secretフラグ初期化 *** -->
	<global name="boss_secret">0</global>

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

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

	<!-- *** 会話終了ロックをかける *** -->
	<setLock><num>11</num></setLock>

	<w>1</w>

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

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<!-- ｘ座標、y座標、体力、スコア、タイムボーナス、abs -->
	<createRef label="enemy_create_boss">
		<p>400</p>
		<p>-12</p>
		<p>10500</p>
<!--		<p>16000</p> -->
		<p>120</p>
		<p>400+20*$_difficulty</p>
		<p>500000</p>
	</createRef>

	<wait>60</wait>

</action>

<!-- ********************************************************************* -->
<!-- *** ボス戦開始                                                    *** -->
<!-- ***                                                               *** -->
<action label="stage_main_boss_start">


	<!-- *** 会話終了ロック解除 *** -->
	<releaseLock><num>11</num></releaseLock>

	<sound type="bgm" label="bgm">
		<track><file type="ogg">07_boss1_loop</file></track>
		<play><flag>1</flag><loop>44100*2*2*3</loop></play>
	</sound>
<!--
	<actionRef label="stage1_2_bgm_title_action"/>
-->

	<!-- ここから ABS 減少開始 -->
	<system><command>absdecon</command></system>

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

<!-- ********************************************************************* -->
<!-- *** ボスオブジェクト作成                                        *** -->
<!-- ***                                                               *** -->
<create label="enemy_create_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_boss"><p>$5</p><p>$4</p></enemyRef>  <!-- score渡す -->
</create>

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

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

	<rep><ts>$__boss_state-lt4</ts>
		<presentRef label="stage_main_boss_present_01"></presentRef>
	</rep>
	<rep><ts>$__boss_state-eq4</ts>
		<presentRef label="stage_main_boss_present_last"></presentRef>
	</rep>

	<!-- *** 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">2430</eval>
		<revengeRef label="stage_boss_01_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_boss_01_action"><p>$boss_time</p></actionRef> 
	</repeat>

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

		<eval name="boss_time">2280</eval>
		<revengeRef label="stage_boss_02_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_boss_02_action"><p>$boss_time</p></actionRef> 
	</repeat>

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

		<eval name="boss_time">2300</eval>
		<revengeRef label="stage_boss_03_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_boss_03_action"><p>$boss_time</p></actionRef> 
	</repeat>

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

		<eval name="boss_time">4180</eval>
		<revengeRef label="stage_boss_04_revenge"><p>$boss_time</p><p>$1</p><p>$2</p></revengeRef> <!-- $1はスコア -->
		<actionRef  label="stage_boss_04_action"><p>$boss_time</p></actionRef> 
	</repeat>

<!--
	<repeat><times>($__boss_state-eq4)*($__boss_secret-eq1)</times>
		<aRef label="calc_rank_action_stage1"/>

		<eval name="boss_time">3000</eval>
		<revengeRef label="stage_boss_04_secret_revenge"><p>$boss_time</p><p>$1</p></revengeRef>
		<actionRef  label="stage_boss_04_secret_action"><p>$boss_time</p></actionRef> 
	</repeat>
-->

</enemy>

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

<action  label="stage_boss_01_action">
	<changeSpeed>
		<speed>5</speed><tm>0</tm>
	</changeSpeed>
	<changeDirection>
		<dir type="abs">180</dir><tm>0</tm>
	</changeDirection>
	<wait>25</wait>

	<changeSpeed>
		<speed>0</speed><tm>30</tm>
	</changeSpeed>
	<wait>35</wait>

	<!-- *** 会話終了待ち *** -->
	<waitLock><num>11</num></waitLock>
	

	<w>30</w>

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

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

<!-- ここから弾幕 -->
<repeat><times>3</times>
	<repeat><times>$_difficulty-eq0</times>
		<aRef l="b01_act1_00"/>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="b01_act1_01"/>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<aRef l="b01_act1_02"/>
	</repeat>

	<eval name="t_mv">-1+2*(($_player_cx*3+$_player_cy*2)%2)</eval>
	<chD><dir type="abs">40*$t_mv</dir><tm>1</tm></chD>
	<chS><sp>3.2</sp><tm>10</tm></chS>
	<w>30</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>60</w>
	<debugval><num>$_counter</num></debugval>

	<w>60</w>

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

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>$_difficulty-eq0</times>
		<cRef label="enemy_fire_b01_3_dummy"><p>1</p><p>0</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy"><p>-1</p><p>0</p></cRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<cRef label="enemy_fire_b01_3_dummy2"><p>1</p><p>0</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy2"><p>-1</p><p>0</p></cRef>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<cRef label="enemy_fire_b01_3_dummy3"><p>1</p><p>0</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy3"><p>-1</p><p>0</p></cRef>
	</repeat>
	<chD><dir type="abs">-1*$t_mv*98</dir><tm>1</tm></chD>
	<chS><sp>2</sp><tm>10</tm></chS>
	<w>40</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>15</w>
	<debugval><num>$_counter</num></debugval>

	<w>30</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>$_difficulty-eq0</times>
		<cRef label="enemy_fire_b01_3_dummy"><p>1</p><p>24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy"><p>-1</p><p>24*$t_mv</p></cRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<cRef label="enemy_fire_b01_3_dummy2"><p>1</p><p>24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy2"><p>-1</p><p>24*$t_mv</p></cRef>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<cRef label="enemy_fire_b01_3_dummy3"><p>1</p><p>24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy3"><p>-1</p><p>24*$t_mv</p></cRef>
	</repeat>
	<chD><dir type="saim">0</dir><tm>1</tm></chD>
	<chS><sp>2</sp><tm>10</tm></chS>
	<w>40</w>
	<chS><sp>0</sp><tm>10</tm></chS>
	<w>15</w>
	<debugval><num>$_counter</num></debugval>

	<w>30</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>$_difficulty-eq0</times>
		<cRef label="enemy_fire_b01_3_dummy"><p>1</p><p>-24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy"><p>-1</p><p>-24*$t_mv</p></cRef>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<cRef label="enemy_fire_b01_3_dummy2"><p>1</p><p>-24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy2"><p>-1</p><p>-24*$t_mv</p></cRef>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<cRef label="enemy_fire_b01_3_dummy3"><p>1</p><p>-24*$t_mv</p></cRef>
		<cRef label="enemy_fire_b01_3_dummy3"><p>-1</p><p>-24*$t_mv</p></cRef>
	</repeat>
	
	<w>60</w>
	<eval name="t_y">($_self_cy-lt100)+($_self_cy-lt200)-($_self_cy-gt200)</eval>
	<eval name="t_x">1-2*($_self_cx-gt400)</eval>
	<eval name="t_mv">110*$t_x+30*$t_y*$t_x</eval>

	<chD><dir type="abs">$t_mv</dir><tm>1</tm></chD>
	<chS><sp type="abs">1.8</sp><tm>10</tm></chS>
	<w>40</w>
	<chS><sp type="abs">0</sp><tm>10</tm></chS>
	<w>10</w>

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

	<repeat><times>$_difficulty-eq0</times>
		<aRef l="b01_act1_10"/>
	</repeat>
	<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
		<aRef l="b01_act1_11"/>
	</repeat>
	<repeat><times>$_difficulty-eq3</times>
		<aRef l="b01_act1_12"/>
	</repeat>

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


	<eval name="t_y">$_self_cy-200</eval>
	<eval name="t_x">400-$_self_cx</eval>
	<repeat><times>(($t_y-eq0)+($t_x-eq0))-eq0</times>
		<func name="t_mv" type="atan2"><p>$t_y</p><p>$t_x</p></func>
		<func name="t_dis0" type="cos"><p>$t_mv</p></func>
		<eval name="t_dis">$t_x/$t_dis0</eval>
		<func name="t_dis2" type="abs"><p>$t_dis</p></func>
	</repeat>
	<repeat><times>($t_x-eq0)</times>
		<eval name="t_mv">180*($_self_cy-lt200)</eval>
		<func name="t_dis2" type="abs"><p>$t_y</p></func>
	</repeat>
	<repeat><times>($t_y-eq0)</times>
		<eval name="t_mv">90-180*($_self_cx-gt400)</eval>		
		<func name="t_dis2" type="abs"><p>$t_x</p></func>
	</repeat>
	<w>20</w>

	<chD><dir type="abs">90-$t_mv</dir><tm>1</tm></chD>
	<chS><sp type="abs">$t_dis2/40</sp><tm>10</tm></chS>
	<w>40</w>
	<chS><sp type="abs">0</sp><tm>10</tm></chS>
	<w>50</w>
	<global name="temp_grank">$__grank</global>

	<debugval><num>$t_mv</num></debugval>
	<debugval><num>$t_dis0</num></debugval>
	<debugval><num>$t_dis</num></debugval>
	<debugval><num>$t_dis2</num></debugval>
	<debugval><num>$_self_cx</num></debugval>
	<debugval><num>$_self_cy</num></debugval>
	<debugval><num>$_counter</num></debugval>

</repeat>

</action>

<a l="b01_act1_00">

	<eval name="t_sp">3.6</eval>
	<eval name="t_sp2">3.2+$__temp_grank*0.1</eval>
	<eval name="temp">4</eval>
	<eval name="l_dir">30</eval>
	<eval name="t_bul">4</eval>
	<eval name="t_wait">35</eval>
	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b01ab"><p>45+($_player_cx%3)</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">4</evaladd>
	<w>8</w>

	<repeat><times>4</times>
	<fRef l="enemy_fire_b01s"><p>90+7.5</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">4</evaladd>
	<w>9</w>
	</repeat>

	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>4</times>
		<fRef l="enemy_fire_b01s"><p>90+7.5</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		<repeat><times>3</times>
			<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		</repeat>
		<evaladd name="l_dir">4</evaladd>
		<w>9</w>
		</repeat>
		<w>3</w>
	</repeat>

</a>

<a l="b01_act1_01">

	<eval name="t_sp">3.6</eval>
	<eval name="t_sp2">3.2+$__temp_grank*0.1</eval>
	<eval name="temp">4</eval>
	<eval name="l_dir">37.5</eval>
	<eval name="t_bul">5</eval>
	<eval name="t_wait">28</eval>
	<w>2</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b01ab"><p>45+($_player_cx%3)</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">3.5</evaladd>
	<w>7</w>

	<repeat><times>5</times>
	<fRef l="enemy_fire_b01s"><p>90+6</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>3</times>
		<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">3.5</evaladd>
	<w>7</w>
	</repeat>

	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>5</times>
		<fRef l="enemy_fire_b01s"><p>90+6</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		<repeat><times>3</times>
			<fRef l="enemy_fire_b01s"><p>90</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		</repeat>
		<evaladd name="l_dir">3.5</evaladd>
		<w>7</w>
		</repeat>
	</repeat>
	<w>3</w>

</a>

<a l="b01_act1_02">

	<eval name="t_sp">3.8</eval>
	<eval name="t_sp2">3.6+$__temp_grank*0.1</eval>
	<eval name="temp">4</eval>
	<eval name="l_dir">17</eval>
	<eval name="t_bul">7</eval>
	<eval name="t_wait">19</eval>
	<w>3</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b01ab"><p>18+($_player_cx%3)</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_b01s"><p>72</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">3.5</evaladd>
	<w>6</w>

	<repeat><times>6</times>
	<fRef l="enemy_fire_b01s"><p>72+4.5</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	<repeat><times>4</times>
		<fRef l="enemy_fire_b01s"><p>72</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
	</repeat>
	<evaladd name="l_dir">3.5</evaladd>
	<w>6</w>
	</repeat>

	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<repeat><times>6</times>
		<fRef l="enemy_fire_b01s"><p>72+4.5</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		<repeat><times>3</times>
			<fRef l="enemy_fire_b01s"><p>72</p><p>$t_sp</p><p>$t_sp2</p><p>$l_dir</p><p>$t_bul</p><p>$t_wait</p></fRef>
		</repeat>
		<evaladd name="l_dir">3.5</evaladd>
		<w>6</w>
		</repeat>
	</repeat>

</a>

<a l="b01_act1_10">

	<eval name="t_sp">3.5</eval>
	<eval name="l_sp">2.4+$__temp_grank*0.1</eval>
	<eval name="temp">-60</eval>
	<eval name="t_wait">40</eval>
	<eval name="t_dir">60</eval>

	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>11</times>
	<w>1</w>
		<evaladd name="t_dir">12</evaladd>
		<evaladd name="temp">10</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>
	<w>5</w>

	<w>5</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">20</eval>
	<eval name="t_dir">66</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>11</times>
	<w>1</w>
		<evaladd name="t_dir">11</evaladd>
		<evaladd name="temp">10</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>5</w>
	<w>5</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">5</eval>
	<eval name="t_dir">50</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>11</times>
	<w>1</w>
		<evaladd name="t_dir">13</evaladd>
		<evaladd name="temp">10</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>
	<w>5</w>

	<w>10</w>

</a>


<a l="b01_act1_11">

	<eval name="t_sp">3.5</eval>
	<eval name="l_sp">2.8+$__temp_grank*0.1</eval>
	<eval name="temp">-60</eval>
	<eval name="t_wait">40</eval>
	<eval name="t_dir">60</eval>

	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>14</times>
	<w>1</w>
		<evaladd name="t_dir">12</evaladd>
		<evaladd name="temp">8</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>5</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">20</eval>
	<eval name="t_dir">66</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>14</times>
	<w>1</w>
		<evaladd name="t_dir">11</evaladd>
		<evaladd name="temp">8</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>5</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">5</eval>
	<eval name="t_dir">50</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>19</times>
	<w>1</w>
		<evaladd name="t_dir">13</evaladd>
		<evaladd name="temp">6</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>10</w>

</a>

<a l="b01_act1_12">

	<eval name="t_sp">3.5</eval>
	<eval name="l_sp">3.4+$__temp_grank*0.1</eval>
	<eval name="temp">-60</eval>
	<eval name="t_wait">40</eval>
	<eval name="t_dir">60</eval>

	<w>1</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>19</times>
	<w>1</w>
		<evaladd name="t_dir">12</evaladd>
		<evaladd name="temp">6</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>1</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">20</eval>
	<eval name="t_dir">66</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>23</times>
	<w>1</w>
		<evaladd name="t_dir">11</evaladd>
		<evaladd name="temp">5</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>1</w>
	<eval name="temp">-60</eval>
	<eval name="t_wait">5</eval>
	<eval name="t_dir">50</eval>
	<w>5</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<func name="t_sp2" type="cos"><p>$temp</p></func>
	<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
	<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	<repeat><times>23</times>
	<w>1</w>
		<evaladd name="t_dir">13</evaladd>
		<evaladd name="temp">5</evaladd>
		<func name="t_sp2" type="cos"><p>$temp</p></func>
		<fRef l="enemy_fire_b01_4ab"><p>90+$temp</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>$t_dir</p></fRef>
		<fRef l="enemy_fire_b01_4ab"><p>-1*(90+$temp)</p><p>$t_sp/$t_sp2</p><p>$t_wait</p><p>$l_sp</p><p>-1*$t_dir</p></fRef>
	</repeat>

	<w>6</w>

</a>


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

<action  label="stage_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>

	<global name="temp_grank">$__grank</global>
	<aRef l="b01_act2"></aRef>


</action>

<a l="b01_act2">

<!-- 難易度共通 -->
<eval name="t_sp">3.3</eval>
<eval name="t_wait">1</eval>
<chS><sp>0.3</sp><tm>1</tm></chS>

<!-- 難易度ごと -->
<repeat><times>$_difficulty-eq0</times>
	<eval name="l_sp">3.2+$__temp_grank*0.1</eval>
	<eval name="t_wait2">4</eval>
	<eval name="t_rep">4</eval>
	<eval name="t_wait3">16</eval>
	<w>1</w>
</repeat>
<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
	<eval name="l_sp">3.4+$__temp_grank*0.1</eval>
	<eval name="t_wait2">4</eval>
	<eval name="t_rep">5</eval>
	<eval name="t_wait3">11</eval>
	<w>1</w>
</repeat>
<repeat><times>$_difficulty-eq3</times>
	<eval name="l_sp">3.6+$__temp_grank*0.1</eval>
	<eval name="t_wait2">3</eval>
	<eval name="t_rep">7</eval>
	<eval name="t_wait3">7</eval>
	<w>1</w>
</repeat>


<repeat><times>9</times>
	<chD><dir type="abs">-89+178*($_player_cx%2)</dir><tm>1</tm></chD>
	<aRef l="enemy_bullet_action"><p>32</p></aRef>
	<fRef l="enemy_fire_b02ab"><p>70+($_player_cx%6)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	<w>60</w>

	<eval name="t_wait">1+($_player_cx*2+$_player_cy*3+$_self_cx*3)%11</eval>

	<aRef l="enemy_bullet_action"><p>32</p></aRef>
	<fRef l="enemy_fire_b02ab"><p>-70-($_player_cy%5)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	<w>30</w>
	<repeat><times>$_difficulty-gt0</times>
		<fRef l="enemy_fire_b02ab"><p>70+($_player_cy%2)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	</repeat>
	<w>30</w>

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

	<eval name="t_wait">2+($_player_cx*2+$_player_cy*3+$_self_cx*3)%11</eval>

	<aRef l="enemy_bullet_action"><p>32</p></aRef>
	<fRef l="enemy_fire_b02ab"><p>76+($_player_cx%6)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	<w>60</w>

	<eval name="t_wait">3+($_player_cx*2+$_player_cy*3+$_self_cx*3)%11</eval>

	<aRef l="enemy_bullet_action"><p>32</p></aRef>
	<fRef l="enemy_fire_b02ab"><p>-76-($_player_cy%5)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	<w>30</w>
	<repeat><times>$_difficulty-gt2</times>
		<fRef l="enemy_fire_b02ab"><p>76+($_player_cx%8)</p><p>$t_sp</p><p>$t_wait</p><p>$l_sp</p><p>$t_wait2</p><p>$t_rep</p><p>$t_wait3</p></fRef>
	</repeat>
	<w>30</w>
	<global name="temp_grank">$__grank</global>

</repeat>

</a>

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

<action  label="stage_boss_03_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>

<repeat><times>3</times>
	<!--時計周りか反時計周りかを決める-->
		<eval name="DIR1">1-2*($_player_cx%2)</eval>
	<!--攻撃１-->
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction01"><p>$DIR1</p></actionRef>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction01_normal"><p>$DIR1</p></actionRef>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction01_hard"><p>$DIR1</p></actionRef>
		</repeat>

		<wait>10</wait>
		<actionRef label="boss_random_move_50"></actionRef>
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction00"><p>$DIR1</p></actionRef>
			<wait>60</wait>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction00_normal"><p>$DIR1</p></actionRef>
			<wait>60-12</wait>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction00_hard"><p>$DIR1</p></actionRef>
			<wait>60-18</wait>
		</repeat>
		<actionRef label="boss_random_move_50"></actionRef>
		<global name="temp_grank">$__grank</global>

	<!--攻撃１(反対方向)-->
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction01"><p>-1*$DIR1</p></actionRef>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction01_normal"><p>-1*$DIR1</p></actionRef>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction01_hard"><p>-1*$DIR1</p></actionRef>
		</repeat>

		<wait>30</wait>
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction01"><p>$DIR1</p></actionRef>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction01_normal"><p>$DIR1</p></actionRef>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction01_hard"><p>$DIR1</p></actionRef>
		</repeat>

		<wait>30</wait>
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction00"><p>-1*$DIR1</p></actionRef>
			<wait>30</wait>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction00_normal"><p>-1*$DIR1</p></actionRef>
			<wait>30-12</wait>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction00_hard"><p>-1*$DIR1</p></actionRef>
			<wait>30-18</wait>
		</repeat>
		<actionRef label="boss_random_move_50"></actionRef>
		<wait>60</wait>

		<global name="temp_grank">$__grank</global>
		<debugval><num>$_counter</num></debugval>
</repeat>
		<repeat><times>$_difficulty-eq0</times>
			<actionRef label="stage1_bossTMP00_subAction00"><p>$DIR1</p></actionRef>
			<wait>60</wait>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<actionRef label="stage1_bossTMP00_subAction00_normal"><p>$DIR1</p></actionRef>
			<wait>60-12</wait>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<actionRef label="stage1_bossTMP00_subAction00_hard"><p>$DIR1</p></actionRef>
			<wait>60-18</wait>
		</repeat>
		<debugval><num>$_counter</num></debugval>

</action>


<!--param0 DIRECT(時計周り=1、反時計周り=-1)-->
<action label="stage1_bossTMP00_subAction00">

	<eval name="SPEED">3.4+($__temp_grank*0.1)</eval>
	<eval name="DIROFFSET1">20.0*$1</eval>
	<eval name="DIROFFSET2">-6*$DIROFFSET1+6.5*$1</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire00A">
		<p>-140*$1</p><p>$SPEED</p>
	</fireRef>
	<repeat><times>2</times>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<wait>1</wait>
	</repeat>

	<repeat><times>20</times>
		<evalAdd name="SPEED">-1.4/20</evalAdd>
		<wait>1</wait>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET2</p><p>$SPEED</p>
		</fireRef>
		<repeat><times>2</times>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<wait>1</wait>
		</repeat>
	</repeat>
</action>

<!--param0 DIRECT(時計周り=1、反時計周り=-1)-->
<action label="stage1_bossTMP00_subAction00_normal">

	<eval name="SPEED">3.6</eval>
	<eval name="DIROFFSET1">16.0*$1</eval>
	<eval name="DIROFFSET2">-6*$DIROFFSET1+6.5*$1</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire00A">
		<p>-140*$1</p><p>$SPEED</p>
	</fireRef>
	<repeat><times>2</times>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<wait>1</wait>
	</repeat>

	<repeat><times>24</times>
		<evalAdd name="SPEED">-1.4/24</evalAdd>
		<wait>1</wait>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET2</p><p>$SPEED</p>
		</fireRef>
		<repeat><times>2</times>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<wait>1</wait>
		</repeat>
	</repeat>
</action>

<!--param0 DIRECT(時計周り=1、反時計周り=-1)-->
<action label="stage1_bossTMP00_subAction00_hard">

	<eval name="SPEED">3.8</eval>
	<eval name="DIROFFSET1">12.0*$1</eval>
	<eval name="DIROFFSET2">-8*$DIROFFSET1+6.5*$1</eval>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire00A">
		<p>-140*$1</p><p>$SPEED</p>
	</fireRef>
	<repeat><times>2</times>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
		</fireRef>
		<wait>1</wait>
	</repeat>

	<repeat><times>26</times>
		<evalAdd name="SPEED">-1.4/24</evalAdd>
		<wait>1</wait>
		<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET2</p><p>$SPEED</p>
		</fireRef>
		<repeat><times>2</times>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<fireRef label="stage1_bossTMP00_fire00B">
			<p>$DIROFFSET1</p><p>$SPEED</p>
			</fireRef>
			<wait>1</wait>
		</repeat>
	</repeat>
</action>



<!--param0 DIRECT(時計周り=1、反時計周り=-1)万が一オフセットを持たせる場合用-->
<action label="stage1_bossTMP00_subAction01">
	<!--基本は全方向弾-->
	<eval name="DIR2">($_player_cx*23+$_player_cy*44)%360</eval>
	<eval name="WAIT1">3</eval>
		<eval name="SPEED1">2.0+($_difficulty*0.2)</eval>
	<eval name="OFFSET">$1*1.2</eval><!--１面ならHARD以外は０かと・・・-->

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire01A"><p>$DIR2</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<wait>1</wait>
	<repeat><times>3</times>
		<evalAdd name="WAIT1">-1</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>22.5</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<wait>1</wait>
	</repeat>

	<repeat><times>3</times>
		<wait>4</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>22.5+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>22.5</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<wait>1</wait>
		</repeat>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>4</times>
		<wait>4</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>22.5+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>22.5</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<fireRef label="stage1_bossTMP00_fire01B"><p>90</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<wait>1</wait>
		</repeat>
	</repeat>
</action>

<action label="stage1_bossTMP00_subAction01_normal">
	<!--基本は全方向弾-->
	<eval name="DIR2">($_player_cx*23+$_player_cy*44)%360</eval>
	<eval name="WAIT1">3</eval>
		<eval name="SPEED1">2.0+($_difficulty*0.2)</eval>
	<eval name="OFFSET">$1*1.8</eval><!--１面ならHARD以外は０かと・・・-->

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire01A"><p>$DIR2</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<repeat><times>4</times>
		<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	</repeat>
	<wait>1</wait>
	<repeat><times>3</times>
		<evalAdd name="WAIT1">-1</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
	</repeat>

	<repeat><times>3</times>
		<wait>4</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<repeat><times>4</times>
				<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			</repeat>
			<wait>1</wait>
		</repeat>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>4</times>
		<wait>4</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<repeat><times>4</times>
				<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			</repeat>
			<wait>1</wait>
		</repeat>
	</repeat>
</action>


<action label="stage1_bossTMP00_subAction01_hard">
	<!--基本は全方向弾-->
	<eval name="DIR2">($_player_cx*23+$_player_cy*44)%360</eval>
	<eval name="WAIT1">3</eval>
		<eval name="SPEED1">2.0+($_difficulty*0.2)</eval>
	<eval name="OFFSET">$1*2.6</eval><!--１面ならHARD以外は０かと・・・-->

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef label="stage1_bossTMP00_fire01A"><p>$DIR2</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	<repeat><times>4</times>
		<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
	</repeat>
	<wait>1</wait>
	<repeat><times>3</times>
		<evalAdd name="WAIT1">-1</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
	</repeat>

	<repeat><times>4</times>
		<wait>2</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<repeat><times>4</times>
				<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			</repeat>
			<wait>1</wait>
		</repeat>
	</repeat>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<repeat><times>5</times>
		<wait>2</wait>
		<eval name="WAIT1">3</eval>
		<evalAdd name="SPEED1">0.4</evalAdd>
		<fireRef label="stage1_bossTMP00_fire01B"><p>18+$OFFSET</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		<repeat><times>4</times>
			<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
		</repeat>
		<wait>1</wait>
		<repeat><times>3</times>
			<evalAdd name="WAIT1">-1</evalAdd>
			<fireRef label="stage1_bossTMP00_fire01B"><p>18</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			<repeat><times>4</times>
				<fireRef label="stage1_bossTMP00_fire01B"><p>72</p><p>$SPEED1</p><p>$WAIT1</p></fireRef>
			</repeat>
			<wait>1</wait>
		</repeat>
	</repeat>
	<w>2</w>
</action>



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

<action  label="stage_boss_04_action">

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

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

	<wait>1</wait>

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

	<wait>1</wait>

	<!-- カットイン -->
	<aRef l="boss_cutin_action"/>
	<w>1</w>
	<aRef l="player_cutin_action"/>
	<w>1</w>
	<aRef l="supporter_cutin_action"/>
	<w>1</w>

	<cRef l="boss_barrier_create"><p>12000</p><p>100</p><p>256</p><p>20</p></cRef>
	<cRef l="boss_barrier_create_dummy"><p>256</p></cRef>

	<w>110</w>

	<!-- 移動速度、移動方向、wait -->
	<cRef l="enemy_create_b04_child"><p>1</p><p>45</p><p>1</p></cRef>
	<cRef l="enemy_create_b04_child"><p>1</p><p>-45</p><p>31</p></cRef>
	<cRef l="enemy_create_b04_child"><p>1.5</p><p>90</p><p>46</p></cRef>
	<cRef l="enemy_create_b04_child"><p>1.5</p><p>-90</p><p>91</p></cRef>

	<w>70</w>

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

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

	<!-- パーツ全破壊後攻撃用 -->
	<cRef l="boss_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="boss_04_object_create2"></cRef>
		</repeat>
		<w>6</w>
		<global name="temp_grank">$__grank</global>
	</repeat>


</action>

<create label="boss_04_object_create">
	<speed>0</speed>
	<dir>0</dir>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<child>1</child>
	<objectRef l="boss_04_object"></objectRef>
</create>

<object l="boss_04_object">

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

	<a>

		<repeat><times>$_difficulty-eq0</times>
			<aRef l="boss_act04_00"/>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<aRef l="boss_act04_01"/>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<aRef l="boss_act04_02"/>
		</repeat>

	</a>
</object>

<a l="boss_act04_00">

	<eval name="t_sp">3.2+$__temp_grank*0.1</eval>
	<eval name="t_sp2">2.6+$__temp_grank*0.1</eval>
	<w>1</w>
	<repeat><times>-1</times>

		<aRef label="enemy_laser_action"/>
		<cRef l="enemy_create_alpha_attack"><p>-132</p><p>$t_sp2</p></cRef>
		<repeat><times>6</times>
			<w>6</w>
			<cRef l="enemy_create_alpha_attacks"><p>42</p><p>$t_sp2</p></cRef>
		</repeat>
		<w>72</w>
		<global name="temp_grank">$__grank</global>

	</repeat>

</a>

<a l="boss_act04_01">

	<eval name="t_sp">3.3+$__temp_grank*0.1</eval>
	<eval name="t_sp2">2.7+$__temp_grank*0.1</eval>
	<w>1</w>
	<repeat><times>-1</times>

		<aRef label="enemy_laser_action"/>
		<cRef l="enemy_create_alpha_attack"><p>-128</p><p>$t_sp2</p></cRef>
		<repeat><times>8</times>
			<w>4</w>
			<cRef l="enemy_create_alpha_attacks"><p>32</p><p>$t_sp2</p></cRef>
		</repeat>
		<w>62</w>
		<global name="temp_grank">$__grank</global>

	</repeat>

</a>

<a l="boss_act04_02">

	<eval name="t_sp">3.4+$__temp_grank*0.1</eval>
	<eval name="t_sp2">2.8+$__temp_grank*0.1</eval>
	<w>1</w>
	<repeat><times>-1</times>

		<aRef label="enemy_laser_action"/>
		<cRef l="enemy_create_alpha_attack"><p>-100</p><p>$t_sp2</p></cRef>
		<repeat><times>10</times>
			<w>3</w>
			<cRef l="enemy_create_alpha_attacks"><p>20</p><p>$t_sp2</p></cRef>
		</repeat>
		<w>50</w>
		<global name="temp_grank">$__grank</global>

	</repeat>

</a>


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

<object l="boss_04_object2">

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

	<a>
		<w>45</w>
		<repeat><times>$_difficulty-eq0</times>
			<aRef l="boss_act04_2_00"/>
		</repeat>
		<repeat><times>($_difficulty-eq1)+($_difficulty-eq2)</times>
			<aRef l="boss_act04_2_01"/>
		</repeat>
		<repeat><times>$_difficulty-eq3</times>
			<aRef l="boss_act04_2_02"/>
		</repeat>

	</a>
</object>

<a l="boss_act04_2_00">

<eval name="t_sp">3.0+$__temp_grank*0.1</eval>
<eval name="t_sp2">2.4+$__temp_grank*0.1</eval>
<eval name="counter">1</eval>
<w>1</w>
<repeat><times>-1</times>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b04_1"><p>-54</p><p>$t_sp</p></fRef>
	<repeat><times>6</times>
		<fRef l="enemy_fire_b04_1s"><p>18</p><p>$t_sp</p></fRef>
	</repeat>
	<w>4</w>

	<aRef label="enemy_laser_action"/>
	<cRef l="enemy_create_alpha_attack"><p>-141</p><p>$t_sp2</p></cRef>
	<repeat><times>6</times>
		<w>6</w>
		<cRef l="enemy_create_alpha_attacks"><p>47</p><p>$t_sp2</p></cRef>
	</repeat>
	<w>72-$__boss_parts*5-$counter*2</w>
	<global name="temp_grank">$__grank</global>

	<repeat><times>$counter-lt6</times>
		<evaladd name="counter">1</evaladd>
	</repeat>
</repeat>

</a>

<a l="boss_act04_2_01">

<eval name="t_sp">3.1+$__temp_grank*0.1</eval>
<eval name="t_sp2">2.6+$__temp_grank*0.1</eval>
<eval name="counter">1</eval>
<w>1</w>
<repeat><times>-1</times>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b04_1"><p>-54</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>12</p><p>$t_sp</p></fRef>
	</repeat>
	<w>20</w>
	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b04_1"><p>-56</p><p>$t_sp</p></fRef>
	<repeat><times>7</times>
		<fRef l="enemy_fire_b04_1s"><p>16</p><p>$t_sp</p></fRef>
	</repeat>
	<w>48-$__boss_parts*5-$counter*2</w>

	<aRef label="enemy_laser_action"/>
	<cRef l="enemy_create_alpha_attack"><p>-108</p><p>$t_sp2</p></cRef>
	<repeat><times>6</times>
		<w>5</w>
		<cRef l="enemy_create_alpha_attacks"><p>36</p><p>$t_sp2</p></cRef>
	</repeat>

	<global name="temp_grank">$__grank</global>
	<repeat><times>$counter-lt6</times>
		<evaladd name="counter">1</evaladd>
	</repeat>

</repeat>

</a>

<a l="boss_act04_2_02">

<eval name="t_sp">3.5+$__temp_grank*0.1</eval>
<eval name="t_sp2">3.0+$__temp_grank*0.1</eval>
<eval name="counter">1</eval>
<w>1</w>
<repeat><times>-1</times>


	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b04_1"><p>-45</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_b04_1s"><p>-90+3</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_b04_1s"><p>-90+3</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>

	<aRef label="enemy_laser_action"/>
	<cRef l="enemy_create_alpha_attack"><p>-100</p><p>$t_sp2</p></cRef>
	<repeat><times>8</times>
		<w>4</w>
		<cRef l="enemy_create_alpha_attacks"><p>25</p><p>$t_sp2</p></cRef>
	</repeat>
	<w>32-$__boss_parts*6</w>
	<global name="temp_grank">$__grank</global>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fRef l="enemy_fire_b04_1"><p>-45</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_b04_1s"><p>-90-3</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>6</w>
	<fRef l="enemy_fire_b04_1s"><p>-90-3</p><p>$t_sp</p></fRef>
	<repeat><times>9</times>
		<fRef l="enemy_fire_b04_1s"><p>10</p><p>$t_sp</p></fRef>
	</repeat>
	<w>5</w>

	<aRef label="enemy_laser_action"/>
	<cRef l="enemy_create_alpha_attack"><p>-100</p><p>$t_sp2</p></cRef>
	<repeat><times>8</times>
		<w>4</w>
		<cRef l="enemy_create_alpha_attacks"><p>25</p><p>$t_sp2</p></cRef>
	</repeat>
	<w>33-$__boss_parts*5-$counter</w>
	<global name="temp_grank">$__grank</global>

	<repeat><times>$counter-lt6</times>
		<evaladd name="counter">1</evaladd>
	</repeat>

</repeat>

</a>

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

<object l="boss_04_object3">

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

	<a>

	<eval name="t_sp">3.4+($_difficulty-gt0)*0.2+($_difficulty-gt2)*0.2+$__temp_grank*0.1</eval>

	<repeat><times>-1</times>
		<repeat><times>$__boss_parts-eq4</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b04_1"><p>-90</p><p>$t_sp</p></fRef>
		<repeat><times>9</times>
			<fRef l="enemy_fire_b04_1s"><p>20</p><p>$t_sp</p></fRef>
		</repeat>
		</repeat>
		<w>23-($_difficulty*4)+($_difficulty-gt1)*4</w>
	</repeat>
	</a>
</object>

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

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

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

	<wait>2</wait>

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

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

</action>


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

<a l="boss_attack_child_revenge">
	<targetRevenge label="boss_04_object"></targetRevenge>
	<targetRevenge label="boss_04_child_object"></targetRevenge>
</a>


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

<revenge label="stage_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">34</eval>
	<eval name="score_dat">0</eval>

	<eval name="percent">0</eval>
	<eval name="crystal_num">13</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>

	<!-- 爆発アクション -->
	<!-- *** 形態変数の増加 *** -->
	<global name="boss_state">$__boss_state+1</global>

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

	<!-- Normal- テンションアップ -->
	<repeat><times>($_difficulty-lt2)*($_tension-lt8)</times>
		<createRef label="item_create_03"><p>225</p></createRef>
	</repeat>

	<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)-1*(($percent*100)-gt5)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+($__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>

	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>12000</p><p>140</p><p>420+20*$_difficulty+$score_dat</p><p>500000</p>
	</createRef>

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

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

<revenge label="stage_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">38</eval>
	<eval name="score_dat">0</eval>

	<eval name="percent">0</eval>
	<eval name="crystal_num">13</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)-1*(($percent*100)-gt5)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+($__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>

	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>12000</p><p>160</p><p>440+20*$_difficulty+$score_dat</p><p>500000</p>
	</createRef>

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


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

<revenge label="stage_boss_03_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">40</eval>
	<eval name="score_dat">0</eval>

	<eval name="percent">0</eval>
	<eval name="crystal_num">13</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)-1*(($percent*100)-gt5)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+($__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>

	<wait>60</wait>

	<!-- *** 次の形態のボスの作成 *** -->

	<createRef label="enemy_create_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>13000</p><p>200</p><p>600+40*$_difficulty+$score_dat</p><p>500000</p>
	</createRef>
	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

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

<revenge label="stage_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">54</eval>
	<eval name="score_dat">0</eval>

	<eval name="percent">0</eval>
	<eval name="crystal_num">13</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>
	<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)-1*(($percent*100)-gt5)</eval>
		</repeat>
		<eval name="crystal_num">$crystal_num+($__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_main_boss_final_revenge_action"></actionRef>
</revenge>


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

<revenge label="stage_boss_04_secret_revenge">


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

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

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

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


</exbulletml>
