<?xml version="1.0" ?>

<Scene name="MineChest" type="XMLMinigame" hide_ui="$show_minechest_minigame_interface">

	<Audio source="chapter3"/>
	<Audio source="ambient_mine"/>
	
	<Action type="Composite" name="MineChest_OnSkip">
		<Action type="SetVar" var="pair1_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair1_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair2_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair2_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair3_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair3_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair4_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair4_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair5_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair5_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair6_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair6_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair7_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair7_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair8_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair8_1" value="1" reset="1"/>
		<Action type="SetVar" var="pair9_2" value="1" reset="0"/>
		<Action type="SetVar" var="pair9_1" value="1" reset="1"/>
		<Action type="ResetScene"/>
	</Action>
	
	<Action type="Composite" name="MineChest_OnSuccess">
		<Action type="AddItem" item="mine_diamond_pairs_no_pair" reset="0"/>
		<!-- <Action type="Say" key="SOLVED_MINE_CHEST"/> -->
		<Action type="SetVar" var="ho_new_unique_diamond_visible" value="0" reset="0"/>
		<Action type="SetVar" var="show_minechest_minigame_interface" value="0" reset="0"/>
		<Action type="SetVar" var="solved_mine_chest" value="1" reset="1"/>
	</Action>
	

	<if t="$mine_chest_opened">
		<!-- Images -->
		<Object type="ImageBox" image="scene_mine_chest_opened_closeup" x="2" y="64" />

		<!-- 1 -->
		<if t="$pair1_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_1" x="640" y="310" /> </if>
		<if t="$pair1_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_1" x="640" y="310">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair1_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_2" x="326" y="218" /> </if>
		<if t="$pair1_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_2" x="326" y="218">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_1" x="640" y="310">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair1_2" x="326" y="218">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 2 -->
		<if t="$pair2_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_1" x="497" y="274" /> </if>
		<if t="$pair2_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_1" x="497" y="274">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair2_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_2" x="282" y="346" /> </if>
		<if t="$pair2_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_2" x="282" y="346">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_2">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_1" x="497" y="274">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair2_2" x="282" y="346">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 3 -->
		<if t="$pair3_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_1" x="228" y="264" /> </if>
		<if t="$pair3_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_1" x="228" y="264">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair3_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_2" x="574" y="340" /> </if>
		<if t="$pair3_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_2" x="574" y="340">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_3">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_1" x="228" y="264">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair3_2" x="574" y="340">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 4 -->
		<if t="$pair4_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_1" x="706" y="264" /> </if>
		<if t="$pair4_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_1" x="706" y="264">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair4_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_2" x="149" y="346" /> </if>
		<if t="$pair4_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_2" x="149" y="346">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_4">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_1" x="706" y="264">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair4_2" x="149" y="346">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 5 -->
		<if t="$pair5_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_1" x="383" y="282" /> </if>
		<if t="$pair5_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_1" x="383" y="282">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair5_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_2" x="805" y="228" /> </if>
		<if t="$pair5_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_2" x="805" y="228">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_5">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_1" x="383" y="282">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair5_2" x="805" y="228">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 6 -->
		<if t="$pair6_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_1" x="574" y="246" /> </if>
		<if t="$pair6_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_1" x="574" y="246">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair6_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_2" x="182" y="218" /> </if>
		<if t="$pair6_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_2" x="182" y="218">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_6">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_1" x="574" y="246">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair6_2" x="182" y="218">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 7 -->
		<if t="$pair7_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_1" x="440" y="228" /> </if>
		<if t="$pair7_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_1" x="440" y="228">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair7_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_2" x="721" y="340" /> </if>
		<if t="$pair7_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_2" x="721" y="340">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_7">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_1" x="440" y="228">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair7_2" x="721" y="340">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 8 -->
		<if t="$pair8_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_1" x="449" y="322" /> </if>
		<if t="$pair8_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_1" x="449" y="322">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair8_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_2" x="787" y="282" /> </if>
		<if t="$pair8_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_2" x="787" y="282">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_8">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_1" x="449" y="322">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair8_2" x="787" y="282">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>

		<!-- 9 -->
		<if t="$pair9_1 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_1" x="293" y="300" /> </if>
		<if t="$pair9_1 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_1" x="293" y="300">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$pair9_2 == 0"> <Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_2" x="655" y="218" /> </if>
		<if t="$pair9_2 == -1">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_2" x="655" y="218">
				<Animator type="Rotator" periods="-1" function="sine" amplitude="10" speed="1"/>
			</Object>
		</if>
		<if t="$target_pair == fade_pair_9">
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_1" x="293" y="300">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Object type="ImageBox" image="scene_mine_diamond_pairs_pair9_2" x="655" y="218">
				<Animator type="AlphaChanger" amplitude="-255" speed="2"/>
			</Object>
			<Action type="SetVar" var="target_pair" value="None" reset="0"/>
		</if>


		<!-- Hidden objects/items -->
		<Object type="HiddenObject" name="mine_chest_book_visible" item="mine_chest_book" image="ho_mine_chest_book" x="590" y="228" />
		<if t="$solved_mine_chest">
			<if t="$ho_new_unique_diamond_visible">
				<Object type="ImageBox" image="ho_new_unique_diamond" x="383" y="346" />
			</if>
		<else>
			<Object type="ImageBox" image="ho_new_unique_diamond" x="383" y="346" />
		</else>
		</if>

		<!-- Actions -->

		<!-- exit scene action is not within this large "if" block -->

		<!-- 1 -->
		<if t="$pair1_1 == 0">
			<Action condition="not $target_pair == 1_1 and $target_pair == None" color="8393CA" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="1_2" reset="0"/>
				<Action type="SetVar" var="pair1_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 1_1" color="8393CA" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_1" reset="0"/>
				<Action type="SetVar" var="pair1_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair1_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair1_2 == 0">
			<Action condition="not $target_pair == 1_2 and $target_pair == None" color="7DA7D9" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="1_1" reset="0"/>
				<Action type="SetVar" var="pair1_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 1_2" color="7DA7D9" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_1" reset="0"/>
				<Action type="SetVar" var="pair1_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair1_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 2 -->
		<if t="$pair2_1 == 0">
			<Action condition="not $target_pair == 2_1 and $target_pair == None" color="F78E56" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="2_2" reset="0"/>
				<Action type="SetVar" var="pair2_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 2_1" color="F78E56" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_2" reset="0"/>
				<Action type="SetVar" var="pair2_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair2_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair2_2 == 0">
			<Action condition="not $target_pair == 2_2 and $target_pair == None" color="F36C4F" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="2_1" reset="0"/>
				<Action type="SetVar" var="pair2_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 2_2" color="F36C4F" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_2" reset="0"/>
				<Action type="SetVar" var="pair2_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair2_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 3 -->
		<if t="$pair3_1 == 0">
			<Action condition="not $target_pair == 3_1 and $target_pair == None" color="82CA9C" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="3_2" reset="0"/>
				<Action type="SetVar" var="pair3_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 3_1" color="82CA9C" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_3" reset="0"/>
				<Action type="SetVar" var="pair3_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair3_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair3_2 == 0">
			<Action condition="not $target_pair == 3_2 and $target_pair == None" color="7ACDC8" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="3_1" reset="0"/>
				<Action type="SetVar" var="pair3_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 3_2" color="7ACDC8" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_3" reset="0"/>
				<Action type="SetVar" var="pair3_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair3_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 4 -->
		<if t="$pair4_1 == 0">
			<Action condition="not $target_pair == 4_1 and $target_pair == None" color="A3D49C" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="4_2" reset="0"/>
				<Action type="SetVar" var="pair4_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 4_1" color="A3D49C" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_4" reset="0"/>
				<Action type="SetVar" var="pair4_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair4_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair4_2 == 0">
			<Action condition="not $target_pair == 4_2 and $target_pair == None" color="C4DF9B" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="4_1" reset="0"/>
				<Action type="SetVar" var="pair4_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 4_2" color="C4DF9B" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_4" reset="0"/>
				<Action type="SetVar" var="pair4_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair4_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 5 -->
		<if t="$pair5_1 == 0">
			<Action condition="not $target_pair == 5_1 and $target_pair == None" color="362F2D" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="5_2" reset="0"/>
				<Action type="SetVar" var="pair5_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 5_1" color="362F2D" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_5" reset="0"/>
				<Action type="SetVar" var="pair5_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair5_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair5_2 == 0">
			<Action condition="not $target_pair == 5_2 and $target_pair == None" color="A67C52" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="5_1" reset="0"/>
				<Action type="SetVar" var="pair5_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 5_2" color="A67C52" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_5" reset="0"/>
				<Action type="SetVar" var="pair5_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair5_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 6 -->
		<if t="$pair6_1 == 0">
			<Action condition="not $target_pair == 6_1 and $target_pair == None" color="F6989D" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="6_2" reset="0"/>
				<Action type="SetVar" var="pair6_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 6_1" color="F6989D" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_6" reset="0"/>
				<Action type="SetVar" var="pair6_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair6_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair6_2 == 0">
			<Action condition="not $target_pair == 6_2 and $target_pair == None" color="F49AC2" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="6_1" reset="0"/>
				<Action type="SetVar" var="pair6_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 6_2" color="F49AC2" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_6" reset="0"/>
				<Action type="SetVar" var="pair6_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair6_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 7 -->
		<if t="$pair7_1 == 0">
			<Action condition="not $target_pair == 7_1 and $target_pair == None" color="8C6239" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="7_2" reset="0"/>
				<Action type="SetVar" var="pair7_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 7_1" color="8C6239" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_7" reset="0"/>
				<Action type="SetVar" var="pair7_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair7_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair7_2 == 0">
			<Action condition="not $target_pair == 7_2 and $target_pair == None" color="754C24" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="7_1" reset="0"/>
				<Action type="SetVar" var="pair7_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 7_2" color="754C24" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_7" reset="0"/>
				<Action type="SetVar" var="pair7_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair7_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 8 -->
		<if t="$pair8_1 == 0">
			<Action condition="not $target_pair == 8_1 and $target_pair == None" color="C7B29A" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="8_2" reset="0"/>
				<Action type="SetVar" var="pair8_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 8_1" color="C7B29A" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_8" reset="0"/>
				<Action type="SetVar" var="pair8_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair8_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair8_2 == 0">
			<Action condition="not $target_pair == 8_2 and $target_pair == None" color="998675" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="8_1" reset="0"/>
				<Action type="SetVar" var="pair8_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 8_2" color="998675" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_8" reset="0"/>
				<Action type="SetVar" var="pair8_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair8_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- 9 -->
		<if t="$pair9_1 == 0">
			<Action condition="not $target_pair == 9_1 and $target_pair == None" color="736357" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="9_2" reset="0"/>
				<Action type="SetVar" var="pair9_1" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 9_1" color="736357" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_9" reset="0"/>
				<Action type="SetVar" var="pair9_1" value="1" reset="0"/>
				<Action type="SetVar" var="pair9_2" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>
		<if t="$pair9_2 == 0">
			<Action condition="not $target_pair == 9_2 and $target_pair == None" color="534741" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="9_1" reset="0"/>
				<Action type="SetVar" var="pair9_2" value="-1" reset="1"/>
			</Action>
			<Action condition="$target_pair == 9_2" color="534741" type="Composite" cursor="use">
				<Action type="SetVar" var="target_pair" value="fade_pair_9" reset="0"/>
				<Action type="SetVar" var="pair9_2" value="1" reset="0"/>
				<Action type="SetVar" var="pair9_1" value="1" reset="1"/>
				<!-- <Action type="Say" key="GEM_MATCHED"/> -->
			</Action>
		</if>

		<!-- Other -->
		<if t="not $solved_mine_chest and $pair1_1 == 1 and $pair1_2 == 1 and $pair2_1 == 1 and $pair2_2 == 1 and $pair3_1 == 1 and $pair3_2 == 1 and $pair4_1 == 1 and $pair4_2 == 1 and $pair5_1 == 1 and $pair5_2 == 1 and $pair6_1 == 1 and $pair6_2 == 1 and $pair7_1 == 1 and $pair7_2 == 1 and $pair8_1 == 1 and $pair8_2 == 1 and $pair9_1 == 1 and $pair9_2 == 1">
			<Action type="SetVar" var="minigame_solved" value="1" reset="0"/>
		</if>
	<else> <!-- chest not unlocked/opened -->
		<Action color="FF0000" type="ItemAction" cursor="question">
			<Action itemaction="noitem" type="Composite">
				<Action type="PlaySound" sound="drawer_locked"/>
				<Action type="Say" key="MINE_CHEST_PADLOCK_LOOK"/>
			</Action>			
			<Action itemaction="hut_chest_key" type="Composite">
				<Action type="PlaySound" sound="door_unlock"/>
				<Action type="PlaySound" sound="chest_open"/>
				<Action type="RemoveItem" item="hut_chest_key" reset="0"/>
				<Action type="SetVar" var="show_minechest_minigame_interface" value="1" reset="0"/>
				<Action type="SetVar" var="mine_chest_opened" value="1" reset="1"/>
			</Action>
		</Action>
	</else>
	</if>
	
	<if t="not $ho_new_unique_diamond_visible and not $commented_white_gem">
		<!-- <Action type="Say" key="SOLVED_MINE_CHEST"/> -->
		<Action type="SetVar" var="commented_white_gem" value="1" reset="0"/>		
	</if>

	<!-- Unconditional actions -->
	<Action color="FFFF00" type="Composite">
		<Action type="PlaySound" sound="steps"/>
		<Action type="SwitchScene" scene="forest.Mine"/>
	</Action>	
	<Object type="ActionArrowMarker" x="540" y="635" color="FFFF00" image="ui.gui/ss_marker" angle="-90" clickthrough="1"/>



</Scene>