Advertisement
Cyrix_C

Gyro Boss? IN MY DANMAKUFU PH3??

May 18th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 11.46 KB | None | 0 0
  1. task Linear_GyroBossAll
  2. {
  3.     let fr = rand(80, 140);
  4.     loop
  5.     {
  6.         RING_1();   //1
  7.         wait(32 * 7 + 60);
  8.         RING_2();   //2
  9.         wait(32 * 13);
  10.         RING_3();   //3
  11.         wait(32 * 13);
  12.         Explody_RandBulletA1(); //4
  13.         wait(16 * 50 + 60);
  14.         Explody_RandBulletA2(); //5
  15.         wait(12 * 85 + 60);
  16.         Explody_RandBulletA3(); //6
  17.         wait(32 * 45 + 60);
  18.         Explody_RandBulletA4(); //7
  19.         wait(32 * 30 + 140);
  20.         Explody_RandBulletA5(); //8
  21.         wait(30 + 160);
  22.         Rand_Bullet();  //9
  23.         wait(150 * 2 + 60);
  24.         LinearDanmaku();    //10
  25.         wait(80 + 180);
  26.         RING_PlayerExecutor();  //11
  27.         wait(85 * 4 + 60);
  28.         NonDir_LaserRing(); //12
  29.         wait(390 + 100);
  30.         Track_ExplodyBulletA1();    //13
  31.         wait(32 * 45 + 60);
  32.         Track_ExplodyBulletA2();    //14
  33.         wait(18 * 60 + 20);
  34.         Windy_BulletsA1();  //15
  35.         wait(8 * 35 + 290);
  36.         Windy_BulletsA2();  //16
  37.         wait(8 * 35 + 290);
  38.         LaserZone();    //17
  39.         wait(500);
  40.         Ex_RandBullet();    //18
  41.         wait(75 + 455);
  42.         DoubleExplody_RandBullet(); //19
  43.         wait(365 + 320);
  44.         Wavy_Tentacles();   //20
  45.         wait(8 * 20 + 1020);
  46.         Octo_Fist(fr);  //24
  47.         wait(fr + 1340);
  48.     }
  49. }
  50.  
  51. //funciones y tareas básicas
  52. function wait(f) { loop(f) { yield; } }
  53.  
  54. function ctm_Shot(lox, loy, sp, ang, ang_sp)
  55. {
  56.     let obj = CreateShotA1(lox, loy, sp, ang, 233, 0);
  57.     ObjMove_SetAngularVelocity(obj, ang_sp);
  58.     return obj;
  59. }
  60.  
  61. task ObjShot_FadeDeleteAtFrame(ID, fr)
  62. {
  63.     wait(fr);
  64.     ObjShot_FadeDelete(ID);
  65. }
  66.  
  67. > fr + 50)
  68.         {
  69.             CheckArray_Bullets();
  70.             angle+=1.75;
  71.         }
  72.         if(cnt_tracker > fr + 350) { Obj_Delete(ParentObj); }
  73.         ObjMove_SetPosition(ParentObj, x + 120 * cos(angle), y + 120 * sin(angle));
  74.         yield;
  75.     }
  76.  
  77.     task CheckArray_Bullets()
  78.     {
  79.         let bull_lengtH = GetShotIdInCircleA2(ObjMove_GetX(ParentObj), ObjMove_GetY(ParentObj), 35, TARGET_ENEMY);
  80.         ascent(i in 0..length(bull_lengtH))
  81.         {
  82.             Obj_Delete(bull_lengtH[i]);
  83.         }
  84.     }
  85. }
  86.  
  87. task Tentacle(ang, rot)
  88. {
  89.     ascent(i in 1..18)
  90.     {
  91.         ctm_ExShotA1(i, 750, [x, y], [x + (i * 24) * cos(ang), y + (i * 24) * sin(ang)], ang, 6, 3, rot);
  92.         AdviceLaser(boss, x, y, ang, 600, 328, 120 % i, 161, 120 % i);
  93.     }
  94.  
  95.     task ctm_ExShotA1(i, fr, ini_loc, fin_loc, ang, we, sp, rot)
  96.     {
  97.         let cnt = 0;
  98.         let rang = 0;
  99.         let ParentObj = CreateShotA1(ini_loc[0], ini_loc[1], 0, ang, 225, 0);
  100.         ObjMove_SetDestAtWeight(ParentObj, fin_loc[0], fin_loc[1], we, sp);
  101.         wait(7 * i);
  102.         ObjMove_SetAcceleration(ParentObj, 0.3);
  103.         loop(fr + 20)
  104.         {
  105.             cnt+=1;
  106.             rang+=rot * sin(cnt * 2);
  107.             ObjMove_SetPosition(ParentObj, x + (i * 24) * cos(ang + rang), y + (i * 24) * sin(ang + rang));
  108.             yield;
  109.         }
  110.         descent(i in -18..-1)
  111.         {
  112.             ObjMove_SetDestAtWeight(ParentObj, ini_loc[0], ini_loc[1], sp * -i, we);
  113.             ObjShot_FadeDeleteAtFrame(ParentObj, 150);
  114.         }
  115.     }
  116. }
  117.  
  118. task OneFist(fr, angle, sp, we, ret)
  119. {
  120.     ascent(i in 1..16)
  121.     {
  122.         AdviceLaser(boss, x, y, angle, 600, 328, 100, 160, 100);
  123.         ctm_ExShotA2(i, fr, [x, y], [x + (i * 24) * cos(angle), y + (i * 24) * sin(angle)], angle, we, sp, ret);
  124.     }
  125.  
  126.     task ctm_ExShotA2(i, fr, ini_loc, fin_loc, ang, we, sp, del)
  127.     {
  128.         let ParentObj = CreateShotA1(ini_loc[0], ini_loc[1], 0, ang, 225, 0);
  129.         wait(fr);
  130.         ascent(j in 0..6)
  131.         {
  132.             ObjMove_SetDestAtWeight(ParentObj, fin_loc[0], fin_loc[1], sp[2], we[2]);
  133.             wait(del[1]);
  134.             ObjMove_SetDestAtWeight(ParentObj, ini_loc[0], ini_loc[1], sp[1], we[1]);
  135.             wait(del[0]);
  136.         }
  137.         ObjShot_FadeDeleteAtFrame(ParentObj, 8 % i);
  138.     }
  139. }
  140.  
  141. //ataques ya realizados con éxito
  142. task RING_1
  143. {
  144.     let angle = 180;
  145.     loop(32)
  146.     {
  147.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  148.         loop(8)
  149.         {
  150.             let orig = CreateShotA1(x, y, 5, angle, 225, 0);
  151.             ObjMove_AddPatternA2(orig, 10, 4, NO_CHANGE, -0.1, 0, 2.7);
  152.             angle+=360/8;
  153.         }
  154.         angle+=4;
  155.         wait(7);
  156.     }
  157. }
  158.  
  159. task RING_2
  160. {
  161.     let angle0 = 0;
  162.     let angle1 = 22.5;
  163.     loop(8)
  164.     {
  165.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  166.         loop(8)
  167.         {
  168.             let bull = CreateShotA1(x, y, 6, angle0, 17, 0);
  169.             ObjMove_AddPatternA2(bull, 5, 3.5, NO_CHANGE, -0.1, 0, 2.8);
  170.             angle0+=360/8;
  171.         }
  172.         wait(20);
  173.         loop(8)
  174.         {
  175.             let bull = CreateShotA1(x, y, 6, angle1, 17, 0);
  176.             ObjMove_AddPatternA2(bull, 5, 3.5, NO_CHANGE, -0.1, 0, 2.8);
  177.             angle1+=360/8;
  178.         }
  179.         wait(20);
  180.     }
  181. }
  182.  
  183. task RING_3
  184. {
  185.     let angle0 = 0;
  186.     let angle1 = 22.5;
  187.     loop(8)
  188.     {
  189.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  190.         loop(8)
  191.         {
  192.             let wink = 1;
  193.             let Shot = CreateShotA1(x, y, 3, angle0, 17, 0);
  194.             ascent(i in 0..6)
  195.             {
  196.                 ObjMove_AddPatternA2(Shot, 0, 3 * i, NO_CHANGE, -1, 0.8 * wink, 1.5 / i);
  197.                 ObjMove_AddPatternA2(Shot, 40, 3 * i, NO_CHANGE, -1, 0.8 * -wink, 1.5 / i);
  198.                 ObjMove_AddPatternA2(Shot, 80, 3 * i, NO_CHANGE, -1, 0.8 * wink, 1.5 / i);
  199.                 ObjMove_AddPatternA2(Shot, 120, 3 * i, NO_CHANGE, -1, 0.8 * -wink, 1.5 / i);
  200.                 wink*=-1;
  201.             }
  202.             angle0+=360/8;
  203.         }
  204.         wait(20);
  205.         loop(8)
  206.         {
  207.             let wink = 1;
  208.             let Shot = CreateShotA1(x, y, 3, angle1, 17, 0);
  209.             ascent(i in 0..6)
  210.             {
  211.                 ObjMove_AddPatternA2(Shot, 0, 3 * i, NO_CHANGE, -1, 0.8 * wink, 1.5 / i);
  212.                 ObjMove_AddPatternA2(Shot, 40, 3 * i, NO_CHANGE, -1, 0.8 * -wink, 1.5 / i);
  213.                 ObjMove_AddPatternA2(Shot, 80, 3 * i, NO_CHANGE, -1, 0.8 * wink, 1.5 / i);
  214.                 ObjMove_AddPatternA2(Shot, 120, 3 * i, NO_CHANGE, -1, 0.8 * -wink, 1.5 / i);
  215.                 wink*=-1;
  216.             }
  217.             angle1+=360/8;
  218.         }
  219.         wait(20);
  220.     }
  221. }
  222.  
  223. task Explody_RandBulletA1
  224. {
  225.     let angle;
  226.     loop(16)
  227.     {
  228.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  229.         angle = rand(0, 360);
  230.         ExplodeBulletA1(x, y, angle, 3, -0.0000009, 2.1, -0.1, 53, 0, 0);
  231.         wait(50);
  232.     }
  233. }
  234.  
  235. task Explody_RandBulletA2
  236. {
  237.     loop(12)
  238.     {
  239.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  240.         ExplodeBulletA2(x, y, rand(0, 360), 3.2, -0.0000009, 2.5, -0.1, 28, 0);
  241.         wait(85);
  242.     }
  243. }
  244.  
  245. task Explody_RandBulletA3
  246. {
  247.     loop(32)
  248.     {
  249.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  250.         let angle = rand(0, 360);
  251.         ExplodeBulletA1(x + 168 * cos(angle), y + 168 * sin(angle), 0, 0, 0, 0, 0, 40, 1, 10);
  252.         wait(45);
  253.     }
  254. }
  255.  
  256. task Explody_RandBulletA4
  257. {
  258.     loop(32)
  259.     {
  260.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  261.         let angle = rand(0, 360);
  262.         ExplodeBulletA3(x, y, angle, rand(3.5, 5), 5.5, 5, -0.1, 120, 0);
  263.         wait(30);
  264.     }
  265. }
  266.  
  267. task Explody_RandBulletA5
  268. {
  269.     loop(1)
  270.     {
  271.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  272.         let angle = rand(0, 360);
  273.         loop(7)
  274.         {
  275.             ExplodeBulletA1(x + 168 * cos(angle), y + 168 * sin(angle), angle, 0, 0, 0, 0, 80, 1, 10);
  276.             angle+=360/7;
  277.         }
  278.     }
  279. }
  280.  
  281. task Rand_Bullet
  282. {
  283.     loop(150)
  284.     {
  285.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  286.         loop(2) { CreateShotA2(x, y, rand(2, 4.5), rand(0, 360), -0.7, rand(1.5, 4), 17, 0); }
  287.         wait(2);
  288.     }
  289. }
  290.  
  291. task LinearDanmaku
  292. {
  293.     ascent(i in 0..14)
  294.     {
  295.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  296.         let Shot = CreateShotA1(GetStgFrameWidth()/15 - 30, rand(0, GetStgFrameHeight()), 0, 180, 17, 0);
  297.         ObjMove_AddPatternA2(Shot, 80, 4, 0, -0.9, 0, 3.5);
  298.     }
  299.     ascent(i in 0..14)
  300.     {
  301.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  302.         let Shot = CreateShotA1(GetStgFrameWidth()/15 * 14 + 30, rand(0, GetStgFrameHeight()), 0, 0, 17, 0);
  303.         ObjMove_AddPatternA2(Shot, 80, 4, 180, -0.9, 0, 3.5);
  304.     }
  305. }
  306.  
  307. task RING_PlayerExecutor
  308. {
  309.     let angle = GetAngleToPlayer(boss);
  310.     loop(85)
  311.     {
  312.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  313.         loop(5)
  314.         {
  315.             CreateShotA1(x, y, 4, angle, 17, 0);
  316.             angle+=360/4;
  317.         }
  318.         angle = GetAngleToPlayer(boss);
  319.         wait(4);
  320.     }
  321. }
  322.  
  323. task NonDir_LaserRing
  324. {
  325.     let angle = rand(0, 360);
  326.     let rt = 0;
  327.     ascent(angle in 0..4) { Set_NonDirLaser(angle, 4); }
  328.    
  329.     task Set_NonDirLaser(i, amnt)
  330.     {
  331.         let cnt = 0;
  332.         let ParentLaser = CreateStraightLaserA1(ObjMove_GetX(boss) + 1 * cos(i * (360 / amnt)), ObjMove_GetY(boss) + 1 * sin(i * (360 / amnt)), i * (360 / amnt), 600, 32, 300, 222, 90);
  333.         Trail(ParentLaser, i, amnt);
  334.         while(!Obj_IsDeleted(ParentLaser))
  335.         {
  336.             ObjMove_SetPosition(ParentLaser, ObjMove_GetX(boss) + 1 * cos(i * (360 / amnt) + cnt), ObjMove_GetY(boss) + 1 * sin(i * (360 / amnt) + cnt));
  337.             ObjStLaser_SetAngle(ParentLaser, i * (360 / amnt) + cnt);
  338.             cnt+=1.25;
  339.             yield;
  340.         }
  341.     }
  342.  
  343.     task Trail(Obj, i, amnt)
  344.     {
  345.         let ang = 0;
  346.         let conta = 0;
  347.         while(!Obj_IsDeleted(Obj))
  348.         {
  349.             if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  350.             loop(10)
  351.             {
  352.                 let orig = CreateShotA1(ObjMove_GetX(Obj) + 170 * cos(i * (360 / amnt) + conta), ObjMove_GetY(Obj) + 170 * sin(i * (360 / amnt) + conta), 2.5, ang + (i * 90), 225, 0);
  353.                 ObjMove_AddPatternA2(orig, 5, 2, NO_CHANGE, -0.1, 0, 2.7);
  354.                 ObjMove_AddPatternA2(orig, 10, 1.5, NO_CHANGE, -0.6, 0, -1.7);
  355.                 //Obj_SetRenderPriorityI(orig, 21);
  356.                 ObjShot_FadeDeleteAtFrame(orig, 15);
  357.                 ang+=360/10;
  358.             }
  359.             conta+=2.5;
  360.             wait(2);
  361.         }
  362.     }
  363. }
  364.  
  365. task Track_ExplodyBulletA1
  366. {
  367.     loop(32)
  368.     {
  369.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  370.         ExplodeBulletA1(GetPlayerX(), GetPlayerY(), 0, 0, 0, 0, 0, 40, 1, 10);
  371.         wait(45);
  372.     }
  373. }
  374.  
  375. task Track_ExplodyBulletA2
  376. {
  377.     loop(18)
  378.     {
  379.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) < 0) { return; }
  380.         Bullet_Tracker(boss, 15, 2.5);
  381.         wait(60);
  382.     }
  383. }
  384.  
  385. task Windy_BulletsA1
  386. {
  387.     //debug, posiblemente esté en versión final
  388.     Warning(2500, 150);
  389.     loop(8)
  390.     {
  391.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  392.         ascent(i in 0..33)
  393.         {
  394.             let org = CreateShotA1(-35, GetStgFrameHeight()/32 * i, 0, 0, 17, 2 * i);
  395.             ObjMove_AddPatternB1(org, 100 % i, rand(1, 3), rand(-1.5, 1.5));
  396.             yield;
  397.         }
  398.         wait(35);
  399.     }
  400.  
  401.     task Warning(del_t, ret)
  402.     {
  403.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  404.         AdviceLaser(boss, GetStgFrameWidth()/5 * 1, -75, 90, 600, 328, del_t, 160, ret);
  405.         ascent(i in 0..5)
  406.         {
  407.             AdviceLaser(boss, -75, GetStgFrameHeight()/4 * i, 0, 600, 328, del_t, 160, ret);
  408.         }
  409.     }
  410. }
  411.  
  412. task Windy_BulletsA2
  413. {
  414.     //debug, posiblemente esté en versión final
  415.     Warning(2500, 150);
  416.     loop(8)
  417.     {
  418.         if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  419.         ascent(i in 0..33)
  420.         {
  421.             let org = CreateShotA1(GetStgFrameWidth() + 35, GetStgFrameHeight()/32 * i, 0, 0, 17, 2 * i);
  422.             ObjMove_AddPatternB1(org, 100 % i, rand(-3, -1), rand(-1.5, 1.5));
  423.             yield;
  424.         }
  425.         wait(35);
  426.     }
  427.  
  428.     task Warning(del_t, ret)
  429.     {
  430.         AdviceLaser(boss, GetStgFrameWidth()/5 * 4, -75, 90, 600, 328, del_t, 160, ret);
  431.         ascent(i in 0..5)
  432.         {
  433.             AdviceLaser(boss, GetStgFrameWidth + 75, GetStgFrameHeight()/4 * i, 180, 600, 328, del_t, 160, ret);
  434.         }
  435.     }
  436. }
  437.  
  438. task LaserZone
  439. {
  440.     let angle = rand(0, 360);
  441.     Warning(angle, 100, 100);
  442.     ascent(i in -10..7)
  443.     {
  444.         CreateStraightLaserA1(x, y, angle + (i * 20), 600, 150, 250, 222, 100);
  445.     }
  446.  
  447.     task Warning(angle, del_T, ret)
  448.     {
  449.         ascent(i in 7..8)
  450.         {
  451.             AdviceLaser(boss, x, y, angle + (i * 20), 600, 328, del_T, 160, ret);
  452.         }
  453.     }
  454. }
  455.  
  456. task Ex_RandBullet
  457. {
  458.     Render_Target();
  459.     wait(75);
  460.     Double_RandBullet();
  461.  
  462.     task Render_Target
  463.     {
  464.         let angle = rand(0, 360);
  465.         loop(3)
  466.         {
  467.             Enemy_RngDeleter(angle, 55);
  468.             angle+=360/3;
  469.         }
  470.     }
  471.  
  472.     task Double_RandBullet
  473.     {
  474.         loop(355)
  475.         {
  476.             if(ObjEnemy_GetInfo(boss, INFO_LIFE) <= 0) { return; }
  477.             CreateShotA1(x, y, rand(5.5, 7), rand(0, 360), 17, 0);
  478.             CreateShotA1(x, y, rand(5.5, 7), rand(0, 360), 24, 0);
  479.             wait(1);
  480.         }
  481.     }
  482. }
  483.  
  484. task DoubleExplody_RandBullet
  485. {
  486.     ascent(i in 0..2)
  487.     {
  488.         ExplodeBulletA4(x, y, i * 180, 2, 1, 0.8, 0.1, 0.9, 85, 0);
  489.     }
  490. }
  491.  
  492. task Wavy_Tentacles
  493. {
  494.     loop(8)
  495.     {
  496.         Tentacle(rand(0, 360), 0.9);
  497.         wait(20);
  498.     }
  499. }
  500.  
  501. task Octo_Fist(fr)
  502. {
  503.     let angle = rand(0, 360);
  504.     loop(8)
  505.     {
  506.         OneFist(fr, angle, [3, rand(3, 9), rand(3, 9)], [3, rand(5, 8), rand(5, 8)], [rand(90, 110), rand(90, 110)]);
  507.         angle+=360/8;
  508.     }
  509. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement