Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #TouhouDanmakufu[Single]
- #ScriptVersion[3]
- #Title["(Extra) Spell Recreation 1"]
- #Text["Lesson by Sparen[r]Done by Cresendo[r]Cut in created by gtbot.[r] Strange Art - Eternal Meek"]
- #BGM["Music/Stage_Theme_1.mp3"]
- #include "script/default_system/Default_ShotConst.txt"
- #include"script/default_system/Default_Effect.txt"
- #include"./Cutin.txt"
- let count = 0;
- let objBoss;
- let objScene = GetEnemyBossSceneObjectID();
- let bossmusic = GetCurrentScriptDirectory ~ "Music/Stage_Theme_2.mp3";
- let spellcard = GetCurrentScriptDirectory ~ "SFX/spellcard_alpha.wav";
- let bossdeath = GetCurrentScriptDirectory ~ "SFX/pichun_alpha.mp3";
- LoadSound(bossmusic);
- LoadSound(bossdeath);
- PlaySE(bossmusic);
- @Event{
- alternative(GetEventType())
- case(EV_REQUEST_LIFE){
- SetScriptResult(2000);
- }
- case(EV_REQUEST_TIMER){
- SetScriptResult(60);
- }
- case(EV_REQUEST_SPELL_SCORE){
- SetScriptResult(999999);
- }
- }
- @Initialize{
- objBoss = ObjEnemy_Create(OBJ_ENEMY_BOSS);
- ObjEnemy_Regist(objBoss);
- ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 60, 60);
- ObjEnemyBossScene_StartSpell(objScene);
- wait(120);
- if(count == 0){movement;};
- StartSpell;
- TDrawLoop;
- TFinalize;
- MainTask;
- }
- @MainLoop{
- ObjEnemy_SetIntersectionCircleToShot(objBoss,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),32);
- ObjEnemy_SetIntersectionCircleToPlayer(objBoss,ObjMove_GetX(objBoss),ObjMove_GetY(objBoss),24);
- yield;
- }
- function GetCenterX(){
- return GetStgFrameWidth() / 2;
- }
- function GetCenterY(){
- return GetStgFrameHeight() / 2;
- }
- function wait(n){
- loop(n){yield;}
- }
- task MainTask{
- ObjMove_SetDestAtFrame(objBoss, GetCenterX(), 112, 60)
- wait(120);
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- CreateShotA1(ObjMove_GetX(objBoss), ObjMove_GetY(objBoss), rand(3, 6), rand(0, 360), DS_BALL_S_BLUE, 20);
- yield;
- }
- }
- task StartSpell{
- let objEnemy = GetEnemyBossObjectID[0];
- loop(90){yield;}
- //Cutin Images from http://seiga.nicovideo.jp/user/illust/3494232
- let cirno = GetCurrentScriptDirectory~"ccutin.png";
- ObjCutin_SetSpellcardS4("Copycat - Eternal Meek", cirno, NAZRIN, 240, 104, 104);
- //No matter what cutin type and image you put for the first ObjCutin_SetSpellcardS4 function,
- //the ObjCutin_LaunchS3's cutin type and image will override them
- ObjCutin_LaunchS3(YABUSAME, cirno, "Normal");
- }
- task movement {
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){
- ObjMove_SetDestAtFrame(objBoss, rand(GetCenterX() + 90, GetCenterX() - 90), rand(GetCenterY() - 60, GetCenterY() - 120), 60);
- wait(200);
- }
- }
- task TDrawLoop {
- let imgExRumia = GetCurrentScriptDirectory() ~ "Sprites/cirno.png";
- ObjPrim_SetTexture(objBoss, imgExRumia);
- ObjSprite2D_SetSourceRect(objBoss, 0, 0, 110, 110);
- ObjSprite2D_SetDestCenter(objBoss);
- }
- task TFinalize {
- while(ObjEnemy_GetInfo(objBoss, INFO_LIFE) > 0){yield;}
- if(ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SHOOTDOWN_COUNT)
- +ObjEnemyBossScene_GetInfo(objScene, INFO_PLAYER_SPELL_COUNT) == 0){
- AddScore(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
- }
- PlaySE(bossdeath);
- TExplosionA(GetCenterX,GetCenterY,10,0.5);
- Obj_Delete(objBoss);
- DeleteShotAll(TYPE_ALL, TYPE_IMMEDIATE);
- SetAutoDeleteObject(true);
- CloseScript(GetOwnScriptID());
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement