| 1 | flash += 1; | 
    
    
        | 2 | if (flash > 2) | 
    
    
        | 3 |     flash = 0; | 
    
    
        | 4 | xx = lengthdir_x(120, image_angle - 90); | 
    
    
        | 5 | yy = lengthdir_y(120, image_angle - 90); | 
    
    
        | 6 | l_timer -= 1; | 
    
    
        | 7 | if (l_timer > 0) | 
    
    
        | 8 | { | 
    
    
        | 9 |     if (caster_is_playing(sfx_t) == 0) | 
    
    
        | 10 |         caster_loop(sfx_t, 1, 1); | 
    
    
        | 11 |     draw_set_color(c_red); | 
    
    
        | 12 |     if (flash == 1) | 
    
    
        | 13 |         draw_set_color(c_orange); | 
    
    
        | 14 |     if (flash == 2) | 
    
    
        | 15 |         draw_set_color(c_yellow); | 
    
    
        | 16 |     if (type == 0) | 
    
    
        | 17 |     { | 
    
    
        | 18 |         xxx = lengthdir_x(600, image_angle - 90); | 
    
    
        | 19 |         yyy = lengthdir_y(600, image_angle - 90); | 
    
    
        | 20 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 21 |     } | 
    
    
        | 22 |     if (type == 1) | 
    
    
        | 23 |     { | 
    
    
        | 24 |         xxx = lengthdir_x(600, image_angle - 104); | 
    
    
        | 25 |         yyy = lengthdir_y(600, image_angle - 104); | 
    
    
        | 26 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 27 |         xxx = lengthdir_x(600, image_angle - 90); | 
    
    
        | 28 |         yyy = lengthdir_y(600, image_angle - 90); | 
    
    
        | 29 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 30 |         xxx = lengthdir_x(600, image_angle - 77); | 
    
    
        | 31 |         yyy = lengthdir_y(600, image_angle - 77); | 
    
    
        | 32 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 33 |     } | 
    
    
        | 34 |     if (type == 2) | 
    
    
        | 35 |     { | 
    
    
        | 36 |         xxx = lengthdir_x(600, image_angle - 110); | 
    
    
        | 37 |         yyy = lengthdir_y(600, image_angle - 110); | 
    
    
        | 38 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 39 |         xxx = lengthdir_x(600, image_angle - 96); | 
    
    
        | 40 |         yyy = lengthdir_y(600, image_angle - 96); | 
    
    
        | 41 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 42 |         xxx = lengthdir_x(600, image_angle - 84); | 
    
    
        | 43 |         yyy = lengthdir_y(600, image_angle - 84); | 
    
    
        | 44 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 45 |         xxx = lengthdir_x(600, image_angle - 70); | 
    
    
        | 46 |         yyy = lengthdir_y(600, image_angle - 70); | 
    
    
        | 47 |         draw_line(x + xx, y + yy, x + xxx, y + yyy); | 
    
    
        | 48 |     } | 
    
    
        | 49 | } | 
    
    
        | 50 | else if (caster_is_playing(sfx_t)) | 
    
    
        | 51 | { | 
    
    
        | 52 |     caster_stop(sfx_t); | 
    
    
        | 53 | } | 
    
    
        | 54 | if (meter == 1) | 
    
    
        | 55 | { | 
    
    
        | 56 |     metercounter += 1; | 
    
    
        | 57 |     for (i = 0; i < 7; i += 1) | 
    
    
        | 58 |     { | 
    
    
        | 59 |         if (metercounter > i) | 
    
    
        | 60 |         { | 
    
    
        | 61 |             mcolor = make_color_hsv((metercounter * 12) - (i * 24), 180, 255); | 
    
    
        | 62 |             draw_sprite_ext(spr_asriel_gunarm_meter, i, x, y, image_xscale, image_yscale, image_angle, mcolor, 1); | 
    
    
        | 63 |         } | 
    
    
        | 64 |     } | 
    
    
        | 65 | } | 
    
    
        | 66 | if (blast == 1) | 
    
    
        | 67 | { | 
    
    
        | 68 |     if (bt > 4) | 
    
    
        | 69 |     { | 
    
    
        | 70 |         view_xview[0] = choose(1, -1) * random(3); | 
    
    
        | 71 |         view_yview[0] = choose(1, -1) * random(3); | 
    
    
        | 72 |     } | 
    
    
        | 73 |     else | 
    
    
        | 74 |     { | 
    
    
        | 75 |         view_xview[0] = 0; | 
    
    
        | 76 |         view_yview[0] = 0; | 
    
    
        | 77 |     } | 
    
    
        | 78 |     if (image_index == 5) | 
    
    
        | 79 |         image_index = 4; | 
    
    
        | 80 |     else | 
    
    
        | 81 |         image_index = 5; | 
    
    
        | 82 |     metercounter -= 1.25; | 
    
    
        | 83 |     x = (thisx + random(6)) - random(6); | 
    
    
        | 84 |     y = thisy - random(15) - 16; | 
    
    
        | 85 |     king.x = ((x - relx) + random(3)) - random(3); | 
    
    
        | 86 |     king.y = (y - rely) + random(8) + 12; | 
    
    
        | 87 |     xx = lengthdir_x(115, image_angle - 90); | 
    
    
        | 88 |     yy = lengthdir_y(115, image_angle - 90); | 
    
    
        | 89 |     xxx = lengthdir_x(600, image_angle - 90); | 
    
    
        | 90 |     yyy = lengthdir_y(600, image_angle - 90); | 
    
    
        | 91 |     mcolor1 = make_color_hsv(btimer * 18, 180, 255); | 
    
    
        | 92 |     mcolor2 = make_color_hsv((btimer * 18) + 60, 180, 255); | 
    
    
        | 93 |     draw_line_width_color(x + xx, y + yy, x + xxx, y + yyy, bt, mcolor1, mcolor2); | 
    
    
        | 94 |     xxa = lengthdir_x(90, image_angle - 90); | 
    
    
        | 95 |     yya = lengthdir_y(90, image_angle - 90); | 
    
    
        | 96 |     xxb = lengthdir_x(100, image_angle - 90); | 
    
    
        | 97 |     yyb = lengthdir_y(100, image_angle - 90); | 
    
    
        | 98 |     draw_line_width_color(x + xx, y + yy, x + xxa, y + yya, bt / 2, mcolor1, mcolor2); | 
    
    
        | 99 |     draw_line_width_color(x + xx, y + yy, x + xxb, y + yyb, bt / 1.5, mcolor1, mcolor2); | 
    
    
        | 100 |     nx_factor = lengthdir_x(1, image_angle); | 
    
    
        | 101 |     ny_factor = lengthdir_y(1, image_angle); | 
    
    
        | 102 |     if (col_o == 1) | 
    
    
        | 103 |     { | 
    
    
        | 104 |         for (cl = 0; cl < 4; cl += 1) | 
    
    
        | 105 |         { | 
    
    
        | 106 |             if (collision_line((x + xx) - (((nx_factor * bt) / 2) * (cl / 4)), (y + yy) - (((ny_factor * bt) / 2) * (cl / 4)), (x + xxx) - (((nx_factor * bt) / 2) * (cl / 4)), (y + yyy) - (((ny_factor * bt) / 2) * (cl / 4)), obj_heart, false, true)) | 
    
    
        | 107 |                 event_user(7); | 
    
    
        | 108 |         } | 
    
    
        | 109 |         for (cl = 0; cl < 4; cl += 1) | 
    
    
        | 110 |         { | 
    
    
        | 111 |             if (collision_line(x + xx + (((nx_factor * bt) / 2) * (cl / 4)), y + yy + (((ny_factor * bt) / 2) * (cl / 4)), x + xxx + (((nx_factor * bt) / 2) * (cl / 4)), y + yyy + (((ny_factor * bt) / 2) * (cl / 4)), obj_heart, false, true)) | 
    
    
        | 112 |                 event_user(7); | 
    
    
        | 113 |         } | 
    
    
        | 114 |     } | 
    
    
        | 115 |     if (col_o == 0) | 
    
    
        | 116 |         col_o = 1; | 
    
    
        | 117 |     else | 
    
    
        | 118 |         col_o = 0; | 
    
    
        | 119 |     btimer += 1; | 
    
    
        | 120 |     if (btimer > 15) | 
    
    
        | 121 |     { | 
    
    
        | 122 |         bt -= 3; | 
    
    
        | 123 |         if (bt < 3) | 
    
    
        | 124 |         { | 
    
    
        | 125 |             bt = 0; | 
    
    
        | 126 |             blast = 0; | 
    
    
        | 127 |             unhinge = 0; | 
    
    
        | 128 |             meter = 0; | 
    
    
        | 129 |         } | 
    
    
        | 130 |     } | 
    
    
        | 131 | } | 
    
    
        | 132 | if (unhinge == 1) | 
    
    
        | 133 | { | 
    
    
        | 134 |     if (image_index >= 5) | 
    
    
        | 135 |     { | 
    
    
        | 136 |         image_index = 5; | 
    
    
        | 137 |         image_speed = 0; | 
    
    
        | 138 |     } | 
    
    
        | 139 | } | 
    
    
        | 140 | draw_sprite_ext(sprite_index, image_index, x, y, image_xscale, image_yscale, image_angle, image_blend, image_alpha); |