Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[FrostBite "Glass Reflection"]
- #Text[Cirno's Spell Card]
- #BGM[script\cirno\Pokemon X and Y Gym.mp3]
- #PlayLevel[Lunatic]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main {
- let CSD = GetCurrentScriptDirectory;
- let boss = CSD ~ "anm.png";
- let cut = CSD ~ "cirnocutin.png";
- let bg = CSD ~ "ice.png";
- let lay = CSD ~ "snow.png";
- let slide = 0;
- let sfx1 = CSD ~ "sfx/ShotA.wav";
- let sfx2 = CSD ~ "sfx/ShotB.wav";
- let concenfx = CSD ~ "sfx/Concen.wav";
- let spell = CSD ~ "sfx/Spell.wav";
- let f = 0;
- let f2 = 0;
- @Initialize {
- SetMovePosition01(GetCenterX, GetClipMinY + 120, 5);
- wait(60);
- LoadSE(spell);
- PlaySE(spell);
- SetLife(2000);
- SetTimer(90);
- SetScore(48000000);
- SetShotAutoDeleteClip(64,64,64,64);
- LoadGraphic(boss);
- LoadGraphic(cut);
- LoadGraphic(bg);
- LoadGraphic(lay);
- LoadSE(sfx1);
- CutIn(YOUMU, "FrostBite"\""Glass Reflection"\",cut,0,0,566,775);
- mainTask;
- }
- @MainLoop {
- SetCollisionA(GetX,GetY,24);
- SetCollisionB(GetX,GetY,16);
- yield;
- }
- @DrawLoop {
- SetTexture(boss);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- if(int(GetSpeedX())==0){
- if(f<10){ SetGraphicRect(0,0,64,64); }
- if(f>=10 && f<20){ SetGraphicRect(64,0,128,64); }
- if(f>=20 && f<30){ SetGraphicRect(128,0,192,64); }
- if(f>=30 && f<40){ SetGraphicRect(192,0,256,64); }
- f2=0;
- }
- if(GetSpeedX()>0){
- if(f2<5){ SetGraphicRect(0,64,64,128); }
- if(f2>=5 && f2<10){ SetGraphicRect(64,64,128,128); }
- if(f2>=10 && f2<15){ SetGraphicRect(128,64,192,128); }
- if(f2>=15){ SetGraphicRect(192,64,256,128); }
- f2++;
- }
- if(GetSpeedX()<0){
- SetGraphicAngle(180,0,0);
- if(f2<5){ SetGraphicRect(0,64,64,128); }
- if(f2>=5 && f2<10){ SetGraphicRect(64,64,128,128); }
- if(f2>=10 && f2<15){ SetGraphicRect(128,64,192,128); }
- if(f2>=15){ SetGraphicRect(192,64,256,128); }
- f2++;
- }
- DrawGraphic(GetX,GetY);
- f++;
- if(f==40){f=0;}
- }
- @BackGround {
- SetTexture(bg);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,1600,1118);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- SetTexture(lay);
- SetRenderState(ADD);
- SetGraphicRect(0,0,20000,20000);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX+slide,GetCenterY+slide);
- slide+=2;
- }
- @Finalize {
- DeleteGraphic(boss);
- DeleteGraphic(bg);
- DeleteGraphic(cut);
- DeleteSE(spell);
- }
- task mainTask{
- wait(60);
- yield;
- circle;
- move;
- concen;
- barrage;
- }
- task concen{
- PlaySE(concenfx);
- Concentration01(60);
- Concentration02(60);
- }
- task move{
- loop{
- wait(120);
- SetMovePositionRandom01(80,80,20,100,150,350,200);
- wait(60);
- yield;
- }
- }
- task circle{
- let x = 0;
- let dir = 0;
- wait(120);
- loop(5){
- PlaySE(sfx1);
- while(x<36){
- CreateShotA(1,GetEnemyX,GetEnemyY,1);
- SetShotDataA(1,0,1,dir,2,-0.5,8,AQUA02);
- FireShot(1);
- dir+=360/36;
- x++;
- }
- x = 0;
- dir = 0;
- wait(5);
- yield;
- }
- }
- task barrage{
- let x = 0;
- let dir = 0;
- wait(300);
- loop(5){
- PlaySE(sfx2);
- while(x<36){
- CreateShotA(1,GetEnemyX,GetEnemyY,1);
- SetShotDataA(1,0,1,dir,0,-0.5,8,BLUE31);
- FireShot(1);
- dir+=360/36;
- x++;
- }
- x = 0;
- dir = 0;
- wait(5);
- yield;
- }
- }
- //Wait Function
- function wait(w){
- loop(w) {yield;}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment