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

<exbulletml>

<!-- ******************************************************************************* -->
<!-- ***** STAGE G2 ”wŒi                        ***** -->
<!-- ******************************************************************************* -->

<action label="bg_bossbegin_action">
</action>

<action label="bg_bossend_action">
</action>

<action l="bg_midbossend_action">
</action>

<action l="bg_bossbossend_action">
</action>

<action label="bg_shake_action">
	<create>
		<cx>320</cx><cy>240</cy><speed>0</speed><dir type="abs">0</dir>
		<object>
			<sound label="flash_se" type="se">
				<track><file type="ogg">fire</file></track>
				<play><flag>1</flag><loop>0</loop></play>
			</sound>


			<eval n="i">0.03</eval>
			<rep><ts>20</ts>
					<changeEye><worldx>$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
					<changeEye><worldx>-$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>-$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
				<add n="i">0.015</add>
			</rep>

<!--
			<rep><ts>120</ts>
					<changeEye><worldx>$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
					<changeEye><worldx>-$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>-$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
			</rep>

			<rep><ts>19</ts>
					<changeEye><worldx>$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
					<changeEye><worldx>-$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>-$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
				<add n="i">-0.01</add>
			</rep>

			<eval n="i">0.01</eval>
-->


			<rep><ts>150</ts>
					<changeEye><worldx>$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
					<changeEye><worldx>-$i</worldx><worldy>0+$i</worldy><worldz>0</worldz><term>1</term></changeEye>
					<changeLookAt><worldx>-$i</worldx><worldy>-15+$i</worldy><worldz>20</worldz><term>1</term></changeLookAt>
					<wait>1</wait>
					<add n="i">-0.002</add>
			</rep>


			<wait>1</wait>
			<vanish></vanish>
		</object>
	</create>
</action>


<action label="bg_stop_action">
	<global name="bg_stop_flag">1</global>


	<create>
		<cx>320</cx><cy>240</cy><speed>0</speed><dir type="abs">0</dir>
		<object>
			<changeLight type="directional"><alpha>0</alpha><red>200</red><green>200</green><blue>250</blue><x>0</x><y>-1</y><z>1</z><num>0</num><term>60</term></changeLight>
			<changeLight type="ambient"><alpha>0</alpha><red>150</red><green>150</green><blue>150</blue><term>60</term></changeLight>
			<wait>60</wait>
			<aRef l="bg_action_2_2"></aRef>
		</object>
	</create>

	<create>
		<direction type="absolute">0</direction><speed type="absolute">0</speed>
		<cx>320</cx><cy>240</cy>
		<object>
			<eval n="i">0</eval>
			<rep><ts>60</ts>
				<setBgColor><alpha>255</alpha><red>($i*255)/60</red><green>($i*255)/60</green><blue>($i*255)/60</blue></setBgColor>
				<add n="i">1</add>
				<wait>1</wait>
			</rep>
			<setBgColor><alpha>255</alpha><red>255</red><green>255</green><blue>255</blue></setBgColor>
		</object>
	</create>

</action>


<action label="bg_create_action">
	<global name="bg_stop_flag">0</global>
	<actionRef label="stagestart_blackbg_create_action"></actionRef>
	<system><command>effectmeshdisable</command></system>
	<system><command>fulldrawoff</command></system>

	<setLight type="ambient"><alpha>0</alpha><red>0</red><green>0</green><blue>0</blue><flag>0</flag></setLight>
	<setLight type="directional"><alpha>0</alpha><red>0</red><green>0</green><blue>0</blue><x>0</x><y>-1</y><z>1</z><num>0</num></setLight>
	
	<changeLight type="directional"><alpha>0</alpha><red>80</red><green>80</green><blue>80</blue><x>0</x><y>-1</y><z>1</z><num>0</num><term>60</term></changeLight>

	<setEye><worldx>0</worldx><worldy>0</worldy><worldz>0</worldz></setEye>
	<setLookAt><worldx>0</worldx><worldy>-15</worldy><worldz>20</worldz></setLookAt>
	<setUpVec><worldx>0</worldx><worldy>0</worldy><worldz>1</worldz></setUpVec>


	<setFog>
		<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue>
		<worldminz>0</worldminz><worldmaxz>40</worldmaxz>
	</setFog>		

	<setBgColor><alpha>255</alpha><red>0</red><green>0</green><blue>0</blue></setBgColor>

	<create>
		<direction type="absolute">0</direction><speed type="absolute">0</speed>
		<cx>320</cx><cy>240</cy>
		<object>
			<img type="add">
				<file type="dds">stageGbgfilter</file>
				<left>0</left><top>0</top><right>64</right><bottom>256</bottom>
				<width>362</width><height>480</height>
				<alpha>200</alpha><red>255</red><green>255</green><blue>255</blue>
			</img>
			<setDrawLevel><num>1</num></setDrawLevel>
			<rep><ts>-1</ts>
				<changeColor>
					<alpha>50</alpha><red>255</red><green>255</green><blue>255</blue><term>510</term>
				</changeColor>
				<wait>510</wait>
				<changeColor>
					<alpha>100</alpha><red>255</red><green>255</green><blue>255</blue><term>510</term>
				</changeColor>
				<wait>510</wait>
			</rep>
		</object>
	</create>

	<create>
		<direction type="absolute">0</direction><speed type="absolute">0</speed>
		<cx>320</cx><cy>240</cy>
		<object>
			<wait>30</wait>
			<targetRevenge label="stagestart_blackbg_object"></targetRevenge>
			<vanish></vanish>
		</object>
	</create>

	<create>
		<cx>320</cx><cy>240</cy><speed>0</speed><dir type="abs">0</dir>
		<object>
			<aRef l="bg_action_1"></aRef>
		</object>
	</create>

	<create>
		<cx>320</cx><cy>240</cy><speed>0</speed><dir type="abs">0</dir>
		<object>
			<aRef l="bg_action_2"></aRef>
		</object>
	</create>

</action>

<action label="bg_start_action">
</action>

<a l="bg_action_1">
	<v n="worldx">0</v>
	<v n="worldy">-60</v>
	<v n="worldz">40</v>
	<v n="vz">-0.05</v>
	<v n="vy">0.0</v>

	<eval n="i">0</eval>
	<rep><ts>20</ts>
		<meshRef label="ring1"><p>0</p><p>-7+3*$_rand</p><p>$worldz-$i</p><p>$vy</p><p>$vz</p></meshRef>
		<add n="i">3</add>
	</rep>

	<repeat><ts>-1</ts>
		<meshRef label="ring1"><p>0</p><p>-7+3*$_rand</p><p>$worldz</p><p>$vy</p><p>$vz</p></meshRef>
		<w>40</w>
	</repeat>
</a>

<a l="bg_action_2">
	<rep><ts>-1</ts>
		<changeLight type="ambient"><alpha>0</alpha><red>40</red><green>40</green><blue>0</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>0</red><green>0</green><blue>40</blue><worldminz>0</worldminz><worldmaxz>40</worldmaxz><term>180</term></changeFog>		
		<actionRef l="bg_stop_wait_check_action"><p>180</p></actionRef>

		<changeLight type="ambient"><alpha>0</alpha><red>40</red><green>0</green><blue>40</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>0</red><green>40</green><blue>0</blue><worldminz>0</worldminz><worldmaxz>40</worldmaxz><term>180</term></changeFog>		
		<actionRef l="bg_stop_wait_check_action"><p>180</p></actionRef>

		<changeLight type="ambient"><alpha>0</alpha><red>0</red><green>40</green><blue>40</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>40</red><green>0</green><blue>0</blue><worldminz>0</worldminz><worldmaxz>40</worldmaxz><term>180</term></changeFog>		
		<actionRef l="bg_stop_wait_check_action"><p>180</p></actionRef>
	</rep>
</a>

<a l="bg_action_2_2">
	<rep><ts>-1</ts>
		<changeLight type="ambient"><alpha>0</alpha><red>255</red><green>255</green><blue>40</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>100</red><green>100</green><blue>255</blue><worldminz>0</worldminz><worldmaxz>25</worldmaxz><term>180</term></changeFog>		
		<w>180</w>
		<changeLight type="ambient"><alpha>0</alpha><red>255</red><green>40</green><blue>255</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>100</red><green>255</green><blue>100</blue><worldminz>0</worldminz><worldmaxz>25</worldmaxz><term>180</term></changeFog>		
		<w>180</w>
		<changeLight type="ambient"><alpha>0</alpha><red>40</red><green>255</green><blue>255</blue><flag>0</flag><term>180</term></changeLight>
		<changeFog><alpha>0</alpha><red>255</red><green>100</green><blue>100</blue><worldminz>0</worldminz><worldmaxz>25</worldmaxz><term>180</term></changeFog>		
		<w>180</w>
	</rep>
</a>


<action l="bg_stop_wait_check_action">
	<rep><ts>$1/5</ts>
		<wait>5</wait>
		<rep><ts>$__bg_stop_flag-eq1</ts><exit></exit></rep>
	</rep>
</action>

<action label="stagestart_blackbg_create_action">
	<create>
		<direction type="absolute">0</direction>
		<speed type="absolute">0</speed>
		<cx>320</cx><cy>240</cy>
		<object label="stagestart_blackbg_object">
			<revengeRef label="stagestart_blackbg_revenge"></revengeRef>
			<img type="normal">
				<file type="dds">rectwhite</file>
				<left>0</left><top>0</top><right>32</right><bottom>32</bottom>
				<width>360</width><height>482</height>
				<alpha>255</alpha><red>0</red><green>0</green><blue>0</blue>
			</img>
			<setDrawLevel><num>24</num></setDrawLevel>
		</object>
	</create>
</action>

<revenge label="stagestart_blackbg_revenge">
	<wait>2</wait>
	<changeColor>
		<alpha>0</alpha><red>0</red><green>0</green><blue>0</blue><term>5</term>			
	</changeColor>
	<wait>5</wait>
	<vanish></vanish>
</revenge>


<mesh label="ring1">
	<file>stageGring</file>
	<worldx>$1</worldx><worldy>$2</worldy><worldz>$3</worldz>
	<worldvx>0.0</worldvx><worldvy>$4</worldvy><worldvz>$5</worldvz>
	<worldminx>-200.0</worldminx><worldminy>-200.0</worldminy><worldminz>-10.0</worldminz>
	<worldmaxx>200.0</worldmaxx><worldmaxy>200.0</worldmaxy><worldmaxz>1000.0</worldmaxz>
	<rotatex>70.0</rotatex><rotatey>0.0</rotatey><rotatez>0.0</rotatez>
	<rotatevx>0.0</rotatevx><rotatevy>0.05+0.20*$_rand</rotatevy><rotatevz>0.0</rotatevz>
	<flag>16</flag>
</mesh>


</exbulletml>
