<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>spr_Player_Down_Unarmed</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>0</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>spr_Player_Left</maskName>
  <events>
    <event eventtype="0" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>instance_create(obj_Player.x,obj_Player.y,obj_Light);
instance_create(obj_Player.x,obj_Player.y,obj_Round);

hole = 2;

sprite[0,0] = spr_Player_Up_Left;
sprite[0,1] = spr_Player_Left;
sprite[0,2] = spr_Player_Down_Left;
sprite[1,0] = spr_Player_Up;
sprite[1,2] = spr_Player_Down;
sprite[2,0] = spr_Player_Up_Right;
sprite[2,1] = spr_Player_Right;
sprite[2,2] = spr_Player_Down_Right;

sprite_shovel[0,0] = spr_Player_Up_Left_Shovel;
sprite_shovel[0,1] = spr_Player_Left_Shovel;
sprite_shovel[0,2] = spr_Player_Down_Left_Shovel;
sprite_shovel[1,0] = spr_Player_Up_Shovel;
sprite_shovel[1,2] = spr_Player_Down_Shovel;
sprite_shovel[2,0] = spr_Player_Up_Right_Shovel;
sprite_shovel[2,1] = spr_Player_Right_Shovel;
sprite_shovel[2,2] = spr_Player_Down_Right_Shovel;

sprite_torch[0,0] = spr_Player_Up_Left_Torch;
sprite_torch[0,1] = spr_Player_Left_Torch;
sprite_torch[0,2] = spr_Player_Down_Left_Torch;
sprite_torch[1,0] = spr_Player_Up_Torch;
sprite_torch[1,2] = spr_Player_Down_Torch;
sprite_torch[2,0] = spr_Player_Up_Right_Torch;
sprite_torch[2,1] = spr_Player_Right_Torch;
sprite_torch[2,2] = spr_Player_Down_Right_Torch;

sprite_unarmed[0,0] = spr_Player_Up_Left_Unarmed;
sprite_unarmed[0,1] = spr_Player_Left_Unarmed;
sprite_unarmed[0,2] = spr_Player_Down_Left_Unarmed;
sprite_unarmed[1,0] = spr_Player_Up_Unarmed;
sprite_unarmed[1,2] = spr_Player_Down_Unarmed;
sprite_unarmed[2,0] = spr_Player_Up_Right_Unarmed;
sprite_unarmed[2,1] = spr_Player_Right_Unarmed;
sprite_unarmed[2,2] = spr_Player_Down_Right_Unarmed;


image_speed = 0.23;

cooldown = 0;
cooldown_add = 10;
cooldown2= 0;
cooldown2_add = 200;
hp = 100;
touch = 0;
trap =0;
if(global.number = -1)
{
pick = -1;
}
else
{
pick = 0;
}
if(global.number = -1)
{
inv=3;
}
else
{
inv=2;
}
if(global.level=1)
{
global.number = 0;
}
else
{
if(global.level=2)
{
global.number=1;
}
else
if global.level&gt;2
global.number=2;
}
if ( audio_is_playing(snd_menu))
{
audio_stop_sound(snd_menu)
audio_play_sound(snd_game,1000,true)
}


</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="0">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>var xDirection, yDirection;

xDirection = keyboard_check(ord('D')) - keyboard_check(ord('A'));
yDirection = keyboard_check(ord('S')) - keyboard_check(ord('W'));
if pick =1
{
if (xDirection != 0 || yDirection != 0) 
{
if !audio_is_playing(snd_footsteps)
{
audio_play_sound(snd_footsteps,100,true)
}
    
    sprite_index = sprite[xDirection + 1, yDirection + 1];
   
    image_speed = 0.23;
    
} else {
if audio_is_playing(snd_footsteps)
{
audio_stop_sound(snd_footsteps)
}
   
    image_index = 0;

    image_speed = 0;
}}

x += xDirection * 3;
y += yDirection * 3;


cooldown = max(0,cooldown-1);

if instance_exists(obj_Skeleton)
{
    if distance_to_object (obj_Skeleton) &lt; 70 &amp;&amp; cooldown = 0
    {
         cooldown = cooldown_add;
         instance_create(obj_Player.x,obj_Player.y,obj_Soul); 
         hp = hp - 5;
         pula = pula-1;
    }

}
if pick = 0
{
if (xDirection != 0 || yDirection != 0) 
{
if !audio_is_playing(snd_footsteps)
{
audio_play_sound(snd_footsteps,100,true)
}

    
    sprite_index = sprite_shovel[xDirection + 1, yDirection + 1];
   
    image_speed = 0.23;
    
} else {
if audio_is_playing(snd_footsteps)
{
audio_stop_sound(snd_footsteps)
}
   
    image_index = 0;

    image_speed = 0;
}}
cooldown2 = max(0,cooldown2-1);
if pula&lt;19 &amp;&amp;  cooldown2 = 0
    {
         cooldown2 = cooldown2_add;
         pula=pula+1;
         hp=hp+5;
    }

if pula &lt; 0
{
audio_stop_all()
room_restart()
}
if pick = 2
{
if (xDirection != 0 || yDirection != 0) 
{
if !audio_is_playing(snd_footsteps)
{
audio_play_sound(snd_footsteps,100,true)
}
    
    sprite_index = sprite_torch[xDirection + 1, yDirection + 1];
   
    image_speed = 0.23;
    
} else {
   if audio_is_playing(snd_footsteps)
{
audio_stop_sound(snd_footsteps)
}
    image_index = 0;

    image_speed = 0;
}}
if pick = -1
{
if (xDirection != 0 || yDirection != 0) 
{
if !audio_is_playing(snd_footsteps)
{
audio_play_sound(snd_footsteps,100,true)
}
    
    sprite_index = sprite_unarmed[xDirection + 1, yDirection + 1];
    
   
    image_speed = 0.23;
    
} else {
if audio_is_playing(snd_footsteps)
{
audio_stop_sound(snd_footsteps)
}
   
    image_index = 0;

    image_speed = 0;
}}


</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="obj_Portal">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>room_goto(Secret)
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="obj_Finish">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>global.level = global.level+1
room_goto_next()
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="obj_Wall_Crack">
      <action>
        <libid>1</libid>
        <id>101</id>
        <kind>0</kind>
        <userelative>-1</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>1</exetype>
        <functionname>action_move</functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>000010000</string>
          </argument>
          <argument>
            <kind>0</kind>
            <string>0</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="obj_Wall">
      <action>
        <libid>1</libid>
        <id>101</id>
        <kind>0</kind>
        <userelative>-1</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>1</exetype>
        <functionname>action_move</functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>000010000</string>
          </argument>
          <argument>
            <kind>0</kind>
            <string>0</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="5" enumb="27">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>global.number=-1
pick = -1;
inv = 3;
audio_stop_all()
room_goto(Main_Menu)
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="9" enumb="81">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if pick &gt;0
{
pick = pick-1;
inv=inv+1;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="9" enumb="69">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if pick &lt; global.number
{
pick = pick +1;
inv=inv-1;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="9" enumb="32">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if pick = 0
{
if ( hole &gt; 0)
{
if !instance_exists(obj_Skeleton_Hole)
{
instance_create(obj_Player.x,obj_Player.y,obj_Hole)
hole = hole -1;
 audio_play_sound(snd_digging,100,false)
 }
}
}
if pick =1
{
if distance_to_object(obj_Wall_Crack) &lt; 10
{
with instance_nearest(x+64,y+64,obj_Wall_Crack)
{instance_destroy()
audio_play_sound(snd_WallDestroy,100,false)
}
} 
}
if ( !trap )
{exit}
else
if pick =0
{
{
if distance_to_object (obj_Skeleton_Hole) &lt; 10
{

with instance_nearest(obj_Player.x,obj_Player.y,obj_Skeleton_Hole)
{
instance_destroy()
}
}
}
}
if pick = 2
{
if distance_to_object (obj_Bat)&lt;10
{
with instance_nearest(obj_Player.x,obj_Player.y,obj_Bat)
{
instance_destroy()
}
}

}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="9" enumb="18">
      <action>
        <libid>1</libid>
        <id>603</id>
        <kind>7</kind>
        <userelative>0</userelative>
        <isquestion>0</isquestion>
        <useapplyto>-1</useapplyto>
        <exetype>2</exetype>
        <functionname></functionname>
        <codestring></codestring>
        <whoName>self</whoName>
        <relative>0</relative>
        <isnot>0</isnot>
        <arguments>
          <argument>
            <kind>1</kind>
            <string>if distance_to_object(obj_Chest) &lt; 50
{
    with instance_nearest(obj_Player.x,obj_Player.y,obj_Chest)
    {
      global.number =global.number +1;
      if obj_Player.inv=3
      {
      obj_Player.pick = obj_Player.pick + 1;
      obj_Player.inv=2;
      }
      
        instance_destroy();
    }
    with instance_nearest(obj_Player.x,obj_Player.y,obj_Bone)
    {
        instance_create(obj_Bone.x,obj_Bone.y,obj_Skeleton)
        
    }
        
    with instance_nearest(obj_Player.x,obj_Player.y,obj_Bone)
    {
        instance_destroy();
    }        
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
  </events>
  <PhysicsObject>0</PhysicsObject>
  <PhysicsObjectSensor>0</PhysicsObjectSensor>
  <PhysicsObjectShape>0</PhysicsObjectShape>
  <PhysicsObjectDensity>0.5</PhysicsObjectDensity>
  <PhysicsObjectRestitution>0.100000001490116</PhysicsObjectRestitution>
  <PhysicsObjectGroup>0</PhysicsObjectGroup>
  <PhysicsObjectLinearDamping>0.100000001490116</PhysicsObjectLinearDamping>
  <PhysicsObjectAngularDamping>0.100000001490116</PhysicsObjectAngularDamping>
  <PhysicsObjectFriction>0.200000002980232</PhysicsObjectFriction>
  <PhysicsObjectAwake>-1</PhysicsObjectAwake>
  <PhysicsObjectKinematic>0</PhysicsObjectKinematic>
  <PhysicsShapePoints>
    <point>0,0</point>
    <point>70,70</point>
  </PhysicsShapePoints>
</object>
