Mewkyuu

Untitled

Sep 4th, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.33 KB | None | 0 0
  1. script_enemy_main {
  2. #include_function ".\include.dnh"
  3. task TMain {
  4. SetLife(630); CreateLifebar(3, 1); dmgratemax=15; dmgrateup=1;
  5. SetMovePosition03(GetCenterX, GetCenterY-100, 15, 9); waitInv(60);
  6. cutin("Deathbringer "\""Infinite Being"\", cut, 0, 0, 512, 512);
  7. SetScore(1000000); wait(1); SetTimer(150);
  8. SetMovePosition03(GetCenterX, GetCenterY-75, 10, 9);
  9. Override(true, true, 30, 15, 7.5, 0);
  10. waitInv(120);
  11. attack_;
  12. attack0;
  13. attack1;
  14. attack2;
  15. attack3;
  16. attack4;
  17. }
  18. let phase = 0;
  19. task attack_ {
  20. SetCommonData("passedLast", -1);
  21. loop {
  22. let r = rand(-5,5);
  23. let n = [37, 37, 43, 43, 47, 57, 71][phase];
  24. let v = [3, 13/4, 7/2, 7/2, 7/2, 3, 5/2][phase];
  25. ascent(i in -n..n+1) { CreateShot02(GetX, GetY, 7, -90+i*v+r, -1/10, 2, 227, 0); }
  26. loop (20) {
  27. phase = 0;
  28. if((GetEnemyLife<630*9/10) || (GetTimer < 130)) { phase = 1; }
  29. if((GetEnemyLife<630*7/10) || (GetTimer < 110)) { phase = 2; }
  30. if((GetEnemyLife<630*5/10) || (GetTimer < 90)) { phase = 3; }
  31. if((GetEnemyLife<630*3/10) || (GetTimer < 70)) { phase = 4; }
  32. if((GetEnemyLife<630*2/10) || (GetTimer < 50)) { phase = 5; }
  33. if((GetTimer < 30)) { phase = 6; }
  34. if(GetEnemyLife<10&&GetEnemyLife>0){
  35. SetCommonData("passedLast", 1*(GetSpellCardBonusScore>0));
  36. AddLife(-GetLife);
  37. } wait(1);
  38. }
  39. }
  40. }
  41. task attack0 {
  42. let a = GetAngleToPlayer;
  43. loop {
  44. if(phase>=0) {
  45. ascent(i in 0..27) { CreateShot01(GetX, GetY, 3, a+i*360/27, 166, 10); }
  46. }
  47. a+=7; a%=360;
  48. wait(20);
  49. }
  50. }
  51. task attack1 {
  52. loop {
  53. let a = GetAngleToPlayer;
  54. loop(5) {
  55. if(phase>=1) {
  56. ascent(i in -2..3) { CreateShot01(GetX, GetY, 4, a+i*11, 218, 10); }
  57. }
  58. wait(5);
  59. }
  60. wait(45);
  61. }
  62. }
  63. task attack2 {
  64. let a = 90;
  65. loop {
  66. if(phase>=2) {
  67. ascent(i in 0..7) { CreateShot01(GetX, GetY, 2, a+i*360/7, 212, 10); }
  68. }
  69. wait(15);
  70. a+=pi*9/2;a%=360;
  71. }
  72. }
  73. task attack3 {
  74. let a_ = GetAngleToPlayer;
  75. let a = 0;
  76. loop {
  77. if(phase>=3) {
  78. CreateShot01(GetX, GetY, 3, a_+87*sin(a), 235, 15);
  79. }
  80. wait(5);
  81. a-=pi*7/2;a%=360;
  82. }
  83. }
  84. task attack4 {
  85. loop {
  86. if(phase>=4) { ascent(j in -1..2) { ascent(i in 0..2) {
  87. CreateShot01(GetX, GetY, pi-(|j|), GetAngleToPlayer+23*(i*2-1)+j*10, 254, 15);
  88. } } }
  89. wait(13);
  90. }
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment