2022-08-20 05:42:00 +00:00
|
|
|
#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:
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
+ Laser ring density
|
|
|
|
+ Laser spin speed
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
+ Spiral density
|
|
|
|
+ Spiral speed
|
|
|
|
+ Spiral angle offset
|
|
|
|
+ Spiral delay
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
int[] denseLaser = [7, 8, 9];
|
|
|
|
float[] speedspinLaser = [0.35, 0.35, 0.35];
|
|
|
|
int[] timeLaser = [60, 70, 80];
|
|
|
|
int[] timeDelayLaser = [45, 40, 30];
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
int[] denseSpiral = [5, 6, 7];
|
|
|
|
float[] angleoffsetSpiral = [1.618*8, 1.618*7, 1.618*6];
|
|
|
|
float[] speedSpiral = [8.5, 9.5, 10.5];
|
|
|
|
int[] delaySpiral = [5, 5, 4];
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
// Includes ahoy
|
|
|
|
|
|
|
|
#include "script/KevinSystem/Universal_Lib.txt" // The library to include all libraries :sans: :nail_care:
|
|
|
|
|
|
|
|
@Initialize {
|
|
|
|
|
|
|
|
//SetIntersectionVisualization(true);
|
|
|
|
|
|
|
|
SetAutoDeleteObject(true);
|
|
|
|
|
|
|
|
_InitDifficulty(difficultySelect);
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
//difficultySelect = 0; // debug
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
_RenderBoss(bossObj);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
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);
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
ObjEnemy_SetIntersectionCircleToShot(bossObj, ObjMove_GetX(bossObj), ObjMove_GetY(bossObj), 180);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
yield;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
@Finalize {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
/*Nonspell 2 (Patchouli):
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
Non-directional Laser with Bubble Spiral
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
Parameters:
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
+ Laser ring density
|
|
|
|
+ Laser spin speed
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
+ Spiral density
|
|
|
|
+ Spiral speed
|
|
|
|
+ Spiral angle offset
|
2022-08-20 05:42:00 +00:00
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
task mainTask {
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
ObjMove_SetDestAtFrame(bossObj, STG_WIDTH/2, STG_HEIGHT/6+30, 45, LERP_DECELERATE);
|
|
|
|
wait(60);
|
|
|
|
int multiplier = 1;
|
|
|
|
|
2022-08-20 05:42:00 +00:00
|
|
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE) > 0){
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
ascent(i in 0..denseLaser[difficultySelect]){
|
|
|
|
SpawnNDLaser(i, multiplier);
|
|
|
|
}
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
wait(timeDelayLaser[difficultySelect]);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
float ang = 0;
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
loop(90/delaySpiral[difficultySelect]){
|
|
|
|
float ang2 = ang;
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
loop(denseSpiral[difficultySelect]){
|
|
|
|
|
|
|
|
int shot = CreateShotA1(bossX, bossY, speedSpiral[difficultySelect], ang2, KEV_BUBBLE_RED, 10);
|
|
|
|
|
|
|
|
if (multiplier == -1) {ObjShot_SetGraphic(shot, KEV_BUBBLE_AQUA);}
|
|
|
|
else{}
|
|
|
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) <= 0){Obj_Delete(shot);}
|
|
|
|
else{
|
|
|
|
_Delay(shot, 10);
|
|
|
|
_BulletRescale(shot, 0.65, true, 1);
|
|
|
|
Shoot1;
|
|
|
|
}
|
|
|
|
|
|
|
|
ang2 += 360/denseSpiral[difficultySelect];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
ang += angleoffsetSpiral[difficultySelect]*-multiplier;
|
|
|
|
wait(delaySpiral[difficultySelect]);
|
2022-08-20 05:42:00 +00:00
|
|
|
}
|
2022-08-22 10:14:18 +00:00
|
|
|
|
|
|
|
multiplier *= -1;
|
|
|
|
|
|
|
|
yield;
|
|
|
|
|
2022-08-20 05:42:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
task SpawnNDLaser(int ID, int multiplier){
|
|
|
|
|
|
|
|
float objcount = 0;
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
int obj = CreateStraightLaserA1(bossX + -45*cos(ID*360/denseLaser[difficultySelect]), bossY + -45*sin(ID*360/denseLaser[difficultySelect]), ID * 360/denseLaser[difficultySelect], STG_HEIGHT*1.5, 100, timeLaser[difficultySelect], KEV_AMULET_RED, timeDelayLaser[difficultySelect]);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(obj);}
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
int shot = CreateShotA1(bossX + 120*cos(ID*360/denseLaser[difficultySelect]), bossY + 120*sin(ID*360/denseLaser[difficultySelect]), 0, ID * 360/denseLaser[difficultySelect], KEV_AURABALL_RED, 10);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) == 0){Obj_Delete(shot);}
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
else{
|
|
|
|
_Delay(shot, 10);
|
|
|
|
_BulletRescale(shot, 2, true, 1);
|
|
|
|
Shoot1;
|
2022-08-20 05:42:00 +00:00
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
if(multiplier == -1){
|
|
|
|
ObjShot_SetGraphic(obj, KEV_AMULET_AQUA);
|
|
|
|
ObjShot_SetGraphic(shot, KEV_AURABALL_AQUA);
|
2022-08-20 05:42:00 +00:00
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
ObjShot_SetAutoDelete(obj, false);
|
|
|
|
ObjShot_SetAutoDelete(shot, false);
|
|
|
|
ObjRender_SetBlendType(obj, BLEND_ADD_ARGB);
|
|
|
|
ObjRender_SetBlendType(shot, BLEND_ADD_ARGB);
|
|
|
|
ObjLaser_SetInvalidLength(obj, 0.25, 0.25);
|
|
|
|
ObjStLaser_SetSource(obj, true);
|
|
|
|
ObjStLaser_SetEnd(obj, true);
|
|
|
|
ObjStLaser_SetEndGraphic(obj, ObjShot_GetImageID(obj)-33);
|
2022-08-20 05:42:00 +00:00
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
async{
|
|
|
|
wait(timeDelayLaser[difficultySelect]);
|
2022-08-20 05:42:00 +00:00
|
|
|
Shoot2;
|
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
while(!Obj_IsDeleted(obj)){
|
|
|
|
ObjMove_SetPosition(obj, bossX + -45*cos(ID*360/denseLaser[difficultySelect] + objcount), bossY + -45 * sin(ID*360/denseLaser[difficultySelect] + objcount));
|
|
|
|
ObjMove_SetPosition(shot, bossX + 120*cos(ID*360/denseLaser[difficultySelect] + objcount), bossY + 120*sin(ID*360/denseLaser[difficultySelect] + objcount));
|
|
|
|
ObjStLaser_SetAngle(obj, ID*360/denseLaser[difficultySelect] + objcount);
|
|
|
|
objcount += speedspinLaser[difficultySelect]*multiplier;
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
ObjShot_FadeDelete(shot);
|
|
|
|
|
2022-08-20 05:42:00 +00:00
|
|
|
}
|
|
|
|
|
2022-08-22 10:14:18 +00:00
|
|
|
/*task SpawnNDLaser(ID, multiplier){
|
|
|
|
let objcount = 0;
|
|
|
|
let obj = CreateStraightLaserA1(ObjMove_GetX(bossObj) + 60*cos(ID*360/denseLaser[difficultySelect]), ObjMove_GetY(bossObj) + 60*sin(ID*360/denseLaser[difficultySelect]), ID * 360/denseLaser[difficultySelect], 512, 24, 300, KEV_AMULET_RED, 60);
|
|
|
|
while(!Obj_IsDeleted(obj)){
|
|
|
|
ObjMove_SetPosition(obj, ObjMove_GetX(bossObj) + 60*cos(ID*360/denseLaser[difficultySelect] + objcount), ObjMove_GetY(bossObj) + 60*sin(ID*360/denseLaser[difficultySelect] + objcount));
|
|
|
|
ObjStLaser_SetAngle(obj, ID*360/denseLaser[difficultySelect] + objcount);
|
|
|
|
//objcount += 1 * multiplier;
|
|
|
|
objcount += 0.5;
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
2022-08-20 05:42:00 +00:00
|
|
|
task endingnew(){
|
|
|
|
|
|
|
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){
|
|
|
|
yield;
|
|
|
|
}
|
|
|
|
|
|
|
|
_GoToBrazil(objScene, bossObj, 12, 24);
|
|
|
|
wait(120);
|
|
|
|
ObjSound_SetVolumeRate(fire2, 20);
|
|
|
|
|
|
|
|
CloseScript(GetOwnScriptID);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|