Changes between Initial Version and Version 29 of Ticket #4142

Jan 21, 2017, 4:03:39 AM (7 years ago)

In this patch, the heroes spawned at the start of the game in regicide will be considered the "critical" ones necessary for the game, and the AI will assign healers to each of them. A generic Map is used that can be utilized for other victory conditions.

But there is a small issue: when init is called for the various managers at the start of a new game (turn 0), the trigger script has not yet spawned the hero unit(s). So the "init" of gameTypeManager (caching the gameType-critical ents like heroes in regicide) has to be called on the first turn. In this patch this issue is handled in update of gameTypeManager.js.

There is a possibility that the AI will train too many healers relative to its population cap if there are many units that it needs to guard; I guess this could be avoided by setting the max number of healers/guards in total that it can train.


  • Ticket #4142

    • Property Keywords rfc patch added
    • Property Cc Sandarac added
    • Property Milestone BacklogAlpha 22
    • Property Summary Petra AI - Regicide Support[PATCH] Petra AI - Regicide Support
  • Ticket #4142 – Description

    initial v29  
    11If regicide gamemode is enabled, a player loses if the hero dies. So the AI should do its best to avoid that.
    32There are two more options planned (prohibiting garrisoning the hero and prohibiting attacks/auras in age 1/2).
    53The hero could be used to scout and to kill women in age 1, but needs to be retreated if too many men attack it. Some heroes like elephants are very slow at escaping, thus more vulnerable.