From 701446810ea0d8e96e58debcba4edc32cb1844f4 Mon Sep 17 00:00:00 2001 From: dewfewg <3061784569@qq.com> Date: Thu, 23 Nov 2023 17:29:06 +0800 Subject: [PATCH] =?UTF-8?q?3=E4=BA=8C=E5=8D=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- StrategySystem.cpp | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/StrategySystem.cpp b/StrategySystem.cpp index 850ea2c..359cc98 100644 --- a/StrategySystem.cpp +++ b/StrategySystem.cpp @@ -507,6 +507,7 @@ void CStrategySystem::cp_kick() { // TODO 中心球员击球 else if (fm_id() == 2) { } else if (fm_id() == 3) { + Shot(fm_id); } else { Direction(cp_id(), ball.position); @@ -546,6 +547,35 @@ void CStrategySystem::fm_gen() { // TODO 阵型生成 else if (fm_id() == 2) { } else if (fm_id() == 3) { + if(ball.position.x>=157&&ball.position.x<=590&&ball.positiony<=409) + { + //内圈 + pos[1] = CPoint(pos[0].x - 15, pos[0].y - 40); + pos[2] = CPoint(pos[0].x + 15, pos[0].y - 40); + pos[3] = CPoint(pos[0].x + 40 * cos(30), pos[0].y - 40 * sin(30)); + pos[4] = CPoint(pos[0].x + 40 * cos(30), pos[0].y + 40 * sin(40)); + pos[5] = CPoint(pos[0].x + 15, pos[0].y + 40); + pos[6] = CPoint(pos[0].x - 15, pos[0].y + 40); + //内圈 + pos[7] = CPoint(pos[0].x + 120 * cos(67.5), pos[0].y - 120 * sin(67.5)); + pos[8] = CPoint(pos[0].x + 120 * cos(45), pos[0].y - 120 * sin(45)); + pos[9] = CPoint(pos[0].x + 120 * cos(22.5), pos[0].y - 120 * sin(22.5)); + } + else if (ball.position.x >= 157 && ball.position.x <= 590 && ball.positiony > ) + { + // 内圈 + pos[1] = CPoint(pos[0].x - 15, pos[0].y - 40); + pos[2] = CPoint(pos[0].x + 15, pos[0].y - 40); + pos[3] = CPoint(pos[0].x + 40 * cos(30), pos[0].y - 40 * sin(30)); + pos[4] = CPoint(pos[0].x + 40 * cos(30), pos[0].y + 40 * sin(40)); + pos[5] = CPoint(pos[0].x + 15, pos[0].y + 40); + pos[6] = CPoint(pos[0].x - 15, pos[0].y + 40); + // 内圈 + pos[7] = CPoint(pos[0].x + 120 * cos(67.5), pos[0].y + 120 * sin(67.5)); + pos[8] = CPoint(pos[0].x + 120 * cos(45), pos[0].y + 120 * sin(45)); + pos[9] = CPoint(pos[0].x + 120 * cos(22.5), pos[0].y + 120 * sin(22.5)); + } + else if(ball) } else if (fm_id() == 4) { }