Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Koishi Spell ?]
- #Text[Survival]
- #PlayLevel[Extra]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main
- {
- #include_function ".\Library.dnh"
- let KoishiSprite = csd~"img/KoishiSprite.png";
- let cutin = csd~"img/KoishiCutin.png";
- let blank = csd~"img/blank.png";
- let SpellBG01 = csd~"img/SpellBG01.png";
- let SpellBG02 = csd~"img/SpellBG02.png";
- @Initialize
- {
- PlayMusic(csd~"Hartmann's Youkai Girl.mp3");
- LoadUserShotData(csd~"Shot.txt");
- LoadGraphic(KoishiSprite);
- LoadGraphic(SpellBG01);
- LoadGraphic(SpellBG02);
- SetLife(1000);
- SetDamageRate(0,0);
- SetTimer(76);
- SetScore(100000);
- SetEnemyMarker(false);
- SetMovePosition03(GetCenterX,GetCenterY,8,5);
- SetEffectForZeroLife(60,0,0);
- SetDurableSpellCard;
- ExCutin("NAZRIN", cutin, 0, -50, 256, 512);
- CutIn(YOUMU,"Response "\""Responding Heart"\", blank,0,0,256,512);
- PlaySE(SpellCard);
- MainTask;
- Timer;
- IdleAnimation;
- }
- task MainTask
- {
- SetShotAutoDeleteClip(96,96,96,96);
- Wait(60);
- SetColor(64,255,64);
- Concentration01(120);
- FireAnimation;
- SetColor(255,255,255);
- PlaySE(Charge1);
- Wait(120);
- loop
- {
- let angle = rand(0,360);
- loop(1)
- {
- CreateShot02(GetPlayerX+cos(angle)*96,GetPlayerY+sin(angle)*96,0,angle+180,0.005,2,252,10);
- IdleFire;
- PlaySE(Shot2);
- angle += rand(15,30);
- Wait(2);
- }
- Wait(1);
- }
- }
- task Timer
- {
- loop
- {
- if (GetTimer > 5 && GetTimer <= 11){PlaySE(TimeOut01);}
- if (GetTimer >= 1 && GetTimer <= 5){PlaySE(TimeOut02);}
- Wait(60);
- }
- }
- @MainLoop
- {
- yield;
- }
- let BR = [0,0,64,64];
- let bossflip = 0;
- let ani = 0;
- task MoveAnimation
- {
- ani++;
- let currentani = ani;
- if (GetSpeedX > 0)
- {
- bossflip = 0;
- loop(8){if(currentani==ani){BR = [0,64,64,128]; yield;}}
- loop(8){if(currentani==ani){BR = [64,64,128,128]; yield;}}
- loop(8){if(currentani==ani){BR = [128,64,192,128]; yield;}}
- while(GetSpeed>0 && currentani==ani){BR = [192,64,256,128]; yield;}
- loop(8){if(currentani==ani){BR = [128,64,192,128]; yield;}}
- loop(8){if(currentani==ani){BR = [64,64,128,128]; yield;}}
- }
- else
- {
- if (GetSpeedX < 0)
- {
- bossflip = 1;
- loop(8){if(currentani==ani){BR = [0,64,64,128]; yield;}}
- loop(8){if(currentani==ani){BR = [64,64,128,128]; yield;}}
- loop(8){if(currentani==ani){BR = [128,64,192,128]; yield;}}
- while(GetSpeed>0 && currentani==ani){BR = [192,64,256,128]; yield;}
- loop(8){if(currentani==ani){BR = [128,64,192,128]; yield;}}
- loop(8){if(currentani==ani){BR = [64,64,128,128]; yield;}}
- }
- }
- if(currentani==ani){IdleAnimation;}
- }
- task IdleAnimation
- {
- ani++;
- let currentani = ani;
- while(currentani==ani)
- {
- bossflip = 0;
- loop(8){if(currentani==ani){BR = [0,0,64,64]; yield;}}
- loop(8){if(currentani==ani){BR = [64,0,128,64]; yield;}}
- loop(8){if(currentani==ani){BR = [128,0,192,64]; yield;}}
- loop(8){if(currentani==ani){BR = [192,0,256,64]; yield;}}
- loop(8){if(currentani==ani){BR = [128,0,192,64]; yield;}}
- loop(8){if(currentani==ani){BR = [64,0,128,64]; yield;}}
- }
- }
- task FireAnimation
- {
- ani++;
- let currentani = ani;
- while(currentani==ani)
- {
- bossflip = 0;
- loop(8){if(currentani==ani){BR = [0,192,64,128]; yield;}}
- loop(8){if(currentani==ani){BR = [64,192,128,128]; yield;}}
- loop(8){if(currentani==ani){BR = [128,192,192,128]; yield;}}
- loop(999){if(currentani==ani){BR = [192,192,256,128]; yield;}}
- }
- }
- task IdleFire
- {
- ani++;
- let currentani = ani;
- while(currentani==ani)
- {
- bossflip = 0;
- loop(1){if(currentani==ani){BR = [192,192,256,128]; yield;}}
- }
- }
- @DrawLoop
- {
- SetAlpha(128);
- if (bossflip==0){SetGraphicScale(1,1);}
- if (bossflip==1){SetGraphicScale(-1,1);}
- SetColor(255,255,255);
- SetGraphicAngle(0,0,0);
- SetTexture(KoishiSprite);
- SetGraphicRect(BR[0],BR[1],BR[2],BR[3]);
- DrawGraphic(GetX,GetY);
- }
- let bgalpha = 0;
- let bgangle = 0;
- @BackGround
- {
- if (bgalpha < 255){bgalpha += 5;}
- bgangle += 0.3;
- SetAlpha(bgalpha);
- SetGraphicScale(1,1);
- SetColor(255,255,255);
- SetTexture(SpellBG01);
- SetGraphicRect(0,0,384,448);
- DrawGraphic(GetX,GetCenterY);
- SetTexture(SpellBG02);
- SetGraphicRect(0,0,765,765);
- SetGraphicAngle(0,0,bgangle);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize
- {
- DeleteGraphic(KoishiSprite);
- DeleteGraphic(SpellBG01);
- DeleteGraphic(SpellBG02);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement