<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sMonsterShell1</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>0</depth>
  <persistent>0</persistent>
  <parentName>&lt;undefined&gt;</parentName>
  <maskName>&lt;undefined&gt;</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>canbeX = 0;
makeActive();
setCollisionBounds(-20, -18, 20, 12);
image_speed = 0;
state = 0;
statetime = 0;
//hp = 5;
hp = global.mod_monstersHealth;
frozen = 0;
if (global.difficulty == 0) freezetime = 240;
if (global.difficulty == 1) freezetime = 150;
if (global.difficulty &gt; 1 || oControl.mod_monstersextreme == 1) freezetime = 120;
flashing = 0;
fxtimer = 0;
dontfollow = 0;
shell_frame = 0;
fangs_frame = 0;
fangs_frspd = 0.2;
fangs_yoff = 0;
fangs_x = x;
fangs_y = y;
body2_alpha = 0;
spark_frame = 0;
spark_alpha = 0;
eyes_scale = 1;
eyes_x = x;
eyes_y = y - 4;
iframe = 0;
i = 0;
j = 0;
targetx = x;
targety = y;
scale = 0.5;
col = 0;
startx = x;
starty = y;
safex = x;
safey = y;
alarm[0] = 1;
alarm[1] = 1;
alarm[2] = 1;
spark1 = -4;
spark2 = -4;
spark3 = -4;

//1.4.4? Movement fixes
outside = 0;

dead = false;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="2">
      <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 (state == 3) spark3 = instance_create(x, y, oMonsterSpark);
alarm[2] = 17;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" enumb="1">
      <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 (state == 3) spark2 = instance_create(x, y, oMonsterSpark);
alarm[1] = 15;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" 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>if (state == 2 || state == 3) spark1 = instance_create(x, y, oMonsterSpark);
alarm[0] = 20 + random(10);
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="2">
      <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 (instance_exists(spark1)) {
    spark1.x = x;
    spark1.y = y;
}
if (instance_exists(spark2)) {
    spark2.x = x;
    spark2.y = y;
}
if (instance_exists(spark3)) {
    spark3.x = x;
    spark3.y = y;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="3" enumb="1">
      <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_activate_region(x - 100 , y - 100, 200, 200, 1);
</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>if(global.metdead[myid] == 1 &amp;&amp; !dead){
    dead = true;
    hp = 0;
    var pickup;
    
    if (hp &lt;= 0) {
        repeat (10) {
            expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
            expl.image_speed = 0.5 + random(0.5);
            expl.additive = 0;
            expl.sprite_index = sExpl1;
            expl.direction = random(360);
            expl.speed = 2 + random(1);
        }
        repeat (20) deb = instance_create(x, y - 8, oIceShard);
        make_explosion4(x, y);
        instance_create(x, y, oScreenFlash);
        sfx_play(sndMissileExpl);
        PlaySoundMono(sndIceShatter);
        sfx_play(sndMonsterDeath);
        if (global.monstersarea &lt; 1) global.monstersarea = 1;
        if (global.monstersleft &lt; 1) global.monstersleft = 1;
        pickup = choose(0, 1);
        if (pickup == 0) {
            if (global.missiles &lt; global.maxmissiles &amp;&amp; global.maxmissiles &gt; 0) {
                repeat (3) instance_create(x + random_range(-15, 15), y + random_range(-15, 15), oMPickup);
            } else pickup = 1;
        }
        if (pickup == 1) {
            if (global.smissiles &lt; global.maxsmissiles &amp;&amp; global.maxsmissiles &gt; 0) instance_create(x, y, oSMPickup);
        }
        if (global.playerhealth &lt; global.maxhealth &amp;&amp; (oControl.mod_insanitymode == 0 || (global.difficulty &lt; 2 &amp;&amp; oControl.mod_insanitymode == 1))) {
            repeat (3) instance_create(x + random_range(-15, 15), y + random_range(-15, 15), oHPickupBig);
        }
        
        //if (room == rm_a7b08A &amp;&amp; global.metdead[52] &gt; 0 &amp;&amp; global.metdead[53] &gt; 0 &amp;&amp; global.metdead[54] &gt; 0 &amp;&amp; global.metdead[55] &gt; 0 &amp;&amp; global.metdead[56] &gt; 0 &amp;&amp; global.metdead[57] &gt; 0 &amp;&amp; global.metdead[58] &gt; 0 &amp;&amp; global.metdead[74] &gt; 0)
        
        if (room == rm_a7b08A &amp;&amp; instance_number(oMonster) == 1) //oMonster must == 1 here, since oMonster is checking for oMonsters!!!
        {
            if (global.monstersleft != 1) { global.monstersleft = 1; }
            if (global.monstersarea != 1) { global.monstersarea = 1; }
            instance_create(0,0,oBigQuakeQueen);
        }
        
        instance_destroy();
    }
}

var tgty;
if (state == 0) {
    scale = 0.5;
    image_blend = c_black;
    if (point_distance(x, y, oCharacter.x, oCharacter.y - 16) &lt; 90) {
        state = 1;
        statetime = 0;
    }
}
if (state == 1) {
    if (col &lt; 255) col += 5;
    image_blend = make_colour_rgb(col, col, col);
    if (scale &lt; 1) {
        scale += 0.01;
    } else {
        scale = 1;
        state = 2;
        statetime = 0;
    }
}
if (state == 2) {
    iframe = 0;
    if (dontfollow == 0) {
        targetx = oCharacter.x;
        if (oCharacter.mask_index == sMask1) targety = oCharacter.y - 20;
        if (oCharacter.mask_index == sMask3) targety = oCharacter.y - 15;
        if (oCharacter.mask_index == sMask4) targety = oCharacter.y - 10;
    } else {
        targetx = oCharacter.x + random_range(-80, 80);
        targety = oCharacter.y - 40 - random(60);
    }
    safex = x;
    safey = y;
    if (targety &gt; y) yVel += 0.1;
    if (targety - 24 &lt; y) yVel -= 0.1;
    if (targetx &gt; x) xVel += 0.1;
    if (targetx &lt; x) xVel -= 0.1;
    if (isCollisionRight(1) &amp;&amp; xVel &gt; 0 || isCollisionLeft(1) &amp;&amp; xVel &lt; 0) xVel = 0;
    if (isCollisionBottom(1) &amp;&amp; yVel &gt; 0 || isCollisionTop(1) &amp;&amp; yVel &lt; 0) yVel = 0;
    if (xVel &gt; 3) xVel = 3;
    if (xVel &lt; -3) xVel = -3;
    if (yVel &gt; 3) yVel = 3;
    if (yVel &lt; -3) yVel = -3;
    if (random(10) &lt; 1) {
        xVel += choose(0.2, -0.2);
        yVel += choose(0.2, -0.2);
    }
    if (collision_rectangle(x - 20, y - 18, x + 20, y + 12, oMonster, true, true)) {
        if (other.x &lt; x) {
            xVel += 0.1;
        } else xVel -= 0.1;
        if (other.y &lt; y) {
            yVel += 0.1;
        } else yVel -= 0.1;
    }
    xVel = clamp(xVel, -3, 3);
    yVel = clamp(yVel, -3, 5);
    moveTo(xVel, yVel);
} // if (state == 2)
if (state == 3) {
    if oCharacter.state == 32 tgty = oCharacter.y - oCharacter.sprite_height * 1.25  //fartmaster/King Bore
    if (oCharacter.mask_index == sMask1) tgty = oCharacter.y - 40;
    if (oCharacter.mask_index == sMask3) tgty = oCharacter.y - 32;
    if (oCharacter.mask_index == sMask4) tgty = oCharacter.y - 24;
    x = lerp(x, oCharacter.x, 0.4);
    y = lerp(y, tgty, 0.4);
    with (oCharacter) monster_drain = 2;
    xVel = 0;
    speed = 0;
    with (oMonster) if (state == 2) dontfollow = 2;
    iframe += 0.5;
    if (iframe &gt; 2) iframe = 0;
}
if (state == 4) {
    if (statetime == 0) {
        vspeed = -6;
        if (oCharacter.facing == 18) {
            hspeed = 6;
        } else hspeed = -6;
        sfx_play(sndMonsterStun);
        iframe = 0;
    }
    if (statetime &lt; 30) speed *= 0.9;
    if (statetime == 30) {
        //gravity = 0.1;
        //gravity_direction = point_direction(x, y, safex, safey);
    }
    if (isCollisionBottom(1) == 0 &amp;&amp; isCollisionTop(1) &gt; 0) {
        y += 1;
        vspeed = 0.5;
    }
    if (isCollisionBottom(1) &gt; 0 &amp;&amp; isCollisionTop(1) == 0) {
        y -= 1;
        vspeed = -0.5;
    }
    if (isCollisionRight(1) == 0 &amp;&amp; isCollisionLeft(1) &gt; 0) {
        x += 1;
        hspeed = 0.5;
    }
    if (isCollisionRight(1) &gt; 0 &amp;&amp; isCollisionLeft(1) == 0) {
        x -= 1;
        hspeed = -0.5;
    }
    if (statetime &gt; 30) {
        if (isCollisionRight(1) == 0 &amp;&amp; isCollisionLeft(1) == 0 &amp;&amp; isCollisionBottom(1) == 0 &amp;&amp; isCollisionTop(1) == 0 &amp;&amp; collision_rectangle(x - 20, y - 18, x + 20, y + 12, oSolid, true, true) == noone) {
            state = 2;
            statetime = -1;
            //gravity = 0;
            //speed = 0;
        }
    }
    if (speed &gt; 3) speed = 3;
} // if (state == 4)
if (state == 5) {
    if (statetime == 0) {
        iframe = 0;
        speed = 0;
        //gravity = 0.1;
        //gravity_direction = point_direction(x, y, safex, safey);
    }
    if (speed &gt; 3) speed = 3;
    if (isCollisionBottom(1) == 0) {
        yVel += 0.1;
        if (yVel &gt; 5) yVel = 5;
    } else {
        xVel *= 0.8;
        yVel = 0;
    }
    if (isCollisionRight(1) &gt; 0 || isCollisionLeft(1) &gt; 0) xVel = 0;
    if (isCollisionBottom(0) == 0 &amp;&amp; isCollisionTop(1) &gt; 0) {
        y += 1;
        vspeed = 0.5;
    }
    if (isCollisionBottom(0) &gt; 0 &amp;&amp; isCollisionTop(1) == 0) {
        y -= 1;
        vspeed = -0.5;
    }
    if (isCollisionRight(1) == 0 &amp;&amp; isCollisionLeft(1) &gt; 0) {
        x += 1;
        hspeed = 0.5;
    }
    if (isCollisionRight(1) &gt; 0 &amp;&amp; isCollisionLeft(1) == 0) {
        x -= 1;
        hspeed = -0.5;
    }
    if (isCollisionRight(1) == 0 &amp;&amp; isCollisionLeft(1) == 0 &amp;&amp; isCollisionBottom(0) == 0 &amp;&amp; isCollisionTop(1) == 0 &amp;&amp; collision_rectangle(x - 20, y - 18, x + 20, y + 12, oSolid, true, true) == noone) {
        gravity = 0;
        speed = 0;
    }
    if (statetime &gt; freezetime) {
        state = 2;
        statetime = -1;
    }
    xVel = clamp(xVel, -3, 3);
    yVel = clamp(yVel, -3, 5);
    moveTo(xVel, yVel);
} // if (state == 5)
shell_frame = !shell_frame;
if (state != 5) fangs_frame = anim_frame_cycle(sMonsterFangs, fangs_frame, fangs_frspd);
if (state != 5) i += 0.02;
if (i &gt; 99999999) i = 0;
j = sin(i) * 0.1;
eyes_scale = (0.9 + j) * scale;
fangs_x = x + lengthdir_x(fangs_yoff * scale, image_angle + 270);
fangs_y = y + lengthdir_y(fangs_yoff * scale, image_angle + 270);
eyes_x = x + lengthdir_x(4 * scale, image_angle + 90);
eyes_y = y + lengthdir_y(4 * scale, image_angle + 90);
//image_angle = xVel * hspeed * -2;
statetime += 1;
if (flashing &gt; 0) flashing -= 1;
if (fxtimer &lt; 5) {
    fxtimer += 1;
} else fxtimer = 0;
if (dontfollow &gt; 0) dontfollow -= 1;

//1.4.4? Movement fixes
if(collision_point(x, y, oGotoRoom, false, true) &amp;&amp; outside == 0) {
    var door = instance_nearest(x, y, oDoor);
    if(door.open == 0) {
        outside = 1;
        hp = 0;
        event_user(0);
    }
}

if(collision_point(x, y, oDoor, false, true) &amp;&amp; outside == 0) {
    x = xprevious;
    y = yprevious;
    speed = -speed * .5;
    xVel = -xVel * .5;
    if(state == 3) 
    {
        state = 2;
        statetime = 0;
    }
}

if(collision_point(x, y, oSolid, false, true)) {
    if(x &gt; room_width/2) x --;
    else x ++;
    if(y &gt; room_height/2) y--;
    else y ++;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMMoverAccelH">
      <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 (state == 2) xVel *= 1.1;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMMoverDown">
      <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 (state == 2) yVel += -0.2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMMoverUp">
      <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 (state == 2) yVel += -0.2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMMoverRight">
      <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 (state == 2) xVel += 0.2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMMoverLeft">
      <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 (state == 2) xVel += -0.2;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oMissile">
      <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>//damagemissiles  = 1;
damagemissiles = global.mod_monstersDmissiles;
//damagesupermissiles = 5;
damagesupermissiles = global.mod_monstersDsuper;

if (state &gt;= 2) {
    if (state != 5) {
        with (other) event_user(1);
    } else {
        with (other) event_user(0);
        if (other.smissile == 1) {
            hp -= damagesupermissiles;
        } else hp -= damagemissiles;
        event_user(0);
    }
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oBeam">
      <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 (state &gt;= 2) {
    if (other.ibeam) {
        state = 5;
        statetime = 0;
        PlaySoundMono(sndFreezeHit);
        with (other) {
            event_user(0);
            instance_destroy();
        }
    } else with (other) {
        event_user(1);
        instance_destroy();
    }
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oBombExpl">
      <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 (state == 3) {
    state = 4;
    statetime = 0;
}
if (state == 2) {
    yVel = -4;
    xVel *= 0.5;
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="4" ename="oCharacter">
      <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(collision_point(x, y, oDoor, false, true)) exit;
if (state == 2 &amp;&amp; dontfollow == 0 &amp;&amp; oCharacter.monster_drain == 0) {
    if (room != rm_a7b05 || oCharacter.x &gt; 144 || oCharacter.y &gt; 80) {
        state = 3;
        statetime = 0;
        with (oCharacter) monster_drain = 1;
    }
}
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" enumb="10">
      <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 pickup;
if (hp &lt;= 0) {
    repeat (10) {
        expl = instance_create(x - 16 + random(32), y - 16 + random(32), oFXAnimSpark);
        expl.image_speed = 0.5 + random(0.5);
        expl.additive = 0;
        expl.sprite_index = sExpl1;
        expl.direction = random(360);
        expl.speed = 2 + random(1);
    }
    repeat (20) deb = instance_create(x, y - 8, oIceShard);
    make_explosion4(x, y);
    instance_create(x, y, oScreenFlash);
    sfx_play(sndMissileExpl);
    PlaySoundMono(sndIceShatter);
    sfx_play(sndMonsterDeath);
    global.monstersleft -= 1;
    global.monstersarea -= 1;
    if (global.monstersarea &lt; 1) global.monstersarea = 1;
    if (global.monstersleft &lt; 1) global.monstersleft = 1;
    global.metdead[myid] = 1;
    with (oMonsterDoorControl) alarm[1] = 1;
    pickup = choose(0, 1);
    if (pickup == 0) {
        if (global.missiles &lt; global.maxmissiles &amp;&amp; global.maxmissiles &gt; 0) {
            repeat (3) instance_create(x + random_range(-15, 15), y + random_range(-15, 15), oMPickup);
        } else pickup = 1;
    }
    if (pickup == 1) {
        if (global.smissiles &lt; global.maxsmissiles &amp;&amp; global.maxsmissiles &gt; 0) instance_create(x, y, oSMPickup);
    }
    if (global.playerhealth &lt; global.maxhealth &amp;&amp; (oControl.mod_insanitymode == 0 || (global.difficulty &lt; 2 &amp;&amp; oControl.mod_insanitymode == 1))) {
        repeat (3) instance_create(x + random_range(-15, 15), y + random_range(-15, 15), oHPickupBig);
    }
    
    //if (room == rm_a7b08A &amp;&amp; global.metdead[52] &gt; 0 &amp;&amp; global.metdead[53] &gt; 0 &amp;&amp; global.metdead[54] &gt; 0 &amp;&amp; global.metdead[55] &gt; 0 &amp;&amp; global.metdead[56] &gt; 0 &amp;&amp; global.metdead[57] &gt; 0 &amp;&amp; global.metdead[58] &gt; 0 &amp;&amp; global.metdead[74] &gt; 0)
    
    if (room == rm_a7b08A &amp;&amp; instance_number(oMonster) == 1) //oMonster must == 1 here, since oMonster is checking for oMonsters!!!
    {
        if (global.monstersleft != 1) { global.monstersleft = 1; }
        if (global.monstersarea != 1) { global.monstersarea = 1; }
        instance_create(0,0,oBigQuakeQueen);
    }
    
    
    instance_destroy();
} else {
    flashing = 20;
    sfx_play(sndMonsterHit);
} // if (hp &lt;= 0) else
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="7" 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>hp = 0;
event_user(0);
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="8" 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>if (state &lt; 5) {
    draw_sprite_ext(sMonsterFangs, fangs_frame, fangs_x, fangs_y, scale, scale, image_angle, image_blend, image_alpha);
    draw_sprite_ext(sMonsterInside, iframe, x, y, scale, scale, image_angle, image_blend, image_alpha);
    draw_sprite_ext(sMonsterEyes, iframe, x, y - 4, eyes_scale, eyes_scale, image_angle, image_blend, image_alpha);
    draw_set_blend_mode(bm_add);
    draw_sprite_ext(sMonsterShell2, -1, x, y, scale, scale, image_angle, image_blend, image_alpha * 0.5);
    draw_set_blend_mode(bm_normal);
    draw_sprite_ext(sMonsterShell1, shell_frame, x, y, scale, scale, image_angle, image_blend, image_alpha);
} else {
    if (!flashing) {
        draw_sprite_ext(sMonsterFangsFrozen, fangs_frame, fangs_x, fangs_y, scale, scale, image_angle, image_blend, image_alpha);
        draw_sprite_ext(sMonsterInsideFrozen, -1, x, y, scale, scale, image_angle, image_blend, image_alpha);
        draw_sprite_ext(sMonsterEyesFrozen, -1, x, y - 4, eyes_scale, eyes_scale, image_angle, image_blend, image_alpha);
        draw_sprite_ext(sMonsterShell1Frozen, shell_frame, x, y, scale, scale, image_angle, image_blend, image_alpha);
    } else {
        draw_sprite_ext(sMonsterFangsFrozen, fangs_frame, fangs_x, fangs_y, scale, scale, image_angle, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
        draw_sprite_ext(sMonsterInsideFrozen, -1, x, y, scale, scale, image_angle, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
        draw_sprite_ext(sMonsterEyesFrozen, -1, x, y - 4, eyes_scale, eyes_scale, image_angle, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
        draw_sprite_ext(sMonsterShell1Frozen, shell_frame, x, y, scale, scale, image_angle, make_color_rgb(255 - fxtimer * 63, 255 - fxtimer * 63, 255 - fxtimer * 63), 1);
        draw_set_blend_mode(bm_add);
        repeat (2) {
            draw_sprite_ext(sMonsterFangsFrozen, fangs_frame, fangs_x, fangs_y, scale, scale, image_angle, -1, 1 - fxtimer * 0.25);
            draw_sprite_ext(sMonsterInsideFrozen, -1, x, y, scale, scale, image_angle, -1, 1 - fxtimer * 0.25);
            draw_sprite_ext(sMonsterEyesFrozen, -1, x, y - 4, eyes_scale, eyes_scale, image_angle, -1, 1 - fxtimer * 0.25);
            draw_sprite_ext(sMonsterShell1Frozen, shell_frame, x, y, scale, scale, image_angle, -1, 1 - fxtimer * 0.25);
        }
        draw_set_blend_mode(bm_normal);
    }
    if (state == 5 &amp;&amp; statetime &gt; freezetime - 30) {
        draw_sprite_ext(sMonsterFangs, fangs_frame, fangs_x, fangs_y, scale, scale, image_angle, -1, 1 - fxtimer * 0.3);
        draw_sprite_ext(sMonsterInside, -1, x, y, scale, scale, image_angle, -1, 1 - fxtimer * 0.3);
        draw_sprite_ext(sMonsterEyes, -1, x, y - 4, eyes_scale, eyes_scale, image_angle, -1, 1 - fxtimer * 0.3);
        draw_sprite_ext(sMonsterShell1, shell_frame, x, y, scale, scale, image_angle, -1, 1 - fxtimer * 0.3);
    }
} // if (state &lt; 5) else
</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/>
</object>
