-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFightGroupMaker.h
75 lines (63 loc) · 1.83 KB
/
FightGroupMaker.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#pragma once
#include "AITechManager.h"
#include "Outpost2DLL/Outpost2DLL.h"
#include <array>
#include <vector>
#include <cstddef>
#include <map>
class FightGroupMaker {
public:
FightGroupMaker(PlayerNum aiPlayerNum, MAP_RECT holdingRect);
void CreatePatrolGroups();
void CreateAttack();
void LaunchEmpMissile();
void UpdateFightGroups();
private:
enum class ColonyType
{
Eden = 0,
Plymouth
};
struct TurretRatio
{
map_id turret;
unsigned int maxPercent;
};
struct StartLoc {
LOCATION loc;
UnitDirection rotation;
};
struct FightGroupTarget
{
FightGroup fightGroup;
Unit building;
};
static const std::map<TurretLevel, std::vector<TurretRatio>> PlymouthTurrets;
static const std::map<TurretLevel, std::vector<TurretRatio>> EdenTurrets;
static const std::array<FightGroupMaker::StartLoc, 8> startLocs;
const PlayerNum aiPlayerNum;
AITechManager aiTechManager;
map_id GetChassisID(ChassisType chassisType);
std::size_t attackGroupSize;
std::vector<FightGroupTarget> fightGroupsWithTarget;
std::vector<FightGroup> fightGroupsHoldingRect;
MAP_RECT holdingRect;
inline std::size_t HumanPlayerCount() const
{
return aiPlayerNum;
}
LOCATION GetPatrolLoc(UnitDirection rotation);
void CreatePatrolGroup();
void CreateAttackGroup(const StartLoc& startLoc, map_id chassisID);
void TaskFightGroup(FightGroup& fightGroup);
void AttackBuilding(FightGroup& fightGroup, const std::vector<map_id>& buildingTypes);
void AttackHoldingZone(FightGroup& fightGroup);
void CheckTargets();
void CheckHoldingZone();
map_id SelectTurret(ColonyType colonyType);
ColonyType SelectColony();
void GetHumanBuildings(std::vector<Unit>& buildingsOut, map_id buildingType);
void GetHumanBuildings(std::vector<Unit>& buildingsOut, const std::vector<map_id>& buildingTypes);
void AttackGroupDebug();
void TestGuardingHoldingZone();
};