<!--This Document is generated by GameMaker, if you edit it by hand then you do so at your own risk!-->
<object>
  <spriteName>sTesterBody</spriteName>
  <solid>0</solid>
  <visible>-1</visible>
  <depth>1</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;
wall_u = 90;
wall_l = 90;
wall_r = 230;
wall_d = 870;
next_attack = 0;
image_angle = 0;
target_angle = 0;
rot_speed = 0;
cam = instance_create(x, y, oObjectCamera);
cam.target_obj = id;
s1 = instance_create(x, y, oTesterShield);
s2 = instance_create(x, y, oTesterShield);
s3 = instance_create(x, y, oTesterShield);
s4 = instance_create(x, y, oTesterShield);
soffset = 0;
target_soff = 0;
soffmax = 24;
sangle = 0;
starget_angle = 0;
srot_speed = 5;
sangle_timer = 0;
shuriken = 0;
enableforcefield = 0;
change_time = 300;
flashing = 0;
attacks = 0;
s1.image_angle = image_angle;
s2.image_angle = image_angle + 90;
s3.image_angle = image_angle + 180;
s4.image_angle = image_angle + 270;
c1 = instance_create(x, y, oTesterCannon);
c2 = instance_create(x, y, oTesterCannon);
c3 = instance_create(x, y, oTesterCannon);
c4 = instance_create(x, y, oTesterCannon);
coffset = 0;
target_coff = 0;
coffmax = 54;
c1.image_angle = image_angle;
c2.image_angle = image_angle + 90;
c3.image_angle = image_angle + 180;
c4.image_angle = image_angle + 270;
eye = instance_create(x, y, oTesterEye);
glass = instance_create(x, y, oTesterGlass);
state = 0;
statetime = 0;
targetx = x;
targety = y;
movetotarget = 1;
movespeed = 1;
directrotate = 0;
aim_x = 0;
aim_y = 0;

dead = false;
</string>
          </argument>
        </arguments>
      </action>
    </event>
    <event eventtype="2" 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>expl = instance_create(x + random_range(-45, 45), y + random_range(-45, 45), oFXAnimSpark);
expl.image_speed = 0.5;
expl.additive = 0;
expl.sprite_index = sExpl1;
alarm[10] = 2;
</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>sfx_play(sndFireBeamCI);
</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>sfx_play(sndFireball);
</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>sfx_play(sndAutrackFire);
</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(s1)) {
    s1.image_angle = image_angle + sangle;
    s1.x = x + lengthdir_x(soffset, image_angle + sangle + 45 + shuriken * 90);
    s1.y = y + lengthdir_y(soffset, image_angle + sangle + 45 + shuriken * 90);
}
if (instance_exists(s2)) {
    s2.image_angle = image_angle + sangle + 90;
    s2.x = x + lengthdir_x(soffset, image_angle + sangle + 135 + shuriken * 90);
    s2.y = y + lengthdir_y(soffset, image_angle + sangle + 135 + shuriken * 90);
}
if (instance_exists(s3)) {
    s3.image_angle = image_angle + sangle + 180;
    s3.x = x + lengthdir_x(soffset, image_angle + sangle + 225 + shuriken * 90);
    s3.y = y + lengthdir_y(soffset, image_angle + sangle + 225 + shuriken * 90);
}
if (instance_exists(s4)) {
    s4.image_angle = image_angle + sangle + 270;
    s4.x = x + lengthdir_x(soffset, image_angle + sangle + 315 + shuriken * 90);
    s4.y = y + lengthdir_y(soffset, image_angle + sangle + 315 + shuriken * 90);
}
if (instance_exists(c1)) {
    c1.image_angle = image_angle;
    c1.x = x + lengthdir_x(coffset, image_angle);
    c1.y = y + lengthdir_y(coffset, image_angle);
}
if (instance_exists(c2)) {
    c2.image_angle = image_angle + 90;
    c2.x = x + lengthdir_x(coffset, image_angle + 90);
    c2.y = y + lengthdir_y(coffset, image_angle + 90);
}
if (instance_exists(c3)) {
    c3.image_angle = image_angle + 180;
    c3.x = x + lengthdir_x(coffset, image_angle + 180);
    c3.y = y + lengthdir_y(coffset, image_angle + 180);
}
if (instance_exists(c4)) {
    c4.image_angle = image_angle + 270;
    c4.x = x + lengthdir_x(coffset, image_angle + 270);
    c4.y = y + lengthdir_y(coffset, image_angle + 270);
}
if (instance_exists(eye)) {
    eye.x = x;
    eye.y = y;
}
if (instance_exists(glass)) {
    glass.x = x;
    glass.y = y;
    glass.image_angle = image_angle;
}
</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 (eye.myhealth &lt; 0) { state = 100 }

aim_x = oCharacter.x;
aim_y = oCharacter.y;
if (state == 0) {
    if (statetime == 60) {
        with (oA4TileLight1) color = 1;
        sfx_play(sndTesterStartup);
    }
    if (statetime &gt; 60) {
        if (eye.shutter_frame &lt; 4) eye.shutter_frame += 0.25;
    }
    if (statetime == 120) {
        enableforcefield = 1;
        glass.enabled = 1;
        sfx_play(sndTesterBarrierUp);
    }
    if (statetime == 150) {
        if(file_exists("musTester.ogg")) {
            mus_play(musTester);
            oMusicV2.bossbgm = musTester;
        }
        else {
            mus_play(musAncientGuardian);
            oMusicV2.bossbgm = musAncientGuardian;
        }
    }
    if (statetime == 240) {
        state = 1;
        statetime = 0;
        eye.canbehit = 1;
        scan_log(35, get_text("ScanEvents", "ScanMechanism"), 180, 0);
    }
}
if (state == 1) {
    if (statetime == 0) {
        x = round(x);
        y = round(y);
        targetx = 160;
        if (y &gt;= 480) {
            targety = 100;
        } else targety = 860;
        target_soff = 0;
        target_coff = 0;
        target_angle = 0;
        rot_speed = 5;
        sangle_timer = 60;
        if (instance_number(oTesterShield) == 4) change_time = 360;
        if (instance_number(oTesterShield) == 3) change_time = 300;
        if (instance_number(oTesterShield) == 2) change_time = 240;
        if (instance_number(oTesterShield) == 1) change_time = 180;
        if (instance_number(oTesterShield) == 0) change_time = 120;
    }
    if (y &lt;= 120) targety = 860;
    if (y &gt;= 840) targety = 100;
    if (instance_number(oTesterShield) == 4) movespeed = 1;
    if (instance_number(oTesterShield) == 3) movespeed = 1.5;
    if (instance_number(oTesterShield) == 2) movespeed = 2;
    if (instance_number(oTesterShield) == 1) movespeed = 2.5;
    if (instance_number(oTesterShield) == 0) movespeed = 3;
    if (point_distance(x, y, oCharacter.x, oCharacter.y) &gt; 220) movespeed = 1;
    if (statetime &gt; 60 &amp;&amp; statetime &lt; 260) {
        if (sangle_timer &gt; 0) {
            sangle_timer -= 1;
        } else {
            starget_angle = floor(random_range(0, 3.9)) * 90;
            sangle_timer = 120;
            sfx_play(sndTesterRotate);
        }
    }
    if (statetime &gt;= change_time) {
        if (attacks == 0) {
            if (instance_number(oTesterShield) == 4) {
                next_attack = 7;
            } else next_attack = 2;
        }
        if (attacks == 1 || attacks == 3) next_attack = choose(3, 4, 5, 6);
        if (attacks == 2) next_attack = 2;
        attacks += 1;
        if (attacks &gt; 3) attacks = 0;
        state = next_attack;
        statetime = 0;
    }
} // if (state == 1)
if (state == 2) {
    if (statetime == 0) {
        targetx = 160;
        targety = y;
        movespeed = 0;
        target_soff = soffmax;
        target_coff = coffmax;
        rot_speed = 5;
        with (oTesterCannon) {
            type = 0;
            event_user(2);
        }
        sfx_play(sndTesterCannonArm);
    }
    if (statetime == 50) with (oTesterCannon) open = 1;
    if (statetime == 60) target_angle = 45;
    if (statetime == 70) with (oTesterCannon) event_user(0);
    if (statetime == 90) target_angle = 90;
    if (statetime == 100) with (oTesterCannon) event_user(0);
    if (statetime == 110) target_angle = 45;
    if (statetime == 120) with (oTesterCannon) event_user(0);
    if (statetime == 130) with (oTesterCannon) open = 0;
    if (statetime == 200) {
        state = 1;
        statetime = -1;
    }
} // if (state == 2)
if (state == 3) {
    if (statetime == 0) {
        targetx = 100;
        targety = 120;
        movespeed = 5;
        target_soff = soffmax;
        target_coff = coffmax;
        target_angle = 180;
        rot_speed = 5;
        with (oTesterCannon) {
            type = 1;
            event_user(2);
        }
        sfx_play(sndTesterCannonArm);
    }
    if (statetime == 100) with (oTesterCannon) open = 1;
    if (statetime == 130) with (oTesterCannon) event_user(0);
    if (statetime == 190) {
        targetx = 125;
        targety = 300;
        target_angle = 270;
    }
    if (statetime == 250) with (oTesterCannon) event_user(0);
    if (statetime == 280) {
        targetx = 160;
        targety = 480;
        target_angle = 180;
    }
    if (statetime == 340) with (oTesterCannon) event_user(0);
    if (statetime == 370) {
        targetx = 195;
        targety = 660;
        target_angle = 90;
    }
    if (statetime == 430) with (oTesterCannon) event_user(0);
    if (statetime == 460) {
        targetx = 220;
        targety = 840;
        target_angle = 0;
    }
    if (statetime == 520) with (oTesterCannon) event_user(0);
    if (statetime == 550) with (oTesterCannon) open = 0;
    if (statetime == 610) {
        state = 1;
        statetime = -1;
    }
} // if (state == 3)
if (state == 4) {
    if (statetime == 0) {
        targetx = 160;
        targety = 480;
        movespeed = 5;
        target_soff = soffmax;
        target_coff = coffmax;
        target_angle = 45;
        rot_speed = 5;
        with (oTesterCannon) {
            type = 2;
            event_user(2);
        }
        sfx_play(sndTesterCannonArm);
    }
    if (statetime == 60) with (oTesterCannon) open = 1;
    if (statetime == 100) with (oTesterCannon) event_user(0);
    if (statetime == 400) with (oTesterCannon) open = 0;
    if (statetime == 460) {
        state = 1;
        statetime = -1;
    }
}
if (state == 5) {
    if (statetime == 0) {
        targetx = 160;
        targety = y;
        movespeed = 0;
        target_soff = soffmax;
        target_coff = coffmax;
        target_angle = 0;
        rot_speed = 5;
        with (oTesterCannon) {
            type = 3;
            event_user(2);
        }
        sfx_play(sndTesterCannonArm);
    }
    if (statetime == 50) with (oTesterCannon) open = 1;
    if (statetime == 100) with (oTesterCannon) event_user(0);
    if (statetime == 130) {
        target_angle = -45;
        rot_speed = 0.5;
    }
    if (statetime == 210) {
        target_angle = 45;
        rot_speed = 0.5;
    }
    if (statetime == 390) with (oTesterCannon) open = 0;
    if (statetime == 450) {
        state = 1;
        statetime = -1;
    }
} // if (state == 5)
if (state == 6) {
    if (statetime == 0) {
        targetx = 160;
        targety = y;
        if (y &gt; 736) targety = 736;
        if (y &lt; 224) targety = 224;
        movespeed = 4;
        target_soff = soffmax;
        target_coff = coffmax;
        target_angle = 0;
        rot_speed = 5;
        with (oTesterCannon) {
            type = 4;
            event_user(2);
        }
        sfx_play(sndTesterCannonArm);
    }
    if (statetime == 50) with (oTesterCannon) open = 1;
    if (statetime == 100) {
        with (oTesterCannon) event_user(0);
        sfx_loop(sndTesterPlasmaLoop);
    }
    if (statetime == 130) {
        target_angle = 360;
        rot_speed = 0.5;
    }
    if (statetime == 850) {
        with (oTesterPlasmaBeam) fadeout = 1;
        sfx_stop(sndTesterPlasmaLoop);
    }
    if (statetime == 870) with (oTesterCannon) open = 0;
    if (instance_number(oTesterPlasmaBeam) == 0 &amp;&amp; sfx_isplaying(sndTesterPlasmaLoop)) sfx_stop(sndTesterPlasmaLoop);
    if (statetime == 930) {
        state = 1;
        statetime = -1;
        image_angle = 0;
        target_angle = 0;
    }
} // if (state == 6)
if (state == 7) {
    if (statetime == 0) {
        movetotarget = 0;
        target_soff = 35;
        shuriken = 1;
        target_angle = 0;
        rot_speed = 0;
        sfx_play(sndTesterRotate);
    }
    if (statetime == 50) {
        directrotate = 1;
        sfx_loop(sndTesterMeleeLoop);
    }
    if (statetime == 100) {
        direction = point_direction(x, y, aim_x, aim_y);
        speed = 4;
    }
    if (x &gt; wall_r &amp;&amp; hspeed &gt; 0) hspeed *= -1;
    if (x &lt; wall_l &amp;&amp; hspeed &lt; 0) hspeed *= -1;
    if (y &gt; wall_d &amp;&amp; vspeed &gt; 0) vspeed *= -1;
    if (y &lt; wall_u &amp;&amp; vspeed &lt; 0) vspeed *= -1;
    if (statetime == 600) {
        speed = 0;
        target_soff = 0;
        directrotate = 0;
        sfx_stop(sndTesterMeleeLoop);
    }
    if (statetime == 660) {
        state = 1;
        statetime = -1;
        image_angle = 0;
        target_angle = 0;
        shuriken = 0;
        movetotarget = 1;
        targetx = 160;
        targety = 480;
    }
} // if (state == 7)
if (state == 100) {
    if (statetime == 0) {
        movespeed = 0;
        movetotarget = 0;
        directrotate = 0;
        rot_speed = 0;
        speed = 0;
        sfx_stop(sndTesterMeleeLoop);
        with (oTesterCannon) open = 0;
        with (oTesterPlasmaBeam) fadeout = 1;
        with (oTesterGlass) instance_destroy();
        with (oTesterMissile) event_user(0);
        with (oTesterSpazerBeam) event_user(0);
        with (oTesterIceBeam) event_user(0);
        with (oTesterWaveBeam) event_user(0);
        with (oA4TileLight1) color = 0;
        with (cam) instance_destroy();
        sfx_stop(sndTesterPlasmaLoop);
        sfx_play(sndTesterDeath);
        mus_fadeout(musTester);
        mus_fadeout(musAncientGuardian);
        oMusicV2.bossbgm = sndJump;
    }
    if (statetime == 200) {
        sfx_stop(sndTesterMeleeLoop);
        repeat (20) {
            expl = instance_create(x + random_range(-45, 45), y + random_range(-45, 45), oFXAnimSpark);
            expl.image_speed = 0.3 + random(0.5);
            expl.additive = 0;
            expl.sprite_index = sExpl1Big;
        }
        make_explosion3(x, y - 40);
        repeat (20) instance_create(x, y - 50, oDebris);
        repeat (30) instance_create(x, y - 50, oMetalDebrisBig);
        instance_create(x, y, oScreenFlash);
        sfx_play(sndRobotExpl);
        sfx_play(sndMissileExpl);
        spawn_many_powerups(x - 64, y - 64, 128, 128);
        with (oDoor) event_user(3);
        with (oTesterCannon) instance_destroy();
        with (oTesterShield) instance_destroy();
        with (oTesterEye) instance_destroy();
        
        global.event[200] = 2;
        mus_current_fadein();
        instance_destroy();
    }
} // if (state == 100)
if (movetotarget) {
    if (x &lt; targetx) x += 1;
    if (x &gt; targetx) x -= 1;
    if (y &lt; targety) y += movespeed;
    if (y &gt; targety) y -= movespeed;
}
if (soffset &lt; target_soff) soffset += 1;
if (soffset &gt; target_soff) soffset -= 1;
if (coffset &lt; target_coff) coffset += 2;
if (coffset &gt; target_coff) coffset -= 2;
if (image_angle &gt; target_angle) image_angle -= rot_speed;
if (image_angle &lt; target_angle) image_angle += rot_speed;
if (directrotate) {
    sangle -= 20;
    if (sangle &lt; 0) sangle += 360;
} else {
    if (sangle &gt; starget_angle) sangle -= srot_speed;
    if (sangle &lt; starget_angle) sangle += srot_speed;
}
if (state != 100) {
    if (instance_number(oTesterShield) &lt; 4 &amp;&amp; enableforcefield == 0) {
        enableforcefield = 1;
        glass.enabled = 1;
    }
    if (glass.enabled == 1) {
        eye.canbehit = 0;
    } else eye.canbehit = 1;
}
if (flashing &gt; 0) flashing -= 1;
statetime += 1;

if(global.event[200] &gt; 1 &amp;&amp; !dead){
    make_explosion3(x, y);
    repeat (30) instance_create(x, y, oDebris);
    state = 100;
    statetime = -1;
    alarm[10] = 1;
    alarm[11] = 300;
    with (oTesterShield) event_user(1);
    visible = false;
    dead = true;
}
</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>draw_sprite_ext(sTesterBody, -1, x, y, 1, 1, image_angle, image_blend, image_alpha);
draw_sprite_ext(sTesterBody, -1, x, y, -1, 1, image_angle, image_blend, image_alpha);
draw_sprite_ext(sTesterBody, -1, x, y, -1, -1, image_angle, image_blend, image_alpha);
draw_sprite_ext(sTesterBody, -1, x, y, 1, -1, image_angle, image_blend, image_alpha);
if (flashing) {
    draw_set_blend_mode(bm_add);
    repeat (2) {
        draw_sprite_ext(sTesterBody, -1, x, y, 1, 1, image_angle, image_blend, flashing / 5);
        draw_sprite_ext(sTesterBody, -1, x, y, -1, 1, image_angle, image_blend, flashing / 5);
        draw_sprite_ext(sTesterBody, -1, x, y, -1, -1, image_angle, image_blend, flashing / 5);
        draw_sprite_ext(sTesterBody, -1, x, y, 1, -1, image_angle, image_blend, flashing / 5);
    }
    draw_set_blend_mode(bm_normal);
}
</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>-1</PhysicsObjectKinematic>
  <PhysicsShapePoints/>
</object>
