SMUnlimited / AMAI

Advanced Melee Artificial Intelligence Mod For Warcraft 3
Other
210 stars 34 forks source link

SelectByWindwalk how can IsUnitInvisible(u, GetOwningPlayer(u)) ?? #407

Closed jzy-chitong56 closed 1 week ago

jzy-chitong56 commented 2 weeks ago

https://github.com/SMUnlimited/AMAI/blob/43e6d5f9edc94c82f38e2b983d60e497f36e696f/Jobs/FOCUSFIRE_CONTROL.eai#L139

is Player(PLAYER_NEUTRAL_AGGRESSIVE) ??


here should add real human player unit ??

      elseif IsPlayerAlly(GetOwningPlayer(u), ai_player) then
        if IsUnitType(u, UNIT_TYPE_RANGED_ATTACKER) then
          set range_strength = range_strength + GetUnitStrength(u)
          if unit_life < GetUnitState(u, UNIT_STATE_MAX_LIFE) then 
            call GroupAddUnit(micro_ranged_group, u) // Only add to micro orders if damaged
          endif
        endif
SMUnlimited commented 1 week ago

That IsUnitInvisible check would basically be ignored so we can likely remove.

Second bit does need fixing, although i'm sure the micro order would just have been ignored when sent to allied units unless they had full unit sharing enabled.

jzy-chitong56 commented 1 week ago

In fact, it does control the units of other players -- API no need sharing ....