<?xml version="1.0" encoding="utf-8" ?>
<c2eventsheet>
    <!--All the 'name' attributes are ignored by Construct 2 - they are there for readability only.-->
    <name>Event sheet 1</name>
    <events>
        <comment>Use the down arrow to allow the player to deliberately drop down through a jump-thru platform.</comment>
        <event-block sid="886640563587973">
            <conditions>
                <condition id="0" name="On key pressed" sid="111877937354771" type="Keyboard">
                    <param id="0" name="Key">40</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="12" name="Fall through" sid="700184262031854" type="Player" />
                <action id="0" name="Call function" sid="391977032652754" type="Function">
                    <param id="0" name="Name">&quot;DoSomThing&quot;</param>
                    <param id="1" name="Parameter {n}"></param>
                </action>
            </actions>
        </event-block>
        <comment>Allow WASD as alternate controls to arrow keys.</comment>
        <event-block sid="490770379779868">
            <conditions>
                <condition id="2" name="Key is down" sid="437247455484079" type="Keyboard">
                    <param id="0" name="Key">49</param>
                </condition>
            </conditions>
            <actions>
                <action id="-28" name="Set canvas size" sid="437168673710900" type="System">
                    <param id="0" name="Width">128</param>
                    <param id="1" name="Height">64</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="168805343427839">
            <conditions>
                <condition id="2" name="Key is down" sid="798785420513493" type="Keyboard">
                    <param id="0" name="Key">50</param>
                </condition>
            </conditions>
            <actions>
                <action id="-28" name="Set canvas size" sid="127442793148544" type="System">
                    <param id="0" name="Width">256</param>
                    <param id="1" name="Height">128</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="380337292996572">
            <conditions>
                <condition id="2" name="Key is down" sid="858144220720775" type="Keyboard">
                    <param id="0" name="Key">51</param>
                </condition>
            </conditions>
            <actions>
                <action id="-28" name="Set canvas size" sid="479676528808172" type="System">
                    <param id="0" name="Width">512</param>
                    <param id="1" name="Height">256</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="470494788975054">
            <conditions>
                <condition id="2" name="Key is down" sid="520718978758922" type="Keyboard">
                    <param id="0" name="Key">52</param>
                </condition>
            </conditions>
            <actions>
                <action id="-28" name="Set canvas size" sid="359380265203178" type="System">
                    <param id="0" name="Width">1024</param>
                    <param id="1" name="Height">512</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="216990433528962">
            <conditions>
                <condition id="2" name="Key is down" sid="545348612270515" type="Keyboard">
                    <param id="0" name="Key">87</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" sid="473908442623894" type="Player">
                    <param id="0" name="Control">2</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="278067649516833">
            <conditions>
                <condition id="2" name="Key is down" sid="408965356872458" type="Keyboard">
                    <param id="0" name="Key">65</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" sid="805786851366270" type="Player">
                    <param id="0" name="Control">0</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="489659495610727">
            <conditions>
                <condition id="2" name="Key is down" sid="532964852915189" type="Keyboard">
                    <param id="0" name="Key">83</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="12" name="Fall through" sid="208515064351745" type="Player" />
                <action id="0" name="Call function" sid="132537646034836" type="Function">
                    <param id="0" name="Name">&quot;DoSomThing&quot;</param>
                    <param id="1" name="Parameter {n}"></param>
                </action>
            </actions>
        </event-block>
        <event-block sid="271951318904492">
            <conditions>
                <condition id="2" name="Key is down" sid="931340294563742" type="Keyboard">
                    <param id="0" name="Key">68</param>
                </condition>
            </conditions>
            <actions>
                <action behavior="Platform" id="7" name="Simulate control" sid="385220938438099" type="Player">
                    <param id="0" name="Control">1</param>
                </action>
            </actions>
        </event-block>
        <event-block sid="157422730822496">
            <conditions>
                <condition id="2" name="Key is down" sid="633125434979458" type="Keyboard">
                    <param id="0" name="Key">27</param>
                </condition>
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="638484466245954">
                    <conditions>
                        <condition id="-14" name="Pick by unique ID" sid="679426114617395" type="Respaun">
                            <param id="0" name="Unique ID">Player.RespUID</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-4" name="Set position to another object" sid="275948683971502" type="Player">
                            <param id="0" name="Object">Respaun</param>
                            <param id="1" name="Image point (optional)">0</param>
                        </action>
                        <action id="-10" name="Set value" sid="341889421715938" type="Player">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">5</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <comment>Mirror the player&apos;s image so they appear facing the right way when moving left or right.</comment>
        <event-block any="1" sid="292497607685938">
            <conditions>
                <condition id="0" name="On key pressed" sid="689028167987175" type="Keyboard">
                    <param id="0" name="Key">37</param>
                </condition>
                <condition id="0" name="On key pressed" sid="492713045083914" type="Keyboard">
                    <param id="0" name="Key">65</param>
                </condition>
            </conditions>
            <actions>
                <action id="7" name="Set mirrored" sid="527724538220414" type="Player">
                    <param id="0" name="State">0</param>
                </action>
                <action id="7" name="Set mirrored" sid="856269162261626" type="HeroAvatar">
                    <param id="0" name="State">0</param>
                </action>
            </actions>
        </event-block>
        <event-block any="1" sid="937628726831093">
            <conditions>
                <condition id="0" name="On key pressed" sid="167778558156895" type="Keyboard">
                    <param id="0" name="Key">39</param>
                </condition>
                <condition id="0" name="On key pressed" sid="308527582085951" type="Keyboard">
                    <param id="0" name="Key">68</param>
                </condition>
            </conditions>
            <actions>
                <action id="7" name="Set mirrored" sid="981998101838804" type="Player">
                    <param id="0" name="State">1</param>
                </action>
                <action id="7" name="Set mirrored" sid="185343770533925" type="HeroAvatar">
                    <param id="0" name="State">1</param>
                </action>
            </actions>
        </event-block>
        <event-block any="1" sid="334819607536650">
            <conditions>
                <condition id="0" name="On key pressed" sid="300296428756857" type="Keyboard">
                    <param id="0" name="Key">32</param>
                </condition>
            </conditions>
            <actions>
                <action id="0" name="Spawn another object" sid="816019732421004" type="HeroAvatar">
                    <param id="0" name="Object">Bit</param>
                    <param id="1" name="Layer">2</param>
                    <param id="2" name="Image point">1</param>
                </action>
                <action behavior="Timer" id="0" name="Start timer" sid="851055756627793" type="Bit">
                    <param id="0" name="Duration">0.05</param>
                    <param id="1" name="Type">0</param>
                    <param id="2" name="Tag">&quot;Bit&quot;</param>
                </action>
            </actions>
            <sub-events>
                <event-block sid="578263004066222">
                    <conditions>
                        <condition id="7" name="Is mirrored" sid="582746279331594" type="HeroAvatar" />
                    </conditions>
                    <actions>
                        <action id="7" name="Set mirrored" sid="487489535608253" type="Bit">
                            <param id="0" name="State">0</param>
                        </action>
                        <action behavior="Bullet" id="3" name="Set angle of motion" sid="956055781294200" type="Bit">
                            <param id="0" name="Angle">180</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="819002580833750">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="232392524516342" type="Bit">
                            <param id="0" name="Object">MobAvatar</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Spawn another object" sid="469509252272768" type="Bit">
                            <param id="0" name="Object">Blood</param>
                            <param id="1" name="Layer">2</param>
                            <param id="2" name="Image point">0</param>
                        </action>
                        <action id="-12" name="Subtract from" sid="353477024389212" type="MobAvatar">
                            <param id="0" name="Instance variable">hels</param>
                            <param id="1" name="Value">1</param>
                        </action>
                        <action id="7" name="Set mirrored" sid="364325143309754" type="MobAvatar">
                            <param id="0" name="State">0</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="577894965000488">
                            <conditions>
                                <condition id="-11" name="For Each" sid="599314841138641" type="System">
                                    <param id="0" name="Object">Mob</param>
                                </condition>
                                <condition id="-7" name="Compare instance variable" sid="813421876445182" type="Mob">
                                    <param id="0" name="Instance variable">AvatarUID</param>
                                    <param id="1" name="Comparison">0</param>
                                    <param id="2" name="Value">MobAvatar.UID</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-10" name="Set value" sid="518218516768835" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Value">random(Mob.Xleft,Mob.Xright)</param>
                                </action>
                                <action id="-10" name="Set value" sid="622120165059310" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Value">Player.X</param>
                                </action>
                                <action id="-10" name="Set value" sid="241784590553601" type="Mob">
                                    <param id="0" name="Instance variable">MobSpeed</param>
                                    <param id="1" name="Value">30</param>
                                </action>
                                <action id="6" name="Set speed" sid="904055970363417" type="Mob">
                                    <param id="0" name="Speed">8</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="364752792990219">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="755229988375657" type="Mob">
                                            <param id="0" name="Instance variable">Xmove</param>
                                            <param id="1" name="Comparison">4</param>
                                            <param id="2" name="Value">Mob.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="7" name="Set mirrored" sid="856887622950695" type="MobAvatar">
                                            <param id="0" name="State">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="483265742342570">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="196843218229598" type="MobAvatar">
                                    <param id="0" name="Instance variable">hels</param>
                                    <param id="1" name="Comparison">3</param>
                                    <param id="2" name="Value">0</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="547785961597198">
                                    <conditions>
                                        <condition id="-11" name="For Each" sid="450707782916958" type="System">
                                            <param id="0" name="Object">Mob</param>
                                        </condition>
                                        <condition id="-7" name="Compare instance variable" sid="140678998674668" type="Mob">
                                            <param id="0" name="Instance variable">AvatarUID</param>
                                            <param id="1" name="Comparison">0</param>
                                            <param id="2" name="Value">MobAvatar.UID</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-9" name="Destroy" sid="568976908305615" type="Mob" />
                                    </actions>
                                </event-block>
                                <event-block sid="394793821992648">
                                    <conditions />
                                    <actions>
                                        <action id="-9" name="Destroy" sid="232353254552887" type="MobAvatar" />
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="444885535126304">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="254981726379449" type="Bit">
                            <param id="0" name="Object">MobSin</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Spawn another object" sid="796555944263380" type="Bit">
                            <param id="0" name="Object">Blood</param>
                            <param id="1" name="Layer">2</param>
                            <param id="2" name="Image point">0</param>
                        </action>
                        <action id="-12" name="Subtract from" sid="787957151471148" type="MobSin">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">1</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="599373833259417">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="295767424658358" type="MobSin">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Comparison">3</param>
                                    <param id="2" name="Value">0</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-9" name="Destroy" sid="643328695829371" type="MobSin" />
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="186781542200121">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="795549301568329" type="Bit">
                            <param id="0" name="Object">MobBoss</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Spawn another object" sid="601696867609126" type="Bit">
                            <param id="0" name="Object">Blood</param>
                            <param id="1" name="Layer">2</param>
                            <param id="2" name="Image point">0</param>
                        </action>
                        <action id="-12" name="Subtract from" sid="185019153518403" type="MobBoss">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">1</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="938870991416460">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="269078308994677" type="MobBoss">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Comparison">3</param>
                                    <param id="2" name="Value">0</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-9" name="Destroy" sid="471731548484896" type="MobBoss" />
                            </actions>
                            <sub-events>
                                <event-block sid="229425734650721">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="225454917492091" type="SolidTile">
                                            <param id="0" name="Unique ID">410</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-9" name="Destroy" sid="159739470219479" type="SolidTile" />
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="858437369554830">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="432067486873636" type="Bit">
                            <param id="0" name="Object">MobArcher</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="0" name="Spawn another object" sid="791385564490985" type="Bit">
                            <param id="0" name="Object">Blood</param>
                            <param id="1" name="Layer">2</param>
                            <param id="2" name="Image point">0</param>
                        </action>
                        <action id="-12" name="Subtract from" sid="649210440223833" type="MobArcher">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">1</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="845855543363715">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="432787677011430" type="MobArcher">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Comparison">3</param>
                                    <param id="2" name="Value">0</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-9" name="Destroy" sid="602097057468962" type="MobArcher" />
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-block>
        <comment>If the player falls off the bottom of the layout, restart the level.</comment>
        <event-block sid="409653344764981">
            <conditions>
                <condition id="-2" name="Compare Y" sid="944162036862902" type="Player">
                    <param id="0" name="Comparison">4</param>
                    <param id="1" name="Y co-ordinate">LayoutHeight</param>
                </condition>
            </conditions>
            <actions>
                <action disabled="1" id="-26" name="Restart layout" sid="415201424165973" type="System" />
            </actions>
            <sub-events>
                <event-block sid="148836686565465">
                    <conditions>
                        <condition id="-14" name="Pick by unique ID" sid="797062886698887" type="Respaun">
                            <param id="0" name="Unique ID">Player.RespUID</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-4" name="Set position to another object" sid="756652457979453" type="Player">
                            <param id="0" name="Object">Respaun</param>
                            <param id="1" name="Image point (optional)">0</param>
                        </action>
                        <action id="-10" name="Set value" sid="687430918837055" type="Player">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">5</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <event-block sid="944080152889355">
            <conditions>
                <condition id="-7" name="Compare instance variable" sid="983749519919333" type="Player">
                    <param id="0" name="Instance variable">Hels</param>
                    <param id="1" name="Comparison">2</param>
                    <param id="2" name="Value">0</param>
                </condition>
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="888318743164686">
                    <conditions>
                        <condition id="-14" name="Pick by unique ID" sid="626833560700142" type="Respaun">
                            <param id="0" name="Unique ID">Player.RespUID</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-4" name="Set position to another object" sid="105569257021553" type="Player">
                            <param id="0" name="Object">Respaun</param>
                            <param id="1" name="Image point (optional)">0</param>
                        </action>
                        <action id="-10" name="Set value" sid="955041527405433" type="Player">
                            <param id="0" name="Instance variable">Hels</param>
                            <param id="1" name="Value">5</param>
                        </action>
                    </actions>
                </event-block>
            </sub-events>
        </event-block>
        <event-group description="" sid="458057374683673" title="Hero">
            <sub-events>
                <event-block sid="479766943763113">
                    <conditions>
                        <condition id="-1" name="Every tick" sid="941140477730093" type="System" />
                    </conditions>
                    <actions>
                        <action id="-4" name="Set position to another object" sid="113669250497015" type="HeroAvatar">
                            <param id="0" name="Object">Player</param>
                            <param id="1" name="Image point (optional)">1</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="666350872328457">
                    <conditions>
                        <condition behavior="Platform" id="0" name="Is moving" sid="128283830111421" type="Player" />
                        <condition behavior="Platform" id="2" name="Is on floor" sid="858678076282386" type="Player" />
                    </conditions>
                    <actions>
                        <action id="4" name="Set animation" sid="675722772913467" type="Player">
                            <param id="0" name="Animation">&quot;move&quot;</param>
                            <param id="1" name="From">1</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="827760737859617">
                    <conditions>
                        <condition behavior="Platform" id="0" name="Is moving" sid="465842585135092" type="Player" />
                        <condition behavior="Platform" id="2" inverted="1" name="Is on floor" sid="874541006428650" type="Player" />
                    </conditions>
                    <actions>
                        <action id="4" name="Set animation" sid="238424259999459" type="Player">
                            <param id="0" name="Animation">&quot;fall&quot;</param>
                            <param id="1" name="From">0</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="917357596255416">
                    <conditions>
                        <condition behavior="Platform" id="1" name="Compare speed" sid="975957385811318" type="Player">
                            <param id="0" name="Comparison">2</param>
                            <param id="1" name="Speed">10</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="4" name="Set animation" sid="832052842184705" type="Player">
                            <param id="0" name="Animation">&quot;stop&quot;</param>
                            <param id="1" name="From">1</param>
                        </action>
                    </actions>
                </event-block>
                <event-block sid="412187238991611">
                    <conditions>
                        <condition id="-6" name="Every X seconds" sid="930708326179510" type="System">
                            <param id="0" name="Interval (seconds)">1.0</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="869390573934074">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="923576217122554" type="Player">
                                    <param id="0" name="Object">Respaun</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-10" name="Set value" sid="558282456412799" type="Player">
                                    <param id="0" name="Instance variable">RespUID</param>
                                    <param id="1" name="Value">Respaun.UID</param>
                                </action>
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-group>
        <event-group description="" sid="980974534121447" title="MOB">
            <sub-events>
                <event-block sid="787202717535279">
                    <conditions>
                        <condition id="-11" name="For Each" sid="863362630129792" type="System">
                            <param id="0" name="Object">Mob</param>
                        </condition>
                        <condition id="-14" name="Pick by unique ID" sid="756099556543145" type="MobAvatar">
                            <param id="0" name="Unique ID">Mob.AvatarUID</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-4" name="Set position to another object" sid="138720063737383" type="MobAvatar">
                            <param id="0" name="Object">Mob</param>
                            <param id="1" name="Image point (optional)">1</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="453828111925636">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="465042639460661" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Comparison">4</param>
                                    <param id="2" name="Value">Mob.X</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-1" name="Set X" sid="853962893650060" type="Mob">
                                    <param id="0" name="X">Mob.X+dt*Mob.MobSpeed</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="122829002001427">
                            <conditions>
                                <condition id="-7" name="Compare instance variable" sid="571230690804836" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Comparison">2</param>
                                    <param id="2" name="Value">Mob.X</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-1" name="Set X" sid="834422023828030" type="Mob">
                                    <param id="0" name="X">Mob.X-dt*Mob.MobSpeed</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="101001819880123">
                            <conditions>
                                <condition id="-21" name="Is between values" sid="865837882407689" type="System">
                                    <param id="0" name="Value">Mob.X</param>
                                    <param id="1" name="Lower bound">Mob.Xmove-2</param>
                                    <param id="2" name="Upper bound">Mob.Xmove+2</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-10" name="Set value" sid="381410044731883" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Value">random(Mob.Xleft,Mob.Xright)</param>
                                </action>
                                <action id="-11" name="Add to" sid="131828957845022" type="Mob">
                                    <param id="0" name="Instance variable">MobSpeed</param>
                                    <param id="1" name="Value">random(-2,2)</param>
                                </action>
                                <action id="-10" name="Set value" sid="610230606173288" type="Mob">
                                    <param id="0" name="Instance variable">MobSpeed</param>
                                    <param id="1" name="Value">max(Mob.MobSpeed,Mob.MobSpeedMin)</param>
                                </action>
                                <action id="-10" name="Set value" sid="638043724571734" type="Mob">
                                    <param id="0" name="Instance variable">MobSpeed</param>
                                    <param id="1" name="Value">min(Mob.MobSpeed,Mob.MobSpeedMax)</param>
                                </action>
                                <action id="7" name="Set mirrored" sid="377402034022865" type="MobAvatar">
                                    <param id="0" name="State">0</param>
                                </action>
                                <action id="6" name="Set speed" sid="777025095542783" type="Mob">
                                    <param id="0" name="Speed">random(4,6)</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="882510641628641">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="967542498442371" type="Mob">
                                            <param id="0" name="Instance variable">Xmove</param>
                                            <param id="1" name="Comparison">4</param>
                                            <param id="2" name="Value">Mob.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="7" name="Set mirrored" sid="672353317414204" type="MobAvatar">
                                            <param id="0" name="State">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="285783152092460">
                            <conditions>
                                <condition id="-21" name="Is between values" sid="336997277146050" type="System">
                                    <param id="0" name="Value">Player.X</param>
                                    <param id="1" name="Lower bound">Mob.Xleft</param>
                                    <param id="2" name="Upper bound">Mob.Xright</param>
                                </condition>
                                <condition id="-21" name="Is between values" sid="794547142580144" type="System">
                                    <param id="0" name="Value">Player.Y</param>
                                    <param id="1" name="Lower bound">Mob.Y-3</param>
                                    <param id="2" name="Upper bound">Mob.Y+6</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-10" name="Set value" sid="463860276127404" type="Mob">
                                    <param id="0" name="Instance variable">Xmove</param>
                                    <param id="1" name="Value">Player.X</param>
                                </action>
                                <action id="-10" name="Set value" sid="951606379351821" type="Mob">
                                    <param id="0" name="Instance variable">MobSpeed</param>
                                    <param id="1" name="Value">30</param>
                                </action>
                                <action id="7" name="Set mirrored" sid="843465347487210" type="MobAvatar">
                                    <param id="0" name="State">0</param>
                                </action>
                                <action id="6" name="Set speed" sid="873510250333085" type="Mob">
                                    <param id="0" name="Speed">8</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="698694437908980">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="833150265971752" type="Mob">
                                            <param id="0" name="Instance variable">Xmove</param>
                                            <param id="1" name="Comparison">4</param>
                                            <param id="2" name="Value">Mob.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="7" name="Set mirrored" sid="899436691960337" type="MobAvatar">
                                            <param id="0" name="State">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="250242095666344">
                    <conditions>
                        <condition id="-6" name="Every X seconds" sid="378480070497472" type="System">
                            <param id="0" name="Interval (seconds)">0.2</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="231438870633319">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="738292003280907" type="Player">
                                    <param id="0" name="Object">MobSin</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="446144869253034" type="Player">
                                    <param id="0" name="Object">Blood</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="-12" name="Subtract from" sid="600607129473131" type="Player">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                                <action behavior="Platform" id="8" name="Set vector X" sid="436925807002375" type="Player">
                                    <param id="0" name="Vector X">200</param>
                                </action>
                                <action behavior="ScrollTo" id="0" name="Shake" sid="419158986499836" type="Player">
                                    <param id="0" name="Magnitude">1</param>
                                    <param id="1" name="Duration">0.2</param>
                                    <param id="2" name="Mode">0</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="901247287174065">
                                    <conditions>
                                        <condition id="-1" name="Compare X" sid="158609595824343" type="Player">
                                            <param id="0" name="Comparison">2</param>
                                            <param id="1" name="X co-ordinate">MobSin.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action behavior="Platform" id="8" name="Set vector X" sid="264189170784533" type="Player">
                                            <param id="0" name="Vector X">-200</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="740267221494130">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="400037798737526" type="Sipy">
                                    <param id="0" name="Object">Player</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="494934616440845" type="Player">
                                    <param id="0" name="Object">Blood</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="-12" name="Subtract from" sid="416098782396723" type="Player">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                                <action behavior="Platform" id="9" name="Set vector Y" sid="933512277802166" type="Player">
                                    <param id="0" name="Vector Y">-80</param>
                                </action>
                                <action behavior="ScrollTo" id="0" name="Shake" sid="926456962584816" type="Player">
                                    <param id="0" name="Magnitude">1</param>
                                    <param id="1" name="Duration">0.2</param>
                                    <param id="2" name="Mode">0</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="555307266846330">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="487548137889811" type="Strela">
                                    <param id="0" name="Object">Player</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="747454862039198" type="Player">
                                    <param id="0" name="Object">Blood</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="-12" name="Subtract from" sid="692574657409158" type="Player">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                                <action behavior="Platform" id="8" name="Set vector X" sid="831297343262641" type="Player">
                                    <param id="0" name="Vector X">300</param>
                                </action>
                                <action behavior="ScrollTo" id="0" name="Shake" sid="806207966998996" type="Player">
                                    <param id="0" name="Magnitude">1</param>
                                    <param id="1" name="Duration">0.2</param>
                                    <param id="2" name="Mode">0</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="623233841854016">
                                    <conditions>
                                        <condition id="-13" name="Is between angles" sid="848426446841223" type="Strela">
                                            <param id="0" name="First angle">100</param>
                                            <param id="1" name="Second angle">270</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action behavior="Platform" id="8" name="Set vector X" sid="844194220189555" type="Player">
                                            <param id="0" name="Vector X">-300</param>
                                        </action>
                                    </actions>
                                </event-block>
                                <event-block sid="605558204615278">
                                    <conditions />
                                    <actions>
                                        <action id="-9" name="Destroy" sid="805729977104970" type="Strela" />
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="293840606786438">
                    <conditions>
                        <condition id="-6" name="Every X seconds" sid="929562091615311" type="System">
                            <param id="0" name="Interval (seconds)">0.5</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="106400101155825">
                            <conditions>
                                <condition id="1" name="Is overlapping another object" sid="622387678755002" type="Player">
                                    <param id="0" name="Object">MobAvatar</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="198593594898306" type="Player">
                                    <param id="0" name="Object">Blood</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="-12" name="Subtract from" sid="433697229723777" type="Player">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                                <action behavior="Platform" id="8" name="Set vector X" sid="427876882014928" type="Player">
                                    <param id="0" name="Vector X">200</param>
                                </action>
                                <action behavior="ScrollTo" id="0" name="Shake" sid="877432774539947" type="Player">
                                    <param id="0" name="Magnitude">1</param>
                                    <param id="1" name="Duration">0.2</param>
                                    <param id="2" name="Mode">0</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="383467924774193">
                                    <conditions>
                                        <condition id="-1" name="Compare X" sid="578577160088318" type="Player">
                                            <param id="0" name="Comparison">2</param>
                                            <param id="1" name="X co-ordinate">MobAvatar.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action behavior="Platform" id="8" name="Set vector X" sid="609242817939761" type="Player">
                                            <param id="0" name="Vector X">-200</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="336007500098407">
                    <conditions>
                        <condition id="-11" name="For Each" sid="254393256806259" type="System">
                            <param id="0" name="Object">MobSin</param>
                        </condition>
                        <condition id="-7" name="Compare instance variable" sid="637066067803104" type="MobSin">
                            <param id="0" name="Instance variable">intelect</param>
                            <param id="1" name="Comparison">0</param>
                            <param id="2" name="Value">1</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="301526027592081">
                            <conditions>
                                <condition id="-8" name="Compare two values" sid="644105546144286" type="System">
                                    <param id="0" name="First value">distance(Player.X, Player.Y, MobSin.X, MobSin.Y)</param>
                                    <param id="1" name="Comparison">2</param>
                                    <param id="2" name="Second value">64</param>
                                </condition>
                                <condition id="-8" name="Compare two values" sid="238405613422279" type="System">
                                    <param id="0" name="First value">abs(Player.Y-MobSin.Y)</param>
                                    <param id="1" name="Comparison">2</param>
                                    <param id="2" name="Second value">16</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-23" name="Move at angle" sid="900628867886044" type="MobSin">
                                    <param id="0" name="Angle">angle(Player.X, Player.Y, MobSin.X, MobSin.Y)</param>
                                    <param id="1" name="Distance">-dt*15</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="314752724803356">
                                    <conditions>
                                        <condition id="-1" name="Compare X" sid="814796467451215" type="MobSin">
                                            <param id="0" name="Comparison">4</param>
                                            <param id="1" name="X co-ordinate">Player.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="7" name="Set mirrored" sid="652503906511965" type="MobSin">
                                            <param id="0" name="State">0</param>
                                        </action>
                                    </actions>
                                </event-block>
                                <event-block sid="660365809504111">
                                    <conditions>
                                        <condition id="-1" name="Compare X" sid="849571495660493" type="MobSin">
                                            <param id="0" name="Comparison">2</param>
                                            <param id="1" name="X co-ordinate">Player.X</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="7" name="Set mirrored" sid="134534338003283" type="MobSin">
                                            <param id="0" name="State">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="346621700775106">
                    <conditions>
                        <condition id="-6" name="Every X seconds" sid="420347622272505" type="System">
                            <param id="0" name="Interval (seconds)">1.5</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="257847179982457">
                            <conditions>
                                <condition id="-11" name="For Each" sid="498400354220863" type="System">
                                    <param id="0" name="Object">MobArcher</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="534114256326550">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="231528575659422" type="MobArcher">
                                            <param id="0" name="Instance variable">Algoritm</param>
                                            <param id="1" name="Comparison">0</param>
                                            <param id="2" name="Value">0</param>
                                        </condition>
                                    </conditions>
                                    <actions />
                                    <sub-events>
                                        <event-block sid="149531061723633">
                                            <conditions>
                                                <condition id="-21" name="Is between values" sid="425663637788654" type="System">
                                                    <param id="0" name="Value">MobArcher.Y</param>
                                                    <param id="1" name="Lower bound">Player.Y+MobArcher.Ylow</param>
                                                    <param id="2" name="Upper bound">Player.Y+MobArcher.Ymax</param>
                                                </condition>
                                            </conditions>
                                            <actions />
                                            <sub-events>
                                                <event-block sid="977730724386358">
                                                    <conditions>
                                                        <condition id="-21" name="Is between values" sid="422850299589607" type="System">
                                                            <param id="0" name="Value">Player.X</param>
                                                            <param id="1" name="Lower bound">MobArcher.X+MobArcher.Xmin</param>
                                                            <param id="2" name="Upper bound">MobArcher.X+MobArcher.Xmax</param>
                                                        </condition>
                                                    </conditions>
                                                    <actions>
                                                        <action id="7" name="Set mirrored" sid="785944184894687" type="MobArcher">
                                                            <param id="0" name="State">1</param>
                                                        </action>
                                                    </actions>
                                                    <sub-events>
                                                        <event-block sid="517866955587298">
                                                            <conditions>
                                                                <condition id="-1" name="Compare X" sid="938684998826854" type="Player">
                                                                    <param id="0" name="Comparison">2</param>
                                                                    <param id="1" name="X co-ordinate">MobArcher.X</param>
                                                                </condition>
                                                            </conditions>
                                                            <actions>
                                                                <action id="7" name="Set mirrored" sid="620309724900370" type="MobArcher">
                                                                    <param id="0" name="State">0</param>
                                                                </action>
                                                            </actions>
                                                        </event-block>
                                                        <event-block sid="373185012529439">
                                                            <conditions />
                                                            <actions>
                                                                <action id="0" name="Spawn another object" sid="940071008637038" type="MobArcher">
                                                                    <param id="0" name="Object">Strela</param>
                                                                    <param id="1" name="Layer">2</param>
                                                                    <param id="2" name="Image point">1</param>
                                                                </action>
                                                                <action behavior="Timer" id="0" name="Start timer" sid="714191958732060" type="Strela">
                                                                    <param id="0" name="Duration">2</param>
                                                                    <param id="1" name="Type">0</param>
                                                                    <param id="2" name="Tag">&quot;bolt&quot;</param>
                                                                </action>
                                                                <action id="-8" name="Set angle" sid="934311267520966" type="Strela">
                                                                    <param id="0" name="Angle">random(MobArcher.AngleLow,MobArcher.AngleHigh)</param>
                                                                </action>
                                                                <action id="5" name="Set frame" sid="820601923505186" type="Strela">
                                                                    <param id="0" name="Frame number">MobArcher.StrelaFrame</param>
                                                                </action>
                                                            </actions>
                                                            <sub-events>
                                                                <event-block sid="307459061570104">
                                                                    <conditions>
                                                                        <condition id="7" name="Is mirrored" sid="572598223882641" type="MobArcher" />
                                                                    </conditions>
                                                                    <actions>
                                                                        <action id="-8" name="Set angle" sid="961084708174023" type="Strela">
                                                                            <param id="0" name="Angle">540-Strela.Angle</param>
                                                                        </action>
                                                                    </actions>
                                                                </event-block>
                                                            </sub-events>
                                                        </event-block>
                                                    </sub-events>
                                                </event-block>
                                            </sub-events>
                                        </event-block>
                                    </sub-events>
                                </event-block>
                                <event-block sid="269967727302017">
                                    <conditions>
                                        <condition id="-7" name="Compare instance variable" sid="996966463735379" type="MobArcher">
                                            <param id="0" name="Instance variable">Algoritm</param>
                                            <param id="1" name="Comparison">0</param>
                                            <param id="2" name="Value">1</param>
                                        </condition>
                                    </conditions>
                                    <actions />
                                    <sub-events>
                                        <event-block sid="268110830495984">
                                            <conditions>
                                                <condition id="-21" name="Is between values" sid="565828701374612" type="System">
                                                    <param id="0" name="Value">MobArcher.Y</param>
                                                    <param id="1" name="Lower bound">Player.Y+MobArcher.Ylow</param>
                                                    <param id="2" name="Upper bound">Player.Y+MobArcher.Ymax</param>
                                                </condition>
                                            </conditions>
                                            <actions />
                                            <sub-events>
                                                <event-block sid="555999254344244">
                                                    <conditions>
                                                        <condition id="-21" name="Is between values" sid="438682988276737" type="System">
                                                            <param id="0" name="Value">Player.X</param>
                                                            <param id="1" name="Lower bound">MobArcher.X+MobArcher.Xmin</param>
                                                            <param id="2" name="Upper bound">MobArcher.X+MobArcher.Xmax</param>
                                                        </condition>
                                                    </conditions>
                                                    <actions>
                                                        <action id="7" name="Set mirrored" sid="225286869347774" type="MobArcher">
                                                            <param id="0" name="State">1</param>
                                                        </action>
                                                    </actions>
                                                    <sub-events>
                                                        <event-block sid="804680064998210">
                                                            <conditions>
                                                                <condition id="-1" name="Compare X" sid="701105558767064" type="Player">
                                                                    <param id="0" name="Comparison">2</param>
                                                                    <param id="1" name="X co-ordinate">MobArcher.X</param>
                                                                </condition>
                                                            </conditions>
                                                            <actions>
                                                                <action id="7" name="Set mirrored" sid="134909561040256" type="MobArcher">
                                                                    <param id="0" name="State">0</param>
                                                                </action>
                                                            </actions>
                                                        </event-block>
                                                        <event-block sid="784999108588729">
                                                            <conditions>
                                                                <condition id="-8" name="Compare two values" sid="110160792740458" type="System">
                                                                    <param id="0" name="First value">random(3)</param>
                                                                    <param id="1" name="Comparison">4</param>
                                                                    <param id="2" name="Second value">1</param>
                                                                </condition>
                                                            </conditions>
                                                            <actions>
                                                                <action id="0" name="Spawn another object" sid="284546503534916" type="Player">
                                                                    <param id="0" name="Object">Cast</param>
                                                                    <param id="1" name="Layer">2</param>
                                                                    <param id="2" name="Image point">1</param>
                                                                </action>
                                                                <action id="-23" name="Move at angle" sid="524922373653872" type="Cast">
                                                                    <param id="0" name="Angle">random(360)</param>
                                                                    <param id="1" name="Distance">random(5)</param>
                                                                </action>
                                                                <action id="0" name="Spawn another object" sid="732890559396455" type="MobArcher">
                                                                    <param id="0" name="Object">Strela</param>
                                                                    <param id="1" name="Layer">2</param>
                                                                    <param id="2" name="Image point">1</param>
                                                                </action>
                                                                <action behavior="Bullet" id="5" name="Set enabled" sid="262233630825121" type="Strela">
                                                                    <param id="0" name="State">0</param>
                                                                </action>
                                                                <action behavior="Timer" id="0" name="Start timer" sid="744156352615857" type="Strela">
                                                                    <param id="0" name="Duration">0.2</param>
                                                                    <param id="1" name="Type">0</param>
                                                                    <param id="2" name="Tag">&quot;bolt&quot;</param>
                                                                </action>
                                                                <action id="5" name="Set frame" sid="486948297859901" type="Strela">
                                                                    <param id="0" name="Frame number">3</param>
                                                                </action>
                                                            </actions>
                                                        </event-block>
                                                    </sub-events>
                                                </event-block>
                                            </sub-events>
                                        </event-block>
                                    </sub-events>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
                <event-block sid="866245809644334">
                    <conditions>
                        <condition id="-6" name="Every X seconds" sid="500915608171167" type="System">
                            <param id="0" name="Interval (seconds)">2</param>
                        </condition>
                    </conditions>
                    <actions />
                    <sub-events>
                        <event-block sid="865368946606057">
                            <conditions>
                                <condition id="-11" name="For Each" sid="630141914815207" type="System">
                                    <param id="0" name="Object">MobBoss</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="676654794873570">
                                    <conditions>
                                        <condition id="-21" name="Is between values" sid="744932760192095" type="System">
                                            <param id="0" name="Value">MobBoss.Y</param>
                                            <param id="1" name="Lower bound">Player.Y+MobBoss.Ymin</param>
                                            <param id="2" name="Upper bound">Player.Y+MobBoss.Ymax</param>
                                        </condition>
                                    </conditions>
                                    <actions />
                                    <sub-events>
                                        <event-block sid="392477228559044">
                                            <conditions>
                                                <condition id="-21" name="Is between values" sid="860021622615751" type="System">
                                                    <param id="0" name="Value">Player.X</param>
                                                    <param id="1" name="Lower bound">MobBoss.X+MobBoss.Xmin</param>
                                                    <param id="2" name="Upper bound">MobBoss.X+MobBoss.Xmax</param>
                                                </condition>
                                            </conditions>
                                            <actions />
                                            <sub-events>
                                                <event-block sid="567656374916196">
                                                    <conditions />
                                                    <actions>
                                                        <action id="0" name="Spawn another object" sid="111855332155085" type="MobBoss">
                                                            <param id="0" name="Object">Strela</param>
                                                            <param id="1" name="Layer">2</param>
                                                            <param id="2" name="Image point">1</param>
                                                        </action>
                                                        <action behavior="Timer" id="0" name="Start timer" sid="127102019742815" type="Strela">
                                                            <param id="0" name="Duration">2</param>
                                                            <param id="1" name="Type">0</param>
                                                            <param id="2" name="Tag">&quot;bolt&quot;</param>
                                                        </action>
                                                        <action id="-8" name="Set angle" sid="107112978459493" type="Strela">
                                                            <param id="0" name="Angle">angle(MobBoss.ImagePointX(1), MobBoss.ImagePointY(1), Player.X, Player.Y)+random(-15,15)</param>
                                                        </action>
                                                        <action id="4" name="Set animation" sid="415837247445960" type="Strela">
                                                            <param id="0" name="Animation">&quot;A2&quot;</param>
                                                            <param id="1" name="From">1</param>
                                                        </action>
                                                    </actions>
                                                </event-block>
                                            </sub-events>
                                        </event-block>
                                    </sub-events>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-group>
        <event-group description="" sid="433845292494771" title="Bit">
            <sub-events>
                <event-block sid="830099063034105">
                    <conditions>
                        <condition behavior="Timer" id="0" name="On timer" sid="112196335521154" type="Bit">
                            <param id="0" name="Tag">&quot;Bit&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Destroy" sid="354248884410407" type="Bit" />
                    </actions>
                </event-block>
                <event-block sid="623794772510536">
                    <conditions>
                        <condition id="4" name="On finished" sid="730989547951073" type="Blood">
                            <param id="0" name="Animation">&quot;Default&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Destroy" sid="602422832931600" type="Blood" />
                    </actions>
                </event-block>
                <event-block sid="241926200029255">
                    <conditions>
                        <condition behavior="Timer" id="0" name="On timer" sid="534892187818990" type="Strela">
                            <param id="0" name="Tag">&quot;bolt&quot;</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-9" name="Destroy" sid="132600268343667" type="Strela" />
                    </actions>
                </event-block>
                <event-block sid="324832740668312">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="362991518003311" type="Strela">
                            <param id="0" name="Object">SolidTile</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action behavior="Bullet" id="5" name="Set enabled" sid="424635889103043" type="Strela">
                            <param id="0" name="State">0</param>
                        </action>
                    </actions>
                </event-block>
                <variable constant="0" name="WatWeDo" sid="144501082254560" static="0" type="number">0</variable>
                <event-block sid="756951788924770">
                    <conditions>
                        <condition id="5" name="On any finished" sid="410906520465086" type="Cast" />
                    </conditions>
                    <actions>
                        <action id="-9" name="Set value" sid="506442761769101" type="System">
                            <param id="0" name="Variable">WatWeDo</param>
                            <param id="1" name="Value">random(100)</param>
                        </action>
                    </actions>
                    <sub-events>
                        <event-block sid="845287298350258">
                            <conditions>
                                <condition id="-14" name="Compare variable" sid="341562395300310" type="System">
                                    <param id="0" name="Variable">WatWeDo</param>
                                    <param id="1" name="Comparison">2</param>
                                    <param id="2" name="Value">70</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="180392147163997" type="Cast">
                                    <param id="0" name="Object">Strela</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="5" name="Set frame" sid="590373754557065" type="Strela">
                                    <param id="0" name="Frame number">2</param>
                                </action>
                                <action behavior="Bullet" id="0" name="Set speed" sid="763753264079915" type="Strela">
                                    <param id="0" name="Speed">15</param>
                                </action>
                                <action id="-8" name="Set angle" sid="247580797467062" type="Strela">
                                    <param id="0" name="Angle">270</param>
                                </action>
                                <action behavior="Timer" id="0" name="Start timer" sid="525948857036477" type="Strela">
                                    <param id="0" name="Duration">2</param>
                                    <param id="1" name="Type">0</param>
                                    <param id="2" name="Tag">&quot;bolt&quot;</param>
                                </action>
                            </actions>
                        </event-block>
                        <event-block sid="851886046732574">
                            <conditions>
                                <condition id="-21" name="Is between values" sid="201830191886695" type="System">
                                    <param id="0" name="Value">WatWeDo</param>
                                    <param id="1" name="Lower bound">70</param>
                                    <param id="2" name="Upper bound">100</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="0" name="Spawn another object" sid="732174877089608" type="Cast">
                                    <param id="0" name="Object">MobSin</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="Image point">0</param>
                                </action>
                                <action id="-10" name="Set value" sid="877592584887886" type="MobSin">
                                    <param id="0" name="Instance variable">Hels</param>
                                    <param id="1" name="Value">3</param>
                                </action>
                                <action id="-10" name="Set value" sid="390212077498101" type="MobSin">
                                    <param id="0" name="Instance variable">intelect</param>
                                    <param id="1" name="Value">1</param>
                                </action>
                                <action behavior="Sine" id="1" name="Set period" sid="103781952095837" type="MobSin">
                                    <param id="0" name="Period">2</param>
                                </action>
                                <action behavior="Sine" id="2" name="Set magnitude" sid="532229955807193" type="MobSin">
                                    <param id="0" name="Magnitude">3</param>
                                </action>
                                <action id="5" name="Set frame" sid="424697088902383" type="MobSin">
                                    <param id="0" name="Frame number">6</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="933824166921137">
                                    <conditions>
                                        <condition id="-14" name="Compare variable" sid="369897117373255" type="System">
                                            <param id="0" name="Variable">WatWeDo</param>
                                            <param id="1" name="Comparison">4</param>
                                            <param id="2" name="Value">80</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="5" name="Set frame" sid="583708707603680" type="MobSin">
                                            <param id="0" name="Frame number">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                                <event-block sid="974966478079983">
                                    <conditions>
                                        <condition id="-14" name="Compare variable" sid="183847451904168" type="System">
                                            <param id="0" name="Variable">WatWeDo</param>
                                            <param id="1" name="Comparison">4</param>
                                            <param id="2" name="Value">90</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="5" name="Set frame" sid="181043460679025" type="MobSin">
                                            <param id="0" name="Frame number">5</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <event-block sid="449361800197756">
                            <conditions />
                            <actions>
                                <action id="-9" name="Destroy" sid="402288309331877" type="Cast" />
                            </actions>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-group>
        <event-group description="" sid="705208710859101" title="StartGame">
            <sub-events>
                <event-block sid="768270756324863">
                    <conditions>
                        <condition id="-2" name="On start of layout" sid="186440856022325" type="System" />
                    </conditions>
                    <actions>
                        <action id="-9" name="Destroy" sid="768542659788798" type="Strela" />
                    </actions>
                </event-block>
            </sub-events>
        </event-group>
        <event-group description="" sid="694331684815274" title="Function" />
        <event-block sid="714188299770238">
            <conditions>
                <condition id="0" name="On function" sid="545714709532097" type="Function">
                    <param id="0" name="Name">&quot;DoSomThing&quot;</param>
                </condition>
            </conditions>
            <actions />
            <sub-events>
                <event-block sid="635204922678394">
                    <conditions>
                        <condition id="1" name="Is overlapping another object" sid="449515424496609" type="Player">
                            <param id="0" name="Object">Trigger</param>
                        </condition>
                    </conditions>
                    <actions>
                        <action id="-8" name="Set angle" sid="313712429878085" type="Trigger">
                            <param id="0" name="Angle">Trigger.gotoAngle</param>
                        </action>
                        <action behavior="Bullet" id="5" name="Set enabled" sid="938492169334776" type="Trigger">
                            <param id="0" name="State">1</param>
                        </action>
                        <action behavior="ScrollTo" id="0" name="Shake" sid="101203374254608" type="Player">
                            <param id="0" name="Magnitude">3</param>
                            <param id="1" name="Duration">0.4</param>
                            <param id="2" name="Mode">0</param>
                        </action>
                    </actions>
                    <sub-events>
                        <comment>Лестница</comment>
                        <event-block sid="989481294477261">
                            <conditions>
                                <condition id="2" name="Is playing" sid="999062232878092" type="Trigger">
                                    <param id="0" name="Animation">&quot;L1&quot;</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-3" name="Create object" sid="390046386595803" type="System">
                                    <param id="0" name="Object to create">JampThruSprite</param>
                                    <param id="1" name="Layer">1</param>
                                    <param id="2" name="X">623</param>
                                    <param id="3" name="Y">44</param>
                                </action>
                                <action id="-7" name="Set size" sid="194286358429805" type="JampThruSprite">
                                    <param id="0" name="Width">4</param>
                                    <param id="1" name="Height">4</param>
                                </action>
                            </actions>
                            <sub-events>
                                <event-block sid="420368379653972">
                                    <conditions>
                                        <condition id="2" name="Is playing" sid="793550669837364" type="StateObj">
                                            <param id="0" name="Animation">&quot;A1&quot;</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-15" name="Set visible" sid="117339358435667" type="StateObj">
                                            <param id="0" name="Visibility">1</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Ключ от коморки деда</comment>
                        <event-block sid="829172994710475">
                            <conditions>
                                <condition id="2" name="Is playing" sid="761819712143648" type="Trigger">
                                    <param id="0" name="Animation">&quot;L2&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="706577568775210">
                                    <conditions>
                                        <condition id="2" name="Is playing" sid="921668569512741" type="StateObj">
                                            <param id="0" name="Animation">&quot;A2&quot;</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-15" name="Set visible" sid="666031477235626" type="StateObj">
                                            <param id="0" name="Visibility">1</param>
                                        </action>
                                    </actions>
                                    <sub-events>
                                        <event-block sid="400110599295600">
                                            <conditions>
                                                <condition id="1" name="Is overlapping another object" sid="888173430321725" type="StateObj">
                                                    <param id="0" name="Object">SolidTile</param>
                                                </condition>
                                            </conditions>
                                            <actions>
                                                <action id="-9" name="Destroy" sid="578083726564784" type="SolidTile" />
                                            </actions>
                                        </event-block>
                                    </sub-events>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Рычаг верхнего лифта</comment>
                        <event-block sid="426309183595303">
                            <conditions>
                                <condition id="2" name="Is playing" sid="363854134844972" type="Trigger">
                                    <param id="0" name="Animation">&quot;L3&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="309266803500123">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="457337121848621" type="MobileSolidSprite">
                                            <param id="0" name="Unique ID">16</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-2" name="Set Y" sid="110346409601899" type="MobileSolidSprite">
                                            <param id="0" name="Y">120</param>
                                        </action>
                                        <action behavior="Sine" id="0" name="Set active" sid="977613751743821" type="MobileSolidSprite">
                                            <param id="0" name="State">1</param>
                                        </action>
                                        <action id="-9" name="Destroy" sid="447507845395289" type="Trigger" />
                                        <action id="-3" name="Create object" sid="498856379488309" type="System">
                                            <param id="0" name="Object to create">Blood</param>
                                            <param id="1" name="Layer">2</param>
                                            <param id="2" name="X">204</param>
                                            <param id="3" name="Y">72</param>
                                        </action>
                                        <action id="-3" name="Create object" sid="410058941202788" type="System">
                                            <param id="0" name="Object to create">Blood</param>
                                            <param id="1" name="Layer">2</param>
                                            <param id="2" name="X">224</param>
                                            <param id="3" name="Y">68</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Дед открывается каморка</comment>
                        <event-block sid="967400191382737">
                            <conditions>
                                <condition id="2" name="Is playing" sid="302198408906524" type="Trigger">
                                    <param id="0" name="Animation">&quot;L4&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="354492835231652">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="526892725795449" type="SolidSprite">
                                            <param id="0" name="Unique ID">400</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-9" name="Destroy" sid="264335954939454" type="SolidSprite" />
                                    </actions>
                                </event-block>
                                <event-block sid="332109418875648">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="731249153862470" type="Sipy">
                                            <param id="0" name="Unique ID">371</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-9" name="Destroy" sid="396382766797480" type="Sipy" />
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Дед сносит кактус</comment>
                        <event-block sid="844998133023414">
                            <conditions>
                                <condition id="2" name="Is playing" sid="199795849688777" type="Trigger">
                                    <param id="0" name="Animation">&quot;L5&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="687763747325683">
                                    <conditions>
                                        <condition id="2" name="Is playing" sid="954435227772299" type="StateObj">
                                            <param id="0" name="Animation">&quot;A3&quot;</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-15" name="Set visible" sid="944882165074584" type="StateObj">
                                            <param id="0" name="Visibility">1</param>
                                        </action>
                                        <action id="-3" name="Create object" sid="445945872667344" type="System">
                                            <param id="0" name="Object to create">JampThruSprite</param>
                                            <param id="1" name="Layer">1</param>
                                            <param id="2" name="X">682</param>
                                            <param id="3" name="Y">51</param>
                                        </action>
                                        <action id="-7" name="Set size" sid="556096436620742" type="JampThruSprite">
                                            <param id="0" name="Width">12</param>
                                            <param id="1" name="Height">4</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Рычаг нижнего лифта</comment>
                        <event-block sid="181566828761119">
                            <conditions>
                                <condition id="2" name="Is playing" sid="889643445841717" type="Trigger">
                                    <param id="0" name="Animation">&quot;L6&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="398846544487535">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="835129545588455" type="MobileSolidSprite">
                                            <param id="0" name="Unique ID">381</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-2" name="Set Y" sid="288801422154334" type="MobileSolidSprite">
                                            <param id="0" name="Y">308</param>
                                        </action>
                                        <action behavior="Sine" id="0" name="Set active" sid="564160700811488" type="MobileSolidSprite">
                                            <param id="0" name="State">1</param>
                                        </action>
                                        <action id="-9" name="Destroy" sid="460465839858772" type="Trigger" />
                                    </actions>
                                </event-block>
                                <event-block disabled="1" sid="337382761714321">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="835532528859337" type="MobileSolidSprite">
                                            <param id="0" name="Unique ID">16</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action behavior="Sine" id="5" name="Set cycle position" sid="119843915205525" type="MobileSolidSprite">
                                            <param id="0" name="Cycle position">0</param>
                                        </action>
                                        <action behavior="Sine" id="2" name="Set magnitude" sid="359352804119874" type="MobileSolidSprite">
                                            <param id="0" name="Magnitude">39</param>
                                        </action>
                                        <action id="-2" name="Set Y" sid="863887479601250" type="MobileSolidSprite">
                                            <param id="0" name="Y">149</param>
                                        </action>
                                        <action behavior="Sine" id="1" name="Set period" sid="977350906386533" type="MobileSolidSprite">
                                            <param id="0" name="Period">10</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Лампа джина</comment>
                        <event-block sid="140316521761648">
                            <conditions>
                                <condition id="2" name="Is playing" sid="189754553999582" type="Trigger">
                                    <param id="0" name="Animation">&quot;L7&quot;</param>
                                </condition>
                            </conditions>
                            <actions />
                            <sub-events>
                                <event-block sid="305011751020148">
                                    <conditions>
                                        <condition id="3" name="Compare frame" sid="880800435091767" type="MobSin">
                                            <param id="0" name="Comparison">0</param>
                                            <param id="1" name="Number">7</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="-9" name="Destroy" sid="737268444528212" type="MobSin" />
                                    </actions>
                                </event-block>
                                <event-block sid="302093872100040">
                                    <conditions>
                                        <condition id="2" name="Is playing" sid="956399362391239" type="StateObj">
                                            <param id="0" name="Animation">&quot;A4&quot;</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action id="0" name="Spawn another object" sid="916237141408524" type="StateObj">
                                            <param id="0" name="Object">Trigger</param>
                                            <param id="1" name="Layer">2</param>
                                            <param id="2" name="Image point">0</param>
                                        </action>
                                        <action id="-9" name="Destroy" sid="494151254736776" type="StateObj" />
                                        <action id="4" name="Set animation" sid="541148621049341" type="Trigger">
                                            <param id="0" name="Animation">&quot;L8&quot;</param>
                                            <param id="1" name="From">1</param>
                                        </action>
                                        <action id="-10" name="Set value" sid="547013219860906" type="Trigger">
                                            <param id="0" name="Instance variable">gotoAngle</param>
                                            <param id="1" name="Value">348</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                        <comment>Улет на дилижабе, победа, рестарт</comment>
                        <event-block sid="322283680544115">
                            <conditions>
                                <condition id="2" name="Is playing" sid="497818422918551" type="Trigger">
                                    <param id="0" name="Animation">&quot;L8&quot;</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-3" name="Create object" sid="799287362110434" type="System">
                                    <param id="0" name="Object to create">StateObj</param>
                                    <param id="1" name="Layer">2</param>
                                    <param id="2" name="X">64</param>
                                    <param id="3" name="Y">104</param>
                                </action>
                                <action id="4" name="Set animation" sid="663266088299727" type="StateObj">
                                    <param id="0" name="Animation">&quot;A5&quot;</param>
                                    <param id="1" name="From">1</param>
                                </action>
                                <action id="-15" name="Set visible" sid="433383904777441" type="StateObj">
                                    <param id="0" name="Visibility">1</param>
                                </action>
                                <action id="-9" name="Destroy" sid="210244258648810" type="HeroAvatar" />
                                <action behavior="ScrollTo" id="1" name="Set enabled" sid="515570579337056" type="Player">
                                    <param id="0" name="State">0</param>
                                </action>
                                <action id="-9" name="Destroy" sid="504462521148147" type="Player" />
                                <action id="-16" name="Wait" sid="885464385306568" type="System">
                                    <param id="0" name="Seconds">10</param>
                                </action>
                                <action id="-26" name="Restart layout" sid="613133279650439" type="System" />
                            </actions>
                        </event-block>
                        <comment>Верхний лифт спускается до низу</comment>
                        <event-block sid="704760264061474">
                            <conditions>
                                <condition id="2" name="Is playing" sid="299682573626100" type="Trigger">
                                    <param id="0" name="Animation">&quot;L9&quot;</param>
                                </condition>
                            </conditions>
                            <actions>
                                <action id="-9" name="Destroy" sid="497974963837522" type="Trigger" />
                            </actions>
                            <sub-events>
                                <event-block sid="700674967312651">
                                    <conditions>
                                        <condition id="-14" name="Pick by unique ID" sid="253232803422623" type="MobileSolidSprite">
                                            <param id="0" name="Unique ID">16</param>
                                        </condition>
                                    </conditions>
                                    <actions>
                                        <action behavior="Sine" id="5" name="Set cycle position" sid="767954152995392" type="MobileSolidSprite">
                                            <param id="0" name="Cycle position">0</param>
                                        </action>
                                        <action behavior="Sine" id="2" name="Set magnitude" sid="943005250953091" type="MobileSolidSprite">
                                            <param id="0" name="Magnitude">39</param>
                                        </action>
                                        <action id="-2" name="Set Y" sid="610521294998069" type="MobileSolidSprite">
                                            <param id="0" name="Y">149</param>
                                        </action>
                                        <action behavior="Sine" id="1" name="Set period" sid="376560109766306" type="MobileSolidSprite">
                                            <param id="0" name="Period">10</param>
                                        </action>
                                    </actions>
                                </event-block>
                            </sub-events>
                        </event-block>
                    </sub-events>
                </event-block>
            </sub-events>
        </event-block>
    </events>
</c2eventsheet>
