Advertisement
Guest User

Danmakufu - Cresendo

a guest
Sep 8th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. #TouhouDanmakufu[Single]
  2. #ScriptVersion[3]
  3. #Title["(Extra) Spell Recreation 1"]
  4. #Text["Lesson by Sparen[r]Done by Cresendo[r]Cut in created by gtbot.[r] Strange Art - Eternal Meek"]
  5. #BGM["Music/Stage_Theme_1.mp3"]
  6. #include "script/default_system/Default_ShotConst.txt"
  7. #include"script/default_system/Default_Effect.txt"
  8. #include"./Cutin.txt"
  9.  
  10.  
  11. let count = 0;
  12.  
  13. let objBoss;
  14. let objScene = GetEnemyBossSceneObjectID();
  15. let bossmusic = GetCurrentScriptDirectory ~ "Music/Stage_Theme_2.mp3";
  16. let spellcard = GetCurrentScriptDirectory ~ "SFX/spellcard_alpha.wav";
  17. let bossdeath = GetCurrentScriptDirectory ~ "SFX/pichun_alpha.mp3";
  18.  
  19. LoadSound(bossmusic);
  20. LoadSound(bossdeath);
  21. PlaySE(bossmusic);
  22.  
  23.  
  24. @Event{
  25. alternative(GetEventType())
  26. case(EV_REQUEST_LIFE){
  27. SetScriptResult(2000);
  28. }
  29. case(EV_REQUEST_TIMER){
  30. SetScriptResult(60);
  31. }
  32. case(EV_REQUEST_SPELL_SCORE){
  33. SetScriptResult(999999);
  34. }
  35. }
  36. @Initialize{
  37. objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
  38. ObjEnemy_Regist(objBoss);
  39. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
  40.  
  41. ObjEnemyBossScene_StartSpell(objScene);
  42.  
  43. wait(120);
  44.  
  45. if(count == 0){movement;};
  46. StartSpell;
  47. TDrawLoop;
  48. TFinalize;
  49. MainTask;
  50.  
  51. }
  52. @MainLoop{
  53.  
  54.  
  55. ObjEnemy_SetIntersectionCircleToShot(objBoss,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),32);
  56. ObjEnemy_SetIntersectionCircleToPlayer(objBoss,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),24);
  57.  
  58. yield;
  59. }
  60.  
  61. function GetCenterX(){
  62. return GetStgFrameWidth() / 2;
  63. }
  64. function GetCenterY(){
  65. return GetStgFrameHeight() / 2;
  66. }
  67. function wait(n){
  68. loop(n){yield;}
  69. }
  70.  
  71.  
  72. task MainTask{
  73. ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 112, 60)
  74. wait(120);
  75. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  76. CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(3, 6), rand(0, 360), DS_BALL_S_BLUE, 20);
  77. yield;
  78. }
  79. }
  80.  
  81. task StartSpell{
  82. let objEnemy = GetEnemyBossObjectID[0];
  83. loop(90){yield;}
  84.  
  85. //Cutin Images from http://seiga.nicovideo.jp/user/illust/3494232
  86.  
  87.  
  88. let cirno = GetCurrentScriptDirectory~"ccutin.png";
  89. ObjCutin_SetSpellcardS4("Copycat - Eternal Meek", cirno, NAZRIN, 240, 104, 104);
  90. //No matter what cutin type and image you put for the first ObjCutin_SetSpellcardS4 function,
  91. //the ObjCutin_LaunchS3's cutin type and image will override them
  92. ObjCutin_LaunchS3(YABUSAME, cirno, "Normal");
  93. }
  94.  
  95.  
  96. task movement {
  97. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
  98. ObjMove_SetDestAtFrame(objBoss, rand(GetCenterX() + 90, GetCenterX() - 90), rand(GetCenterY() - 60, GetCenterY() - 120), 60);
  99. wait(200);
  100. }
  101. }
  102.  
  103.  
  104. task TDrawLoop {
  105. let imgExRumia = GetCurrentScriptDirectory() ~ "Sprites/cirno.png";
  106. ObjPrim_SetTexture(objBoss, imgExRumia);
  107. ObjSprite2D_SetSourceRect(objBoss, 0, 0, 110, 110);
  108. ObjSprite2D_SetDestCenter(objBoss);
  109. }
  110.  
  111.  
  112. task TFinalize {
  113. while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
  114. if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
  115. +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
  116. AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
  117. }
  118. PlaySE(bossdeath);
  119. TExplosionA(GetCenterX,GetCenterY,10,0.5);
  120. Obj_Delete(objBoss);
  121. DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
  122. SetAutoDeleteObject(true);
  123. CloseScript(GetOwnScriptID());
  124. return;
  125. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement