Commit graph

1 commit

Author SHA1 Message Date
Celtic Minstrel
2d95c0f7d3 AI: Convert the FormulaAI example scenario to do all the same things using Lua
- Unit formulas are replaced by inline MicroAIs or candidate actions placed in the unit's [ai] tag.
  - The stationed_guardian MicroAI was chosen as the closest match to the guardian FormulaAI. It's not a perfect fit, but it's pretty close.
  - The goto and patrol MicroAIs are fairly obvious substitutes for the respective unit formulas.
  - The priority test in unit formulas is replaced by fairly basic inline non-external CAs with differing scores.
- The side formulas (opening.fai) have been converted to a separate Lua stage using a new opening.lua. However, that's only a partial conversion. The move and attack functionalities of opening.fai are missing from opening.lua; instead the built-in move, move leader to keep, and combat CAs are used.
- The scouting FormulaAI CA has been ported to Lua. It remains a very basic AI, probably not well-suited to genera use.
- The level up attack FormulaAI CA has been ported to Lua. Like the new scouting CA, this is mostly intended to serve as an example.
2021-09-04 22:20:28 -04:00