Skip to content

The problem of obtaining attack targets #504

@jzy-chitong56

Description

@jzy-chitong56

in GetxxxxEnemy
You can see that some places have used GetBuilding
but in ChooseAnEnemyTarget not use the unit
here just get a new town

There are some issues present

  • GetBuilding It's not always possible to achieve success, especially when there are no resources available in the later stages
  • If it is still under construction in the later stage, it indicates that there are still resources, but perhaps it has been completely destroyed and needs to be rebuilt rather than expanded, so it seems not ideal to measure the strength of this unit
  • GetBuilding If the acquisition fails , ChooseAnEnemyTarget 's target_enemy maybe is null , so it is likely to lead to the inability to obtain the attack target in the later stage

ChooseAnEnemyTarget Perhaps new methods need to be used to acquire enemies
Of course, it could also be that I made a mistake and was unable to obtain the target


like you said , attacking_strategy absolutely not equal to 1~3
so here just 4 and 5

see the GetWeakAndNearEnemy -- minstr -- Near is 10000 , need to consider the size of the map here, and it should not be directly written as dead, especially for maps with 12 or more people, which require enlarging the values

  if attacking_strategy == 1 or attacking_strategy == 3 then
    set target_enemy = GetWeakestEnemy()
    //call Trace("Chooing Weakest Enemy")
  elseif attacking_strategy == 2 then
    set target_enemy = GetStrongestEnemy()
    //call Trace("Choosing Strongest Enemy")
  elseif attacking_strategy == 5 then
    set target_enemy = GetFFAEnemy()
    //call Trace("Choosing FFA Enemy")
  else
    set target_enemy = GetWeakAndNearEnemy()
    //call Trace("Choosing weakest closest Enemy")
  endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions