Advertisement
Guest User

Attack.txt

a guest
May 10th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.13 KB | None | 0 0
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Fluidmovement"]
  4. #Text["New"]
  5. #include "script/default_system/Default_ShotConst.txt"
  6.  
  7. let objBoss;
  8. let objScene = GetEnemyBossSceneObjectID();
  9.  
  10. @Event{
  11. alternative(GetEventType())
  12. case(EV_REQUEST_LIFE){
  13. SetScriptResult(500);
  14. }
  15. case(EV_REQUEST_TIMER){
  16. SetScriptResult(60);
  17. }
  18. case(EV_REQUEST_SPELL_SCORE){
  19. SetScriptResult(1000000);
  20. }
  21. }
  22. @Initialize{
  23. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  24. ObjEnemy_Regist(objBoss);
  25. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
  26.  
  27. ObjEnemyBossScene_StartSpell(objScene);
  28.  
  29.  
  30. TDrawLoop;
  31. TFinalize;
  32. MainTask;
  33. }
  34. task TDrawLoop {
  35. let imgExRumia = GetCurrentScriptDirectory() ~ "ExRumia.png";
  36. ObjPrim_SetTexture(objBoss, imgExRumia);
  37. ObjSprite2D_SetSourceRect(objBoss, 64, 1, 127, 64);
  38. ObjSprite2D_SetDestCenter(objBoss);
  39.  
  40. }
  41. @MainLoop{
  42. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  43. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  44. yield;
  45. }
  46. task MainTask{
  47. /*while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  48. let angleT = GetAngleToPlayer(objBoss);
  49. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2, angleT, DS_BALL_S_RED, 5);
  50. wait(30);
  51. }*/
  52. //while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  53. wait(120);
  54.  
  55. loop(30){
  56. /*let angleT = 0;
  57. ascent(i in -2..2){
  58. ascent (j in 0..3) {
  59. //let obj = CreateStraightLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), GetAngleToPlayer(objBoss), 512, 20, 60, 153, 60);
  60. }
  61. }*/
  62.  
  63.  
  64. let angleT = 90;
  65. ascent(i in -1..2){
  66. ascent(j in 0..5){
  67. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6,
  68. angleT + i*15, DS_RICE_M_SKY, 1);
  69.  
  70. }
  71. wait(20);
  72. }
  73.  
  74.  
  75.  
  76. /*let angleT = 90;
  77. ascent(i in -9..10){*/
  78. //ascent (j in 0..5) {
  79. //CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
  80. /*CreateLooseLaserA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3,
  81. angleT + i*11.25,
  82. 100, 20, 52 + i, 0);*/
  83. //angleT += 360/13;
  84. //wait(30);
  85.  
  86.  
  87. //}
  88. // }
  89. }
  90.  
  91.  
  92.  
  93.  
  94.  
  95. /* wait(120);
  96. //while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  97. let angleT = 0;
  98. loop(30){
  99. ascent(i in -1..2){
  100. ascent(j in 0..3){
  101. CreateShotA1(ObjMove_GetX(objBoss) + 90*cos(angleT), ObjMove_GetY(objBoss) + 90*sin(angleT), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
  102. }
  103. }
  104. angleT += 360/30
  105. }*/
  106. /*wait(120);
  107. movement;
  108. fireA;
  109. fireB;*/
  110. }
  111. task TFinalize {
  112. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  113. Obj_Delete(objBoss);
  114. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  115. SetAutoDeleteObject(true);
  116. CloseScript(GetOwnScriptID());
  117. return;
  118. if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
  119. +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
  120. AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
  121. }
  122. }
  123. task fireB{
  124. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  125. let angleT = GetAngleToPlayer(objBoss);
  126. loop(13){
  127. ascent(i in 0..5){
  128. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 1.0 - i/9, angleT, DS_BALL_S_RED + i, 5);
  129. }
  130. angleT += 360/3;
  131. wait(30);
  132. }
  133. }
  134. }
  135. task fireA {
  136. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  137. let angleT = GetAngleToPlayer(objBoss);
  138. ascent(i in -1..2){
  139. ascent(j in 0..3){
  140. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 3 - j/6, angleT + i*15, DS_RICE_M_SKY, 5);
  141. }
  142. }
  143. wait(120)
  144. }
  145. }
  146. task movement{
  147. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  148. ObjMove_SetDestAtFrame(objBoss, rand(GetCenterX + 90, GetCenterX - 90), rand(GetCenterY - 60, GetCenterY - 120), 60);
  149. wait(240);
  150. }
  151. }
  152. function GetCenterX(){
  153. return GetStgFrameWidth() / 2;
  154. }
  155. function GetCenterY(){
  156. return GetStgFrameHeight() / 2;
  157. }
  158. function wait(n){
  159. loop(n){yield;}
  160. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement