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

<!-- ********************************************************************* -->
<!-- *** 中ボス戦はここから始ま					*** -->
<!-- *** stage4A中ボス normal					   *** -->

<action label="stage4A_middle_boss">

	<!-- *** 第 N 形態 *** -->
	<global name="boss_state">1</global>
	
	<!-- *** ボスの初期ライフ *** -->
	<global name="boss_life">1</global>
	
	<!-- *** 最初のボスオブジェクト作成 *** -->
	<createRef label="enemy_create_middle_boss"><param>200</param><param>-12</param></createRef>


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

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

</action>



<!-- ********************************************************************* -->

<!-- *** 中ボス第 1 形態のボスオブジェクト作成			 *** -->
<!-- ***							       *** -->

<create label="enemy_create_middle_boss">

	<speed>4</speed>
	<direction type="absolute">135</direction>
	<cx>$1</cx><cy>$2</cy>
 	<vital>1400</vital>
	<inv>40</inv>
	<score>110000</score>
	<prate>$__middle_boss_prate</prate>
	<enemyRef label="enemy_middle_boss"></enemyRef>

</create>

<create label="enemy_create_middle_boss2">

	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>1150</vital>
	<inv>40</inv>
	<score>120000</score>
	<prate>$__middle_boss_prate2</prate>
	<enemyRef label="enemy_middle_boss"></enemyRef>

</create>

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


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

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

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

	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<revengeRef label="stage4A_middle_boss_01_revenge"></revengeRef>
		<global name="timer">12</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_middle_boss_01_action"></actionRef>

	</repeat>
	<repeat><times>$__boss_state-eq2</times>
		<global name="prate_average">$__prate_average+$_prate</global>
		<global name="prate_average_num">$__prate_average_num+1</global>

		<revengeRef label="stage4A_middle_boss_02_revenge"></revengeRef>
		<global name="timer">11</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_middle_boss_02_action"></actionRef>
	</repeat>
</enemy>


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

	<wait>30</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>

	<wait>19</wait>

<!-- 弾幕開始 -->
<!-- 自爆まで４ループ -->
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<repeat><times>4</times>

	<!-- 第１形態 No1 ウィルスばらまき -->
	<eval name="dir">1</eval>

		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="middle_boss_fire_01"><param>0</param><param>255</param><param>8</param><param>4</param></fireRef>
		<repeat><times>7</times>
			<fireRef label="middle_boss_fire_01_s"><param>45</param><param>255</param><param>8</param><param>4</param></fireRef>
		</repeat>
		<wait>1</wait>
		<wait>20</wait>

	<repeat><times>2</times>

		<!-- 緑 -->
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>5</param><param>255</param><param>4</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>5</param><param>255</param><param>4</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!-- 青 -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>5</param><param>4</param><param>255</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>5</param><param>4</param><param>255</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!-- 紫 -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>155</param><param>4</param><param>255</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>155</param><param>4</param><param>255</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!-- 水色 -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>5</param><param>164</param><param>255</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>5</param><param>164</param><param>255</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!-- 黄色 -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>205</param><param>164</param><param>4</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>205</param><param>164</param><param>4</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!--  -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>105</param><param>164</param><param>4</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>105</param><param>164</param><param>4</param></fireRef>
			</repeat>
			<wait>1</wait>

		<!--  -->
			<wait>20</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>65</param><param>155</param><param>64</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>65</param><param>155</param><param>64</param></fireRef>
			</repeat>
			<wait>1</wait>

			<wait>20</wait>

		<!-- 赤 -->
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_01_s"><param>45+8*$dir</param><param>255</param><param>8</param><param>4</param></fireRef>
			<repeat><times>7</times>
				<fireRef label="middle_boss_fire_01_s"><param>45</param><param>255</param><param>8</param><param>4</param></fireRef>
			</repeat>
			<wait>1</wait>

			<wait>20</wait>

	</repeat>

	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<!-- No2速弾 -->

	<eval name="move">1-($_player_cx%2)*2</eval>

	<changeSpeed>
		<speed type="absolute">2.5</speed><term>20</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">65*$move</direction><term>1</term>
	</changeDirection>
	<wait>20</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

	<wait>30</wait>
	<fireRef label="middle_boss_fire_03_aim"><param>$move</param></fireRef>
	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<repeat><times>3</times>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>
	</repeat>	
	</repeat>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>

	<changeDirection>
		<direction type="absolute">-90*$move</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2.5</speed><term>20</term>
	</changeSpeed>

	<wait>60</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>

	<wait>60</wait>
	<fireRef label="middle_boss_fire_03_aim"><param>$move</param></fireRef>
	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<repeat><times>3</times>
		<fireRef label="middle_boss_fire_03_s"><param>-30</param></fireRef>
		<wait>6</wait>
	</repeat>	
	</repeat>
		<fireRef label="middle_boss_fire_03_s"><param>-30</param></fireRef>
		<wait>6</wait>
		<fireRef label="middle_boss_fire_03_s"><param>-30</param></fireRef>
		<wait>6</wait>

	<changeSpeed>
		<speed type="absolute">5.5</speed><term>20</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">100*$move</direction><term>1</term>
	</changeDirection>
	<wait>20</wait>

	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

	<wait>60</wait>
	<fireRef label="middle_boss_fire_03_aim"><param>-135</param></fireRef>
	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<repeat><times>3</times>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>
	</repeat>	
	</repeat>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>
		<fireRef label="middle_boss_fire_03_s"><param>30</param></fireRef>
		<wait>6</wait>

	<wait>60-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<!-- No3 -->

		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="middle_boss_fire_05"><param>80</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		</repeat>	

		<wait>1</wait>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		</repeat>	

		<wait>1</wait>

		<wait>10</wait>

		<repeat><times>18</times>
		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="middle_boss_fire_05_s"><param>36+15</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		</repeat>	

		<wait>1</wait>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>120</param></fireRef>
		<fireRef label="middle_boss_fire_05_s"><param>36</param><param>-120</param></fireRef>
		</repeat>	

		<wait>1</wait>

		<wait>10</wait>
		</repeat>
		<wait>60</wait>

		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="middle_boss_fire_06"><param>-70</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		</repeat>	

		<wait>1</wait>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		</repeat>	

		<wait>1</wait>

		<wait>10</wait>

		<repeat><times>18</times>
		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36-15</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		</repeat>	

		<wait>1</wait>
		<repeat><times>2</times>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>-120</param></fireRef>
		<fireRef label="middle_boss_fire_06_s"><param>-36</param><param>120</param></fireRef>
		</repeat>	

		<wait>1</wait>

		<wait>10</wait>

		</repeat>
		<wait>60-3</wait>
		<!-- タイマーを１つ消す -->
		<global name="timer">$__timer-1</global>
		<actionRef label="vanish_timer"></actionRef>
		<!-- <wait>3</wait> -->

</repeat>

<wait>60</wait>
<targetRevenge label="enemy_middle_boss"></targetRevenge>

</action>

<fire label="middle_boss_fire_01">
	<speed>0</speed>
	<direction type="aim">$1</direction>
	<bulletRef label="middle_boss_bullet_01"><param>$2</param><param>$3</param><param>$4</param></bulletRef>
</fire>

<fire label="middle_boss_fire_01_ab">
	<speed>0</speed>
	<direction type="absolute">$1</direction>
	<bulletRef label="middle_boss_bullet_01"><param>$2</param><param>$3</param><param>$4</param></bulletRef>
</fire>

<fire label="middle_boss_fire_01_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<bulletRef label="middle_boss_bullet_01"><param>$2</param><param>$3</param><param>$4</param></bulletRef>
</fire>

<fire label="middle_boss_fire_02">
	<speed>2</speed>
	<direction type="absolute">0</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_02"><param>$1</param><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="middle_boss_fire_02_s">
	<speed>2</speed>
	<direction type="sequence">180</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_02"><param>$1</param><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="middle_boss_fire_03">
	<speed>6</speed>
	<direction type="absolute">130*$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_03"></bulletRef>
</fire>

<fire label="middle_boss_fire_03_aim">
	<speed>6</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_03"></bulletRef>
</fire>

<fire label="middle_boss_fire_03_s">
	<speed>6</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_03"></bulletRef>
</fire>

<fire label="middle_boss_fire_04">
	<speed>2</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_04"></bulletRef>
</fire>

<fire label="middle_boss_fire_04_s">
	<speed>2</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_04"></bulletRef>
</fire>

<fire label="middle_boss_fire_05">
	<speed>4</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_05"><param>$2</param></bulletRef>
</fire>

<fire label="middle_boss_fire_05_s">
	<speed>4</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_05"><param>$2</param></bulletRef>
</fire>

<fire label="middle_boss_fire_06">
	<speed>4</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_06"><param>$2</param></bulletRef>
</fire>

<fire label="middle_boss_fire_06_s">
	<speed>4</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_06"><param>$2</param></bulletRef>
</fire>


<bullet label="middle_boss_bullet_01">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>
	<img type="maskadd">
		<file type="dds">bullet32_1</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>$1</red><green>$2</green><blue>$3</blue>
	</img>
	<rotateImg>
		<direction>1.8</direction><term>-1</term>
	</rotateImg>

	<action>
		<fireRef label="middle_boss_fire_02"><param>$1</param><param>$2</param><param>$3</param></fireRef>
		<fireRef label="middle_boss_fire_02_s"><param>$1</param><param>$2</param><param>$3</param></fireRef>
		<changeSpeed>
			<speed type="absolute">1.6</speed><term>8</term>
		</changeSpeed>
	</action>

</bullet>

<bullet label="middle_boss_bullet_02">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>5</radius></collision>
	<child>1</child>
	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>

	<img type="maskadd">
		<file type="dds">bullet32_1</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>12</width><height>12</height>
		<alpha>255</alpha><red>$1</red><green>$2</green><blue>$3</blue>
	</img>


	<action>
		<changeSpeed>
			<speed type="absolute">0.4</speed><term>10</term>
		</changeSpeed>
		<wait>11</wait>

		<changeDirection>
			<direction type="relative">90</direction><term>1</term>
		</changeDirection>
		<wait>1</wait>

		<repeat><times>-1</times>
			<changeDirection>
				<direction type="relative">360</direction><term>200</term>
			</changeDirection>
			<wait>200</wait>
		</repeat>
	</action>

</bullet>

<bullet label="middle_boss_bullet_03">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>7</radius></collision>
	<img type="normal">
		<file type="dds">bullet</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">2.1</speed><term>42</term>
		</changeSpeed>

		<repeat><times>2</times>
			<actionRef label="enemy_bullet_action4"><param>32</param></actionRef>
			<repeat><times>2</times>
			<fireRef label="middle_boss_fire_04"><param>0</param></fireRef>
			<fireRef label="middle_boss_fire_04_s"><param>90</param></fireRef>
			<fireRef label="middle_boss_fire_04_s"><param>90</param></fireRef>
			<fireRef label="middle_boss_fire_04_s"><param>90</param></fireRef>
			<wait>10</wait>
			</repeat>
		</repeat>
	</action>

</bullet>

<bullet label="middle_boss_bullet_04">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>3</radius></collision>	
	
	<img type="maskadd">
		<file type="dds">dia32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>255</red><green>35</green><blue>5</blue>
	</img>

	<imgDirection type="sync">0</imgDirection>

	<action>
		<changeSpeed>
			<speed type="absolute">1.2</speed><term>60</term>
		</changeSpeed>
	</action>

</bullet>

<bullet label="middle_boss_bullet_05">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>7</radius></collision>
	<img type="maskadd">
		<file type="dds">bullet32_1</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>20</red><green>172</green><blue>250</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">0.5</speed><term>30</term>
		</changeSpeed>
		<changeDirection>
			<direction type="relative">$1</direction><term>120</term>
		</changeDirection>
		<wait>30</wait>
		<changeSpeed>
			<speed type="absolute">1.5</speed><term>30</term>
		</changeSpeed>

	</action>

</bullet>


<bullet label="middle_boss_bullet_06">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>7</radius></collision>
	<img type="maskadd">
		<file type="dds">bullet32_1</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>225</red><green>12</green><blue>25</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">0.5</speed><term>30</term>
		</changeSpeed>
		<changeDirection>
			<direction type="relative">$1</direction><term>120</term>
		</changeDirection>
		<wait>30</wait>
		<changeSpeed>
			<speed type="absolute">1.5</speed><term>30</term>
		</changeSpeed>

	</action>

</bullet>


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

<action  label="stage4A_middle_boss_02_action">

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

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

	<wait>2</wait>
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<!-- 弾幕開始 -->
	<createRef label="middle_boss_dummy_07"></createRef>

	<repeat><times>11</times>
		<repeat><times>2</times>

			<eval name="dir">$_player_cx+$_player_cy</eval>

			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>0</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>2.1</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>1.9</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>
			<wait>1</wait>
			<wait>12</wait>

			<eval name="dir">$_player_cy</eval>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>($dir%3)*(-1)</param><param>1.7</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>1.9</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>1.8</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>2.1</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>
			<wait>1</wait>
			<wait>12</wait>

			<eval name="dir">$_player_cx</eval>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>($dir%3)*(-1)</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>2.1</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>1.9</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>	
			<wait>1</wait>
			<wait>12</wait>	
			<wait>60</wait>
		</repeat>
			<eval name="dir">$_player_cx+$_player_cy</eval>

			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>0</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>2.1</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>1.9</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>
			<wait>1</wait>
			<wait>12</wait>

			<eval name="dir">$_player_cy</eval>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>($dir%3)*(-1)</param><param>1.8</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>2</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>1.9</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>2.1</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>
			<wait>1</wait>
			<wait>12</wait>

			<eval name="dir">$_player_cx</eval>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="middle_boss_fire_07"><param>($dir%3)*(-1)</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%5</param><param>2.1</param><param>5</param><param>200</param><param>205</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>($dir%7)*(-1)</param><param>2</param><param>5</param><param>255</param><param>5</param></fireRef>
			<wait>1</wait>
			<fireRef label="middle_boss_fire_07"><param>$dir%9</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
			<wait>1</wait>
			<wait>1</wait>	
			<wait>1</wait>
			<wait>12</wait>	

			<wait>60-3</wait>
			<!-- タイマーを１つ消す -->
			<global name="timer">$__timer-1</global>
			<actionRef label="vanish_timer"></actionRef>
			<!-- <wait>3</wait> -->
		</repeat>

<wait>60+12</wait>
<targetRevenge label="enemy_middle_boss"></targetRevenge>

</action>





<create label="middle_boss_dummy_07">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>1</vital>
	<enemyRef label="middle_boss_dummy_enemy_07"></enemyRef>
</create>

<enemy label="middle_boss_dummy_enemy_07">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<img type="normal">
		<file type="dds">bullet32_1</file>
		<left>0</left><top>0</top><right>8</right><bottom>8</bottom>
		<width>8</width><height>8</height>
		<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
	</img>
	<collision type="circle"><cx>0</cx><cy>0</cy><radius>0</radius></collision>
	<child>1</child>
	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>

	<action>
	<!-- ばらまき -->

	<eval name="dir">$_player_cx+$_player_cy</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%2)*(-1)</param><param>2.1</param><param>255</param><param>2</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%4</param><param>2</param><param>5</param><param>200</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%6)*(-1)</param><param>1.7</param><param>5</param><param>255</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%8</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%10)*(-1)</param><param>1.9</param><param>205</param><param>0</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%12</param><param>1.7</param><param>3</param><param>4</param><param>255</param></fireRef>
	<wait>9</wait>

	<repeat><times>55</times>
	<eval name="dir">$_player_cx</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="middle_boss_fire_07"><param>-6+($dir%3)*(-1)</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>

	<repeat><times>2</times>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%2)*(-1)</param><param>2.1</param><param>255</param><param>2</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%12</param><param>1.7</param><param>3</param><param>4</param><param>255</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%6)*(-1)</param><param>1.9</param><param>5</param><param>255</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%8</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%4</param><param>1.6</param><param>5</param><param>200</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%10)*(-1)</param><param>1.7</param><param>205</param><param>0</param><param>205</param></fireRef>
	<wait>1</wait>
	</repeat>

	<wait>9</wait>
	<eval name="dir">$_player_cy</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%2)*(-1)</param><param>2</param><param>255</param><param>2</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%10)*(-1)</param><param>2.1</param><param>205</param><param>0</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%6)*(-1)</param><param>1.7</param><param>5</param><param>255</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%4</param><param>1.9</param><param>5</param><param>200</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%8</param><param>1.8</param><param>205</param><param>200</param><param>2</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%12</param><param>1.9</param><param>3</param><param>4</param><param>255</param></fireRef>
	<wait>9</wait>

	<eval name="dir">$_player_cx+$_player_cy</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="middle_boss_fire_07"><param>-12+($dir%3)*(-1)</param><param>1.8</param><param>255</param><param>2</param><param>5</param></fireRef>

	<repeat><times>2</times>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%2)*(-1)</param><param>1.6</param><param>255</param><param>2</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%6)*(-1)</param><param>2</param><param>5</param><param>255</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%4</param><param>2.1</param><param>5</param><param>200</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%8</param><param>1.7</param><param>205</param><param>200</param><param>2</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+$dir%12</param><param>1.9</param><param>3</param><param>4</param><param>255</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>-30+($dir%10)*(-1)</param><param>1.8</param><param>205</param><param>0</param><param>205</param></fireRef>
	<wait>1</wait>
	</repeat>


	<eval name="dir">$_player_cx+$_player_cy</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<repeat><times>2</times>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%2)*(-1)</param><param>1.8</param><param>255</param><param>2</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%10)*(-1)</param><param>2.1</param><param>205</param><param>0</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%12</param><param>1.9</param><param>3</param><param>4</param><param>255</param></fireRef>
	<fireRef label="middle_boss_fire_07_s"><param>30+($dir%6)*(-1)</param><param>2</param><param>5</param><param>255</param><param>5</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%4</param><param>1.7</param><param>5</param><param>200</param><param>205</param></fireRef>
	<wait>1</wait>
	<fireRef label="middle_boss_fire_07_s"><param>30+$dir%8</param><param>1.6</param><param>205</param><param>200</param><param>2</param></fireRef>
	<wait>1</wait>
	</repeat>
	<wait>9</wait>

	</repeat>
	</action>

</enemy>

<fire label="middle_boss_fire_07">
	<speed>3.4</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_07"><param>$1</param><param>$2</param><param>$3</param><param>$4</param><param>$5</param></bulletRef>
</fire>

<fire label="middle_boss_fire_07_s">
	<speed>3.4</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="middle_boss_bullet_07"><param>$1</param><param>$2</param><param>$3</param><param>$4</param><param>$5</param></bulletRef>
</fire>

<bullet label="middle_boss_bullet_07">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>3</radius></collision>	
	
	<img type="maskadd">
		<file type="dds">dia32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>$3</red><green>$4</green><blue>$5</blue>
	</img>

	<imgDirection type="sync">0</imgDirection>

	<action>

		<wait>10</wait>
		<changeSpeed>
			<speed type="absolute">0</speed><term>10</term>
		</changeSpeed>
		<wait>10</wait>

		<changeDirection>
			<direction type="relative">-1*$1</direction><term>20</term>
		</changeDirection>
		<changeSpeed>
			<speed type="absolute">$2</speed><term>30</term>
		</changeSpeed>


	</action>
</bullet>



<!-- ********************************************************************* -->
<!-- *** 中ボスのリベンジ						*** -->
<!-- ***							       *** -->

<revenge label="stage4A_middle_boss_01_revenge">

	<eval name="localcounter">$_counter</eval>
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	
	<!-- *** 形態変数の増加 *** -->
	<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>

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>32-($_self_cx%9)*8</param><param>32-$_self_cx%64</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>20/2</param><param>$counter_e</param><param>1160</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>40</param></actionRef>
	</repeat>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="enemy_create_middle_boss2"></createRef>

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

<revenge label="stage4A_middle_boss_02_revenge">

	<eval name="localcounter">$_counter</eval>
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>

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

	<!-- *** 弾幕のアイテム化 *** -->
	<!-- *** 自爆の場合は、弾けし *** -->
	<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="boss_life"></targetRevenge>
	<!-- *** ボス名称表示消す *** -->
	<targetRevenge label="boss_name_stage4middle"></targetRevenge>

	<wait>1</wait>


	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>32-($_self_cx%9)*8</param><param>32-$_self_cx%64</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<!-- 直前の中型機３台を倒せていたら1upを出現させる -->
		<repeat><times>$__1up_set-eq3</times>
			<createRef label="item_create_05"></createRef>
		</repeat>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<!-- 01ばらまき -->
	<createRef label="mbreak_dummy"></createRef>
	<changeColor>
		<alpha>60</alpha><red>255</red><green>255</green><blue>255</blue><term>60</term>
	</changeColor>
	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>22/2</param><param>$counter_e</param><param>1100</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>60</param></actionRef>
	</repeat>

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

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



<!-- ********************************************************************* -->
<!-- *** ボス戦はここから始まる					*** -->
<action label="stage4A_boss_top_action">

	<changeTargetVolume label="bgm">
		<num>-10000</num><term>30</term>
	</changeTargetVolume>
	<wait>30</wait>
	<targetVanish label="bgm"></targetVanish>

	<sound label="bgm" type="bgm">
		<track>
			<file type="ogg">14_stage4boss</file>
		</track>
		<play>
			<flag>1</flag><loop>44100*2*2*3</loop>
		</play>
	</sound>
	<actionRef label="stage4_2_bgm_title_action"></actionRef>


	<!-- *** 第 N 形態 *** -->
	<global name="boss_state">1</global>
	
	<!-- *** ボスの初期ライフ *** -->
	<global name="boss_life">4</global>
	
	<!-- 出現用ボスを消去 -->
	<targetRevenge label="stage4A_boss_enemy_appear"></targetRevenge>

	<!-- *** 最初のボスオブジェクト作成 *** -->
	<createRef label="stage4A_boss_01_create"></createRef>
	
	<!-- *** ボスのライフ表示オブジェクト作成 *** -->
	<wait>1</wait>
	<createRef label="boss_life_create"></createRef>
	<!-- *** ボスの名称表示オブジェクト作成 *** -->
	<createRef label="boss_name_stage4"></createRef>

	<!-- *** Enemy Tension判定用変数 *** -->
	<global name="ttc_start">0</global>
	<global name="miss_start">0</global>

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


<!-- ********************************************************************* -->
<!-- *** 第 1 形態のボスオブジェクト作成			       *** -->
<!-- ***							       *** -->
<!-- *** 初期位置が固定であることに注意				*** -->
<create label="stage4A_boss_01_create">
	<speed>0</speed>
	<direction type="absolute">180</direction>
	<cx>$__boss_cx</cx><cy>$__boss_cy</cy>
	<vital>$__vital_1</vital>
	<inv>40</inv>
	<score>160000</score>
	<prate>$__boss_prate</prate>
	<enemyRef label="stage4A_boss_enemy"></enemyRef>
</create>


<!-- *** 第 2 形態のボスオブジェクト作成			       *** -->
<!-- ***							       *** -->
<!-- *** 初期位置は前の形態のボスと同じ位置になる		      *** -->
<create label="stage4A_boss_02_create">
	<speed>0</speed>
	<direction type="absolute">180</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>$__vital_2</vital>
	<inv>40</inv>
	<score>200000</score>
	<prate>$__boss_prate2</prate>
	<enemyRef label="stage4A_boss_enemy"></enemyRef>
</create>

<!-- *** 第 3 形態のボスオブジェクト作成			       *** -->
<!-- ***							       *** -->
<!-- *** 初期位置は前の形態のボスと同じ位置になる		      *** -->
<create label="stage4A_boss_03_create">
	<speed>0</speed>
	<direction type="absolute">180</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>$__vital_3</vital>
	<inv>40</inv>
	<score>260000</score>
	<prate>$__boss_prate2</prate>
	<enemyRef label="stage4A_boss_enemy"></enemyRef>
</create>

<!-- *** 第 4 形態のボスオブジェクト作成			       *** -->
<!-- ***							       *** -->
<!-- *** 初期位置は前の形態のボスと同じ位置になる		      *** -->
<create label="stage4A_boss_04_create">
	<speed>0</speed>
	<direction type="absolute">180</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>$__vital_4</vital>
	<inv>40</inv>
	<score>280000</score>
	<prate>$__boss_prate3</prate>
	<enemyRef label="stage4A_boss_enemy"></enemyRef>
</create>

<!-- *** 第 5 形態のボスオブジェクト作成			       *** -->
<!-- ***							       *** -->
<!-- *** 初期位置は前の形態のボスと同じ位置になる		      *** -->
<create label="stage4A_boss_05_create">
	<speed>0</speed>
	<direction type="absolute">180</direction>
	<cx>$_self_cx</cx><cy>$_self_cy</cy>
	<vital>$__vital_5</vital>
	<inv>40</inv>
	<score>320000</score>
	<prate>$__boss_prate3</prate>
	<enemyRef label="stage4A_boss_enemy"></enemyRef>
</create>

<!-- ********************************************************************* -->
<!-- *** ボスオブジェクト					      *** -->
<enemy label="stage4A_boss_enemy">
	<presentRef label="stage4A_boss_present"></presentRef>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>

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

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


	<!-- *** 第 N 形態ごとのアクション *** -->
	<repeat><times>$__boss_state-eq1</times>
		<revengeRef label="stage4A_boss_01_revenge"></revengeRef>
		<global name="timer">12</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_boss_01_action"></actionRef>
	</repeat>
	<repeat><times>$__boss_state-eq2</times>
		<global name="prate_average">$__prate_average+$_prate</global>
		<global name="prate_average_num">$__prate_average_num+1</global>
		<revengeRef label="stage4A_boss_02_revenge"></revengeRef>
		<global name="timer">12</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_boss_02_action"></actionRef>
	</repeat>
	<repeat><times>$__boss_state-eq3</times>
		<global name="prate_average">$__prate_average+$_prate</global>
		<global name="prate_average_num">$__prate_average_num+1</global>
		<revengeRef label="stage4A_boss_03_revenge"></revengeRef>
		<global name="timer">12</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_boss_03_action"></actionRef>
	</repeat>
	<repeat><times>$__boss_state-eq4</times>
		<global name="prate_average">$__prate_average+$_prate</global>
		<global name="prate_average_num">$__prate_average_num+1</global>
		<revengeRef label="stage4A_boss_04_revenge"></revengeRef>
		<global name="timer">14</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_boss_04_action"></actionRef>
	</repeat>
	<repeat><times>$__boss_state-eq5</times>
		<global name="prate_average">$__prate_average+$_prate</global>
		<global name="prate_average_num">$__prate_average_num+1</global>
		<revengeRef label="stage4A_boss_05_revenge"></revengeRef>
		<global name="timer">16</global>
		<actionRef  label="create_timer"></actionRef>
		<actionRef  label="stage4A_boss_05_action"></actionRef>

	</repeat>
</enemy>


<!-- ********************************************************************* -->
<!-- *** ボスのアクション					      *** -->
<!-- *** 第１形態						      *** -->
<action  label="stage4A_boss_01_action">
	<changeSpeed>
		<speed>0</speed><term>60</term>
	</changeSpeed>
	<wait>60</wait>
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<!-- 弾幕開始 -->
<repeat><times>4</times>
	<!-- No1 円形傾き破裂 -->
	<eval name="last_dir">1</eval>


	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_01"><param>0</param><param>$last_dir</param><param>0</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_01_s"><param>12</param><param>$last_dir</param><param>0</param></fireRef>
	</repeat>
	<wait>1</wait>
	<eval name="wait_time">1</eval>
	<repeat><times>4</times>
	<repeat><times>6</times>
		<fireRef label="stage4A_boss_fire_01_s"><param>12</param><param>$last_dir</param><param>$wait_time</param></fireRef>
	</repeat>
	<evaladd name="wait_time">1</evaladd>
	<wait>1</wait>
	</repeat>

	<eval name="move_time">($_player_cx%9)</eval>
	<eval name="move_dir">1-2*($_player_cx%2)</eval>
	<changeDirection>
		<direction type="absolute">55*$move_dir</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">3</speed><term>20</term>
	</changeSpeed>
	<wait>40+$move_time</wait>

	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>50</wait>

	<eval name="last_dir">-1*$last_dir</eval>

	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_01"><param>2</param><param>$last_dir</param><param>0</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_01_s"><param>12</param><param>$last_dir</param><param>0</param></fireRef>
	</repeat>
	<wait>1</wait>
	<eval name="wait_time">1</eval>
	<repeat><times>4</times>
	<repeat><times>6</times>
		<fireRef label="stage4A_boss_fire_01_s"><param>12</param><param>$last_dir</param><param>$wait_time</param></fireRef>
	</repeat>
	<evaladd name="wait_time">1</evaladd>
	<wait>1</wait>
	</repeat>

	<eval name="move_time">($_self_cx%9)</eval>
	<changeDirection>
		<direction type="absolute">-70*$move_dir</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">3</speed><term>20</term>
	</changeSpeed>
	<wait>40+$move_time</wait>

	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>50</wait>

	<eval name="last_dir">-1*$last_dir</eval>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_01_2"><param>4</param><param>$last_dir</param><param>0</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_01_2_s"><param>12</param><param>$last_dir</param><param>0</param></fireRef>
	</repeat>
	<wait>1</wait>
	<eval name="wait_time">1</eval>
	<repeat><times>4</times>
	<repeat><times>6</times>
		<fireRef label="stage4A_boss_fire_01_2_s"><param>12</param><param>$last_dir</param><param>$wait_time</param></fireRef>
	</repeat>
	<evaladd name="wait_time">1</evaladd>
	<wait>1</wait>
	</repeat>

	<changeSpeed>
		<speed type="absolute">2</speed><term>2</term>
	</changeSpeed>

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

	<wait>60-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<!-- No2 -->
	<!-- ○弾ダイヤばらまき -->
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_03"><param>0</param><param>1</param></fireRef>
	<repeat><times>4</times>
		<fireRef label="stage4A_boss_fire_03_s"><param>36</param><param>1</param></fireRef>
	</repeat>
	<wait>1</wait>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_03_s"><param>36</param><param>1</param></fireRef>
	</repeat>

	<changeSpeed>
		<speed type="aboslute">1</speed><term>20</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">-60+120*($_player_cx%2)</direction><term>1</term>
	</changeDirection>
	<wait>20</wait>
	<changeSpeed>
		<speed type="aboslute">0</speed><term>20</term>
	</changeSpeed>
	<wait>60</wait>

	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_05"><param>0</param><param>1</param></fireRef>
	<repeat><times>4</times>
		<fireRef label="stage4A_boss_fire_05_s"><param>36</param><param>1</param></fireRef>
	</repeat>
	<wait>1</wait>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_05_s"><param>36</param><param>1</param></fireRef>
	</repeat>

	<changeSpeed>
		<speed type="aboslute">1</speed><term>20</term>
	</changeSpeed>
	<changeDirection>
		<direction type="relative">180</direction><term>1</term>
	</changeDirection>
	<wait>20</wait>
	<changeSpeed>
		<speed type="aboslute">0</speed><term>20</term>
	</changeSpeed>

	<wait>60-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<!-- No3 -->
	<changeSpeed>
		<speed type="absolute">3</speed><term>10</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">60</direction><term>1</term>
	</changeDirection>
	<wait>60</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>10</term>
	</changeSpeed>
	<wait>60</wait>

	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_07_TOP"><param>-95</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_BOTTOM"><param>-120</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_LEFT"><param>-145</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_RIGHT"><param>-170</param></fireRef>


	<changeSpeed>
		<speed type="absolute">3</speed><term>10</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">-90</direction><term>1</term>
	</changeDirection>
	<wait>90</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>10</term>
	</changeSpeed>
	<wait>60</wait>

	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_07_TOP"><param>95</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_BOTTOM"><param>120</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_LEFT"><param>145</param></fireRef>
	<fireRef label="stage4A_boss_fire_07_RIGHT"><param>170</param></fireRef>

	<changeSpeed>
		<speed type="absolute">3</speed><term>10</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">133</direction><term>1</term>
	</changeDirection>
	<wait>50</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>10</term>
	</changeSpeed>
	<wait>120-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->
</repeat>

<wait>120</wait>
<targetRevenge label="stage4A_boss_enemy"></targetRevenge>


</action>

<fire label="stage4A_boss_fire_01">
	<speed>0</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_01"><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_01_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_01"><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_01_2">
	<speed>0</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_01_2"><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_01_2_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_01_2"><param>$2</param><param>$3</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_02">
	<speed>3</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_02"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_02_2">
	<speed>3</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_02_2"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_03">
	<speed>4.4</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_03"></bulletRef>
</fire>

<fire label="stage4A_boss_fire_03_s">
	<speed>4.4</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_03"></bulletRef>
</fire>

<fire label="stage4A_boss_fire_04">
	<speed>0</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_04"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_05">
	<speed>4.4</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_05"></bulletRef>
</fire>

<fire label="stage4A_boss_fire_05_s">
	<speed>4.4</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_05"></bulletRef>
</fire>

<fire label="stage4A_boss_fire_06">
	<speed>0</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_06"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_07_TOP">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<bulletRef label="stage4A_boss_bullet_07">
	<param>3</param>
	<param>255</param>
	<param>132</param>
	<param>146</param>
	</bulletRef>
</fire>
<fire label="stage4A_boss_fire_07_BOTTOM">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<bulletRef label="stage4A_boss_bullet_07">
	<param>1</param>
	<param>132</param>
	<param>180</param>
	<param>255</param>
	</bulletRef>
</fire>
<fire label="stage4A_boss_fire_07_LEFT">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<bulletRef label="stage4A_boss_bullet_07">
	<param>2</param>
	<param>132</param>
	<param>255</param>
	<param>114</param>
	</bulletRef>
</fire>
<fire label="stage4A_boss_fire_07_RIGHT">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<bulletRef label="stage4A_boss_bullet_07">
	<param>0</param>
	<param>255</param>
	<param>234</param>
	<param>102</param>
	</bulletRef>
</fire>

<fire label="stage4A_boss_fire_08">
	<speed>0</speed>
	<direction type="aim">0</direction>
	<bulletRef label="stage4A_boss_bullet_08">
	<param>$2</param>
	<param>$3</param>
	<param>$4</param>
	<param>$5</param>
	</bulletRef>
</fire>
<fire label="stage4A_boss_fire_08_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<bulletRef label="stage4A_boss_bullet_08">
	<param>$2</param>
	<param>$3</param>
	<param>$4</param>
	<param>$5</param>
	</bulletRef>
</fire>


<bullet label="stage4A_boss_bullet_01">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>4</radius></collision>
	<img type="normal">
		<file type="dds">bullet</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>10</width><height>10</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<wait>10-$2</wait>
		<changeSpeed>
			<speed type="absolute">4.5</speed><term>1</term>
		</changeSpeed>
		<wait>1</wait>
		<changeSpeed>
			<speed type="absolute">0</speed><term>30</term>
		</changeSpeed>
		<wait>30+$2</wait>

		<actionRef label="enemy_bullet_action3"><param>32</param></actionRef>
		<fireRef label="stage4A_boss_fire_02"><param>30*$1</param><param>1.8</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02"><param>35*$1</param><param>1.6</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02"><param>40*$1</param><param>1.4</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02"><param>45*$1</param><param>1.2</param></fireRef>
		<wait>3</wait>

		<vanish/>
	</action>

</bullet>


<bullet label="stage4A_boss_bullet_01_2">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>4</radius></collision>
	<img type="normal">
		<file type="dds">bullet</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>10</width><height>10</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<wait>10-$2</wait>
		<changeSpeed>
			<speed type="absolute">4.5</speed><term>1</term>
		</changeSpeed>
		<wait>1</wait>
		<changeSpeed>
			<speed type="absolute">0</speed><term>30</term>
		</changeSpeed>
		<wait>30+$2</wait>

		<actionRef label="enemy_bullet_action3"><param>32</param></actionRef>
		<fireRef label="stage4A_boss_fire_02_2"><param>30*$1</param><param>1.8</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02_2"><param>40*$1</param><param>1.7</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02_2"><param>50*$1</param><param>1.6</param></fireRef>
		<wait>3</wait>
		<fireRef label="stage4A_boss_fire_02_2"><param>60*$1</param><param>1.5</param></fireRef>
		<wait>3</wait>

		<vanish/>
	</action>

</bullet>

<bullet label="stage4A_boss_bullet_02">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>4</radius></collision>
	<img type="normal">
		<file type="dds">bullet</file>
		<left>32*3</left><top>0</top><right>32*4</right><bottom>32</bottom>
		<width>10</width><height>10</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">$1</speed><term>8</term>
		</changeSpeed>

	</action>

</bullet>

<bullet label="stage4A_boss_bullet_02_2">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>4</radius></collision>
	<img type="normal">
		<file type="dds">bullet</file>
		<left>32*4</left><top>0</top><right>32*5</right><bottom>32</bottom>
		<width>10</width><height>10</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">$1</speed><term>8</term>
		</changeSpeed>

	</action>

</bullet>


<bullet label="stage4A_boss_bullet_03">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>8</radius></collision>
	<img type="normal">
<!--
		<file type="dds">bullet</file>
		<left>32*4</left><top>0</top><right>32*5</right><bottom>32</bottom>
-->
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>18</width><height>18</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">0</speed><term>60</term>
		</changeSpeed>
		<changeDirection>
			<direction type="relative">30</direction><term>60</term>
		</changeDirection>

		<repeat><times>2</times>
		<actionRef label="enemy_bullet_action8"><param>32</param></actionRef>
		<repeat><times>2</times>
			<fireRef label="stage4A_boss_fire_04"><param>80</param><param>1.4</param></fireRef>
			<wait>7</wait>
			<fireRef label="stage4A_boss_fire_04"><param>-80</param><param>1.4</param></fireRef>
			<wait>8</wait>
		</repeat>
		</repeat>

		<changeSpeed>
			<speed type="absolute">3.7</speed><term>60</term>
		</changeSpeed>
<!--
		<changeDirection>
			<direction type="relative">150</direction><term>1</term>
		</changeDirection>
-->
		<wait>1</wait>

		<changeDirection>
			<direction type="relative">30</direction><term>59</term>
		</changeDirection>

		<actionRef label="enemy_bullet_action8"><param>32</param></actionRef>
		<repeat><times>2</times>
			<fireRef label="stage4A_boss_fire_04"><param>80</param><param>1.4</param></fireRef>
			<wait>7</wait>
			<fireRef label="stage4A_boss_fire_04"><param>-80</param><param>1.4</param></fireRef>
			<wait>8</wait>
		</repeat>


	</action>

</bullet>

<bullet label="stage4A_boss_bullet_04">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>3</radius></collision>	
	
	<img type="maskadd">
		<file type="dds">dia32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>2</blue>
	</img>

	<imgDirection type="sync">0</imgDirection>

	<action>

		<changeSpeed>
			<speed type="absolute">$1</speed><term>60</term>
		</changeSpeed>


	</action>
</bullet>

<bullet label="stage4A_boss_bullet_05">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>8</radius></collision>
	<img type="normal">
<!--
		<file type="dds">bullet</file>
		<left>32*7</left><top>0</top><right>32*8</right><bottom>32</bottom>
-->
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>18</width><height>18</height>
		<alpha>255</alpha><red>255</red><green>204</green><blue>195</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">0</speed><term>60</term>
		</changeSpeed>
		<changeDirection>
			<direction type="relative">30</direction><term>60</term>
		</changeDirection>

		<repeat><times>2</times>
		<actionRef label="enemy_bullet_action8"><param>32</param></actionRef>
		<repeat><times>2</times>
			<fireRef label="stage4A_boss_fire_06"><param>80</param><param>1.4</param></fireRef>
			<wait>7</wait>
			<fireRef label="stage4A_boss_fire_06"><param>-80</param><param>1.4</param></fireRef>
			<wait>8</wait>
		</repeat>
		</repeat>

		<changeSpeed>
			<speed type="absolute">3</speed><term>60</term>
		</changeSpeed>

		<changeDirection>
			<direction type="relative">150</direction><term>1</term>
		</changeDirection>

		<wait>1</wait>

		<changeDirection>
			<direction type="relative">30</direction><term>59</term>
		</changeDirection>

		<repeat><times>2</times>
		<actionRef label="enemy_bullet_action8"><param>32</param></actionRef>
		<repeat><times>2</times>
			<fireRef label="stage4A_boss_fire_06"><param>80</param><param>1.4</param></fireRef>
			<wait>7</wait>
			<fireRef label="stage4A_boss_fire_06"><param>-80</param><param>1.4</param></fireRef>
			<wait>8</wait>
		</repeat>
		</repeat>

	</action>

</bullet>

<bullet label="stage4A_boss_bullet_06">

	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>3</radius></collision>	
	
	<img type="maskadd">
		<file type="dds">dia32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>255</red><green>2</green><blue>255</blue>
	</img>

	<imgDirection type="sync">0</imgDirection>

	<action>

		<changeSpeed>
			<speed type="absolute">$1</speed><term>60</term>
		</changeSpeed>


	</action>
</bullet>

<bullet label="stage4A_boss_bullet_07">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>7</radius></collision>

	<img type="normal">
<!--
		<file type="dds">bullet</file>
		<left>32*1</left><top>0</top><right>32*2</right><bottom>32</bottom>
-->
		<file type="dds">ring_bullet_b32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<imgDirection type="sync">0</imgDirection>

	<action>
		<changeSpeed>
			<speed>2.0</speed><term>60</term>
		</changeSpeed>
		<wait>60+$1</wait>
		<eval name="count1">0</eval>
		<fireRef label="stage4A_boss_fire_08">
			<param>0</param>
			<param>$2</param>
			<param>$3</param>
			<param>$4</param>
			<param>1.6</param>
		</fireRef>
		<repeat><times>3</times>
			<eval name="count1">($count1+1)</eval>
			<wait>9</wait>
			<actionRef label="enemy_bullet_action2"><param>32</param></actionRef>
			<fireRef label="stage4A_boss_fire_08_s">
			<param>(12*$count1)</param>
			<param>$2</param>
			<param>$3</param>
			<param>$4</param>
			<param>1.4</param>
			</fireRef>
			<wait>9</wait>
			<fireRef label="stage4A_boss_fire_08_s">
			<param>(-20*$count1)</param>
			<param>$2</param>
			<param>$3</param>
			<param>$4</param>
			<param>1.5</param>
			</fireRef>
			<wait>9</wait>
			<eval name="count1">($count1+1)</eval>
			<actionRef label="enemy_bullet_action2"><param>32</param></actionRef>
			<fireRef label="stage4A_boss_fire_08_s">
			<param>(17*$count1)</param>
			<param>$2</param>
			<param>$3</param>
			<param>$4</param>
			<param>1.3</param>
			</fireRef>
			<wait>9</wait>
			<fireRef label="stage4A_boss_fire_08_s">
			<param>(-25*$count1)</param>
			<param>$2</param>
			<param>$3</param>
			<param>$4</param>
			<param>1.5</param>
			</fireRef>
		</repeat>
	</action>

</bullet>

<bullet label="stage4A_boss_bullet_08">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>4</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>10</width><height>10</height>
		<alpha>255</alpha><red>$1</red><green>$2</green><blue>$3</blue>
	</img>
	<imgDirection type="sync">0</imgDirection>

	<action>
		<changeSpeed>
			<speed>$4</speed><term>8</term>
		</changeSpeed>
		<wait>60</wait>
	</action>

</bullet>


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

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

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

	<wait>2</wait>
<!-- 弾幕開始 -->
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

	<actionRef label="move1"></actionRef>
	<createRef label="stage4A_boss_create_2_01"><param>195+16</param><param>4+96</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>445-16</param><param>4+96</param><param>-90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>270+16</param><param>4+96*2</param><param>-90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>370-16</param><param>4+96*2</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>235+16</param><param>4+96*3</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>405-16</param><param>4+96*3</param><param>-90</param></createRef>

	<!-- 青 -->
<repeat><times>3</times>
	<createRef label="stage4A_boss_create_2_01"><param>140+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>500-16</param><param>4</param><param>-90</param></createRef>

	<wait>60</wait>
	<createRef label="stage4A_boss_create_2_01"><param>160+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>480-16</param><param>4</param><param>-90</param></createRef>

	<actionRef label="move"></actionRef>
	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_01"><param>300+16</param><param>4</param><param>-90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>340-16</param><param>4</param><param>90</param></createRef>

	<wait>60</wait>
	<createRef label="stage4A_boss_create_2_01"><param>220+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>420-16</param><param>4</param><param>-90</param></createRef>

	<wait>60</wait>
	<createRef label="stage4A_boss_create_2_01"><param>140+($_player_cx%11)*10+16</param><param>16</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_01"><param>500-($_player_cx%11)*10-16</param><param>16</param><param>-90</param></createRef>

	<actionRef label="move"></actionRef>
	<wait>30-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->


	<!-- 黄 -->
	<createRef label="stage4A_boss_create_2_02"><param>140+16</param><param>4</param><param>90</param></createRef>
	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_02"><param>500-16</param><param>4</param><param>-90</param></createRef>

	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_02"><param>260+16</param><param>4</param><param>90</param></createRef>
	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_02"><param>400-16</param><param>4</param><param>-90</param></createRef>

	<actionRef label="move"></actionRef>
	<createRef label="stage4A_boss_create_2_02"><param>300+16</param><param>4</param><param>-90</param></createRef>
	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_02"><param>340-16</param><param>4</param><param>90</param></createRef>

	<wait>30</wait>
<!--	<createRef label="stage4A_boss_create_2_02"><param>180+16</param><param>4</param><param>90</param></createRef> -->
	<wait>30</wait>
<!--	<createRef label="stage4A_boss_create_2_02"><param>460-16</param><param>4</param><param>-90</param></createRef> -->

	<wait>30</wait>
	<createRef label="stage4A_boss_create_2_02"><param>140+($_player_cx%11)*10+16</param><param>16</param><param>90</param></createRef>
	<wait>30-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<createRef label="stage4A_boss_create_2_02"><param>500-($_player_cy%11)*10-16</param><param>16</param><param>-90</param></createRef>

	<actionRef label="move"></actionRef>

	<!-- 赤 -->
	<repeat><times>2</times>
	<createRef label="stage4A_boss_create_2_03"><param>140+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_03"><param>500-16</param><param>4</param><param>-90</param></createRef>
	<wait>15</wait>
	<createRef label="stage4A_boss_create_2_04"><param>140+16</param><param>64</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_04"><param>500-16</param><param>64</param><param>-90</param></createRef>
	<wait>45</wait>

	<createRef label="stage4A_boss_create_2_03"><param>170+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_03"><param>420-16</param><param>4</param><param>-90</param></createRef>

	<wait>15</wait>
	<createRef label="stage4A_boss_create_2_04"><param>140+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_04"><param>500-16</param><param>4</param><param>-90</param></createRef>
	<actionRef label="move"></actionRef>
	<wait>15</wait>
	<createRef label="stage4A_boss_create_2_03"><param>280+16</param><param>4</param><param>-90</param></createRef>
	<createRef label="stage4A_boss_create_2_03"><param>360-16</param><param>4</param><param>90</param></createRef>

	<wait>15</wait>
<!--	<createRef label="stage4A_boss_create_2_04"><param>140+16</param><param>124</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_04"><param>500-16</param><param>124</param><param>-90</param></createRef>
-->
	<wait>45</wait>
<!--	<createRef label="stage4A_boss_create_2_03"><param>200+($_player_cx%3)*10+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_03"><param>440-($_player_cx%3)*10-16</param><param>4</param><param>-90</param></createRef>
-->
	<wait>15</wait>
	<createRef label="stage4A_boss_create_2_04"><param>140+16</param><param>4</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_04"><param>500-16</param><param>4</param><param>-90</param></createRef>
	<wait>45</wait>
	<createRef label="stage4A_boss_create_2_03"><param>140+($_player_cx%11)*10+16</param><param>16</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_03"><param>500-($_player_cx%11)*10-16</param><param>16</param><param>-90</param></createRef>
	<wait>15</wait>
	<createRef label="stage4A_boss_create_2_04"><param>140+16</param><param>34</param><param>90</param></createRef>
	<createRef label="stage4A_boss_create_2_04"><param>500-16</param><param>34</param><param>-90</param></createRef>
	<actionRef label="move"></actionRef>
	<wait>15-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<wait>120</wait>

	</repeat>
</repeat>

<wait>240</wait>
<targetRevenge label="stage4A_boss_enemy"></targetRevenge>

</action>

<action label="move">

	<eval name="judge">($_self_cx-lt220)+($_self_cx-gt420)</eval>
	<eval name="judge2">($_player_cx-gt320)+($_self_cx-lt320)</eval>

	<repeat><times>$judge</times>
		<actionRef label="move3"></actionRef>
	</repeat>

	<repeat><times>(1-$judge)*($judge2-eq1)</times>
		<actionRef label="move1"></actionRef>
	</repeat>

	<repeat><times>(1-$judge)*(1-($judge2-eq1))</times>
		<actionRef label="move2"><param>$judge2</param></actionRef>
	</repeat>

</action>

<action label="move1">
	<changeSpeed>
		<speed type="absolute">1.6</speed><term>30</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">-88+176*(($_player_cx+$_player_cy)%2)</direction><term>1</term>
	</changeDirection>
	<wait>30</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>

</action>

<action label="move2">
	<changeSpeed>
		<speed type="absolute">1.6</speed><term>30</term>
	</changeSpeed>
	<changeDirection>
		<direction type="absolute">-90+$1*90</direction><term>1</term>
	</changeDirection>
	<wait>30</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
</action>

<action label="move3">
	<changeSpeed>
		<speed type="absolute">3.2</speed><term>30</term>
	</changeSpeed>
	<changeDirection>
		<direction type="relative">180</direction><term>1</term>
	</changeDirection>
	<wait>30</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
</action>


<create label="stage4A_boss_create_2_01">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$1</cx><cy>$2</cy>
	<vital>1</vital>
	<enemyRef label="stage4A_boss_enemy_2_01"><param>$1</param><param>$2</param><param>$3</param></enemyRef>
</create>

<enemy label="stage4A_boss_enemy_2_01">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>

	<img type="normal">
		<file type="dds">s_mahoujin5</file>
		<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
		<width>4</width><height>4</height>
		<alpha>125</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<child>1</child>
	<flag>8</flag>

	<rotateImg>
		<direction>3</direction><term>-1</term>
	</rotateImg>
	<changeImgSize>
		<width>48</width><height>48</height><term>50</term>
	</changeImgSize>

	<action>
		<wait>45</wait>
		<changeSpeed>
			<speed type="absolute">1.1</speed><term>10</term>
		</changeSpeed>
		<changeDirection>
			<direction type="absolute">180</direction><term>1</term>
		</changeDirection>
		

		<repeat><times>-1</times>
			<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_2_01"><param>$3</param></fireRef>
			<wait>112</wait>
		</repeat>

	</action>
</enemy>


<create label="stage4A_boss_create_2_02">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$1</cx><cy>$2</cy>
	<vital>1</vital>
	<enemyRef label="stage4A_boss_enemy_2_02"><param>$1</param><param>$2</param><param>$3</param></enemyRef>
</create>

<enemy label="stage4A_boss_enemy_2_02">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>

	<img type="normal">
		<file type="dds">s_mahoujin6</file>
		<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
		<width>4</width><height>4</height>
		<alpha>125</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<child>1</child>
	<flag>8</flag>

	<rotateImg>
		<direction>3</direction><term>-1</term>
	</rotateImg>
	<changeImgSize>
		<width>48</width><height>48</height><term>50</term>
	</changeImgSize>

	<action>
		<wait>45</wait>
		<changeSpeed>
			<speed type="absolute">1.1</speed><term>10</term>
		</changeSpeed>
		<changeDirection>
			<direction type="absolute">180</direction><term>1</term>
		</changeDirection>
		

		<repeat><times>-1</times>
			<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_2_02"><param>$3</param></fireRef>
			<wait>103</wait>
		</repeat>

	</action>
</enemy>

<create label="stage4A_boss_create_2_03">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$1</cx><cy>$2</cy>
	<vital>1</vital>
	<enemyRef label="stage4A_boss_enemy_2_03"><param>$1</param><param>$2</param><param>$3</param></enemyRef>
</create>

<enemy label="stage4A_boss_enemy_2_03">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>
	<child>1</child>
	<flag>8</flag>

	<img type="normal">
		<file type="dds">s_mahoujin</file>
		<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
		<width>4</width><height>4</height>
		<alpha>125</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>

	<rotateImg>
		<direction>3</direction><term>-1</term>
	</rotateImg>
	<changeImgSize>
		<width>48</width><height>48</height><term>50</term>
	</changeImgSize>

	<action>
		<wait>45</wait>
		<changeSpeed>
			<speed type="absolute">1.1</speed><term>10</term>
		</changeSpeed>
		<changeDirection>
			<direction type="absolute">180</direction><term>1</term>
		</changeDirection>
		

		<repeat><times>-1</times>
			<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_2_03"><param>$3</param></fireRef>
			<wait>126</wait>
		</repeat>

	</action>
</enemy>

<create label="stage4A_boss_create_2_04">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$1</cx><cy>$2</cy>
	<vital>1</vital>
	<enemyRef label="stage4A_boss_enemy_2_04"><param>$1</param><param>$2</param><param>$3</param></enemyRef>
</create>

<enemy label="stage4A_boss_enemy_2_04">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>0</radius></collision>

	<img type="normal">
		<file type="dds">s_mahoujin</file>
		<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
		<width>4</width><height>4</height>
		<alpha>125</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<child>1</child>
	<flag>8</flag>

	<rotateImg>
		<direction>3</direction><term>-1</term>
	</rotateImg>
	<changeImgSize>
		<width>48</width><height>48</height><term>50</term>
	</changeImgSize>

	<action>
		<wait>45</wait>
		<changeSpeed>
			<speed type="absolute">1.1</speed><term>10</term>
		</changeSpeed>
		<changeDirection>
			<direction type="absolute">$3</direction><term>1</term>
		</changeDirection>
		

		<repeat><times>-1</times>
			<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_2_04"><param>180</param></fireRef>
			<wait>98</wait>
		</repeat>

	</action>
</enemy>


<fire label="stage4A_boss_fire_2_01">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_2_01"></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_2_01">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>200</red><green>200</green><blue>255</blue>
	</img>
	<child>1</child>
	<definedAction type="synctoparenty"></definedAction>
</bullet>


<fire label="stage4A_boss_fire_2_02">
	<speed>1</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_2_02"></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_2_02">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>255</red><green>250</green><blue>200</blue>
	</img>
	<child>1</child>
	<definedAction type="synctoparenty"></definedAction>
</bullet>

<fire label="stage4A_boss_fire_2_03">
	<speed>1.1</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_2_03"></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_2_03">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>255</red><green>200</green><blue>200</blue>
	</img>
	<child>1</child>
	<definedAction type="synctoparenty"></definedAction>
</bullet>

<fire label="stage4A_boss_fire_2_04">
	<speed>1.1</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_2_04"></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_2_04">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>255</red><green>200</green><blue>200</blue>
	</img>
</bullet>


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

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

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

	<wait>2</wait>
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<!-- 弾幕開始 -->

	<repeat><times>12</times>
	<eval name="dir">$_player_cx%15</eval>
	<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_3_01"><param>$dir</param><param>1</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>2</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>3</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>4</param></fireRef>

	<wait>40</wait>
	<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_3_01_2"><param>-1*$dir</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_2_s"><param>90</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_2_s"><param>90</param></fireRef>
	<wait>8</wait>
	<wait>40</wait>


	<eval name="dir">$_player_cx%15</eval>
	<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_3_01"><param>$dir</param><param>1</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>2</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>3</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_s"><param>90</param><param>4</param></fireRef>

	<wait>40</wait>
	<actionRef label="enemy_bullet_action"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_3_01_2"><param>-1*$dir</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_2_s"><param>90</param></fireRef>
	<wait>8</wait>
	<fireRef label="stage4A_boss_fire_3_01_2_s"><param>90</param></fireRef>
	<wait>8</wait>
	<wait>40-3</wait>

	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	</repeat>


<wait>120</wait>

<targetRevenge label="stage4A_boss_enemy"></targetRevenge>

</action>

<fire label="stage4A_boss_fire_3_01">
	<speed>3.6</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_01"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_3_01_s">
	<speed>3.6</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_01"><param>$2</param></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_3_01">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>235</blue>
	</img>

	<action>
		<changeDirection>
			<direction type="relative">360</direction><term>60</term>
		</changeDirection>
		<wait>1</wait>

		<repeat><times>3</times>
			<actionRef label="enemy_bullet_action4"><param>32</param></actionRef>
			<repeat><times>2</times>
				<fireRef label="stage4A_boss_fire_3_02"><param>30</param><param>1.8</param><param>$1</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_02_s"><param>0</param><param>1.2</param><param>$1</param></fireRef>
				<wait>10</wait>
			</repeat>
		</repeat>
		<vanish/>
	</action>

</bullet>


<fire label="stage4A_boss_fire_3_01_2">
	<speed>2</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_01_2"></bulletRef>
</fire>

<fire label="stage4A_boss_fire_3_01_2_s">
	<speed>2</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_01_2"></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_3_01_2">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>9</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>20</width><height>20</height>
		<alpha>255</alpha><red>200</red><green>255</green><blue>255</blue>
	</img>

	<action>

		<changeDirection>
			<direction type="relative">-360</direction><term>120</term>
		</changeDirection>
		<wait>1</wait>

		<repeat><times>3</times>
			<actionRef label="enemy_bullet_action"><param>32</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_03"><param>0</param><param>1.4</param></fireRef>
			<wait>38</wait>
		</repeat>

		<vanish/>
	</action>

</bullet>


<fire label="stage4A_boss_fire_3_02">
	<speed>3</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_02"><param>$2</param><param>$3</param></bulletRef>
</fire>
<fire label="stage4A_boss_fire_3_02_s">
	<speed>3</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_02"><param>$2</param><param>$3</param></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_3_02">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>5</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>12</width><height>12</height>
		<alpha>255</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<action>
		<repeat><times>$2-eq1</times>
		<changeColor>
			<alpha>255</alpha><red>255</red><green>200</green><blue>200</blue><term>1</term>
		</changeColor>
		</repeat>

		<repeat><times>$2-eq2</times>
		<changeColor>
			<alpha>255</alpha><red>255</red><green>255</green><blue>200</blue><term>1</term>
		</changeColor>
		</repeat>
		<repeat><times>$2-eq3</times>
		<changeColor>
			<alpha>255</alpha><red>200</red><green>200</green><blue>255</blue><term>1</term>
		</changeColor>
		</repeat>
		<repeat><times>$2-eq4</times>
		<changeColor>
			<alpha>255</alpha><red>200</red><green>255</green><blue>200</blue><term>1</term>
		</changeColor>
		</repeat>

		<changeSpeed>
			<speed type="absolute">$1</speed><term>10</term>
		</changeSpeed>

	</action>

</bullet>

<fire label="stage4A_boss_fire_3_03">
	<speed>3</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_03"><param>$2</param></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_3_03">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>3</radius></collision>

	<img type="maskadd">
		<file type="dds">dia32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>16</width><height>16</height>
		<alpha>255</alpha><red>1</red><green>240</green><blue>2</blue>
	</img>
	<imgDirection type="sync">0</imgDirection>

	<action>
		<changeSpeed>
			<speed type="absolute">$1</speed><term>10</term>
		</changeSpeed>

	</action>

</bullet>

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

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

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

	<wait>2</wait>
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<!-- 弾幕開始 -->

	<createRef label="stage4A_boss_lazer_org"><param>140+128</param><param>120</param><param>39</param><param>1</param></createRef>
	<createRef label="stage4A_boss_lazer_org"><param>500-128</param><param>120</param><param>0</param><param>-1</param></createRef>


	<wait>90+30</wait>
		<eval name="wait_time">15</eval>
		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="stage4A_boss_fire_3_laser"><param>3</param><param>$wait_time</param></fireRef>
		<repeat><times>14</times>
			<repeat><times>3</times>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
			</repeat>
			<wait>1</wait>
			<evaladd name="wait_time">-1</evaladd>
		</repeat>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
			<wait>1</wait>

		<repeat><times>7</times>
			<eval name="wait_time">15</eval>
			<wait>120-40</wait>
			<actionRef label="move_04"></actionRef>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>2</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

			<eval name="wait_time">15</eval>
			<wait>120-40-3</wait>
			<!-- タイマーを１つ消す -->
			<global name="timer">$__timer-1</global>
			<actionRef label="vanish_timer"></actionRef>
			<!-- <wait>3</wait> -->

			<wait>40</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>1</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<wait>1</wait>


			<eval name="wait_time">15</eval>
			<wait>120-40</wait>
			<actionRef label="move_04r"></actionRef>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>5</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

			<eval name="wait_time">15</eval>
			<wait>120-3</wait>
			<!-- タイマーを１つ消す -->
			<global name="timer">$__timer-1</global>
			<actionRef label="vanish_timer"></actionRef>
			<!-- <wait>3</wait> -->


			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_laser"><param>0</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

		</repeat>

<wait>120</wait>

<targetRevenge label="stage4A_boss_enemy"></targetRevenge>

</action>


<!-- 移動アクション -->
<action label="move_04">

	<changeDirection>
		<direction type="absolute">-100+200*($_player_cx%2)</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

</action>

<action label="move_04r">

	<changeDirection>
		<direction type="relative">180</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

	<changeSpeed>
		<speed type="absolute">0</speed><term>20</term>
	</changeSpeed>
	<wait>20</wait>

</action>


<!-- レーザーaction -->
<create label="stage4A_boss_lazer_org">
	<speed>0</speed>
	<direction type="absolute">0</direction>
	<cx>$1</cx><cy>$2</cy>
	<vital>1</vital>
	<enemyRef label="stage4A_boss_lazer_org"><param>$3</param><param>$4</param></enemyRef>
</create>

<enemy label="stage4A_boss_lazer_org">
	<score>0</score>
	<inv>0</inv>
	<prate>0</prate>
	<img type="normal">
		<file type="dds">s_mahoujin5</file>
		<left>0</left><top>0</top><right>64</right><bottom>64</bottom>
		<width>32</width><height>32</height>
		<alpha>20</alpha><red>255</red><green>255</green><blue>255</blue>
	</img>
	<revengeRef label="stage4A_boss_mahoujin"></revengeRef>
	<collision type="circle"><cx>0</cx><cy>0</cy><radius>0</radius></collision>
	<child>1</child>
<!--
	<definedAction type="synctoparentx"></definedAction>
	<definedAction type="synctoparenty"></definedAction>
-->
	<action>

		<changeColor>
			<alpha>240</alpha><red>255</red><green>255</green><blue>255</blue><term>30</term>
		</changeColor>
		<wait>30</wait>

		<wait>1+$1</wait>

		<eval name="wait_time">15</eval>
		<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
		<fireRef label="stage4A_boss_fire_3_laser"><param>$1</param><param>$wait_time</param></fireRef>
		<repeat><times>14</times>
			<repeat><times>3</times>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
			</repeat>
			<wait>1</wait>
			<evaladd name="wait_time">-1</evaladd>
		</repeat>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
			<wait>1</wait>

		<repeat><times>7</times>
			<eval name="wait_time">15</eval>
			<wait>120</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>3+$1</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

			<eval name="wait_time">15</eval>
			<wait>120</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>0</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

			<eval name="wait_time">15</eval>
			<wait>120</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_s_laser"><param>1+$1</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<wait>1</wait>

			<eval name="wait_time">15</eval>
			<wait>120</wait>
			<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_3_laser"><param>$1</param><param>$wait_time</param></fireRef>
			<repeat><times>14</times>
				<repeat><times>3</times>
					<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				</repeat>
				<wait>1</wait>
				<evaladd name="wait_time">-1</evaladd>
			</repeat>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<fireRef label="stage4A_boss_fire_3_s_laser"><param>8*$2</param><param>$wait_time</param></fireRef>
				<wait>1</wait>
		</repeat>

	</action>
</enemy>

<revenge label="stage4A_boss_mahoujin">
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<changeColor>
		<alpha>32</alpha><red>0</red><green>0</green><blue>0</blue><term>5</term>
	</changeColor>
	<wait>5</wait>

	<vanish></vanish>
</revenge>

<fire label="stage4A_boss_fire_3_laser">
	<speed>0</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_laser"><param>$2</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_3_s_laser">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_3_laser"><param>$2</param></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_3_laser">
	<collision type="sync"><left>-2</left><top>-7</top><right>2</right><bottom>7</bottom></collision>
	
	<img type="add">
		<file type="dds">laser32xb</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>2</width><height>4</height>
		<alpha>255</alpha><red>240</red><green>240</green><blue>255</blue>
	</img>	
	<imgDirection type="sync">0</imgDirection>
	<action>
		<changeImgSize>
			<width>7</width><height>17</height><term>3</term>
		</changeImgSize>
		<wait>2</wait>
		<wait>$1</wait>
		<changeSpeed>
			<speed>1.5</speed><term>1</term>
		</changeSpeed>
	</action>
</bullet>


<!-- ********************************************************************* -->
<!-- *** ボスのアクション					      *** -->
<!-- *** 第５形態（easy最終）				      *** -->
<action  label="stage4A_boss_05_action">

<!-- 魔法陣呼び出し -->
<actionRef label="mahoujin"><param>190</param><param>195</param><param>5</param><param>195</param></actionRef>
<!-- 画像呼び出し -->
<createRef label="stage4A_boss_et"></createRef>

<!-- センターポイントへ移動 -->
	<wait>20</wait>
	<changeSpeed>
		<speed type="absolute">1.0</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>
	<global name="ttc_start_check">$_ttc_frame</global>
	<global name="miss_start">$_misscount</global>

	<wait>2</wait>
<global name="counter_tmp">$_counter</global>
<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>20</radius></collision>

<repeat><times>8</times>
	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_01"><param>0</param><param>2.6</param><param>255</param><param>255</param><param>255</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_5_01_s"><param>60</param><param>2.6</param><param>255</param><param>255</param><param>255</param></fireRef>
	</repeat>

	<changeDirection>
		<direction type="absolute">-80+160*($_player_cx%2)</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>30</term>
	</changeSpeed>
	<wait>45</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
	<wait>55</wait>


	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_01"><param>0</param><param>2.6</param><param>255</param><param>200</param><param>200</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_5_01_s"><param>60</param><param>2.6</param><param>255</param><param>200</param><param>200</param></fireRef>
	</repeat>

	<changeDirection>
		<direction type="relative">180</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>30</term>
	</changeSpeed>
	<wait>45</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
	<wait>55-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->

	<actionRef label="enemy_bullet_action4"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_01"><param>0</param><param>2.6</param><param>255</param><param>255</param><param>200</param></fireRef>
	<repeat><times>5</times>
		<fireRef label="stage4A_boss_fire_5_01_s"><param>60</param><param>2.6</param><param>255</param><param>255</param><param>200</param></fireRef>
	</repeat>

	<changeDirection>
		<direction type="absolute">-80+160*($_player_cx%2)</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>30</term>
	</changeSpeed>
	<wait>45</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
	<wait>30</wait>

	<changeDirection>
		<direction type="relative">180</direction><term>1</term>
	</changeDirection>
	<changeSpeed>
		<speed type="absolute">2</speed><term>30</term>
	</changeSpeed>
	<wait>45</wait>
	<changeSpeed>
		<speed type="absolute">0</speed><term>30</term>
	</changeSpeed>
	<wait>50</wait>

	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_02"><param>$_player_cx%17</param><param>255</param><param>200</param><param>200</param></fireRef>
	<repeat><times>11</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>200</param><param>200</param></fireRef>
	</repeat>
	<wait>5</wait>
		<repeat><times>3</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>29</param><param>255</param><param>200</param><param>200</param></fireRef>
		<repeat><times>11</times>
			<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>200</param><param>200</param></fireRef>
		</repeat>
		<wait>5</wait>
	</repeat>

	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_02_s"><param>32</param><param>255</param><param>200</param><param>200</param></fireRef>
	<repeat><times>11</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>200</param><param>255</param><param>200</param></fireRef>
	</repeat>
	<wait>5</wait>
		<repeat><times>3</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>32</param><param>200</param><param>255</param><param>200</param></fireRef>
		<repeat><times>11</times>
			<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>200</param><param>255</param><param>200</param></fireRef>
		</repeat>
		<wait>5</wait>
	</repeat>
	</repeat>

	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_02_s"><param>28</param><param>255</param><param>255</param><param>200</param></fireRef>
	<repeat><times>11</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>255</param><param>200</param></fireRef>
	</repeat>
	<wait>5</wait>
		<repeat><times>3</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>28</param><param>255</param><param>255</param><param>200</param></fireRef>
		<repeat><times>11</times>
			<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>255</param><param>200</param></fireRef>
		</repeat>
		<wait>5</wait>
	</repeat>
	</repeat>

	<repeat><times>3</times>
	<actionRef label="enemy_bullet_action8"><param>64</param></actionRef>
	<fireRef label="stage4A_boss_fire_5_02_s"><param>32</param><param>255</param><param>200</param><param>255</param></fireRef>
	<repeat><times>11</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>200</param><param>255</param></fireRef>
	</repeat>
	<wait>5</wait>
		<repeat><times>3</times>
		<fireRef label="stage4A_boss_fire_5_02_s"><param>32</param><param>255</param><param>200</param><param>255</param></fireRef>
		<repeat><times>11</times>
			<fireRef label="stage4A_boss_fire_5_02_s"><param>30</param><param>255</param><param>200</param><param>255</param></fireRef>
		</repeat>
		<wait>5</wait>
	</repeat>
	</repeat>

	<wait>30-3</wait>
	<!-- タイマーを１つ消す -->
	<global name="timer">$__timer-1</global>
	<actionRef label="vanish_timer"></actionRef>
	<!-- <wait>3</wait> -->
</repeat>

<wait>120</wait>
<targetRevenge label="stage4A_boss_enemy"></targetRevenge>

</action>


<fire label="stage4A_boss_fire_5_01">
	<speed>0</speed>
	<direction type="aim">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_5_01"><param>$2</param><param>$3</param><param>$4</param><param>$5</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_5_01_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_5_01"><param>$2</param><param>$3</param><param>$4</param><param>$5</param></bulletRef>
</fire>


<bullet label="stage4A_boss_bullet_5_01">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>14</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet_b32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>32</width><height>32</height>
		<alpha>255</alpha><red>$2</red><green>$3</green><blue>$4</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">$1</speed><term>120</term>
		</changeSpeed>

		<eval name="bull_rad">12</eval>
		<eval name="bull_sp">1.6</eval>

		<repeat><times>4</times>
		<repeat><times>3</times>
			<actionRef label="enemy_bullet_action2"><param>64</param></actionRef>
			<fireRef label="stage4A_boss_fire_5_01_small"><param>80</param><param>$bull_sp</param><param>$2</param><param>$3</param><param>$4</param><param>$bull_rad</param></fireRef>
			<fireRef label="stage4A_boss_fire_5_01_small"><param>-80</param><param>$bull_sp</param><param>$2</param><param>$3</param><param>$4</param><param>$bull_rad</param></fireRef>
			<wait>35</wait>
			<evaladd name="bull_sp">-0.08</evaladd>
		</repeat>
			<evaladd name="bull_rad">5</evaladd>
		</repeat>

	</action>
</bullet>

<fire label="stage4A_boss_fire_5_01_small">
	<speed>0</speed>
	<direction type="relative">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_5_01_small"><param>$2</param><param>$3</param><param>$4</param><param>$5</param><param>$6</param></bulletRef>
</fire>


<bullet label="stage4A_boss_bullet_5_01_small">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>($5/2)-1</radius></collision>

	<img type="normal">
		<file type="dds">ring_bullet_b32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>$5</width><height>$5</height>
		<alpha>255</alpha><red>$2</red><green>$3</green><blue>$4</blue>
	</img>

	<action>
		<wait>45</wait>
		<changeSpeed>
			<speed type="absolute">$1</speed><term>80</term>
		</changeSpeed>

	</action>
</bullet>


<fire label="stage4A_boss_fire_5_02">
	<speed>0</speed>
	<direction type="absolute">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_5_02"><param>$2</param><param>$3</param><param>$4</param></bulletRef>
</fire>

<fire label="stage4A_boss_fire_5_02_s">
	<speed>0</speed>
	<direction type="sequence">$1</direction>
	<cx>0</cx><cy>1</cy>
	<bulletRef label="stage4A_boss_bullet_5_02"><param>$2</param><param>$3</param><param>$4</param></bulletRef>
</fire>

<bullet label="stage4A_boss_bullet_5_02">
	<collision type="circle"><cx>-1</cx><cy>-1</cy><radius>15</radius></collision>

	<img type="add">
		<file type="dds">ring_bullet32</file>
		<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
		<width>32</width><height>32</height>
		<alpha>255</alpha><red>$1</red><green>$2</green><blue>$3</blue>
	</img>

	<action>
		<changeSpeed>
			<speed type="absolute">2.4</speed><term>60</term>
		</changeSpeed>

		<changeColor>
			<alpha>255</alpha><red>$2</red><green>$3</green><blue>$1</blue><term>30</term>
		</changeColor>
		<wait>30</wait>

		<changeColor>
			<alpha>255</alpha><red>$3</red><green>$1</green><blue>$2</blue><term>30</term>
		</changeColor>

	</action>
</bullet>

<!-- ********************************************************************* -->
<!-- *** ボスのリベンジ						*** -->
<!-- ***							       *** -->
<!-- *** 次の形態のボスを作成する必要がある			    *** -->

<revenge label="stage4A_boss_01_revenge">

	<eval name="localcounter">$_counter</eval>

	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>

	<!-- *** 形態変数の増加 *** -->
	<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>

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>52-($_self_cx%9)*13</param><param>52-($_self_cx%14)*8</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>24/2</param><param>$counter_e</param><param>1300</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>60</param></actionRef>
	</repeat>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="stage4A_boss_02_create"></createRef>

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


<revenge label="stage4A_boss_02_revenge">

	<eval name="localcounter">$_counter</eval>
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	
	<!-- *** 形態変数の増加 *** -->
	<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>

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>52-($_self_cx%9)*13</param><param>52-($_self_cx%14)*8</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>26/2</param><param>$counter_e</param><param>1380</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>60</param></actionRef>
	</repeat>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="stage4A_boss_03_create"></createRef>
	
	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

<revenge label="stage4A_boss_03_revenge">

	<eval name="localcounter">$_counter</eval>
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	
	<!-- *** 形態変数の増加 *** -->
	<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>

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>52-($_self_cx%9)*13</param><param>52-($_self_cx%14)*8</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>28/2</param><param>$counter_e</param><param>1120</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>60</param></actionRef>
	</repeat>

	<!-- *** 次の形態のボスの作成 *** -->
	<createRef label="stage4A_boss_04_create"></createRef>
	
	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>

<revenge label="stage4A_boss_04_revenge">

	<eval name="localcounter">$_counter</eval>
	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>
	<!-- 爆発アクション -->
	<actionRef label="boss_revenge_present_1"></actionRef>
	
	<!-- *** 形態変数の増加 *** -->
	<global name="boss_state">$__boss_state+1</global>

	<!-- *** 表示ライフの増加 *** -->
	<global name="boss_life">$__boss_life-1</global>

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

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>52-($_self_cx%9)*13</param><param>52-($_self_cx%14)*8</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<wait>1</wait>

	<repeat><times>$_revenge_state-eq1</times>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>30/2</param><param>$counter_e</param><param>1180</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>60</param></actionRef>
	</repeat>

	<!-- *** 次の形態のボスの作成 *** -->
	<!-- *** enemy tension形態のため、TTC発動、ミスのチェック *** -->
	<global name="ttc_start">$_ttc_frame</global>
	<createRef label="stage4A_boss_05_create"></createRef>
	
	<!-- *** 最後に自殺 *** -->
	<vanish></vanish>	
</revenge>


<revenge label="stage4A_boss_05_revenge">
	<!-- *** ボス戦の後始末 *** -->
	<eval name="localcounter">$_counter</eval>
	<actionRef label="bg_fadein_action"></actionRef>

	<!-- enemy tension形態のため、TTC発動、ミスのチェック *** -->
	<eval name="ttc_end">$_ttc_frame</eval>
	<eval name="miss_end">$_misscount</eval>


	<changeSpeed>
		<speed type="absolute">0</speed><term>1</term>
	</changeSpeed>
	<wait>1</wait>


	<!-- *** 弾幕のアイテム化 *** -->
	<!-- *** 自爆の場合は、弾けし *** -->
	<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>
	<!-- 敵ブルブルアクション -->
	<soundRef label="boss_break2"></soundRef>
	<soundRef label="boss_tremble_sound"></soundRef>
	<actionRef label="boss_tremble"></actionRef>

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

	<!-- *** ライフ表示を消す *** -->
	<targetRevenge label="boss_life"></targetRevenge>
	<!-- *** ボス名称表示を消す *** -->
	<targetRevenge label="boss_name_stage4"></targetRevenge>

	<wait>1</wait>

	<!-- *** アイテムの出現 *** -->
	<createRef label="item_create_03"><param>0</param><param>0</param></createRef>
	<createRef label="item_create_03"><param>32-($_self_cx%9)*8</param><param>32-$_self_cx%64</param></createRef>
	<wait>1</wait>
	<repeat><times>$_revenge_state-eq1</times>
		<createRef label="item_create_03"><param>16-$_self_cy%32</param><param>16-($_self_cy%8)*4</param></createRef>
		<createRef label="item_create_03"><param>12-$_self_cx%24</param><param>24-$_self_cx%48</param></createRef>
		<createRef label="item_create_03"><param>24-($_self_cy%8)*6</param><param>12-$_self_cy%24</param></createRef>
	</repeat>

	<!-- *** ETC Break 判定 -->
	<eval name="etb_num">(($ttc_end-$__ttc_start)-eq$localcounter)*($miss_end-eq$__miss_start)*($__ttc_start_check-gt240)</eval>
	<repeat><times>$etb_num-eq0</times>
		<sysvar name="tbchain">0</sysvar>
	</repeat>

	<wait>1</wait>

	<!-- 01ばらまき -->
	<actionRef label="break_action"></actionRef>
	<changeColor>
		<alpha>60</alpha><red>255</red><green>255</green><blue>255</blue><term>60</term>
	</changeColor>
	<repeat><times>($_revenge_state-eq1)</times>
		<repeat><times>$etb_num</times>
			<actionRef label="etb_letter"><param>1</param><param>7</param></actionRef>
			<createRef label="item_create_01_etb"><param>-17000</param><param>350000</param></createRef>
			<sysvar name="tbchain">$_tbchain+1</sysvar>
		</repeat>
		<eval name="counter_e">$__counter_tmp</eval>
		<actionRef label="item_counter_01_boss"><param>36/2</param><param>$counter_e</param><param>1600</param><param>24</param><param>$localcounter</param></actionRef>
	</repeat>
	<repeat><times>$_revenge_state-eq3</times>
		<actionRef label="item_counter_01_red"><param>80</param></actionRef>
		<sysvar name="tbchain">0</sysvar>
	</repeat>

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

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

</revenge>



</exbulletml>
