sTorizoKneel 0 -1 0 0 <undefined> sTorizoMask 1 603 7 0 0 -1 2 self 0 0 1 canbeX = 0; CollisionBottom = 0; CollisionTop = 0; CollisionLeft = 0; CollisionRight = 0; WallUp = 288; i = 0; gravity = 0; gravity_direction = 270; state = 0; statetime = 0; globaltime = 0; phase = 0; facingplayer = 0; turning = 0; //damage = 30; damage = global.mod_torizondamageform2; canbehit = 1; flashing = 0; fxtimer = 0; mycam = instance_create(x, y, oTorizo2Cam); targetx = 0; targety = 144; targetplayer = 0; xAcc = 0; yAcc = 0; maxSpeed = 0; move = 1; usedbirds = 0; if (global.difficulty < 2) { //myhealth = 240; myhealth = global.mod_torizohealthform2; hpforattack1 = 150; hpforattack2 = 80; stayaway = 1; } else { //myhealth = 350; myhealth = global.mod_torizohealthform2hard; hpforattack1 = 220; hpforattack2 = 110; stayaway = 0; } i = 0; repeat (18) { spk = instance_create(32 + i * 16, 432, oTorizoSpikes); spk.alarm[0] = 300 + i * 90; spk = instance_create(592 - i * 16, 432, oTorizoSpikes); spk.alarm[0] = 300 + i * 90; i += 1; } wings = instance_create(x, y - 65, oTorizoWings); 1 603 7 0 0 -1 2 self 0 0 1 repeat (8) { expl = instance_create(x - 16 + random(32), y - random(80), oFXAnimSpark); expl.image_speed = 0.3 + random(0.5); expl.additive = 0; expl.sprite_index = sExpl1; } make_explosion3(x, y - 40); repeat (30) instance_create(x, y - 50, oDebris); instance_create(x, y, oScreenFlash); sfx_play(sndRobotExpl); sfx_play(sndMissileExpl); with (mycam) instance_destroy(); with (wings) instance_destroy(); if(oControl.mod_fusion == 0) { spawn_many_powerups(x - 64, y - 120, 120, 128); mus_current_fadein(); with (oDoor) event_user(3); } else { core = instance_create(mean(bbox_left, bbox_right), mean(bbox_top, bbox_bottom), oCoreX); core.lastBossX = x; core.lastBossY = y; core.lastBossSprite = sprite_index; core.lastBossFrame = image_index; core.lastBossAngle = image_angle; core.lastBossFacing = facing; core.lastYscale = image_yscale; core.lastBossDepth = depth; instance_create(x, y, oTorizoCoreXCam); } instance_destroy(); 1 603 7 0 0 -1 2 self 0 0 1 expl = instance_create(x - 16 + random(32), y - random(80), oFXAnimSpark); expl.image_speed = 0.5; expl.additive = 0; expl.sprite_index = sExpl1; expl.image_xscale = 0.5; expl.image_yscale = 0.5; alarm[10] = 4; 1 603 7 0 0 -1 2 self 0 0 1 var dir, projspeed; dir = point_direction(x + 12 * facing, y - 65, oCharacter.x, oCharacter.y - 32); if (phase == 0) { if (statetime < 180) alarm[0] = 7; projspeed = 4.5; } else if (phase == 1) { if (statetime < 200) alarm[0] = 6; projspeed = 5.2; } else if (phase > 1) { if (statetime < 230) alarm[0] = 5; projspeed = 6; } if (global.difficulty >= 2) projspeed += 1; if (state == 2) { if (facingplayer) { proj = instance_create(x + 12 * facing, y - 65, oTorizoFireball); proj.direction = dir; proj.speed = projspeed; proj.gravity = 0; if (global.difficulty >= 2) { proj = instance_create(x + 12 * facing, y - 65, oTorizoFireball); proj.direction = dir + 30; proj.speed = projspeed; proj.gravity = 0; proj = instance_create(x + 12 * facing, y - 65, oTorizoFireball); proj.direction = dir - 30; proj.speed = projspeed; proj.gravity = 0; } } else { dir = 90 - facing * 90; proj = instance_create(x + 12 * facing, y - 65, oTorizoFireball); proj.direction = dir - 30 + random(60); proj.speed = projspeed; proj.gravity = 0; if (global.difficulty >= 2) { repeat (2) { proj = instance_create(x + 12 * facing, y - 65, oTorizoFireball); proj.direction = dir - 30 + random(60); proj.speed = projspeed; proj.gravity = 0; } } } // if (facingplayer) else } // if (state == 2) if (state == 3) { proj = instance_create(x + 12 * facing, y - 50, oTorizoEgg); proj.hspeed = (1.5 + random(5)) * facing; proj.vspeed = 2 - random(4); if (statetime < 230) alarm[0] = 7; if (global.difficulty >= 2) { proj.hspeed = (2 + random(9)) * facing; proj.vspeed = 4 - random(8); if (statetime < 230) alarm[0] = 6; } } 1 603 7 0 0 -1 2 self 0 0 1 if (y >= 432) { CollisionBottom = 1; } else CollisionBottom = 0; if (y <= WallUp + 80) { CollisionTop = 1; } else CollisionTop = 0; if (x <= 48) { CollisionLeft = 1; } else CollisionLeft = 0; if (x >= 592) { CollisionRight = 1; } else CollisionRight = 0; facingplayer = 0; if (facing == 1 && oCharacter.x > x) facingplayer = 1; if (facing == -1 && oCharacter.x < x) facingplayer = 1; wings.x = x; wings.y = y - 65; nextattack = floor(random(2)); if (state == 0) { if (statetime == 0) { sprite_index = sTorizoKneel; image_index = 3; image_speed = 0; speed = 0; turning = 0; } if (statetime == 45) { sfx_play(sndTorizoRoar); image_index = 2; } if (statetime == 55) image_index = 1; if (statetime == 65) image_index = 0; if (statetime == 75) { vspeed = -3.5; if (x < 160) hspeed = 1.2; if (x > 480) hspeed = -1.2; sprite_index = sTorizoFly; image_index = 0; } if (statetime > 75) speed *= 0.95; if (statetime == 90) { sprite_index = sTorizoFly; image_index = 1; image_speed = 0; } if (statetime == 240) { state = 1; statetime = 0; } } // if (state == 0) if (state == 1) { if (statetime == 0) { sprite_index = sTorizoFly; image_index = 1; image_speed = 0; xAcc = 0.2; yAcc = 0.15; move = 1; if (phase == 0) { if (stayaway == 0) { maxSpeed = 1.8; } else maxSpeed = 2.5; } if (phase == 1) maxSpeed = 1.8; if (phase == 2) maxSpeed = 2.35; if (global.difficulty >= 2) maxSpeed = 2.4; if ((instance_exists(oTorizoGhost) || instance_exists(oTorizoEgg)) && global.difficulty < 2) maxSpeed *= 0.8; } if (stayaway == 0) { if (statetime > 5) { if (oCharacter.x < x - 32 && facing == 1 && turning == 0) facing = -1; if (oCharacter.x > x + 32 && facing == -1 && turning == 0) facing = 1; } if (facing == 1) { targetx = 640; } else targetx = 0; targety = oCharacter.y; if (oCharacter.y > 270 && globaltime < 1200) targety = 120; } else { if (oCharacter.x < x && facing == 1 && turning == 0) facing = -1; if (oCharacter.x >= x && facing == -1 && turning == 0) facing = 1; if (x < 128 && targetx == 0) targetx = 640; if (x > 512 && targetx == 640) targetx = 0; if (y >= 288 && targety == 288) targety = 144; if (y <= 144 && targety == 144) targety = 288; } if (stayaway == 0 && statetime > 300 && (oCharacter.y < 270 && globaltime < 1200 || globaltime >= 1200)) { if (nextattack == 0) { state = 2; statetime = 0; } if (nextattack == 1) { if (phase >= 1) { state = 3; } else state = 2; statetime = 0; } } if (facing == 1 && oCharacter.x < x + 16 || facing == -1 && oCharacter.x > x - 16) image_index = 2; if (facing == 1 && oCharacter.x >= x + 16 && oCharacter.x < x + 64 || facing == -1 && oCharacter.x <= x - 16 && oCharacter.x > x - 64) image_index = 1; if (facing == 1 && oCharacter.x >= x + 64 || facing == -1 && oCharacter.x <= x - 64) image_index = 0; if (statetime > 30 && phase == 0 && myhealth < hpforattack1 || phase == 1 && myhealth < hpforattack2) { state = 4; statetime = 0; phase += 1; with (oTorizoSpikes) alarm[0] = 1; } if (usedbirds == 0 && phase == 1 && statetime == 120) { state = 3; statetime = 0; usedbirds = 1; } } // if (state == 1) if (state == 2) { speed *= 0.95; if (statetime == 0) { sprite_index = sTorizoFlyFireball; image_index = 0; image_speed = 0; xAcc = 0.3; yAcc = 0.2; maxSpeed = 3; move = 1; targety = 160; sfx_play(sndTorizoAttack1); } if (facing == 1) { targetx = oCharacter.x - 140; } else targetx = oCharacter.x + 140; if (statetime == 60) move = 0; if (statetime > 60) { if (image_index < 4) image_index += 0.1; } if (statetime == 120) alarm[0] = 1; if (statetime > 230) { if (image_index > 0) image_index -= 0.1; } if (statetime == 240) { state = 1; statetime = -1; } } // if (state == 2) if (state == 3) { speed *= 0.95; if (statetime == 0) { sprite_index = sTorizoFly; image_index = 0; image_speed = 0; xAcc = 0.2; yAcc = 0.4; maxSpeed = 3.5; move = 1; targety = 300; sfx_play(sndTorizoAttack2); } if (facing == 1) { targetx = oCharacter.x - 180; } else targetx = oCharacter.x + 180; if (statetime == 60) move = 0; if (statetime == 120) alarm[0] = 1; if (statetime == 300) { state = 1; statetime = -1; } } if (state == 4) { if (statetime == 0) { sprite_index = sTorizoFly; image_index = 0; image_speed = 0; speed = 0; turning = 0; if (facing == 1) { targetx = -120; } else targetx = 720; sfx_play(sndTorizoRoar); } if (targetx > x) { hspeed += 0.1; } else hspeed -= 0.1; if (statetime == 120) { state = 5; statetime = 0; } } if (state == 5) { if (statetime == 0) { sprite_index = sTorizoDive; mask_index = sTorizoDive; image_index = 2; image_speed = 0; speed = 0; turning = 0; } if (statetime == 1) { if (facing == 1) { x = oCharacter.x - 320; } else x = oCharacter.x + 320; y = oCharacter.y - 4; hspeed = 12 * facing; sfx_play(sndTorizoAttack2); } if (statetime == 60) { facing = -facing; if (facing == 1) { x = oCharacter.x - 320; } else x = oCharacter.x + 320; y = oCharacter.y - 4; hspeed = 12 * facing; sfx_play(sndTorizoAttack2); } if (statetime == 120) { facing = -facing; if (facing == 1) { x = oCharacter.x - 320; } else x = oCharacter.x + 320; y = oCharacter.y - 4; hspeed = 12 * facing; sfx_play(sndTorizoAttack2); } if (statetime == 180) { facing = -facing; if (facing == 1) { x = oCharacter.x - 320; } else x = oCharacter.x + 320; y = oCharacter.y - 4; hspeed = 12 * facing; sfx_play(sndTorizoAttack2); } if (statetime == 250) { facing = -facing; state = 6; statetime = 0; } } // if (state == 5) if (state == 6) { if (statetime == 0) { sprite_index = sTorizoFly; mask_index = sTorizoMask; image_index = 0; image_speed = 0; speed = 0; turning = 0; sfx_play(sndTorizoAttack1); } if (statetime == 1) { if (facing == 1) { x = -120; } else x = 720; y = 320; hspeed = 8 * facing; } if (statetime > 30) speed *= 0.95; if (statetime > 30 && speed < 0.1) { state = 1; statetime = -1; } } if (state == 100) { sprite_index = sTorizoFly; image_index = 1; image_speed = 0; speed = 0; turning = 0; if (statetime == 0) sfx_play(sndTorizoDeath); } if (state == 1 || state == 2 || state == 3) { if (move) { if (targetx > x) { hspeed += xAcc; } else hspeed -= xAcc; if (targety > y) { vspeed += yAcc; } else vspeed -= yAcc; if (speed > maxSpeed) speed = maxSpeed; } else speed *= 0.9; if (CollisionLeft && hspeed < 0) { hspeed = 0; x = 48; } if (CollisionRight && hspeed > 0) { hspeed = 0; x = 592; } if (CollisionTop && vspeed < 0) { vspeed = 0; y = WallUp + 80; } if (CollisionBottom && vspeed > 0) { vspeed = 0; y = 432; } } // if (state == 1 || state == 2 || state == 3) if (phase > 0 || myhealth <= 200 || globaltime > 3600) stayaway = 0; statetime += 1; if (globaltime < 5000) globaltime += 1; if (fxtimer < 5) { fxtimer += 1; } else fxtimer = 0; if (flashing > 0) flashing -= 1; dist = distance_to_point(oCharacter.x, oCharacter.y - 20); 1 603 7 0 0 -1 2 self 0 0 1 with (other) event_user(0); 1 603 7 0 0 -1 2 self 0 0 1 if (myhealth > 0 && state > 0) { if (!canbehit) { with (other) event_user(1); } else { with (other) event_user(0); if (state != 5) myhealth -= 5 * (1 + other.smissile * 2); if (state != 5 && state != 4) speed *= 0.25; event_user(0); } } 1 603 7 0 0 -1 2 self 0 0 1 if (myhealth > 0 && state > 0 && canbehit) { if (other.chargebeam) { if (state != 5) myhealth -= 4 * (1 - other.sbeam * 0.4); event_user(0); } else { if (state != 5) myhealth -= 1.5 * (1 - other.sbeam * 0.4); event_user(0); } with (other) { event_user(0); instance_destroy(); } } 1 603 7 0 0 -1 2 self 0 0 1 if (myhealth > 0 && state > 0 && canbehit && !flashing) { myhealth -= 2; event_user(0); } 1 603 7 0 0 -1 2 self 0 0 1 if (myhealth > 0 && state > 0 && canbehit && !flashing) { myhealth -= 1; event_user(0); } 1 603 7 0 0 -1 2 self 0 0 1 if (myhealth > 0 && state > 0) damage_player(damage, 5, -3, 0, 0); 1 603 7 0 0 -1 2 self 0 0 1 flashing = 5; fxtimer = 0; PlaySoundMono(sndTorizoHit); myhealth -= 1; if (myhealth <= 0) { state = 100; statetime = 0; alarm[10] = 1; alarm[11] = 300; with (oTorizoEgg) event_user(1); with (oTorizoGhost) event_user(1); if(oControl.mod_fusion == 0) { with (oTorizoSpikes) event_user(0); mus_fadeout(musTorizoB); oMusicV2.bossbgm = sndJump; } } 1 603 7 0 0 -1 2 self 0 0 1 if (turning == 1) turning = 0; 1 603 7 0 0 -1 2 self 0 0 1 draw_sprite_ext(sprite_index, -1, x, y, facing, 1, 0, image_blend, 1); if (flashing) { draw_sprite_ext(sprite_index, -1, x, y, facing, 1, 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(sprite_index, -1, x, y, facing, 1, image_angle, -1, 1 - fxtimer * 0.25); draw_set_blend_mode(bm_normal); } if (state == 5) { draw_set_blend_mode(bm_add); draw_sprite_ext(sTorizoDiveJetFX, -1, x, y, facing, 1, 0, -1, 1); draw_set_blend_mode(bm_normal); } 0 0 0 0.5 0.100000001490116 0 0.100000001490116 0.100000001490116 0.200000002980232 -1 -1