Opponent
namespace Griff.Modules.Strategy;
public sealed class Opponent : ComponentLets the computer play a Faction: it keeps its workers gathering, trains more, puts up the buildings in Builds, trains an army, and sends it to attack once it’s big enough, a bigger one each time.
This is a component: its saved properties are on its component page.
Properties
Section titled “Properties”public string? Army { get; set; }Units it trains for its army, taking turns, e.g. “Soldier, Archer”.
AttackWith
Section titled “AttackWith”public int AttackWith { get; set; }How big its army has to be before it attacks.
Builds
Section titled “Builds”public string? Builds { get; set; }Buildings it puts up, in order, e.g. “Farm, Barracks”. It adds farms as it runs short of supply.
FirstAttack
Section titled “FirstAttack”public float FirstAttack { get; set; }Seconds before its first attack, however big its army.
TrainEvery
Section titled “TrainEvery”public float TrainEvery { get; set; }Seconds between the soldiers it starts training: higher is an easier game. 0 trains as fast as it can pay.
WaveGrowth
Section titled “WaveGrowth”public int WaveGrowth { get; set; }How many more it waits for each time after that.
public int Waves { get; }How many attacks it has sent.
Workers
Section titled “Workers”public int Workers { get; set; }How many workers it keeps.