Skip to content

Commit

Permalink
Add ai managers for legion
Browse files Browse the repository at this point in the history
  • Loading branch information
Tharsy committed Dec 17, 2024
1 parent 913357d commit 4c3f155
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 4 deletions.
8 changes: 4 additions & 4 deletions luarules/configs/BARb/stable/config/hard/behaviour.json
Original file line number Diff line number Diff line change
Expand Up @@ -1876,21 +1876,21 @@
}
},
"leglob": {
"role": ["skirmish", "raider"],
"role": ["skirmish"],
"attribute": ["scout"],
"threat": {"air": 0.0, "water": 0.0,
"vs": {"artillery": 2.0, "anti_air": 2.0}
}
},
"legkark": {
"role": ["riot", "Skirmish"],
"role": ["riot", "siege"],
"threat": {"surf": 1.2, "vs":{"raider": 2.0}},
"retreat": 0.5
},
"leggob": {
"role": ["skirmish"],
"attribute": ["scout"],
"threat":{"air": 0.0, "water": 0.0,
"threat":{"air": 0.05, "water": 0.0,
"vs":{"artillery": 2.0, "anti_air": 2.0}
}
},
Expand Down Expand Up @@ -2243,7 +2243,7 @@
},
"legmext15" : {
"role": ["static"],
"since": 300,
"since": 500,
"build_mod": 200
},
"legmoho" : {
Expand Down
9 changes: 9 additions & 0 deletions luarules/configs/BARb/stable/script/hard/manager/factory.as
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ string corasy ("corasy");
string corap ("corap");
string coraap ("coraap");
string corgant ("corgant");
string leglab ("leglab");
string legalab ("legalab");
string legvp ("legvp");
string legavp ("legavp");
string legsy ("legjim");
string legasy ("legasy");
string legap ("legap");
string legaap ("legaap");
string leggant ("leggant");

float switchLimit = MakeSwitchLimit();

Expand Down
30 changes: 30 additions & 0 deletions luarules/configs/BARb/stable/script/hard/misc/commander.as
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,36 @@ SOpener@ GetOpenInfo()
}},
{Factory::corasy, array<SQueue> = {
SQueue(0.5f, {SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::BUILDER2, 2)})
}},
{Factory::leglab, array<SQueue> = {
SQueue(0.3f, {SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 4), SO(RT::BUILDER), SO(RT::RAIDER, 2)}),
SQueue(0.3f, {SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 2), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 2), SO(RT::RIOT), SO(RT::BUILDER), SO(RT::RAIDER, 2)}),
SQueue(0.3f, {SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER)})
}},
{Factory::legvp, array<SQueue> = {
//standard
SQueue(0.4f, {SO(RT::SCOUT), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 2), SO(RT::BUILDER), SO(RT::RAIDER, 2), SO(RT::BUILDER), SO(RT::RAIDER, 2)}),
// raider serial production
SQueue(0.3f, {SO(RT::SCOUT), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 5), SO(RT::BUILDER)}),
// scout start
//SQueue(0.2f, {SO(RT::SCOUT, 4), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER)}),
//defensive eco start
SQueue(0.2f, {SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER)})
}},
{Factory::legalab, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER2), SO(RT::RAIDER, 3), SO(RT::BUILDER2), SO(RT::RAIDER, 3), SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::HEAVY), SO(RT::BUILDER2), SO(RT::ASSAULT, 2), SO(RT::BUILDER2)})
}},
{Factory::legavp, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER2), SO(RT::SKIRM, 2), SO(RT::BUILDER2), SO(RT::ASSAULT), SO(RT::BUILDER2),SO(RT::HEAVY), SO(RT::BUILDER2, 2)})
}},
{Factory::leggant, array<SQueue> = {
SQueue(1.0f, {SO(RT::RAIDER), SO(RT::ASSAULT), SO(RT::ARTY, 2)})
}},
{Factory::legsy, array<SQueue> = {
SQueue(0.3f, {SO(RT::SCOUT), SO(RT::BUILDER), SO(RT::SCOUT), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::SCOUT), SO(RT::BUILDER), SO(RT::SUB), SO(RT::SKIRM)})
}},
{Factory::legasy, array<SQueue> = {
SQueue(0.5f, {SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::BUILDER2, 2)})
}}
}, {SO(RT::BUILDER), SO(RT::RAIDER, 3), SO(RT::BUILDER), SO(RT::RAIDER)}
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ string corasy ("corasy");
string corap ("corap");
string coraap ("coraap");
string corgant ("corgant");
string leglab ("leglab");
string legalab ("legalab");
string legvp ("legvp");
string legavp ("legavp");
string legsy ("legjim");
string legasy ("legasy");
string legap ("legap");
string legaap ("legaap");
string leggant ("leggant");

int switchInterval = MakeSwitchInterval();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Commander {

string armcom("armcom");
string corcom("corcom");
string legcom("legcom");

}

Expand Down Expand Up @@ -74,6 +75,22 @@ SOpener@ GetOpenInfo()
}},
{Factory::corap, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER), SO(RT::AA), SO(RT::RAIDER), SO(RT::BOMBER), SO(RT::SCOUT)})
}},
{Factory::leglab, array<SQueue> = {
SQueue(0.9f, {SO(RT::BUILDER), SO(RT::SCOUT), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER, 3), SO(RT::BUILDER), SO(RT::RAIDER, 2)}),
SQueue(0.1f, {SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RIOT), SO(RT::BUILDER), SO(RT::RAIDER, 4), SO(RT::BUILDER), SO(RT::RAIDER, 2)})
}},
{Factory::legalab, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER2), SO(RT::RAIDER, 3), SO(RT::BUILDER2), SO(RT::ARTY, 2), SO(RT::ASSAULT), SO(RT::BUILDER2), SO(RT::AA)})
}},
{Factory::legavp, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER2), SO(RT::SKIRM, 3), SO(RT::BUILDER2), SO(RT::SKIRM, 2), SO(RT::ASSAULT), SO(RT::AA), SO(RT::BUILDER2)})
}},
{Factory::legasy, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER2), SO(RT::SKIRM, 2), SO(RT::BUILDER2), SO(RT::SKIRM), SO(RT::BUILDER2), SO(RT::ARTY), SO(RT::AA), SO(RT::BUILDER2)})
}},
{Factory::legap, array<SQueue> = {
SQueue(1.0f, {SO(RT::BUILDER), SO(RT::AA), SO(RT::RAIDER), SO(RT::BOMBER), SO(RT::SCOUT)})
}}
}, {SO(RT::BUILDER), SO(RT::SCOUT), SO(RT::RAIDER, 3), SO(RT::BUILDER), SO(RT::RAIDER), SO(RT::BUILDER), SO(RT::RAIDER)}
);
Expand Down

0 comments on commit 4c3f155

Please sign in to comment.