BananaCupcake

Untitled

Jul 22nd, 2017
71
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["Improvement B2"]
  4. #Text["???"]
  5.  
  6. #include "script/default_system/Shot/ZUNShot_Const.txt"
  7.  
  8. let objBoss;
  9. let objScene=GetEnemyBossSceneObjectID();
  10.  
  11. let Boss;
  12. let BossX = 10;
  13. let BossY = 10;
  14. let obj = 0;
  15. let obj2 = 0;
  16.  
  17.  
  18. @Event{
  19. alternative(GetEventType())
  20. case(EV_REQUEST_LIFE){
  21. SetScriptResult(2500);
  22. }
  23. case(EV_REQUEST_TIMER){
  24. SetScriptResult(80);
  25. }
  26. case(EV_REQUEST_SPELL_SCORE){
  27. SetScriptResult(1000000);
  28. }
  29. }
  30.  
  31. @Initialize{
  32. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  33. ObjEnemy_Regist(objBoss);
  34. ObjMove_SetDestAtFrame(objBoss, GetCenterX, 60, 60);
  35. ObjEnemyBossScene_StartSpell(objScene);
  36. TDrawLoop;
  37. TFinalize;
  38. MainTask;
  39. RenderBG;
  40. }
  41.  
  42. @MainLoop{
  43. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  44. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  45.  
  46. yield;
  47. }
  48.  
  49. task MainTask{
  50. ObjMove_SetDestAtFrame(objBoss, GetCenterX, 60, 60);
  51. wait(55);
  52. fireA;
  53.  
  54.  
  55. }
  56.  
  57. task RenderBG{
  58. let path1 = GetCurrentScriptDirectory() ~ "Muenzuka.png";
  59. let obj1 = ObjPrim_Create(OBJ_SPRITE_2D);
  60. ObjRender_SetBlendType(obj1, BLEND_ALPHA);
  61. Obj_SetRenderPriority(obj1, 0.21);
  62. ObjPrim_SetTexture(obj1, path1);
  63. ObjSprite2D_SetSourceRect(obj1, 0, 0, 512, 512);
  64. ObjSprite2D_SetDestRect(obj1, -256, -256, 256, 256);
  65. ObjRender_SetPosition(obj1, 384/2, 448/2, 1);
  66. let frame = 0;
  67. let alpha = 0;
  68. yield;
  69. }
  70.  
  71.  
  72.  
  73. task fireA{
  74. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  75. let angleT = GetAngleToPlayer(objBoss);
  76. loop(13){
  77. ascent(i in 0..1){
  78. let obj = CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2.5 - i/3, angleT, 406, 5);
  79. let obj2 = CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 2.5 - i/3, angleT, 406, 5);
  80. }
  81. ObjMove_SetAngularVelocity(obj, -0.2) ;
  82. ObjMove_SetAngularVelocity(obj2, 0.2);
  83. angleT += 360/12;
  84. }
  85. wait(50);
  86. }
  87. }
  88.  
  89. task TDrawLoop {
  90. let imgBoss = GetCurrentScriptDirectory() ~ "shikieiki.png.png";
  91. ObjPrim_SetTexture(objBoss, imgBoss);
  92. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 148, 125);
  93. ObjSprite2D_SetDestCenter(objBoss);
  94. }
  95. task TFinalize {
  96. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  97. if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
  98. +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
  99. AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
  100. }
  101. Obj_Delete(objBoss);
  102. DeleteShotAll(TYPE_ALL,TYPE_IMMEDIATE);
  103. SetAutoDeleteObject(true);
  104. CloseScript(GetOwnScriptID());
  105. return;
  106. }
  107. function GetCenterX(){
  108. return GetStgFrameWidth() / 2;
  109. }
  110. function GetCenterY(){
  111. return GetStgFrameHeight() / 2;
  112. }
  113. function wait(n){
  114. loop(n){yield;}
  115. }
RAW Paste Data