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

	<!-- *** 会話終了ロックをかける *** -->
	<setLock><num>11</num></setLock>
	
	<!-- 成実一人戦闘あり -->
	<eval name="vital">13200+($__grank*300)</eval>

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<global name="temp_grank">$__grank</global>
	<createRef label="enemy_create_main_boss">
		<p>320</p>
		<p>-12</p>
		<p>$vital</p>
		<p>0</p>
		<p>110000+($__grank*6000)</p>
		<p>$__main_boss_prate</p>
	</createRef>

	<wait>60</wait>

</action>

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

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

	<!-- *** ボスの名称表示オブジェクト作成 *** -->
	<!--
	<createRef label="boss_name_stage_main"></createRef>	
	-->

	<sound type="bgm" label="bgm">
		<track><file type="ogg">07_bossB_loop</file></track>
		<play><flag>1</flag><loop>44100*2*2*2</loop></play>
	</sound>
	<actionRef label="stageB_2_bgm_title_action"/>


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

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


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

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

	<!-- *** 初期設定では衝突判定無し *** -->
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>
	<presentRef label="stage_main_boss_present_01"></presentRef>

	<!-- *** 第 1 形態以外の場合に VITAL ゲージを作成 *** -->
	<rep><ts>1-($__boss_state-eq1)</ts>
		<!-- *** VITAL ゲージはボスの子オブジェクトなのでここで作成 *** -->
		<createRef label="boss_vital_create"></createRef>

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

	<!-- タイマー差分初期化 -->
	<global name="end_offset">0</global>
	<global name="end_flag">0</global>

	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<eval name="cross_over">90</eval>
		<revengeRef label="stage_main_boss_01_revenge"><p>$cross_over</p></revengeRef>
		<actionRef  label="stage_main_boss_01_action"><p>$cross_over</p></actionRef> 
	</repeat>

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

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

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

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

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

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

	<!-- secret -->
	<repeat><times>$__boss_state-eq5</times>
		<eval name="cross_over">100</eval>
		<aRef l="p_avrage_add"/>
		<revengeRef label="stage_main_boss_05_revenge"><p>$cross_over</p></revengeRef>

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

</enemy>


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

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

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

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

	<!-- *** 一人戦闘の場合のvital変更 *** -->
	<setVital>
	<vital>13200+($__grank*300)-($__twins_set-eq0)*(9200+($__grank*200))</vital>
	</setVital>

	<!-- *** 第 1 形態に限りゲージ類をここで作成 *** -->
	<createRef label="boss_vital_create"></createRef>
	<createRef label="boss_underbar_create"></createRef>
	<global name="timer">12</global>
	<global name="timerwait">217</global>


	<wait>30</wait>
	<!-- *** 実際の戦闘開始 *** -->
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>
	<createRef l="boss_ring"><p>$1</p></createRef>

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

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

	<wait>10</wait>
	<!-- move内 70 -->
	<actionRef label="boss_rand_move01"/>

<repeat><times>3</times>
	<!-- ３種円形 -->
	<eval name="sp">0.7+($__temp_grank*0.2)</eval>
	<eval name="sp2">0.8+($__temp_grank-gt2)*0.2</eval>
	<eval name="dir">20-($__temp_grank-eq1)*2-($__temp_grank-eq2)*5-($__temp_grank-eq3)*8-($__temp_grank-eq4)*10-($__temp_grank-eq5)*11</eval>
	<eval name="rep_time">6+($__temp_grank-eq1)+($__temp_grank-eq2)*2+($__temp_grank-eq3)*4+($__temp_grank-eq4)*6+($__temp_grank-eq5)*7</eval>
	<wait>10</wait>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_b_1_01"><p>0</p><p>$sp</p><p>3</p></fireRef>
	<repeat><times>$rep_time-1+($__temp_grank-eq5)</times>
		<fireRef l="enemy_fire_b_1_01s"><p>$dir</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time-($__temp_grank-eq1)</times>
		<fireRef l="enemy_fire_b_1_01s"><p>$dir</p><p>$sp</p><p>3-1</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time</times>
		<fireRef l="enemy_fire_b_1_01s"><p>$dir</p><p>$sp</p><p>3-2</p></fireRef>
	</repeat>
	<w>1</w>


	<evaladd name="sp">$sp2</evaladd>
	<w>12</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_b_1_02ab"><p>($_prate%17)</p><p>$sp</p><p>3</p></fireRef>
	<repeat><times>$rep_time-1+($__temp_grank-eq5)</times>
		<fireRef l="enemy_fire_b_1_02s"><p>$dir</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time-($__temp_grank-eq1)</times>
		<fireRef l="enemy_fire_b_1_02s"><p>$dir</p><p>$sp</p><p>3-1</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time</times>
		<fireRef l="enemy_fire_b_1_02s"><p>$dir</p><p>$sp</p><p>3-2</p></fireRef>
	</repeat>
	<w>1</w>

	<evaladd name="sp">$sp2</evaladd>
	<w>12</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_b_1_03ab"><p>(($_player_cx+$_self_cx)%17)</p><p>$sp</p><p>3</p></fireRef>
	<repeat><times>$rep_time-1+($__temp_grank-eq5)</times>
		<fireRef l="enemy_fire_b_1_03s"><p>$dir</p><p>$sp</p><p>3</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time-($__temp_grank-eq1)</times>
		<fireRef l="enemy_fire_b_1_03s"><p>$dir</p><p>$sp</p><p>3-1</p></fireRef>
	</repeat>
	<w>1</w>
	<repeat><times>$rep_time</times>
		<fireRef l="enemy_fire_b_1_03s"><p>$dir</p><p>$sp</p><p>3-2</p></fireRef>
	</repeat>
	<w>1</w>

	<w>12</w>
</repeat>

	<w>15</w>
	<!-- move内 70 -->
	<actionRef label="boss_rand_move01"/>

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

	<!-- 狙い円 -->
	<repeat><times>($__temp_grank-gt2)</times>
		<fireRef l="enemy_fire_b_1_04"><p>50</p></fireRef>
		<w>1</w>
		<fireRef l="enemy_fire_b_1_04"><p>-50</p></fireRef>
		<w>1</w>
	</repeat>

	<repeat><times>1-($__temp_grank-gt2)</times>
		<w>2</w>
	</repeat>

	<w>15</w>
	<aRef l="enemy_bullet_action2"><p>64</p></aRef>
	<fireRef l="enemy_fire_b_1_04"><p>80</p></fireRef>
	<w>1</w>
	<fireRef l="enemy_fire_b_1_04"><p>-80</p></fireRef>
	<w>15</w>

	<repeat><times>($__temp_grank-gt3)</times>
		<fireRef l="enemy_fire_b_1_04"><p>100</p></fireRef>
		<w>1</w>
		<fireRef l="enemy_fire_b_1_04"><p>-100</p></fireRef>
		<w>1</w>
	</repeat>

	<repeat><times>1-($__temp_grank-gt3)</times>
		<w>2</w>
	</repeat>


	<w>45</w>
	<!-- move内 70 -->
	<actionRef label="boss_rand_move01"/>
	<w>8</w>

	<eval name="self_judge">1-2*($_self_cx-gt320)</eval>
	<eval name="offset">2</eval>
	<!-- 難易度調整用 -->
	<global name="temp_grank">$__grank</global>
	<w>2</w>

	<aRef l="enemy_bullet_action8"><p>64</p></aRef>
	<fireRef l="enemy_fire_b_1_07"><p>13</p><p>$self_judge</p></fireRef>
	<repeat><times>9</times>
		<fireRef l="enemy_fire_b_1_07s"><p>36</p><p>$self_judge</p></fireRef>
	</repeat>
	<repeat><times>8</times>
		<w>4</w>
		<repeat><times>10</times>
			<fireRef l="enemy_fire_b_1_07s"><p>36</p><p>$self_judge</p></fireRef>
		</repeat>
	</repeat>

	<repeat><times>10-($__temp_grank-eq0)*5</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fireRef l="enemy_fire_b_1_07s"><p>36+$self_judge*$offset</p><p>$self_judge</p></fireRef>
		<repeat><times>9+($__temp_grank-gt4)</times>
			<fireRef l="enemy_fire_b_1_07s"><p>36-($__temp_grank-gt4)*6</p><p>$self_judge</p></fireRef>
		</repeat>
		<w>2</w>
		<evaladd name="offset">2.6</evaladd>
		<w>2+4*($__temp_grank-eq0)</w>
	</repeat>

	<repeat><times>3*($__temp_grank-gt2)+3*($__temp_grank-gt3)+6*($__temp_grank-gt4)</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fireRef l="enemy_fire_b_1_07s"><p>36+$self_judge*$offset</p><p>$self_judge</p></fireRef>
		<repeat><times>9+($__temp_grank-gt4)</times>
			<fireRef l="enemy_fire_b_1_07s"><p>36-($__temp_grank-gt4)*6</p><p>$self_judge</p></fireRef>
		</repeat>
		<w>2</w>
		<evaladd name="offset">2.6</evaladd>
		<w>2</w>
	</repeat>

	<w>10</w>
	<w>50-(3*($__temp_grank-gt2)+3*($__temp_grank-gt3)+3*($__temp_grank-gt4))*4</w>


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

</action>


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

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

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

	<wait>2</wait>

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

	<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>
	<eval name="ch_vital">70</eval> <!-- 元は74 -->
	<eval name="ad_count">0</eval>

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

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

	<eval name="enemy_num">2+$__temp_grank</eval>
	<eval name="enemy_num2">1</eval>
	<eval name="score_judge">($_prate%$enemy_num)+1</eval>
	<global name="enemy_count">$enemy_num</global>
	<w>2</w>

	<repeat><times>$enemy_num</times>
		<createRef l="enemy_create_b01"><p>140+(360/($enemy_num+1)*$enemy_num2)</p><p>($enemy_num2-eq$score_judge)</p><p>$ch_vital</p></createRef>
		<evaladd name="enemy_num2">1</evaladd>
	</repeat>
	<evaladd name="ad_count">1</evaladd>
	<eval name="ch_vital">70+($ad_count*70)</eval>

	<chD><dir type="absolute">(85-($_player_cy%11))*(1-2*($_player_cx-lt320))</dir><tm>1</tm></chD>
	<chS><sp type="absolute">3</sp><tm>15</tm></chS>
	<w>20</w>
	<chS><sp type="absolute">0</sp><tm>15</tm></chS>
	<w>20</w>
	

	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>3</p><p>-1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2</p><p>-1</p></fRef>
		</repeat>
		<w>40-($__temp_grank-gt3)*3</w>

		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>-3</p><p>1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>-(20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2)</p><p>1</p></fRef>
		</repeat>
		<w>10-($__temp_grank-gt3)*3</w>
	</repeat>

	<chD><dir type="relative">180</dir><tm>1</tm></chD>
	<chS><sp type="absolute">3</sp><tm>15</tm></chS>
	<w>20</w>
	<chS><sp type="absolute">0</sp><tm>15</tm></chS>

	<repeat><times>1-($__enemy_count-eq0)</times>
		<w>90</w>
	</repeat>
	<repeat><times>($__enemy_count-eq0)</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>3</p><p>-1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2</p><p>-1</p></fRef>
		</repeat>
		<w>40-($__temp_grank-gt3)*3</w>

		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>-3</p><p>1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>-(20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2)</p><p>1</p></fRef>
		</repeat>
		<w>10-($__temp_grank-gt3)*3</w>
		<w>26</w>
	</repeat>


	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>3</p><p>-1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2</p><p>-1</p></fRef>
		</repeat>
		<w>40-($__temp_grank-gt3)*3</w>

		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>-3</p><p>1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>-(20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2)</p><p>1</p></fRef>
		</repeat>
		<w>10-($__temp_grank-gt3)*3</w>
	</repeat>

	<repeat><times>1-($__enemy_count-eq0)</times>
		<w>150</w>
	</repeat>

	<repeat><times>($__enemy_count-eq0)</times>
	<repeat><times>2</times>
		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>3</p><p>-1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2</p><p>-1</p></fRef>
		</repeat>
		<w>40-($__temp_grank-gt3)*3</w>

		<aRef l="enemy_bullet_action8"><p>64</p></aRef>
		<fRef l="enemy_fire_b_2_02"><p>-3</p><p>1</p></fRef>
		<repeat><times>7+($__temp_grank-gt3)*3</times>
			<w>1</w>
			<fRef l="enemy_fire_b_2_02s"><p>-(20+($__temp_grank-eq0)*4-($__temp_grank-gt2)*4-($__temp_grank-gt3)*4-($__temp_grank-gt4)*2)</p><p>1</p></fRef>
		</repeat>
		<w>10-($__temp_grank-gt3)*3</w>
	</repeat>
	<w>22</w>
	</repeat>

	<!-- タイマーチェック -->
<!--
	<eval name="time_check2">$_stageplayframe-$time_check1</eval>
	<debugstr><string>boss2</string></debugstr>
	<debugval><num>$time_check2</num></debugval>
-->	
</repeat>
<global name="end_flag">1</global>
</action>


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

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

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

	<wait>2</wait>

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

	<!-- 弾幕開始 -->
	<actionRef label="start_boss_bullet"/>
	<eval name="temp">-1</eval>


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

	<createRef l="enemy_create_b02d0"><p>260</p><p>12</p><p>1</p></createRef>
	<w>5</w>
	<createRef l="enemy_create_b02d0"><p>380</p><p>7</p><p>1</p></createRef>
	<w>6</w>
	<createRef l="enemy_create_b02d0"><p>200</p><p>21</p><p>1</p></createRef>
	<w>4</w>
	<createRef l="enemy_create_b02d0"><p>320</p><p>18</p><p>1-($__temp_grank-lt2)</p></createRef>
	<w>8</w>
	<createRef l="enemy_create_b02d0"><p>440</p><p>29</p><p>1</p></createRef>

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

	<w>110</w>
	<!-- move内 70 -->
	<actionRef label="boss_rand_move01"/>
	<w>10</w>
	<repeat><times>($__temp_grank-eq5)</times>
		<aRef l="enemy_bullet_action2"><p>32</p></aRef>
		<fRef l="enemy_fire_b_3_02"><p>72</p></fRef>
		<fRef l="enemy_fire_b_3_02"><p>-72</p></fRef>
	</repeat>
	<w>60</w>


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

	<aRef l="enemy_bullet_action2"><p>32</p></aRef>
	<fRef l="enemy_fire_b_3_02"><p>72</p></fRef>
	<fRef l="enemy_fire_b_3_02"><p>-72</p></fRef>

	<w>60</w>
	<!-- move内 70 -->
	<actionRef label="boss_rand_move01"/>

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

</action>

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

<action  label="stage_main_boss_04_action">
<!-- SECRET MAGIC 演出 0:mid enemy magic  1:mid secret magic 2:boss enemy magic 3:boss secret magic-->
<actionRef label="enemy_magic_action"><p>2</p><param>60</param><param>120</param><param>35</param><param>125</param></actionRef>
<createRef label="stage1_boss_et"></createRef>

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

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

	<wait>110</wait>

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

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

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

<repeat><times>3</times>

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


	<aRef l="enemy_bullet_action8"><p>32</p></aRef>
	<createRef l="enemy_create_b03d"><p>0</p><p>1</p></createRef>
	<repeat><times>3+($__temp_grank-eq5)</times>
		<createRef l="enemy_create_b03ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>1</p></createRef>
	</repeat>
	<w>1</w>
	<repeat><times>5-($__temp_grank-lt3)</times>
		<createRef l="enemy_create_b03ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>1</p></createRef>
	</repeat>
	<w>180</w>

	<chD><dir type="absolute">-87+($_player_cx-gt320)*174</dir><tm>1</tm></chD>
	<chS><sp>0.7</sp><tm>1</tm></chS>
	<w>30</w>
	<chS><sp>0</sp><tm>1</tm></chS>
	<w>310</w>

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


	<aRef l="enemy_bullet_action8"><p>32</p></aRef>
	<createRef l="enemy_create_b03d"><p>14</p><p>-1</p></createRef>
	<repeat><times>3+($__temp_grank-eq5)</times>
		<createRef l="enemy_create_b03ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>-1</p></createRef>
	</repeat>
	<w>1</w>
	<repeat><times>5-($__temp_grank-lt3)</times>
		<createRef l="enemy_create_b03ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>-1</p></createRef>
	</repeat>
	<w>180</w>

	<chD><dir type="relative">180</dir><tm>1</tm></chD>
	<chS><sp>0.7</sp><tm>1</tm></chS>
	<w>30</w>
	<chS><sp>0</sp><tm>1</tm></chS>
	<w>310</w>

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

</action>

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

<action  label="stage_main_boss_05_action">
<!-- SECRET MAGIC 演出 0:mid enemy magic  1:mid secret magic 2:boss enemy magic 3:boss secret magic-->
<actionRef label="enemy_magic_action"><p>3</p><param>60</param><param>120</param><param>35</param><param>125</param></actionRef>
<createRef label="stage1_boss_et"></createRef>

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

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

	<wait>110</wait>

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

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

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

<repeat><times>3</times>

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


	<aRef l="enemy_bullet_action8"><p>32</p></aRef>
	<createRef l="enemy_create_b04d"><p>0</p><p>1</p></createRef>
	<repeat><times>4</times>
		<createRef l="enemy_create_b04ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>1</p></createRef>
	</repeat>
	<w>1</w>
	<repeat><times>4+($__temp_grank-eq5)-($__temp_grank-lt3)</times>
		<createRef l="enemy_create_b04ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>1</p></createRef>
	</repeat>
	<w>180</w>
	
	<chD><dir type="absolute">-87+($_player_cx-gt320)*174</dir><tm>1</tm></chD>
	<chS><sp>0.7</sp><tm>1</tm></chS>
	<w>30</w>
	<chS><sp>0</sp><tm>1</tm></chS>
	<w>330</w>

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


	<aRef l="enemy_bullet_action8"><p>32</p></aRef>
	<createRef l="enemy_create_b04d"><p>14</p><p>-1</p></createRef>
	<repeat><times>4</times>
		<createRef l="enemy_create_b04ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>-1</p></createRef>
	</repeat>
	<w>1</w>
	<repeat><times>4+($__temp_grank-eq5)-($__temp_grank-lt3)</times>
		<createRef l="enemy_create_b04ds"><p>40-(($__temp_grank-eq5)*4)+(($__temp_grank-lt3)*5)</p><p>-1</p></createRef>
	</repeat>
	<w>180</w>

	<chD><dir type="relative">180</dir><tm>1</tm></chD>
	<chS><sp>0.7</sp><tm>1</tm></chS>
	<w>30</w>
	<chS><sp>0</sp><tm>1</tm></chS>
	<w>330</w>

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

</action>

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

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

	<!-- ランク変動値、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<eval name="rank_inc">1100*($_difficulty+1)</eval>
	<eval name="crystal">(14+$_difficulty*2)</eval>
	<eval name="red_crystal">40</eval>
	<eval name="multi4">1000+($__grank-gt2)*80+($__grank-gt3)*80+($__grank-gt4)*100</eval>
	<eval name="distance">$1</eval>

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

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

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

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

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

	<!-- 打ち返し -->
	<repeat><times>$__grank-eq5</times>
		<actionRef label="revenge_bullet_boss"/>
	</repeat>

	<wait>1</wait>

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

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

	<wait>60</wait>

	<!-- 成実一人戦闘あり -->
	<eval name="vital">13200+($__grank*300)-($__twins_set-eq0)*(9700+($__grank*200))</eval>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_main_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>$vital</p><p>0</p><p>110000+($__grank*6000)</p><p>$__main_boss_prate</p>
	</createRef>

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

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

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

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

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

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

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

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

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

	<!-- 打ち返し -->
	<repeat><times>$__grank-eq5</times>
		<actionRef label="revenge_bullet_boss"/>
	</repeat>

	<wait>1</wait>

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

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

	<wait>60</wait>

	<!-- 成実一人戦闘あり -->
	<eval name="vital">13200+($__grank*300)-($__twins_set-eq0)*(8300+($__grank*200))</eval>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_main_boss">
		<p>$_self_cx</p><p>$_self_cy</p><p>$vital</p><p>0</p><p>130000+($__grank*7000)</p><p>$__main_boss_prate</p>
	</createRef>

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

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

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

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

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

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

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

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

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

	<!-- 打ち返し -->
	<repeat><times>$__grank-eq5</times>
		<actionRef label="revenge_bullet_boss"/>
	</repeat>

	<wait>1</wait>

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

		<!-- *** ノーミスノーボムチェック *** -->
<!--		<repeat><times>(($ttc_end-$__ttc_start)-eq($localcounter-$__counter_tmp))*($__ttc_start-gt((300*$_magic_rate/100)-60))</times>
			<addSpirit><spirit>$spirit_inc</spirit></addSpirit>
			<actionRef label="addsp_letter"><param>$spirit_fig_num</param><param>$spirit_inc</param></actionRef>
		</repeat>
-->
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss_stage1">
		<param>$crystal</param><param>$counter_e</param><param>$multi4</param><param>24</param><param>$localcounter</param><param>$rank_inc</param><param>$distance</param>
		</actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<addRank><num>-2*$rank_inc</num></addRank>
		<actionRef label="item_counter_01_red"><param>$red_crystal</param></actionRef>
	</repeat>

	<wait>60</wait>

	<actionRef label="boss_revenge_present_3"/>

	<!-- *** ボスの第３形態までのステージ侵食率低減 14%以上　または侵食率10%以下でsecretへ *** -->

	<eval name="base">140000</eval>
	<eval name="judge">(((($__start_prate-$_prate)-gt$base)+($_prate-lt100000))-gt0)*($_stagemisscount-eq0)</eval>

	<!-- *** 次の形態のボスの作成 EM *** -->
	<repeat><times>$judge*($_stagemisscount-eq0)</times>
		<!-- *** 形態数5 secret *** -->
		<aRef l="secret_hint"><p>$base</p><p>($_prate-lt100000)</p></aRef>
		<sysvar name="secret">$_secret+1</sysvar>
		<global name="boss_state">$__boss_state+1</global>

		<!-- 成実一人戦闘あり -->
		<eval name="vital">16200+($__grank*300)-($__twins_set-eq0)*(13200+($__grank*200))</eval>

		<createRef label="enemy_create_main_boss">
			<p>$_self_cx</p><p>$_self_cy</p><p>$vital</p><p>0</p><p>260000+($__grank*20000)</p><p>$__main_boss_prate3</p>
		</createRef>
	</repeat>
	<repeat><times>1-($judge*($_stagemisscount-eq0))</times>
		<!-- *** 形態数4 *** -->
		<!-- 成実一人戦闘あり -->
		<eval name="vital">17700+($__grank*300)-($__twins_set-eq0)*(14700+($__grank*200))</eval>
		<createRef label="enemy_create_main_boss">
			<p>$_self_cx</p><p>$_self_cy</p><p>$vital</p><p>0</p><p>160000+($__grank*10000)</p><p>$__main_boss_prate2</p>
		</createRef>
	</repeat>

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


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

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

	<!-- ランク変動値、ボーナススピリット、スピリット桁数、クリスタル基本値、赤クリスタル基本値、４倍タイマー -->
	<!-- ランク変動値は、４倍、EMB取得で２回入る -->
	<eval name="rank_inc">1400*($_difficulty+1)</eval>
	<eval name="crystal">(18+$_difficulty*2)</eval>
	<eval name="red_crystal">50</eval>
	<eval name="multi4">1180+($__grank-gt2)*60+($__grank-gt4)*60</eval>
	<eval name="distance">$1</eval>

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

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

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

	<!-- まだないよ -->

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

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

	<wait>1</wait>

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

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

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

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

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

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

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

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

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

	<!-- まだないよ -->

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

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


	<wait>1</wait>

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

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

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



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

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

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