--****************************************************************************** --[[ @brief 220_NEXT @author ishidai ]] --****************************************************************************** -- ▼NEXT使用パラメータ --<< 捕捉用 DIST_RADAR = 5000; -- レーダー:距離 ANGLE_RADAR = 180; -- レーダー:角度 --<< 遠距離オペレーション用 DIST_LONG = 500; -- 遠距離 DIST_MIDDLE = 300; -- 中距離 DIST_SHORT = 80; -- 近距離 --<< 高度調整用 ALT_RELATIVE = 200; -- 相対高度 TIME_JUMP = 6; -- 飛行時間 TIME_WALK = 6; -- 地上時間 --<< メイン攻撃(速射) DIST_M_ATK_LIMIT = 500; -- 右攻撃限界距離 DIST_M_ATK_MAX = 350; -- 右適正距離限界 DIST_M_ATK_MIN = 10; -- 右適正距離最小 --<< サブ攻撃(ブレード) DIST_S_ATK_LIMIT = 400; -- 左攻撃限界距離 DIST_S_ATK_MAX = 200; -- 左適正距離限界 DIST_S_ATK_MIN = 30; -- 左適正距離最小 --<< サード攻撃(コジマ) DIST_T_ATK_LIMIT = 400; -- 左攻撃限界距離 DIST_T_ATK_MAX = 200; -- 左適正距離限界 DIST_T_ATK_MIN = 30; -- 左適正距離最小 -- 依存ファイル dofile("game:\\common\\airesource\\script\\include\\include.lua"); dofile("game:\\common\\event\\include\\m300\\pointid.lua"); dofile("game:\\common\\event\\include\\m300\\entityid.lua"); dofile("game:\\common\\event\\include\\m300\\constvalue.lua"); -- スクリプト初期化 function InitialSetup( context) --== 移動 AddInitialLayer_EveryFrame( context, "InitMove", "Move"); --== 攻撃 AddInitialLayer_EveryFrame( context, "IniAtttack", "Attack"); -- ▼ターゲッティング Targetting_CatchUpWithConeInSide( context, DIST_RADAR , ANGLE_RADAR ); DefaultSetup( context , true ); SetAdjustAltitudeBase( context , ADJUST_ALTITUDE_BASE__ABSOLUTE ); SetAltitudeParam( context , GetInitialAltitude( context ) , 0 ); SetTimeLengthJump( context , 0 , 1 ); end -- 初期化する。 RegistInitializeFuncitonName( "InitialSetup"); --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --****************************************************************************** --[[ @brief 移動 ]] --****************************************************************************** function InitMove() debug_out("メイン関数初期化。"); end function Move( context) -- ▼ローカル変数 local dist = GetToTargetDistance( context ); local alt = GetInitialAltitude( context ); local rand = RandomRangeInt( -20 , 20 ); local ap_ratio = GetMyApRate( context ); -- ▼ブースト頻度 SetEstimation_WalkDashRate( context , 0.2 , 0.8 ); --<< walk, dash 確率 SetEstimation_BoostEnableEnergyRange( context , 0 , 1 , 0.4 , 0.8 ); SetTimeLengthJump( context , TIME_JUMP , TIME_WALK ); -- ▼行動 if ( dist > DIST_MIDDLE ) then --<< 一定以上遠い時はその距離を保とうとする -- ▼高度調整 SetAdjustAltitudeBase( context , ADJUST_ALTITUDE_BASE__ABSOLUTE ); --<< 絶対高度を見る SetAltitudeParam( context , 70 , 70 ); -- ▼遠距離戦闘 Op_KeepDist( context , OperationIdentifier( 1 ) , 4 , 6 , 0.2 , nil , 200 , 100 ); Op_RoundRear( context , OperationIdentifier( 2 ) , 4 , 6 , 0.5 , nil ); Op_RandomWalk( context , OperationIdentifier( 3 ) , 4 , 6 , 0.3 , nil , 200 , 5 ); else --<< 距離を詰められると接近戦へ移行する -- ▼自動高度調整 SetEnableKeepAltitude( context, true); --自動的に高度調整するのを許可するかどうか SetAltitudeParam( context, 50, 50); --自動的に高度調整をする(絶対高度、相対高度) -- ▼近距離戦闘 local rand = RandomRangeInt( -10 , 10 ); Op_MoveTargetRelation( context , OperationIdentifier( 4 ) , 2.5 , 5 , 0.5 , nil , 50 , 150 , 50 , 0 , false ); Op_MoveTargetRelation( context , OperationIdentifier( 5 ) , 2.5 , 5 , 0.5 , nil , 50 , -80 , 50 , 0 , false ); Op_MoveTargetRelation( context , OperationIdentifier( 6 ) , 2 , 5 , 0.5 , nil , 70 ,-170 , 50 , 0 , false ); Op_MoveTargetRelation( context , OperationIdentifier( 7 ) , 2 , 5 , 0.5 , nil , 70 , -20 , 50 , 0 , false ); Op_KeepDist( context , OperationIdentifier( 8 ) , 4 , 6 , 0.5 , nil , 150 , 100 ); Op_RoundRear( context , OperationIdentifier( 9 ) , 4 , 6 , 0.5 , nil ); Op_RandomWalk( context , OperationIdentifier( 10 ) , 4 , 6 , 0.3 , nil , 150 , 5 ); Op_Nothing( context , OperationIdentifier( 11 ) , 1 , 2 , 0.3 , nil); end end --****************************************************************************** --[[ @brief 攻撃 -- AP70%以上⇒レーザー -- AP70%未満⇒レーザーかコジマ砲 -- AP30%未満⇒レーザーかブレード ]] --****************************************************************************** function Init_Attack() end -- function Attack( context) -- ▼ローカル変数 local dist = GetToTargetDistance( context ); local rand = RandomRangeInt( 0 , 3 ); local ap_ratio = GetMyApRate( context ); local ACnum = GetCommonParam( context , 0 ); -- ノーマルモード if(ACnum == 1) then -- APが90%以上 if ap_ratio > 0.9 then Op_ShootRifle( context, OperationIdentifier( 1 ), 8, 8, 1, nil, WEAPON_ID__MAIN , 1, 2, 1, false, false); -- APが50%以上 elseif ap_ratio > 0.5 then Op_ShootRifle( context, OperationIdentifier( 2 ), 8, 8, 1, nil, WEAPON_ID__MAIN , 1, 2, 1, false, false); Op_ShootRifle( context, OperationIdentifier( 3 ), 1, 2, 1, nil, WEAPON_ID__SUB , 0, 0, 1, false, false); -- APが25%未満 elseif ap_ratio > 0.25 then Op_ShootRifle( context, OperationIdentifier( 4 ), 8, 8, 1, nil, WEAPON_ID__MAIN , 1, 4, 1, false, false); Op_ShootRifle( context, OperationIdentifier( 5 ), 1, 2, 1, nil, WEAPON_ID__SUB , 0, 0, 1, false, false); else Op_ShootRifle( context, OperationIdentifier( 6 ), 8, 8, 1, nil, WEAPON_ID__SUB , 0, 0, 1, false, false); end -- ハードモード else -- APが50%以上 if ap_ratio > 0.5 then Op_ShootKojima( context , OperationIdentifier( 7 ) , 2 , 2 , 1 , nil , WEAPON_ID__THIRD , 0, 0, 1, true, false); -- APが50%未満 else Op_ShootKojima( context , OperationIdentifier( 8 ) , 2 , 2 , 1 , nil , WEAPON_ID__THIRD , 0, 0, 1, true, false); end end end