194 lines
4.0 KiB
Plaintext
194 lines
4.0 KiB
Plaintext
|
#TouhouDanmakufu[Single]
|
||
|
#ScriptVersion[3]
|
||
|
#Title["Remilia Spell 1 (Remilia 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:
|
||
|
|
||
|
- Remilia wait time
|
||
|
- Spiral density
|
||
|
- Spiral angle offset per frame
|
||
|
|
||
|
- Ring density
|
||
|
- Ring (max) speed
|
||
|
- Delays between rings
|
||
|
|
||
|
*/
|
||
|
|
||
|
int denseSpiral = [12, 15, 18];
|
||
|
int angleoffsetSpiral = [3, 4, 6];
|
||
|
|
||
|
int[] denseRing = [10, 12, 14];
|
||
|
float[] maxspeedRing = [8, 9, 11];
|
||
|
int[] deceltimeRing = [20, 30, 40];
|
||
|
int[] acceltimeRing = [60, 45, 35];
|
||
|
|
||
|
// Remilia takes 36 frames. Preferably, pick a number 36 can divide with.
|
||
|
|
||
|
int[] delayRing = [9, 6, 5];
|
||
|
|
||
|
// How much time Remilia takes to charge her attack and you get to GTFO.
|
||
|
|
||
|
int[] waittimeRemi = [75, 60, 50];
|
||
|
|
||
|
string tex = "script/game/resourceLib/Spritesheet_StationJam.png";
|
||
|
|
||
|
//LoadTextureEx(tex, true, true);
|
||
|
|
||
|
// 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);
|
||
|
|
||
|
_RenderBoss(bossObj);
|
||
|
|
||
|
//WriteLog(spellPIV);
|
||
|
WriteLog(ObjEnemyBossScene_GetInfo(objScene, INFO_SPELL_SCORE));
|
||
|
|
||
|
mainTask();
|
||
|
_FadeInvincibility(bossObj, 150, 150, 1);
|
||
|
endingnew();
|
||
|
}
|
||
|
|
||
|
@Event {
|
||
|
|
||
|
alternative(GetEventType())
|
||
|
|
||
|
case(EV_REQUEST_LIFE) {
|
||
|
SetScriptResult(4000);
|
||
|
}
|
||
|
|
||
|
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 {
|
||
|
|
||
|
}
|
||
|
|
||
|
/*
|
||
|
|
||
|
Remi Spell 1
|
||
|
|
||
|
Remi moves to your current position (takes 36 frames), fires a dense star of stars (lol) that fades away quickly, and waits a set number of frames before repeating. After 3 waves of this, she moves to the middle and shoots a thick spiral of fireballs that requires you to spin around the screen for a bit.
|
||
|
She also leaves behind trails of rings with every dash.
|
||
|
|
||
|
Remilia takes 36 frames to move to you each time. -> delay between rings: 9, 6, 5
|
||
|
|
||
|
Parameters:
|
||
|
|
||
|
- Remilia wait time
|
||
|
- Spiral density
|
||
|
- Spiral speed
|
||
|
- Spiral angle offset per frame
|
||
|
|
||
|
- Ring density
|
||
|
- Ring speed
|
||
|
- Delays between rings
|
||
|
|
||
|
*/
|
||
|
|
||
|
task mainTask {
|
||
|
|
||
|
}
|
||
|
|
||
|
function <void> _VampireChase(){
|
||
|
|
||
|
ObjMove_SetDestAtFrame(bossObj, playerX, playerY, 36, LERP_DECELERATE);
|
||
|
|
||
|
loop(36/delayRing){
|
||
|
|
||
|
ascent(i in 0..denseRing[difficultySelect]){
|
||
|
int shot = CreateShotA2(bossX, bossY, maxspeedRing[difficultySelect], ang + 360/denseRing[difficultySelect] * i, -maxspeedRing[difficultySelect]/deceltimeRing[difficultySelect], 0, 0, color, 10);
|
||
|
if(ObjEnemy_GetInfo(bossObj, INFO_LIFE) <= 0){Obj_Delete(shot);}
|
||
|
else{
|
||
|
_Delay(shot, 10);
|
||
|
ObjMove_AddPatternA2(shot, 30, NO_CHANGE, NO_CHANGE, maxspeedRing[difficultySelect]/acceltimeRing[difficultySelect], maxspeedRing[difficultySelect], 0);
|
||
|
_BulletRescale(shot, 0.65, true, 1);
|
||
|
//Shoot1;
|
||
|
}
|
||
|
}
|
||
|
wait(delayRing);
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
task endingnew(){
|
||
|
|
||
|
while(ObjEnemy_GetInfo(bossObj, INFO_LIFE)>0){
|
||
|
yield;
|
||
|
}
|
||
|
|
||
|
_GoToBrazil(objScene, bossObj, 12, 24);
|
||
|
wait(120);
|
||
|
ObjSound_SetVolumeRate(fire2, 20);
|
||
|
|
||
|
CloseScript(GetOwnScriptID);
|
||
|
|
||
|
}
|
||
|
|
||
|
|