365 lines
8.5 KiB
Plaintext
365 lines
8.5 KiB
Plaintext
|
#TouhouDanmakufu[Single]
|
|||
|
#ScriptVersion[3]
|
|||
|
#Title["Remilia Nonspell 2"]
|
|||
|
#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:
|
|||
|
|
|||
|
// Trail Burst
|
|||
|
|
|||
|
- Density of red bubble spiral
|
|||
|
- Angular velocity of bubbles
|
|||
|
- Speed of bubbles
|
|||
|
|
|||
|
- Density of each bullet curve left behind
|
|||
|
- Delay between each bullet in curve
|
|||
|
- Delay between each bullet curve
|
|||
|
- Movement speed of bullet curve
|
|||
|
|
|||
|
- Delay between trail and aimed burst
|
|||
|
*/
|
|||
|
|
|||
|
int[] denseTrailSpiral = [7, 8, 10];
|
|||
|
float[] wvelTrailBubble = [3, 4, 5];
|
|||
|
float[] spdTrailBubble = [13, 14, 16];
|
|||
|
|
|||
|
int[] denseTrailCurve = [1, 1, 1];
|
|||
|
int[] delayCurveIndividual = [0, 0, 0];
|
|||
|
int[] delayCurve = [8, 7, 6];
|
|||
|
float[] speedCurve = [5, 6, 7];
|
|||
|
|
|||
|
int[] delayTrailAimed = [110, 100, 90];
|
|||
|
|
|||
|
/*
|
|||
|
// Aimed Burst
|
|||
|
|
|||
|
- Density of red bubble spiral
|
|||
|
- Angular velocity of bubbles
|
|||
|
- Speed of bubbles
|
|||
|
|
|||
|
- Delay between each bullet left behind
|
|||
|
- Bullet acceleration
|
|||
|
- Bullet max speed
|
|||
|
|
|||
|
// Final Trail Burst
|
|||
|
|
|||
|
See trail burst above but x2.
|
|||
|
- Delay between the two trail burst
|
|||
|
*/
|
|||
|
|
|||
|
int[] denseAimedSpiral = [9, 10, 11];
|
|||
|
float[] wvelAimedBubble = [1.25, 1.4, 1.75];
|
|||
|
float[] spdAimedBubble = [12, 14, 16];
|
|||
|
|
|||
|
int[] delayAimed = [11, 9, 7];
|
|||
|
float[] accelAimed = [6/60, 8/50, 10/40];
|
|||
|
float[] maxspdAimed = [7, 8, 9];
|
|||
|
|
|||
|
int[] delayBeforeAim = [40, 30, 20];
|
|||
|
int[] delayFinalBurst = [45, 35, 30];
|
|||
|
int[] thresholdStopSpin = [80, 70, 60];
|
|||
|
|
|||
|
// 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 = 1; // 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(3000);
|
|||
|
}
|
|||
|
|
|||
|
case(EV_REQUEST_TIMER) {
|
|||
|
SetScriptResult(25);
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
@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 {
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
/*Nonspell 1:
|
|||
|
|
|||
|
Reference to Remi final from EoSD (Red Magic/Scarlet Gensokyo).
|
|||
|
|
|||
|
Fires red bubbles that leave behind trails of bullets.
|
|||
|
See: My BHA5 script’s second nonspell
|
|||
|
|
|||
|
Parameters:
|
|||
|
|
|||
|
// Trail Burst
|
|||
|
|
|||
|
- Density of red bubble spiral
|
|||
|
- Angular velocity of bubbles
|
|||
|
- Speed of bubbles
|
|||
|
|
|||
|
- Density of each bullet curve left behind
|
|||
|
- Delay between each bullet in curve
|
|||
|
- Delay between each bullet curve
|
|||
|
- Movement speed of bullet curve
|
|||
|
|
|||
|
- Delay between trail and aimed burst
|
|||
|
|
|||
|
// Aimed Burst
|
|||
|
|
|||
|
- Density of red bubble spiral
|
|||
|
- Angular velocity of bubbles
|
|||
|
- Speed of bubbles
|
|||
|
|
|||
|
- Delay between each bullet left behind
|
|||
|
- Bullet acceleration
|
|||
|
- Bullet max speed
|
|||
|
|
|||
|
// Final Trail Burst
|
|||
|
|
|||
|
See trail burst above but x2.
|
|||
|
- Delay between the two trail burst
|
|||
|
|
|||
|
*/
|
|||
|
|
|||
|
task mainTask {
|
|||
|
|
|||
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
|
|||
|
|
|||
|
FireTrail(rand(1.5*STG_WIDTH/8, 2.5*STG_WIDTH/8));
|
|||
|
FireAimed(rand(6.5*STG_WIDTH/8, 7.5*STG_WIDTH/8));
|
|||
|
wait(delayTrailAimed[difficultySelect]/2);
|
|||
|
FireAimed(rand(1.5*STG_WIDTH/8, 2.5*STG_WIDTH/8));
|
|||
|
FireTrail(rand(6.5*STG_WIDTH/8, 7.5*STG_WIDTH/8));
|
|||
|
wait(delayTrailAimed[difficultySelect]*1.25);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
function <void> FireTrail(destX){
|
|||
|
|
|||
|
//float destX = rand(1.5*STG_WIDTH/8, 2.5*STG_WIDTH/8);
|
|||
|
|
|||
|
ObjMove_SetDestAtFrame(bossObj, destX, STG_HEIGHT/4, 30, LERP_DECELERATE);
|
|||
|
wait(30);
|
|||
|
|
|||
|
float ang = GetAngleToPlayer(bossObj);
|
|||
|
|
|||
|
loop(denseTrailSpiral[difficultySelect]){
|
|||
|
int shot = CreateShotA2(bossX, bossY, spdTrailBubble[difficultySelect], ang, 0, spdTrailBubble[difficultySelect], wvelTrailBubble[difficultySelect], KEV_BUBBLE_RED, 5);
|
|||
|
|
|||
|
ObjMove_AddPatternA2(shot, thresholdStopSpin[difficultySelect], NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE, wvelTrailBubble[difficultySelect]*0.25);
|
|||
|
|
|||
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(shot);}
|
|||
|
else{
|
|||
|
_Delay(shot, 10);
|
|||
|
_BulletRescale(shot, 0.85, true, 1);
|
|||
|
Shoot1;
|
|||
|
}
|
|||
|
_ShotTrail(shot, ang);
|
|||
|
ang += 360/denseTrailSpiral[difficultySelect];
|
|||
|
}
|
|||
|
|
|||
|
wait(delayTrailAimed[difficultySelect]);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
task _ShotTrail(shot, ang){
|
|||
|
|
|||
|
wait(10);
|
|||
|
|
|||
|
int del = 5;
|
|||
|
|
|||
|
async{
|
|||
|
ObjShot_SetAutoDelete(shot, false);
|
|||
|
wait(thresholdStopSpin[difficultySelect]+30);
|
|||
|
ObjShot_SetAutoDelete(shot, true);
|
|||
|
}
|
|||
|
|
|||
|
while(!Obj_IsDeleted(shot) && ObjMove_GetY(shot) <= STG_HEIGHT-30 && ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
|
|||
|
|
|||
|
Shoot2;
|
|||
|
loop(denseTrailCurve[difficultySelect]){
|
|||
|
float x2 = ObjMove_GetX(shot);
|
|||
|
float y2 = ObjMove_GetY(shot);
|
|||
|
let bullet = CreateShotA1(x2, y2, 0, ObjMove_GetAngle(shot), KEV_AURABALL_RED, 15);
|
|||
|
|
|||
|
if(Obj_IsDeleted(shot)){Obj_Delete(bullet);}
|
|||
|
|
|||
|
Obj_SetRenderPriorityI(bullet, Obj_GetRenderPriorityI(shot)+1);
|
|||
|
ObjMove_AddPatternA2(bullet, 60, NO_CHANGE, NO_CHANGE, -accelAimed[difficultySelect], -speedCurve[difficultySelect], 0);
|
|||
|
_BulletRescale(bullet, 0.7, true, 1);
|
|||
|
_Delay(bullet, 15);
|
|||
|
|
|||
|
wait(delayCurveIndividual[difficultySelect]);
|
|||
|
|
|||
|
}
|
|||
|
wait(delayCurve[difficultySelect]);
|
|||
|
del += 5;
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
function <void> FireAimed(destX){
|
|||
|
|
|||
|
//float destX = rand(6.5*STG_WIDTH/8, 7.5*STG_WIDTH/8);
|
|||
|
|
|||
|
ObjMove_SetDestAtFrame(bossObj, destX, STG_HEIGHT/4, 30, LERP_DECELERATE);
|
|||
|
wait(30);
|
|||
|
|
|||
|
float ang = GetAngleToPlayer(bossObj);
|
|||
|
|
|||
|
loop(denseAimedSpiral[difficultySelect]){
|
|||
|
int shot = CreateShotA2(bossX, bossY, spdAimedBubble[difficultySelect], ang, 0, spdAimedBubble[difficultySelect], -1*wvelAimedBubble[difficultySelect], KEV_BUBBLE_LAVENDER, 5);
|
|||
|
|
|||
|
ObjMove_AddPatternA2(shot, thresholdStopSpin[difficultySelect], NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE, wvelTrailBubble[difficultySelect]*-0.25); // Stop spinning after a while
|
|||
|
|
|||
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(shot);}
|
|||
|
else{
|
|||
|
_Delay(shot, 10);
|
|||
|
_BulletRescale(shot, 0.85, true, 1);
|
|||
|
Shoot1;
|
|||
|
}
|
|||
|
_ShotAimed(shot, ang);
|
|||
|
ang += 360/denseAimedSpiral[difficultySelect];
|
|||
|
}
|
|||
|
|
|||
|
wait(delayTrailAimed[difficultySelect]);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
task _ShotAimed(shot, ang){
|
|||
|
|
|||
|
wait(10);
|
|||
|
|
|||
|
int del = 1;
|
|||
|
|
|||
|
async{
|
|||
|
ObjShot_SetAutoDelete(shot, false);
|
|||
|
wait(thresholdStopSpin[difficultySelect]+30);
|
|||
|
ObjShot_SetAutoDelete(shot, true);
|
|||
|
}
|
|||
|
|
|||
|
while(!Obj_IsDeleted(shot) && ObjMove_GetY(shot) <= STG_HEIGHT-30 && ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
|
|||
|
|
|||
|
Shoot2;
|
|||
|
|
|||
|
float x2 = ObjMove_GetX(shot);
|
|||
|
float y2 = ObjMove_GetY(shot);
|
|||
|
let bullet = CreateShotA1(x2, y2, 0, ObjMove_GetAngle(shot), KEV_BUTTERFLY_LAVENDER, 15);
|
|||
|
|
|||
|
if(Obj_IsDeleted(shot)){Obj_Delete(bullet);}
|
|||
|
|
|||
|
Obj_SetRenderPriorityI(bullet, Obj_GetRenderPriorityI(shot)+1);
|
|||
|
ObjMove_AddPatternA4(bullet, delayBeforeAim[difficultySelect]-del, NO_CHANGE, 0, accelAimed[difficultySelect], maxspdAimed[difficultySelect], 0, NO_CHANGE, GetPlayerObjectID());
|
|||
|
_BulletRescale(bullet, 0.85, true, 1);
|
|||
|
_Delay(bullet, 15);
|
|||
|
|
|||
|
wait(delayAimed[difficultySelect]);
|
|||
|
del += 1;
|
|||
|
}
|
|||
|
|
|||
|
ObjMove_AddPatternA2(shot, 80, NO_CHANGE, NO_CHANGE, NO_CHANGE, NO_CHANGE, 0); // Stop spinning after a while
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
task endingnew(){
|
|||
|
|
|||
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){
|
|||
|
yield;
|
|||
|
}
|
|||
|
|
|||
|
_GoToBrazil(objScene, bossObj, 12, 24);
|
|||
|
wait(120);
|
|||
|
ObjSound_SetVolumeRate(fire2, 20);
|
|||
|
|
|||
|
CloseScript(GetOwnScriptID);
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|