Methods
assignGuardToCriticalEnt()
Only send the guard command if the guard's accessIndex is the same as the critical ent
and the critical ent has a position (i.e. not garrisoned).
Request a transport if the accessIndex value is different, and if a transport is needed,
the guardEnt will be given metadata describing which entity it is being sent to guard,
which will be used once its transport has finished.
Return false if the guardEnt is not a valid guard unit (i.e. cannot guard or is being transported).
- Source:
captureGaiaRelic()
Send an expedition to capture a gaia relic, or reinforce an existing one.
- Source:
checkEvents()
In regicide victory condition, if the hero has less than 70% health, try to garrison it in a healing structure
If it is less than 40%, try to garrison in the closest possible structure
If the hero cannot garrison, retreat it to the closest base
- Source:
init()
Cache the ids of any inital victory-critical entities.
- Source:
manageCriticalEntGuards()
Try to keep some military units guarding any criticalEnts, if we can afford it.
If we have too low a population and require units for other needs, remove guards so they can be reassigned.
TODO: Swap citizen soldier guards with champions if they become available.
- Source:
manageCriticalEntHealers()
Train more healers to be later affected to critical entities if needed
- Source: