Skip to content

Commit

Permalink
Update common.eai
Browse files Browse the repository at this point in the history
  • Loading branch information
jzy-chitong56 authored and SMUnlimited committed Dec 5, 2024
1 parent 07d8317 commit ababa50
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -8299,13 +8299,13 @@ function InitCheckHarvest takes nothing returns nothing
local real check = 0
local real distance = 10000
local boolean array b
// some map home_location 1500 radius just one mine , but old war3 (maybe 1.24~1.28 , 1.36 no this bug) UD and ELF still cannot harvest(maybe need 2300 radius no more mine)
// some map home_location 1500 radius just one mine , but old war3 (maybe 1.24~1.28 , 1.36 no this bug) UD and ELF still cannot harvest(maybe need 2500 radius no more mine)
if race_manual_loading then
set i = race_manual_loading_mine
elseif race_uses_mine_expansion then
set i = racial_expansion
endif
call GroupEnumUnitsInRangeOfLoc(g, home_location, 2300, null)
call GroupEnumUnitsInRangeOfLoc(g, home_location, 2500, null)
set g = SelectByHidden(g,false)
set g = SelectByAlive(g,true)
loop
Expand All @@ -8328,8 +8328,7 @@ function InitCheckHarvest takes nothing returns nothing
else
if i != GOLD_MINE and GetOwningPlayer(u) == ai_player and (own_town_mine[0] == null or GetUnitTypeId(own_town_mine[0]) != old_id[i]) then
set own_town_mine[0] = u
endif
if GetOwningPlayer(u) != ai_player then
elseif GetOwningPlayer(u) != ai_player then
set m = 1
endif
set s = s + 1
Expand Down Expand Up @@ -8363,7 +8362,7 @@ function InitCheckHarvest takes nothing returns nothing
call HarvestWood(0,2) // Early triggering Harvest , convenient HARVEST_CHECK job check peon
endif
call CreateDebugTag("FIX mine", 10, fixmine, 4.00, 2.00)
call Trace("first town mine mode :" + Int2Str(first_town_mine) + ", sys mine : " + Int2Str(GetMinesOwned()) + ", gold mine :" + Int2Str(c) + ", race mine :"+ Int2Str(s) + ", player :" + Int2Str(p))
call Trace("first town mine mode : " + Int2Str(first_town_mine) + ", sys mine : " + Int2Str(GetMinesOwned()) + ", gold mine : " + Int2Str(c) + ", race mine : "+ Int2Str(s) + ", player : " + Int2Str(p))
endfunction

//===========================================================================
Expand Down Expand Up @@ -8750,33 +8749,33 @@ function InitAMAI takes nothing returns nothing
set income_per_mine = income_per_mine * Max(difficulty - 1, 1)
call Trace("Init AMAI step 1")
call InitNeutralSpecial()
call Trace("Init AMAI step 2")
call Trace("Init AMAI step 2")
call InitHeroArrays()
call Trace("Init AMAI step 3")
call Trace("Init AMAI step 3")
call InitArrays() // Has been moved to be set before all other code as is only variable declaration
call Trace("Init AMAI step 4")
call Trace("Init AMAI step 4")
call InitChatArrays()
call Trace("Init AMAI step 5")
call Trace("Init AMAI step 5")
call InitChatEvents()
call Trace("Init AMAI step 6")
call Trace("Init AMAI step 6")
call InitTrans()
call Trace("Init AMAI step 7")
call Trace("Init AMAI step 7")
call InitTranslations()
call Trace("Init AMAI step 8")
call Trace("Init AMAI step 8")
call InitRaceNames()
call Trace("Init AMAI step 9")
call Trace("Init AMAI step 9")
call InitCT()
call Trace("Init AMAI step 10")
// call TestCT()
call Trace("Init AMAI step 10")
//call TestCT()
call InitChatVars()
call Trace("Init AMAI step 11")
call Trace("Init AMAI step 11")
call InitCreepStrengthArray()
call Trace("Init AMAI step 12")
call Trace("Init AMAI step 12")
call StopGathering()
call InitBuildArrayAM()
call InitUpkeep()
call InitNeutralBuildings()
call Trace("Init AMAI step 13")
call Trace("Init AMAI step 13")
call StartThread(function PathingThread)
//call StartThread(function ExpansionThread)
//call StartThread(function CheckAllNeutrals)
Expand Down

0 comments on commit ababa50

Please sign in to comment.