Guest User

a

a guest
Dec 19th, 2020
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["HommerL"]
  4. #Text["WIP"]
  5.  
  6. #include "./Cutin/Cutin.txt"
  7. #include "./ShallaHammer_Const.txt"
  8. #include "./ShallareGoldHam_Const.txt"
  9. #include "script/default_system/Default_ShotConst.txt"
  10.  
  11. let GSD = GetCurrentScriptDirectory();
  12. let stgx=GetStgFrameWidth()/2;
  13. let stgy=GetStgFrameHeight()/2;
  14. let objBoss;
  15. let objScene=GetEnemyBossSceneObjectID();
  16. let count = 0;
  17. @Event{
  18. alternative(GetEventType())
  19. case(EV_REQUEST_LIFE){
  20. SetScriptResult(3500);
  21. }
  22. case(EV_REQUEST_TIMER){
  23. SetScriptResult(70);
  24. }
  25. case(EV_REQUEST_SPELL_SCORE){
  26. SetScriptResult(1000000);
  27. }
  28. }
  29. @Initialize{
  30. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  31. ObjEnemy_Regist(objBoss);
  32. ObjMove_SetDestAtFrame(objBoss, GetCenterX, GetCenterY-40, 60);
  33. ObjEnemyBossScene_StartSpell(objScene);
  34. TDrawLoop2;
  35. StartSpell;
  36. TFinalize;
  37. }
  38. @MainLoop{
  39. ObjEnemy_SetIntersectionCircleToShot(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 32);
  40. ObjEnemy_SetIntersectionCircleToPlayer(objBoss, ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), 24);
  41. if(count % 30 == 0){
  42. Gold;
  43. }
  44. count++;
  45. yield;
  46. }
  47. task move{
  48. wait(300);
  49.  
  50. loop(12){
  51. Gold;
  52. }
  53. }
  54. task fire{
  55. wait(80);
  56. if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0){return;} //Default kill to prevent (0,0) spawning
  57. let angleT = GetAngleToPlayer(objBoss);
  58. let ToPlayer = ObjMove_GetAngle(objBoss);
  59. let ToPlayer2 = 0;
  60. wait(60);
  61.  
  62. }
  63. task Gold{
  64. wait(300);
  65. let angle = 0;
  66. let angleT = GetAngleToPlayer(objBoss);
  67. let GoldHam = CreateShotA1(GetPlayerX, -50, 10, 90, 301, 20);
  68. ObjShot_SetSpellResist(GoldHam, true);
  69. loop(60){yield;}
  70.  
  71. ascent(i in 30 .. 3300)
  72. {
  73. if(Obj_IsDeleted(GoldHam)){break;}
  74. let shotSpeed = rand(0.5,1.5);
  75. let sx = ObjMove_GetX(GoldHam);
  76. let sy = ObjMove_GetY(GoldHam);
  77. CreateShotA1(sx, sy - 10, rand(0.5,1.5), rand(0,360), 226, 30);
  78. yield;
  79. }
  80. wait(400);
  81. }
  82. task fire2{
  83. if(ObjEnemy_GetInfo(objBoss, INFO_LIFE) <= 0){return;} //Default kill to prevent (0,0) spawning
  84. let angleT = GetAngleToPlayer(objBoss);
  85. let ToPlayer = ObjMove_GetAngle(objBoss);
  86.  
  87.  
  88. }
  89. task StartSpell{
  90. let objEnemy = GetEnemyBossObjectID[0];
  91. wait(60);
  92. let rumia = GSD ~ "./Img/Shallare.png";
  93. ObjCutin_SetSpellcardS4("Legendary Relic \"Ancient Golden Hammer\"", rumia, KANAKO, 128, 0, 96);
  94. ObjCutin_LaunchS3(NAZRIN, rumia, "Lunatic");
  95. }
  96. task TDrawLoop2 {
  97. let imgExRumia = GetCurrentScriptDirectory() ~ "./Img/Sha2.png";
  98. ObjPrim_SetTexture(objBoss, imgExRumia);
  99. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 64, 80);
  100. ObjSprite2D_SetDestCenter(objBoss);
  101. }
  102. task TFinalize {
  103. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  104. if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
  105. +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
  106. AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
  107. }
  108. Obj_Delete(objBoss);
  109. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  110. SetAutoDeleteObject(true);
  111. CloseScript(GetOwnScriptID());
  112. return;
  113. }
  114. function GetCenterX(){
  115. return GetStgFrameWidth() / 2;
  116. }
  117. function GetCenterY(){
  118. return GetStgFrameHeight() / 2;
  119. }
  120. function wait(n){
  121. loop(n){yield;}
  122. }
RAW Paste Data