#TouhouDanmakufu #Title[Hika Spell - easy] #Text[Hika] #PlayLevel[Easy] #Player[FREE] script_enemy_main{ LoadUserShotData("lib/ZUN/ZUN's shotdata.txt"); let CSD = GetCurrentScriptDirectory; let Hika = CSD ~ "System\Hika_Saiha.png"; let Shot0 = GetCurrentScriptDirectory ~ "SE\Shot00.wav"; let Shot1 = GetCurrentScriptDirectory ~ "SE\Shot01.wav"; let Shot2 = GetCurrentScriptDirectory ~ "SE\Shot02.wav"; let BG = CSD ~ "System\Spell.png"; @Initialize { SetLife(250); SetDamageRate(10, 10); SetTimer(60); SetScore(10000); SetEnemyMarker(true); SetInvincibility(60); SetMovePosition03(GetCenterX,120,2,3); mainTask; LoadGraphic(Hika); LoadGraphic(BG); CutIn(YOUMU, "Fire Sign "\""Flame Drop"\", Hika, 30, 0, 59, 39); } @MainLoop { SetCollisionA(GetX,GetY,15); SetCollisionB(GetX,GetY,15); yield; } @DrawLoop { SetTexture(Hika); SetRenderState(ALPHA); SetAlpha(225); SetGraphicScale(1,1); SetGraphicAngle(0,0,0); if(int(GetSpeedX())==0) { SetGraphicRect(30,0,59,39); } if(int(GetSpeedX())>0) { SetGraphicRect(60,0,89,39); } if(int(GetSpeedX())<0) { SetGraphicRect(0,0,29,39); } DrawGraphic(GetX,GetY); } @BackGround { SetTexture(BG); SetRenderState(ADD); SetGraphicRect(0,0,500,500); SetGraphicScale(1,1); SetGraphicAngle(0,0,0); DrawGraphic(GetCenterX,GetCenterY); } @Finalize { DeleteGraphic(Hika); DeleteSE(Shot0); DeleteSE(Shot1); DeleteSE(Shot2); DeleteGraphic(BG); } task mainTask { wait(60); yield; fire; } task fire { let dir = 0; loop { SetMovePosition03(GetClipMinX+100,360,2,4); wait(20); loop(8) { PlaySE(Shot0); Bullet(GetEnemyX,GetEnemyY,dir,3,83,30); dir+=360/8; } SetMovePosition03(GetClipMaxX-100,245,2,4); wait(20); loop(8) { PlaySE(Shot0); Bullet(GetEnemyX,GetEnemyY,dir,3,83,30); dir+=360/8; } SetMovePosition03(GetClipMinX-100,130,2,4); wait(20); loop(8) { PlaySE(Shot0); Bullet(GetEnemyX,GetEnemyY,dir,3,83,30); dir+=360/8; } SetMovePosition03(GetCenterX,120,2,4); wait(20); loop(9) { loop(8) { PlaySE(Shot0); Bullet(GetEnemyX,GetEnemyY,dir,3,83,30); dir+=360/8; } dir++; dir++; dir++; dir++; dir++; wait(5); } wait(60); } } task Bullet(x, y, angle, s, g, d) { let obj=Obj_Create(OBJ_SHOT); Obj_SetPosition(obj, x, y); Obj_SetAngle(obj, angle); Obj_SetSpeed(obj, s); ObjShot_SetGraphic(obj, g); ObjShot_SetDelay (obj, d); ObjShot_SetBombResist (obj, true); } // wait function function wait(w){ loop(w){ yield; } } }