Guest User

Untitled

a guest
Jan 13th, 2012
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.76 KB | None | 0 0
  1. #TouhouDanmakufu
  2. #Title[ Mokou Nonspell #1 ]
  3. #Text[ More of a PC-98 Nonspell. The pattern is
  4. a random much, yes? ]
  5. #ScriptVersion[ 2 ]
  6. ////////////////////////////////////////////////
  7. script_enemy_main {
  8. ///////////////////////////////////////////////
  9.  
  10. #include_function".\DATA\lib_anime_Mokou.txt";
  11.  
  12. #include_function".\SHOT\Index_UserShot.txt";
  13.  
  14. ///////////////////////////////////////////////
  15.  
  16. let CSD = GetCurrentScriptDirectory;
  17.  
  18. ///////////////////////////////////////////////
  19.  
  20. let Boss_Mokou = CSD ~ "SPRITE\boss_mokou.png";
  21.  
  22. ///////////////////////////////////////////////
  23.  
  24. let Shot01 = CSD ~ "SOUND\SE\Shot1.wav";
  25.  
  26. let Shot02 = CSD ~ "SOUND\SE\Shot2.wav";
  27.  
  28. let FAMILIAR = CSD ~ "SOUNd\SE\Weird.wav";
  29.  
  30. ///////////////////////////////////////////////
  31.  
  32. let UserShot = CSD ~ "SHOT\supershot.txt";
  33.  
  34. ///////////////////////////////////////////////
  35.  
  36. let MokouA = 10;
  37.  
  38. let MokouB = 0;
  39.  
  40. let MokouC = 20;
  41.  
  42. //////////////////////////////////////////////
  43.  
  44. @Initialize {
  45.  
  46. LoadGraphic( Boss_Mokou );
  47.  
  48. SetX( GetCenterX );
  49. SetY( GetCenterY - 100 );
  50.  
  51. LoadSE( Shot01 );
  52. LoadSE( Shot02 );
  53. LoadSE( FAMILIAR );
  54.  
  55. SetLife( 450 );
  56. SetTimer( 35 );
  57. SetDamageRate( 20, 100 );
  58.  
  59. LoadUserShotData( UserShot );
  60.  
  61. ScarletTask;
  62.  
  63. }
  64.  
  65. @MainLoop {
  66.  
  67. SetCollisionA( GetX, GetY, 32 );
  68. SetCollisionB( GetX, GetY, 16 );
  69. yield;
  70.  
  71. }
  72.  
  73. @DrawLoop {
  74.  
  75. DrawBoss( Boss_Mokou );
  76.  
  77. }
  78.  
  79. @Finalize {
  80.  
  81. DeleteGraphic( Boss_Mokou );
  82.  
  83. }
  84.  
  85. task ScarletTask {
  86.  
  87. yield;
  88.  
  89. PhoenixShot;
  90. MokouMovement;
  91. spawn;
  92.  
  93. }
  94.  
  95. sub spawn {
  96.  
  97. CreateEnemyFromScript( "FAMILIAR_A", GetEnemyX, GetEnemyY, 0, 0, 0 );
  98. PlaySE( FAMILIAR );
  99.  
  100. SetAction( ACT_SHOT_A, 10 );
  101.  
  102. }
  103.  
  104. }
  105.  
  106. task PhoenixShot {
  107.  
  108. let MokouX = GetX();
  109. let MokouY = GetY();
  110. let MSpeed = [ 3.2, 3.2, 3.1, 3.1 ];
  111. let MAngle = [ GetAngleToPlayer + MokouA, GetAngleToPlayer + MokouB, GetAngleToplayer + MokouC ];
  112. let MGraphic = [ US_FIREBALL_R, US_FIREBALL_R, US_FIREBALL_R ];
  113. let MDelay = 10;
  114. let MWay = 56;
  115.  
  116.  
  117. loop( MWay ) {
  118.  
  119. SCARLET_SHOT_MOKOU( MokouX, MokouY, MSpeed, MAngle, MGraphic, MDelay );
  120. PlaySE( Shot01 );
  121.  
  122. SetAction( ACT_SHOT_B, 30 );
  123.  
  124. wait( 240 );
  125.  
  126. yield;
  127. }
  128.  
  129. }
  130.  
  131. task SCARLET_SHOT_MOKOU( MokouX, MokouY, MSpeed, MAngle, MGraphic, MDelay ){
  132. let REMI = obj_Create( OBJ_SHOT );
  133.  
  134. Obj_SetPosition( REMI, MokouX, MokouY );
  135. Obj_SetSpeed( REMI, MSpeed );
  136. Obj_Angle( REMI, MAngle );
  137. ObjShot_SetGraphic( REMI, MGraphic );
  138. ObjShot_SetDelay( REMI, MDelay )
  139. ObjShot_SetBombResist( REMI, true ); // Indestructible Bullets
  140.  
  141. }
  142.  
  143. task MokouMovement {
  144.  
  145. SetMovePosition01( GetX, GetY - 100, 3.5 );
  146. wait( 320 );
  147.  
  148. SetMovePosition01( GetCenterX - 100, GetY, 3.5 );
  149. wait( 440 );
  150.  
  151. SetMovePosition01( GetCenterX, GetCenterY - 100, 3.5 );
  152. wait( 560 );
  153.  
  154. }
  155.  
  156. function wait( w ){
  157. loop( w ) { yield };
  158.  
  159.  
  160. }
  161.  
  162. script_enemy FAMILIAR_A {
  163.  
  164. /-- Declaring the Variables ------------
  165.  
  166. let CSD = GetCurrentScriptDirectory;
  167.  
  168. ////////////////////////////////////////
  169.  
  170. let Familiar_A = CSD ~ "SPRITE\Familiar.png";
  171.  
  172. ////////////////////////////////////////
  173.  
  174. let Shot01 = CSD ~ "SOUND\SE\Shot4.wav";
  175.  
  176. ////////////////////////////////////////
  177.  
  178. let UserShot = CSD ~ "SHOT\supershot.txt";
  179.  
  180. /////////////////////////////////////////
  181.  
  182.  
  183. @Initialize {
  184.  
  185. LoadGraphic( Familiar_A );
  186.  
  187. LoadSE( Shot01 );
  188.  
  189. SetLife( 350 );
  190. SetDamageRate( 5, 0 );
  191.  
  192. Concentration01( 60 );
  193.  
  194. LoadUserShotData( UserShot );
  195.  
  196. ScarletFamTask;
  197.  
  198. }
  199.  
  200. @MainLoop {
  201.  
  202. SetCollisionA( GetX, GetY, 16 );
  203. SetCollisionB( GetX, GetY, 16 );
  204. yield;
  205.  
  206. }
  207.  
  208. @DrawLoop {
  209.  
  210. SetTexture( Familiar_A );
  211. SetRenderState( ADD );
  212. SetGraphicScale( 1, 1 );
  213. SetGraphicAngle( 0, 0, 0 );
  214. SetGraphicRect( 68, 32, 100, 64 );
  215. DrawGraphic( GetX, GetY );
  216.  
  217. }
  218.  
  219. @Finalize {
  220.  
  221. DeleteGraphic( Familiar_A );
  222.  
  223.  
  224. }
  225.  
  226. task ScarletFamTask {
  227.  
  228. yield;
  229.  
  230. FamShot;
  231.  
  232. }
  233.  
  234. task FamShot {
  235.  
  236. let FamX = GetX();
  237. let FamY = GetY();
  238. let FSpeed = [ 2.5, 2.5, 2.4, 2.6 ];
  239. let FAngle = [ GetAngleToThePlayer * cos + 10, GetAngleToPlayer * cos + 20, GetAngleToPlayer * cos + 30 ];
  240. let FGraphic = [ US_KNIFE_SAKUYA_RED, US_KNIFE_SAKUYA_PURPLE, US_KNIFE_SAKUYA_BLUE ];
  241. let FDelay = 60;
  242. let FWay = 5;
  243.  
  244. loop ( FWay ){
  245.  
  246. SCARLET_FAM_SHOT( FamX, FamY, FSpeed, FAngle, FGraphic, FDelay );
  247.  
  248. PlaySE( Shot01 );
  249.  
  250. wait( 120 );
  251.  
  252. yield;
  253.  
  254. }
  255. }
  256.  
  257. task SCARLET_FAM_SHOT( FamX, FamY, FSpeed, FAngle, FGraphic, FDelay ){
  258.  
  259. let MEIRIN = Obj_Create( OBJ_SHOT );
  260.  
  261. Obj_SetPosition( MEIRIN, FamX, FamY );
  262. Obj_SetSpeed( MEIRIN, FSpeed );
  263. Obj_SetAngle( MEIRIN, FAngle );
  264. ObjShot_SetGraphic( MEIRIN, FGraphic );
  265. ObjShot_SetDelay( MEIRIN, FDelay );
  266.  
  267. }
  268. }
Advertisement
Add Comment
Please, Sign In to add comment