--****************************************************************************** --[[ @brief arena_NEXT_AC_26 @author Kazushi Morita ]] --****************************************************************************** -- ▼NEXT使用パラメータ --<< 捕捉用 DIST_RADAR = 5000; -- レーダー:距離 ANGLE_RADAR = 180; -- レーダー:角度 --<< 遠距離オペレーション用 DIST_PIVOT_FAR = 600; -- 超遠距離 DIST_PIVOT_LONGRANGE = 400; -- 遠距離 DIST_PIVOT_MIDDLERANGE = 150; -- 中距離 DIST_PIVOT_SHORTRANGE = 80; -- 近距離 DIST_PIVOT = 200; -- 遠距離/近距離の分水嶺 DIST_MARGIN = 50; -- KeepDistでPIVOTからどれだけ離れようとするか BOOT_DIST = 3000; -- 起動距離 --<< 高度調整用 ALT_RELATIVE = 200; -- 相対高度 TIME_JUMP = 4; -- 飛行時間 TIME_WALK = 2; -- 地上時間 --<< 右攻撃 DIST_R_ATK_LIMIT = 500; -- 右攻撃限界距離 DIST_R_ATK_DECENT_MAX = 350; -- 右適正距離限界 DIST_R_ATK_DECENT_MIN = 10; -- 右適正距離最小 --<< 左攻撃 DIST_L_ATK_LIMIT = 400; -- 左攻撃限界距離 DIST_L_ATK_DECENT_MAX = 200; -- 左適正距離限界 DIST_L_ATK_DECENT_MIN = 30; -- 左適正距離最小 --<< 肩攻撃 DIST_S_ATK_LIMIT = 550; -- 肩攻撃限界距離 DIST_S_ATK_DECENT_MAX = 450; -- 肩適正距離限界 DIST_S_ATK_DECENT_MIN = 30; -- 肩適正距離最小 TIME_WAIT_LONG = 3; -- 待ち時間:長 TIME_WAIT_MIDDLE = 1; -- 待ち時間:中 TIME_WAIT_SHORT = 1; -- 待ち時間:短 -- 依存ファイル dofile("game:\\common\\airesource\\script\\include\\include.lua"); -- スクリプト初期化 function InitialSetup( context) -- 最初のオペレーションレイヤーを作成する。 --== 移動 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "InitMove", "Move"); --== 右攻撃 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "Init_R_Attack", "R_Attack"); --== 左攻撃 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "Init_L_Attack", "L_Attack"); --== 肩攻撃 -- 最初のオペレーションレイヤーを作成する。 AddInitialLayer_EveryFrame( context, "Init_S_Attack", "S_Attack"); -- ▼ターゲッティング Targetting_CatchUpWithConeInSide( context, DIST_RADAR , ANGLE_RADAR ); --<< 捕捉(※レーダーの設定) --== 起動用フラグ AddGlobalValue( context , "BOOT_FLAG" , 0 ); DefaultSetup( context , true ); end -- 初期化する。 RegistInitializeFuncitonName( "InitialSetup"); --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --///////////////////////////////////////////////////////////////////////////////////////////// --****************************************************************************** --[[ @brief 移動 ]] --****************************************************************************** function Move(context) local M_dist = GetToTargetDistance( context ); local M_rand = RandomRangeInt( -150, 200); if ( M_dist < 5000 ) then ModifyGlobalValue(context, "BOOT_FLAG", 1); end if ( GetGlobalValue(context, "BOOT_FLAG") == 1 ) then if ( M_dist < 200 and SelfIsLocked(context) == false ) then SetEstimation_WalkDashRate(context, 0.6, 0.4); SetEstimation_BoostEnableEnergyRange(context, 0, 1, 0.4, 0.8); SetTimeLengthJump(context, 2, 8); else SetEstimation_WalkDashRate(context, 0.1, 0.9); SetEstimation_BoostEnableEnergyRange(context, 0, 1, 0.4, 0.8); SetTimeLengthJump(context, 5, 5); end SetEnableTurnToTarget(context, true); SetEnableViewTurn( context, true); if ( M_dist > 600 and SelfIsLocked(context) == false ) then SetOverdBoostDesirablitiy(context, 1, 0.3); SetQuickBoostDesirablitiy(context, 1, 0.6, 1); end SetOverdBoostDesirablitiy(context, 0, 1); if ( M_dist < 100 ) then SetQuickBoostDesirablitiy(context, 4, 0.8, 0.5); end if ( M_dist > 200 ) then SetAdjustAltitudeBase(context ,ADJUST_ALTITUDE_BASE__TARGET_RELATIVE ); SetAltitudeParam(context, 40, 40); else SetAdjustAltitudeBase(context ,ADJUST_ALTITUDE_BASE__ABSOLUTE ); SetAltitudeParam(context, 180, 180 + M_rand); end if ( M_dist > 600 ) then Op_MoveTargetRelation(context, OperationIdentifier( 1 ), 2, 4, 1, nil, 150, 90, 50, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 2 ), 2, 4, 1, nil, 200, -90, 50, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 3 ), 2, 4, 0.8, nil, 150, 120, 50, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 4 ), 2, 4, 0.8, nil, 200, -120, 50, 0, false); else Op_MoveTargetRelation(context, OperationIdentifier( 5 ), 2, 4, 1, nil, 80, 120, 5, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 6 ), 2, 4, 1, nil, 70, -120, 5, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 7 ), 2, 4, 0.8, nil, 80, 150, 5, 0, false); Op_MoveTargetRelation(context, OperationIdentifier( 8 ), 2, 4, 0.8, nil, 90, -150, 5, 0, false); end end end --****************************************************************************** --[[ @brief 右 攻撃 ]] --****************************************************************************** function Init_R_Attack() -- end -- function R_Attack( context) -- ▼ローカル変数 local R_dist = GetToTargetDistance( context ); local R_rand = RandomRangeInt( 0 , 3 ); if ( 250 > R_dist ) then --<< 攻撃限界よりも遠く Op_ShootRifle( context, OperationIdentifier( 50 ), 8, 8, 1, nil, 0, 0, 0,0, true, true); elseif ( DIST_R_ATK_DECENT_MAX < R_dist and R_dist < DIST_R_ATK_LIMIT ) then --<< 遠距離 Op_ShootMssl( context, OperationIdentifier( 51 ), 4, 4, 1, nil, 2, 0, 0, 1, true, true); Op_ShootRifle( context, OperationIdentifier( 52 ), 8, 8, 1, nil, 0, 0, 0,0, true, true); end end --****************************************************************************** --[[ @brief 左 攻撃 ]] --****************************************************************************** function Init_L_Attack() end -- function L_Attack( context) end --****************************************************************************** --[[ @brief 肩 攻撃 ]] --****************************************************************************** function Init_S_Attack() -- end -- function S_Attack( context) -- ▼ローカル変数 local S_dist = GetToTargetDistance( context ); local S_rand = RandomRangeInt( 0 , 3 ); -- local S_ap = GetEntityAP( context, 0); -- local S_pa = GetEntityPAStability( context, 0); -- local S_en = GetEntityEnergy( context, 0); if ( 100 > S_dist ) then --<< 攻撃限界よりも遠く Op_ShootRifle( context, OperationIdentifier( 90 ), 3, 5, 1, nil, 4, 1, 1, 0, false, false) end end