Configurable RTS AI parameters for logic

This commit is contained in:
Anuken
2022-04-24 16:46:26 -04:00
parent abdb1c1252
commit d5e522994e
7 changed files with 15 additions and 11 deletions

View File

@@ -167,7 +167,7 @@ public class RtsAI{
//defend when close, or this is the only squad defending
//TODO will always rush to defense no matter what
if(best instanceof CoreBuild || units.size >= data.team.rules().rtsAiMinSquadSize || best.within(ax, ay, 500f)){
if(best instanceof CoreBuild || units.size >= data.team.rules().rtsMinSquad || best.within(ax, ay, 500f)){
defend = best;
if(debug){
@@ -234,7 +234,7 @@ public class RtsAI{
}
@Nullable Building findTarget(float x, float y, int total, float dps, float health){
if(total < data.team.rules().rtsAiMinSquadSize) return null;
if(total < data.team.rules().rtsMinSquad) return null;
//flag priority?
//1. generator
@@ -264,7 +264,7 @@ public class RtsAI{
);
float weight = weights.get(result, 0f);
if(weight < data.team.rules().minAttackWeight && total < Units.getCap(data.team)){
if(weight < data.team.rules().rtsMinWeight && total < Units.getCap(data.team)){
return null;
}