Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu
- #Title[Koishi Nonspell 1]
- #Text[Nonspell]
- #PlayLevel[Extra]
- #Player[FREE]
- #ScriptVersion[2]
- script_enemy_main
- {
- #include_function ".\Library.dnh"
- let KoishiSprite = csd~"img/KoishiSprite.png";
- @Initialize
- {
- PlayMusic(csd~"Hartmann's Youkai Girl.mp3");
- LoadUserShotData(csd~"Shot.txt");
- LoadGraphic(KoishiSprite);
- SetLife(3000);
- SetEnemyMarker(true);
- SetDamageRate(50,50);
- SetTimer(46);
- SetEffectForZeroLife(60,0,0);
- SetMovePosition02(GetCenterX,GetCenterY-120,60);
- MainTask;
- Vulnerable;
- IdleAnimation;
- MoveAbout;
- }
- task Vulnerable
- {
- Wait(1200);
- SetDamageRate(50,50);
- }
- task MainTask
- {
- Wait(60);
- SetColor(64,255,64);
- Concentration01(120);
- FireAnimation;
- SetColor(255,255,255);
- PlaySE(Charge1);
- Wait(120);
- loop
- {
- let angle = rand(0,360);
- ascent(i in 0..38)
- {
- CreateShot01(GetX,GetY,2,angle+i*10,250,10);
- CreateShot01(GetX,GetY,3,angle+i*10,251,10);
- }
- PlaySE(Shot2);
- Wait(30);
- }
- }
- task MoveAbout
- {
- loop
- {
- Wait(250);
- SetMovePositionRandom01(64,64,1,GetClipMinX+64,GetClipMinY+64,GetClipMaxX-64,GetClipMinY+128);
- MoveAnimation;
- Wait(150);
- }
- }
- @MainLoop
- {
- SetCollisionA(GetX,GetY,24);
- SetCollisionB(GetX,GetY,24);
- 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)
- {
- 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;}}
- }
- }
- @DrawLoop
- {
- SetAlpha(255);
- 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);
- }
- @Finalize
- {
- DeleteGraphic(KoishiSprite);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement