Guest User

Untitled

a guest
Jan 21st, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.16 KB | None | 0 0
  1. /////////////////////////////////////////////////////
  2. //==================================================
  3. //
  4. // Requiem of Scarlet Devil
  5. //
  6. // ( c ) 2011 - 2012
  7. //
  8. //
  9. //==================================================
  10. ////////////////////////////////////////////////////
  11.  
  12. #TouhouDanmakufu
  13. #ScriptVersion[ 2 ]
  14. #Title[ Sanae -
  15. Nonspell 01 ]
  16. #Text[ Sanae -
  17. Simple Barrage of Sanae's Pattern ]
  18.  
  19. ////////////////////////////////////////////////////
  20. ///////////////////////////////////////////////////
  21.  
  22. script_enemy_main {
  23.  
  24. ////////////////////////////////////////////////////
  25. ////////////////////////////////////////////////////
  26.  
  27. #include_function".\UserShotCtC.dnh";
  28. #include_function".\IMAGE\CHAR\DOT\index.dnh";
  29. #include_function".\SOUND\SE\index.dnh";
  30. #include_function".\DATA\lib_anime_Reimu.dnh";
  31. #include_function".\INCLUDE\BOSS\Sanae.dnh";
  32.  
  33. ////////////////////////////////////////////////////
  34. ///Declaring Extra Variables
  35. ////////////////////////////////////////////////////
  36.  
  37. let CtCShot = GetCurrentScriptDirectory ~ "shot_All.dnh";
  38.  
  39. ////////////////////////////////////////////////////
  40. ////////////////////////////////////////////////////
  41.  
  42. @Initialize {
  43.  
  44. LoadGraphic( CL_BOSS_SANAE );
  45. LoadSE( Shot01 );
  46. LoadSE( Shot02 );
  47. LoadSE( LaserShotA );
  48.  
  49. SetMovePosition01( FLAN_CENTER_X, FLAN_CENTER_Y - REMILIA, 1.5 );
  50.  
  51. SetLife( CL_LIFE_VALUE );
  52. SetTimer( CL_SANAE_TIMER );
  53. SetDamageRate( CL_DAMAGE_RATE_SHOT, CL_DAMAGE_RATE_BOMB );
  54.  
  55. LoadUserShotData( CtCShot );
  56.  
  57. SanaeTask;
  58.  
  59. }
  60.  
  61. /////////////////////////////////////////////////////
  62. /////////////////////////////////////////////////////
  63.  
  64. @MainLoop {
  65.  
  66. SetCollisionA( GetX, GetY, 32 );
  67. SetCollisionA( GetX, GetY, 16 );
  68. yield;
  69.  
  70. }
  71.  
  72. /////////////////////////////////////////////////////
  73. /////////////////////////////////////////////////////
  74.  
  75. @DrawLoop {
  76.  
  77. DrawBoss( CL_BOSS_SANAE );
  78.  
  79. }
  80.  
  81. //////////////////////////////////////////////////////
  82. //////////////////////////////////////////////////////
  83.  
  84. @Finalize {
  85.  
  86. DeleteGraphic( CL_BOSS_SANAE );
  87.  
  88. }
  89.  
  90. ///////////////////////////////////////////////////////
  91. ///////////////////////////////////////////////////////
  92. // MainTask RoSD
  93. ///////////////////////////////////////////////////////
  94. ///////////////////////////////////////////////////////
  95.  
  96. task SanaeTask {
  97.  
  98. Moriyashot;
  99.  
  100. yield;
  101.  
  102. }
  103.  
  104. task Moriyashot {
  105.  
  106. let _nFunction = 0;
  107. let _nPlus = 0;
  108. let _nRadius = 75;
  109. let _nAscent = 5;
  110. let _nAscentX = 2;
  111. let _nAdd = 19;
  112. let _nAddX = 4;
  113. let _nSide = 1;
  114. let _nAngle = GetAngleToPlayer + 45 * _nSide;
  115. let _nFlanX = GetX + _nRadius * cos( _nAngle );
  116. let _nFlanY = GetY + _nRadius * sin( _nAngle );
  117. let _nFunctionX = 0;
  118. let _nBulletTime = _nAscentX * _nAdd/_nAddX + 10;
  119. let _nSideX = 1;
  120.  
  121. ascent( i in 0.._nAscent ){
  122.  
  123. let nFlanX = GetX + _nRadius * cos( _nAngle );
  124. let nFlanY = GetX + _nRadius * sin( _nAngle );
  125. let nFlanXX = GetX + _nRadius * cos( _nAngle + 3/_nAscent*360 );
  126. let nFlanYY = GetY + _nRadius * sin( _nAngle + 3/_nAscent*360 );
  127. let _nRemi = ((nFlanXX - nFlanX )^2+( nFlanYY - nFlanY)^2)^0.5;
  128. let _nRFunction = atan2( nFlanYY - nFlanY, nFlanXX - nFlanX );
  129.  
  130. ascent( z in 0..5 ){
  131.  
  132. PlaySE( Shot01 );
  133. SetAction( ACT_SHOT_A, 30 );
  134.  
  135. CreateShotA( 0, nFlanX, nFlanY, 10 );
  136. SetShotDataA( 0, 0, 0, -_nAngle+z*360/5, 0, 0, 0, US_BALL_S_BLUE );
  137. SetShotDataA( 0, _nBulletTime, 5, NULL, 0, -5/45, 0, NULL );
  138. SetShotDataA( 0, _nBulletTime+60, 0, NULL, _nFunction, 0, 0, NULL );
  139. SetShotDataA( 0, _nBulletTime+61, 0, NULL, 0, 2/45, 2, NULL );
  140. FireShot( 0 );
  141.  
  142.  
  143. _nFunction+=18;
  144. _nFunction%=360;
  145. }
  146. }
  147. }
  148.  
  149. let _nAngle = GetAngleToPlayer + 10;
  150. let _nFlanX = GetX;
  151. let _nFlanY = GetY;
  152.  
  153. loop {
  154.  
  155. ascent( i in 0..100 ){
  156.  
  157. CreateShot01( _nFlanX, _nFlanY, 1.8, _nAngle+i*10-20, US_BALL_M_GREEN, 10 );
  158.  
  159. PlaySE( Shot02 );
  160.  
  161. SetAction( ACT_SHOT_A, 30 );
  162.  
  163. wait( 180 );
  164.  
  165. }
  166. }
  167.  
  168. }
  169.  
  170.  
  171. SetMovePosition01( FLAN_CENTER_X - REMILIA, FLAN_CENTER_Y + REMILIA, 1.5 );
  172. Wait( 120 );
  173.  
  174. SetMovePosition01( FLAN_CENTER_X + 50, FLAN_CENTER_Y - 50, 1.5 );
  175. wait( 240 );
  176.  
  177. SetMovePosition01( FLAN_CENTER_X + FLAN_DEFAULT_X, FLAN_CENTER_Y + 25, 1.5 );
  178. Wait( 360 );
  179.  
  180. SetMovePosition01( FLAN_CENTER_X, FLAN_CENTER_Y - REMILIA, 1.5 );
  181. Wait( 480 );
  182.  
  183. }
  184.  
  185. }
  186.  
  187. function wait( w ){
  188. loop( w ) { yield; }
  189. }
  190.  
  191. }
  192. }
Advertisement
Add Comment
Please, Sign In to add comment