Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Divine Spear "Frozen Spear"]
- #Text[The Great Remilia Ripoff!]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main{
- let CSD = GetCurrentScriptDirectory;
- let imgBoss = CSD ~ "system\cirnoboss.png";
- let cut = CSD ~ "system\cirnocut.png";
- let bg = CSD ~ "system\lake.png";
- let time = 0;
- let f = 0;
- let f2 = 0;
- @Initialize{
- SetLife(1000);
- SetTimer(60);
- SetScore(100000);
- SetMovePosition01(GetCenterX,GetCenterY-120,10);
- LoadGraphic(imgBoss);
- LoadGraphic(cut);
- LoadGraphic(bg);
- CutIn(YOUMU, "Divine Spear "\""Frozen Spear"\",cut,0,0,300,384);
- mainTask;
- }
- @DrawLoop{
- SetTexture(imgBoss);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,64,64);
- SetGraphicScale(0.7,0.7);
- 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 && f<10){ SetGraphicRect(64,64,128,128); }
- if(f2>=10 && f<15){ SetGraphicRect(128,64,192,128); }
- if(f2>=15){ SetGraphicRect(192,64,256,128); }
- f2++;
- }
- if(GetSpeedX()<0){
- SetGraphicAngle(180,0,0); // mirror
- if(f2<5){ SetGraphicRect(0,64,64,128); }
- if(f2>=5 && f<10){ SetGraphicRect(64,64,128,128); }
- if(f2>=10 && f<15){ SetGraphicRect(128,64,192,128); }
- if(f2>=15){ SetGraphicRect(192,64,256,128); }
- f2++;
- }
- DrawGraphic(GetX,GetY);
- f++;
- if(f==40){f=0;}
- }
- @MainLoop{
- SetCollisionA(GetX,GetY,32);
- SetCollisionB(GetX,GetY,16);
- time++;
- if(time==90){
- CreateLaserA(4,GetEnemyX,GetEnemyY,400,20,BLUE32,60);
- SetLaserDataA(4,0,GetAngleToPlayer,0,0,0,0);
- SetShotKillTime(4,150);
- Concentration02(60);
- FireShot(4);
- time = 0;
- }
- }
- @BackGround{
- SetTexture(bg);
- SetRenderState(ALPHA);
- SetAlpha(255);
- SetGraphicRect(0,0,512,512);
- SetGraphicScale(1,1);
- SetGraphicAngle(0,0,0);
- DrawGraphic(GetCenterX,GetCenterY);
- }
- @Finalize{
- DeleteGraphic(imgBoss);
- DeleteGraphic(cut);
- DeleteGraphic(bg);
- }
- task mainTask{
- yield;
- fire;
- }
- task fire{
- loop{
- CreateShotA(2,448,rand(16,480),0);
- CreateShotA(3,32,rand(16,480),0);
- SetShotDataA(2,0,1,180,0,0,5,BLUE12);
- SetShotDataA(3,0,1,0+rand(-20,20),0,0,5,BLUE12);
- SetShotDataA(2,300,1,180+rand(-20,20),0,0.5,5,BLUE12);
- SetShotDataA(3,300,1,0,0,0.5,5,BLUE12);
- FireShot(2);
- FireShot(3);
- wait(10);
- }
- }
- function wait(w) { loop(w) { yield; } }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement