INCOMING HEADACHE
#TouhouDanmakufu
#Title[FUCK]
#Text[ASSBALLS]
#Player[FREE]
#ScriptVersion[2]
#BGM[]
script_enemy_main {
#include_function "lib\ExtendedShotDatav4\shot_replace.dnh"
let ImgBoss = "script\img\ExRumia.png";
let pos_draw_a = GetX;
let f = -120;
task derf{
let angle = rand(0, 360);
ascent(a in 0..30){
CreateShot01(GetX, GetY, 3, angle + a*(360/30), ORANGE12, 10);
}
}
task bamf(let i){
let angle = rand_int(0, 18);
loop(10){
ascent(x in 0..20){
yams(i, angle+x*18);
}
loop(3){yield;}
}
}
task yams(let i, let a){
let a_i = [[GetCenterX-175 , GetCenterY-150],[GetCenterX+175 , GetCenterY-150]];
let obj = Obj_Create(OBJ_SHOT);
Obj_SetPosition(obj, a_i[i][0], a_i[i][1]);
Obj_SetSpeed(obj, 10);
Obj_SetAngle(obj, a);
ObjShot_SetGraphic(obj, RED43);
ascent(b in 0..33){Obj_SetSpeed(obj, 10-b*0.3); yield;}
Obj_SetSpeed(obj, 0);
loop(30){yield;}
Obj_SetSpeed(obj, 2);
loop(60){
let anglep = atan2(GetPlayerY-Obj_GetY(obj), -Obj_GetX(obj)+GetPlayerX);
let angleb = Obj_GetAngle(obj);
if(angleb >= 0){
if(anglep > angleb + 1 || anglep <= angleb - 180){Obj_SetAngle(obj, angleb + 1);}
if(anglep < angleb - 1 && anglep > angleb - 180){Obj_SetAngle(obj, angleb - 1);}
} else if(angleb < 0){
if(anglep < angleb - 1 || anglep > angleb + 180){Obj_SetAngle(obj, angleb - 1);}
if(anglep > angleb + 1 && anglep <= angleb + 180){Obj_SetAngle(obj, angleb + 1);}
} else if(angleb == 0){angleb+=0.1;}
while(angleb > 180){angleb -= 360;}
while(angleb < -180){angleb += 360;}
if(anglep <= angleb+1 && anglep >= angleb-1){Obj_SetAngle(obj, anglep);}
yield;
}
}
@Initialize {
SetLife(2000);
SetInvincibility(60);
SetTimer(99);
SetScore(1000000);
SetMovePosition02(GetCenterX, GetClipMinY + 120, 120);
CutIn(YOUMU, "Yam Sign "\""Attack of the fucking yams"\", "", 0, 0, 0, 0);
LoadGraphic(ImgBoss);
SetTexture(ImgBoss);
ShotInit;
}
@MainLoop {
SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 16);
if(f%20==0 && f>=0){derf;}
if(f%80==0 && f>=0){bamf(0);}
if(f%85==0 && f>=0){bamf(1);}
f++;
yield;
}
@DrawLoop {
if(GetX==pos_draw_a){
SetGraphicRect(0, 0, 64, 64);
DrawGraphic(GetX, GetY);
}
if(GetX<pos_draw_a){
SetGraphicRect(128, 0, 192, 64);
DrawGraphic(GetX, GetY);
}
if(GetX>pos_draw_a){
SetGraphicRect(192, 0, 256, 64);
DrawGraphic(GetX, GetY);
}
pos_draw_a = GetX;
}
@Finalize {
DeleteGraphic(ImgBoss);
}
}
Okay. I apologize for the general disorganization and abysmal use of tabbing, but just... try this stupid thing (shot replace v4 required, or you can just change RED43 to whatever). A hitboxless character is strongly advised, or something like that. Anyway. As you can see, my lovely bullets curve towards the player in a highly sensual manner... except for one fun little thing. The first bullet in each wave lags behind the rest by a little, so the 'beams' (which, as it strikes me now, look very shinki-esque) have a little deformity. I've tried everything, and nothing I do can even address the little head. I normally debug my cards by exaggerating various things and seeing what breaks, but I cannot break the head on this at all. It just stays in the same place, and makes the whole card look really shitty.
Obviously, this is a work in progress.
EDIT: It's slightly hard to see in this form, so my suggestion would be to replace RED43 with TEAL12I, and set the loop(30){yield;} in yams() to something much bigger. Maybe to 120? Enough so that you can see, I dunno.