Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[ Mokou Nonspell #1 ]
- #Text[ More of a PC-98 Nonspell. The pattern is
- a random much, yes? ]
- #ScriptVersion[ 2 ]
- ////////////////////////////////////////////////
- script_enemy_main {
- ///////////////////////////////////////////////
- #include_function".\DATA\lib_anime_Mokou.txt";
- #include_function".\SHOT\Index_UserShot.txt";
- ///////////////////////////////////////////////
- let CSD = GetCurrentScriptDirectory;
- ///////////////////////////////////////////////
- let Boss_Mokou = CSD ~ "SPRITE\boss_mokou.png";
- ///////////////////////////////////////////////
- let Shot01 = CSD ~ "SOUND\SE\Shot1.wav";
- let Shot02 = CSD ~ "SOUND\SE\Shot2.wav";
- let FAMILIAR = CSD ~ "SOUNd\SE\Weird.wav";
- ///////////////////////////////////////////////
- let UserShot = CSD ~ "SHOT\supershot.txt";
- ///////////////////////////////////////////////
- let MokouA = 10;
- let MokouB = 0;
- let MokouC = 20;
- //////////////////////////////////////////////
- @Initialize {
- LoadGraphic( Boss_Mokou );
- SetX( GetCenterX );
- SetY( GetCenterY - 100 );
- LoadSE( Shot01 );
- LoadSE( Shot02 );
- LoadSE( FAMILIAR );
- SetLife( 450 );
- SetTimer( 35 );
- SetDamageRate( 20, 100 );
- LoadUserShotData( UserShot );
- ScarletTask;
- }
- @MainLoop {
- SetCollisionA( GetX, GetY, 32 );
- SetCollisionB( GetX, GetY, 16 );
- yield;
- }
- @DrawLoop {
- DrawBoss( Boss_Mokou );
- }
- @Finalize {
- DeleteGraphic( Boss_Mokou );
- }
- task ScarletTask {
- yield;
- PhoenixShot;
- MokouMovement;
- spawn;
- }
- sub spawn {
- CreateEnemyFromScript( "FAMILIAR_A", GetEnemyX, GetEnemyY, 0, 0, 0 );
- PlaySE( FAMILIAR );
- SetAction( ACT_SHOT_A, 10 );
- }
- }
- task PhoenixShot {
- let MokouX = GetX();
- let MokouY = GetY();
- let MSpeed = [ 3.2, 3.2, 3.1, 3.1 ];
- let MAngle = [ GetAngleToPlayer + MokouA, GetAngleToPlayer + MokouB, GetAngleToplayer + MokouC ];
- let MGraphic = [ US_FIREBALL_R, US_FIREBALL_R, US_FIREBALL_R ];
- let MDelay = 10;
- let MWay = 56;
- loop( MWay ) {
- SCARLET_SHOT_MOKOU( MokouX, MokouY, MSpeed, MAngle, MGraphic, MDelay );
- PlaySE( Shot01 );
- SetAction( ACT_SHOT_B, 30 );
- wait( 240 );
- yield;
- }
- }
- task SCARLET_SHOT_MOKOU( MokouX, MokouY, MSpeed, MAngle, MGraphic, MDelay ){
- let REMI = obj_Create( OBJ_SHOT );
- Obj_SetPosition( REMI, MokouX, MokouY );
- Obj_SetSpeed( REMI, MSpeed );
- Obj_Angle( REMI, MAngle );
- ObjShot_SetGraphic( REMI, MGraphic );
- ObjShot_SetDelay( REMI, MDelay )
- ObjShot_SetBombResist( REMI, true ); // Indestructible Bullets
- }
- task MokouMovement {
- SetMovePosition01( GetX, GetY - 100, 3.5 );
- wait( 320 );
- SetMovePosition01( GetCenterX - 100, GetY, 3.5 );
- wait( 440 );
- SetMovePosition01( GetCenterX, GetCenterY - 100, 3.5 );
- wait( 560 );
- }
- function wait( w ){
- loop( w ) { yield };
- }
- script_enemy FAMILIAR_A {
- /-- Declaring the Variables ------------
- let CSD = GetCurrentScriptDirectory;
- ////////////////////////////////////////
- let Familiar_A = CSD ~ "SPRITE\Familiar.png";
- ////////////////////////////////////////
- let Shot01 = CSD ~ "SOUND\SE\Shot4.wav";
- ////////////////////////////////////////
- let UserShot = CSD ~ "SHOT\supershot.txt";
- /////////////////////////////////////////
- @Initialize {
- LoadGraphic( Familiar_A );
- LoadSE( Shot01 );
- SetLife( 350 );
- SetDamageRate( 5, 0 );
- Concentration01( 60 );
- LoadUserShotData( UserShot );
- ScarletFamTask;
- }
- @MainLoop {
- SetCollisionA( GetX, GetY, 16 );
- SetCollisionB( GetX, GetY, 16 );
- yield;
- }
- @DrawLoop {
- SetTexture( Familiar_A );
- SetRenderState( ADD );
- SetGraphicScale( 1, 1 );
- SetGraphicAngle( 0, 0, 0 );
- SetGraphicRect( 68, 32, 100, 64 );
- DrawGraphic( GetX, GetY );
- }
- @Finalize {
- DeleteGraphic( Familiar_A );
- }
- task ScarletFamTask {
- yield;
- FamShot;
- }
- task FamShot {
- let FamX = GetX();
- let FamY = GetY();
- let FSpeed = [ 2.5, 2.5, 2.4, 2.6 ];
- let FAngle = [ GetAngleToThePlayer * cos + 10, GetAngleToPlayer * cos + 20, GetAngleToPlayer * cos + 30 ];
- let FGraphic = [ US_KNIFE_SAKUYA_RED, US_KNIFE_SAKUYA_PURPLE, US_KNIFE_SAKUYA_BLUE ];
- let FDelay = 60;
- let FWay = 5;
- loop ( FWay ){
- SCARLET_FAM_SHOT( FamX, FamY, FSpeed, FAngle, FGraphic, FDelay );
- PlaySE( Shot01 );
- wait( 120 );
- yield;
- }
- }
- task SCARLET_FAM_SHOT( FamX, FamY, FSpeed, FAngle, FGraphic, FDelay ){
- let MEIRIN = Obj_Create( OBJ_SHOT );
- Obj_SetPosition( MEIRIN, FamX, FamY );
- Obj_SetSpeed( MEIRIN, FSpeed );
- Obj_SetAngle( MEIRIN, FAngle );
- ObjShot_SetGraphic( MEIRIN, FGraphic );
- ObjShot_SetDelay( MEIRIN, FDelay );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment