Skip to content

Commit

Permalink
Reduced first_expansion_chosen distance (#241)
Browse files Browse the repository at this point in the history
* Update Blizzard3VAI.eai

* Update common.eai

* Update common.eai

* Update common.eai

* Update common.eai

* Update common.eai

* fix distance
  • Loading branch information
jzy-chitong56 committed Feb 5, 2024
1 parent bdfd1e5 commit 3acfce7
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions common.eai
Original file line number Diff line number Diff line change
Expand Up @@ -768,8 +768,8 @@ globals
integer strat_prev = 0 // strategy chosen by the ai before this one
integer hero_prev = 0 // hero chosen by the ai before this one
integer picked_hero = 0
boolean first_ai = true
integer next_ai = 0
//boolean first_ai = true
//integer next_ai = 0
boolean no_ai_ally = false
boolean no_ally_ctrl = true

Expand Down Expand Up @@ -3420,6 +3420,8 @@ function countAllyEnemy takes nothing returns nothing
local integer i = 0
local boolean self_came = false
local boolean next_came = false
local boolean first_ai = true
local integer next_ai = 0
local player p = null

loop
Expand Down Expand Up @@ -6009,7 +6011,7 @@ function AddExpansion takes unit u, real d returns nothing
set expansion_dist[expansion_list_length] = d
set expansion_creeps[expansion_list_length] = GetExpFoeGroup(expansion_creeps[expansion_list_length],u) // group of the the creeps that guard this mine
if first_expansion_chosen == false then
set first_expansion_chosen = d >= 2000 and not CheckExpansionTaken(u)
set first_expansion_chosen = d * 522 >= front_base_distance and not CheckExpansionTaken(u)
endif
if d > 6000 / 512 then
call GroupAddUnit(far_expansion, u)
Expand Down Expand Up @@ -11574,13 +11576,12 @@ endfunction

//============================================================================
function ReformUntilTargetDeadAM takes unit target, boolean iscreeping returns nothing
call CommonSleepUntilTargetDeadAM(target,iscreeping,true)
call CommonSleepUntilTargetDeadAM(target,iscreeping,true)
endfunction

//============================================================================
function SleepUntilTargetDeadAM takes unit target, boolean iscreeping returns nothing
call CreateDebugTag("Sleep until target dead", 10, target, 3.00, 1.50)
call CommonSleepUntilTargetDeadAM(target,iscreeping,false)
call CommonSleepUntilTargetDeadAM(target,iscreeping,false)
endfunction

//============================================================================
Expand Down

0 comments on commit 3acfce7

Please sign in to comment.