Setup for RTS AI

This commit is contained in:
Anuken
2022-02-17 18:06:33 -05:00
parent 9f3af412f0
commit aaba579314
12 changed files with 61 additions and 30 deletions

View File

@@ -201,7 +201,7 @@ public class Rules{
/** A team-specific ruleset. */
public static class TeamRule{
/** Whether to use building AI. */
/** Whether to use building AI. TODO remove, it is terrible. */
public boolean ai;
/** TODO Tier of blocks/designs that the AI uses for building. [0, 1] */
public float aiTier = 1f;
@@ -214,6 +214,9 @@ public class Rules{
/** If true, this team has infinite unit ammo. */
public boolean infiniteAmmo;
/** Enables "RTS" unit AI. TODO wip */
public boolean rtsAi;
/** How fast unit factories build units. */
public float unitBuildSpeedMultiplier = 1f;
/** How much damage any other units deal. */

View File

@@ -222,7 +222,11 @@ public class Teams{
public static class TeamData{
public final Seq<CoreBuild> cores = new Seq<>();
public final Team team;
public final BaseAI ai;
/** Handles building ""bases"". */
public @Nullable BaseAI baseAi;
/** Handles RTS unit control. */
public @Nullable RtsAI rtsAi;
private boolean presentFlag;
@@ -248,7 +252,6 @@ public class Teams{
public TeamData(Team team){
this.team = team;
this.ai = new BaseAI(this);
}
/** Destroys this team's presence on the map, killing part of its buildings and converting everything to 'derelict'. */