|
#東方弾幕風
#Title[寒符「リンガリング・コールドEX」]
#Text[東方痩白岩_02]
#Image[.\img\spell.png]
#BackGround[.\img\back.png]
#BGM[.\bgm\kuromaku.wav]
#Player[FREE]
#ScriptVersion[2]
////////////////////////////////////////////////////////////////////////////////
// レティ覚醒後リンガリングコールド再現スクリプト
// Author:SARU
// Copyright:上海アリス幻樂団(ZUN)・太増夫・SARU
// LastUpDate:Feb.24.2009
// script_enemy_main
{
let life = 500; // HP:500
// ※ SetLife関数に変数で値を設定すると、
// ゲージがおかしくなるので、44行目のSetLifeにも同じ値を入れること let crazy = life * 0.3; // HP:150から発狂 let crtime = 20; // 残り20秒でも発狂 let count = 0; // ループカウンタ let cx = GetCenterX(); // STGシーンの中心x座標を取得
let imgKuromaku = GetCurrentScriptDirectory~"img\001.png";
let imgKuromakuSpell = GetCurrentScriptDirectory~"img\002.png";
let imgKuromakuBack = GetCurrentScriptDirectory~"img\back.png";
let imgFog = GetCurrentScriptDirectory~"img\fog.png";
let seDanmaku01 = GetCurrentScriptDirectory~"se\tama_01.wav";
let seDanmaku03 = GetCurrentScriptDirectory~"se\tama_02.wav";
let seKira = GetCurrentScriptDirectory~"se\kira.wav";
let seCharge = GetCurrentScriptDirectory~"se\Charge.wav";
let RED42 = 1; // 雪玉赤 let GREEN42 = 2; // 雪玉緑
let BLUE42 = 3; // 雪玉青
let YELLOW42 = 4; // 雪玉黄色 let PURPLE42 = 5; // 雪玉紫
let AQUA42 = 6; // 雪玉水色 let ORANGE42 = 7; // 雪玉オレンジ let WHITE42 = 8; // 雪玉白
// 初期化処理
// レティ・ホワイトロック
// HP:500
// Time:120Sec
// @Initialize {
SetLife( 500 ); // ライフを500に設定
SetScore( 3000000 ); // スペルカードボーナスを3000000に設定
SetDamageRate( 9, 0 ); // 披ダメージを9%、ボムダメージ0%に設定
SetTimer( 120 ); // 時間制限を120秒に設定
SetGraphicRect( 1, 1, 64, 64 ); // 描画元矩形を設定
SetInvincibility( 120 ); // 敵を120フレーム無敵にする
LoadGraphic( imgKuromaku ); // 画像「img\kuromaku.png」を読みこむ
LoadGraphic( imgKuromakuBack ); // 画像「img\kuromakuBack.png」を読みこむ
LoadGraphic( imgFog ); // 画像「img\fog.png」を読みこむ
LoadSE( seDanmaku01 ); // 効果音「se\dannmaku.wav」を読みこむ
LoadSE( seKira ); // 効果音「se\kira.wav」を読みこむ
LoadSE( seCharge ); // 効果音「se\charge.wav」を読みこむ LoadUserShotData(GetCurrentScriptDirectory~"danmaku_yuki\HAL_yuki.txt");
SetMovePosition02( cx, 60, 60 ); // 座標(cx,60)へ60フレームかけて移動する Concentration01( 150 ); // チャージエフェクトを150フレーム描画 DeleteEnemyShot( ALL ); // 出現と同時に敵弾を全て削除 SetEnemyMarker( true ); // エネミーマーカーを表示する
Expert(); // デバッグモードを不可にする SetEffectForZeroLife(90,10,10); // 撃破時のスローレート等の設定
//スペルカード名表示
CutIn( YOUMU, "寒符「リンガリング・コールドEX」", imgKuromakuSpell, 0, 0, 295, 511 ); }
// 寒符「リンガリング・コールドEX」
// ランダムばら撒き弾(雪)
// ランダム発生弾(白)
// 自機狙い大玉(水色)
// 開放弾(青)
// @MainLoop {
let jk = GetAngleToPlayer; // 自機狙い角度取得
if(count == 120) // 登場2秒後
{
let i = 0;
while(i < 320)
{ // ランダムばら撒き弾(雪) let shotSpeed = rand(1,3);
CreateShot01( GetX(), GetY(), shotSpeed, rand(0,360), 1 + (i % 8), i/4);
i++;
}
}
if( ((count % 3) == 0) && (count > 120) && (count < 200))
{ // ランダムばら撒き弾SE再生
PlaySE( seKira );
}
if(count==210)
{ // リンガリング本体 let shotA = 0; // ShotA ID
let twinTail = 60; // しっぽ一本当たりの弾の数
let openTime = 120; // 大玉発射後、尻尾が開くまでのフレーム
CreateShotA( shotA, GetX(), GetY(), 0 ); // shotAを作製
SetShotDataA(shotA, 0, 5, jk, 0, -0.1, 0, AQUA03); // 自機狙いで減速しながら水色大玉発射~停止
SetShotDataA(shotA, openTime, 1, jk, 0, 0, 5, AQUA03); // ゆっくり自機狙い発進
let i = 0;
while(i < twinTail)
{ // リンガリング尻尾
let shotSpeed = 5;
let ta_l = 1;
let ta_r = 2;
CreateShotA( ta_l, 0, 0, 0 );//taを作製
SetShotDataA( ta_l, 0, 0, 0, 0, 0, 0, BLUE01);
SetShotDataA( ta_l, openTime - i, 1 + ((twinTail - i) / 40), jk + 1 + ((twinTail * 2) - (i * 2)), 0, 0, 0, BLUE01);
AddShot(i,shotA,ta_l,0);//shotAにtaを登録
CreateShotA( ta_r, 0, 0, 0 );//taを作製
SetShotDataA( ta_r, 0, 0, 0, 0, 0, 0, BLUE01);
SetShotDataA( ta_r, openTime - i, 1 + ((twinTail - i) / 40), jk - 1 - ((twinTail * 2) - (i * 2)), 0, 0, 0, BLUE01);
AddShot(i,shotA,ta_r,0);//shotAにtaを登録
i++;
}
PlaySE( seDanmaku01 );
FireShot(shotA);
}
if(count == 270)
{ // ランダムばら撒き弾(雪)
let i = 0;
if((GetEnemyLife() > crazy) || (GetTimer < crtime))
{
while(i < 320)
{ // 通常時
let shotSpeed = rand(1,3);
CreateShot01( GetX(), GetY(), shotSpeed, rand(0,360), 1 + (i % 8), i/4);
i++;
}
}else{
while(i < 480)
{ // 発狂時 let shotSpeed = rand(1,5);
CreateShot01( GetX(), GetY(), shotSpeed, rand(0,360), 1 + (i % 8), i/6);
i++;
}
}
}
if( ((count % 3) == 0) && (count > 270) && (count < 350))
{ // ランダムばら撒き弾SE生成 PlaySE( seKira );
}
if(count==450)
{
PlaySE( seCharge );
Concentration02(120);
}
if( ((count % 3) == 0) && (count > 210))
{ // ランダム白球
let shotSpeed = rand(0.5,2.5);
if(rand(0,4) > 1)
{
CreateShot01( rand(GetClipMinX,GetClipMaxX), rand(GetClipMinY,GetCenterY), shotSpeed, rand(0,360), WHITE01, 0.5); //
CreateShot01( rand(GetClipMinX,GetClipMaxX), rand(GetClipMinY,GetCenterY), shotSpeed, rand(0,360), WHITE01, 0.5); //
if((GetEnemyLife() <= crazy) || (GetTimer < crtime))
{
CreateShot01( rand(GetClipMinX,GetClipMaxX), rand(GetClipMinY,GetCenterY), shotSpeed, rand(0,360), WHITE01, 0.5); //
CreateShot01( rand(GetClipMinX,GetClipMaxX), rand(GetClipMinY,GetCenterY), shotSpeed, rand(0,360), WHITE01, 0.5); //
}
PlaySE( seDanmaku03 );
}
}
if(count == 450) // 発狂時のみ {
if((GetEnemyLife() < crazy) || (GetTimer < crtime))
{
let i = 0;
while(i < 320)
{ // ランダムばら撒き弾(雪)
let shotSpeed = rand(1,5);
CreateShot01( GetX(), GetY(), shotSpeed, rand(0,360), 1 + (i % 8), i/4);
i++;
}
}
}
if( ((count % 3) == 0) && (count > 450) && (count < 530))
{ // ランダムばら撒き弾SE再生
if((GetEnemyLife() < crazy) || (GetTimer < crtime))
{
PlaySE( seKira );
}
}
if(count==569){count=209;};
if(OnBomb())
{
SetInvincibility( 1 ); // ボム中なら無敵にする }
SetCollisionA(GetX(),GetY(),32); // 当たり判定(自弾)登録
SetCollisionB(GetX(),GetY(),24); // 当たり判定(体当たり)登録
count++;
}
@Finalize
{// 読みこんだファイルを削除 DeleteGraphic(imgKuromaku);
DeleteGraphic(imgKuromakuBack);
DeleteGraphic(imgFog);
DeleteSE(seDanmaku01);
DeleteSE(seKira);
DeleteSE(seCharge);
loop(8)
{
CreateItem(ITEM_SCORE,cx+rand(-100,100),rand(20,100));
}
}
@DrawLoop
{
// レティさん描画 if( count < 210 ){SetGraphicRect(1,1,64,64);}
if( ( count >= 210 ) && ( count < 240 ) ){SetGraphicRect(64,64,127,127);}
if( ( count >= 240 ) && ( count < 270 ) ){SetGraphicRect( 1, 1, 64, 64);}
if( ( count >= 270 ) && ( count < 350 ) ){SetGraphicRect(64,64,127,127)};
if( count >= 350 ){SetGraphicRect( 1, 1, 64, 64)};
if( ( count >= 450 ) && ( count < 530 ) && ( GetEnemyLife() < crazy ) ){SetGraphicRect(64,64,127,127)}
SetAlpha(255);
SetTexture(imgKuromaku);
DrawGraphic(GetX(),GetY());
}
}
|