#TouhouDanmakufu[Single] #ScriptVersion[3] #Title["Remilia Spell 2 (Patchouli Card)"] #Text["yassification"] #System["script/KevinSystem/Kevin_System.txt"] int difficultySelect = 0; let objScene = GetEnemyBossSceneObjectID(); let csd = GetCurrentScriptDirectory(); let bossObj; float bossX = 0; float bossY = 0; float playerY = 0; float playerX = 0; let aniframe = 0; let aniframe2 = 0; let spellsnd = ObjSound_Create(); let bossdiesnd = ObjSound_Create(); /* Parameters: - Movement speed (in frames) - Ring density - Ring speed - Density of one knife line - Speed of knives - Number of knife rings - Density of each knife ring - Speed of each knife ring */ int[] frameMove = [9*27, 9*25, 9*23]; // Divisible by 9 int[] denseRing = [15, 18, 21]; int[] speedRing = [4, 5, 6]; int[] denseKnifeLine = [5, 6, 7]; float[] speedKnife = [8, 9, 10]; float[] spaceKnifeFan = [5, 7, 9]; int[] ringcountKnife = [3, 5, 7]; int[] ringdenseKnife = [10, 12, 14]; float[] ringspeedKnife = [8, 9, 10]; // Includes ahoy #include "script/KevinSystem/Universal_Lib.txt" // The library to include all libraries :sans: :nail_care: @Initialize { //SetIntersectionVisualization(true); SetAutoDeleteObject(true); _InitDifficulty(difficultySelect); difficultySelect = 0; // debug SetShotAutoDeleteClip(64, 64, 64, 64); if(!IsCommonDataAreaExists("PIV")){ CreateCommonDataArea("PIV"); SetAreaCommonData("PIV", "currentvalue", 10000); } else{} // Create the boss object itself bossObj = ObjEnemy_Create(OBJ_ENEMY_BOSS); ObjEnemy_Regist(bossObj); ObjMove_SetPosition(bossObj, GetCommonData("Boss Position X", STG_WIDTH/2), GetCommonData("Boss Position Y", STG_HEIGHT/2)); ObjEnemy_SetMaximumDamage(bossObj, 999); // PLACEHOLDER! let imgExRumia = GetModuleDirectory() ~ "script/ExRumia/ExRumia.png"; ObjPrim_SetTexture(bossObj, imgExRumia); ObjSprite2D_SetSourceRect(bossObj, 64, 1, 127, 64); ObjSprite2D_SetDestCenter(bossObj); ObjRender_SetScaleXYZ(bossObj, 2, 2, 1); ObjRender_SetColor(bossObj, 0xB93C3C); ObjMove_SetDestAtFrame(bossObj, STG_WIDTH/2, 550, 1); // PLACEHOLDER! /*_SoloCutin( "script/invalid.png", 0, 0, 1, 1, bossObj, objScene, "\"Euphoric Blooming of a New Market\"", 40, 4, 0x2868B9, 0x1D115D, 10, STG_HEIGHT*1/10-30, 41 );*/ //WriteLog(spellPIV); WriteLog(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE)); mainTask(); _FadeInvincibility(bossObj, 150, 150, 1); endingnew(); } @Event { alternative(GetEventType()) case(EV_REQUEST_LIFE) { SetScriptResult(5200); } case(EV_REQUEST_TIMER) { SetScriptResult(40); } } @MainLoop { playerY = GetPlayerY(); playerX = GetPlayerX(); //The player position is ALWAYS UPDATED bossX = ObjMove_GetX(bossObj); bossY = ObjMove_GetY(bossObj); ObjEnemy_SetIntersectionCircleToShot(bossObj, ObjMove_GetX(bossObj), ObjMove_GetY(bossObj), 100); yield; } @Finalize { } /* Spell 2 (Patchouli): Remilia summons 5 books (5 elements) (see Philosopher's Stone). These books move to the top of the screen and fire downwards lines that restrict horizontal movement. Remilia constantly will charge down at the player's horizontal position, leaving behind red rings. The player must weave through the lines of the books. After 3 charges, the books turn into bats that aim for the player, leaving trails of bullets in their wake. Remilia re-calls 5 books and then the pattern restarts. Note: Books = Enemies with no registered intersection Parameters: - Line density - Line speed - Line delay - Ring density - Ring speed - Remilia charge time - Remilia charge delay */ task mainTask { wait(45); while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){ } } /* Fire: 0, 0, 256, 256 Water: 256, 0, 512, 256 Wood: 512, 0, 768, 256 Metal: 768, 0, 1024, 256 Earth: 1024, 0, 1280, 256 */ task _CreateBook( int[] [rectLeft, rectTop, rectRight, rectBottom], float scale ){ } task endingnew(){ while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){ yield; } _GoToBrazil(objScene, bossObj, 12, 24); wait(120); ObjSound_SetVolumeRate(fire2, 20); CloseScript(GetOwnScriptID); }