Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

double_expansion_target replace #338

Open
jzy-chitong56 opened this issue Jul 18, 2024 · 2 comments
Open

double_expansion_target replace #338

jzy-chitong56 opened this issue Jul 18, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jzy-chitong56
Copy link
Contributor

jzy-chitong56 commented Jul 18, 2024

When the attack target is double_expansion_target , CheckDoubleExpansionsClaimedInArea should not be replaced , and double_expansion_target can not IsUnitHidden

  if double_expansion_target != null and IsTargetGood(double_expansion_target, 10) then
    call Trace("Double Expansion Attack")
    call SetAllianceTargetIfLeadAndChat(double_expansion_target, C_Ally)
    call FormGroupAM(3)
    call AttackMoveKillAAM(double_expansion_target)
    call ClearAllianceTarget(double_expansion_target)
    if not UnitAlive(double_expansion_target) then
      set double_expansion_target = null
    endif
    return
  endif
@jzy-chitong56
Copy link
Contributor Author

jzy-chitong56 commented Aug 19, 2024

There is a possibility that if an ally builds a building near the Town without upgrading or expanding, the AI will kill the base and must be forced to reserve a Town or mine for the AI , And I don't think it's necessary for the undead and the dark night to carry out the job of killing, because they may have already occupied the gold mine
Additionally, the Trace of CheckDoubleExpansion is not accurate
In the end, the entire feature created too many unit groups

I tried to make corrections
https://github.com/jzy-chitong56/AMAI/blob/master/Jobs/DETECT_DOUBLE_EXP.eai

@SMUnlimited
Copy link
Owner

This was designed this way so if player prefers the location, AI will sacrifice base himself.

@SMUnlimited SMUnlimited added the enhancement New feature or request label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants