Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
10e2bc6
Add files via upload
jzy-chitong56 Feb 4, 2025
d3ba11d
Update Manager_language.txt
jzy-chitong56 Feb 4, 2025
f2e79cd
Delete SetManagerLanguage.bat
jzy-chitong56 Feb 5, 2025
df1e880
Add files via upload
jzy-chitong56 Feb 5, 2025
d6a81ab
Add files via upload
jzy-chitong56 Feb 7, 2025
59da278
Add files via upload
jzy-chitong56 Feb 8, 2025
fcb0def
Update common.eai
jzy-chitong56 Feb 8, 2025
9346ae2
Update common.eai
jzy-chitong56 Feb 8, 2025
e87f309
Add files via upload
jzy-chitong56 Feb 8, 2025
2640116
Add files via upload
jzy-chitong56 Feb 9, 2025
00ffcdf
Add files via upload
jzy-chitong56 Feb 9, 2025
551c5fa
Add files via upload
jzy-chitong56 Feb 9, 2025
a1d28fa
Add files via upload
jzy-chitong56 Feb 9, 2025
2fc72c6
Add files via upload
jzy-chitong56 Feb 10, 2025
23a7298
Delete Manager_language.txt
jzy-chitong56 Feb 10, 2025
a61edc6
更新 AMAIStrategyManager.pl
jzy-chitong56 Feb 10, 2025
6dde282
Add files via upload
jzy-chitong56 Feb 11, 2025
118ab2e
Add files via upload
jzy-chitong56 Feb 12, 2025
da6e3e4
Add files via upload
jzy-chitong56 Feb 12, 2025
589caf2
Add files via upload
jzy-chitong56 Mar 2, 2025
562d7e0
Add files via upload
jzy-chitong56 Mar 2, 2025
529ee23
Add files via upload
jzy-chitong56 Mar 3, 2025
cc6afb6
Add files via upload
jzy-chitong56 Mar 4, 2025
37caefb
Add files via upload
jzy-chitong56 Mar 4, 2025
5b322a8
Add files via upload
jzy-chitong56 Mar 4, 2025
a189cc7
Add files via upload
jzy-chitong56 Mar 4, 2025
3c3d5aa
Add files via upload
jzy-chitong56 Mar 4, 2025
181c618
支持滚动和打开策略报告翻译文件
jzy-chitong56 Mar 6, 2025
c6301be
Add files via upload
jzy-chitong56 Mar 6, 2025
1d3ecc6
Add files via upload
jzy-chitong56 Mar 16, 2025
ff78898
Add files via upload
jzy-chitong56 Mar 16, 2025
4e86b83
Edit Strat add Strat race
jzy-chitong56 Mar 31, 2025
c08abca
Add files via upload
jzy-chitong56 Apr 14, 2025
eeabc28
Add files via upload
jzy-chitong56 Apr 14, 2025
3003ff8
Add files via upload
jzy-chitong56 Apr 14, 2025
e2a1186
debug num
jzy-chitong56 Apr 25, 2025
feecfa3
Add files via upload
jzy-chitong56 May 17, 2025
9b9f690
fix
jzy-chitong56 Aug 1, 2025
71c91f6
fix
jzy-chitong56 Aug 1, 2025
097f3e0
fix
jzy-chitong56 Aug 1, 2025
3b9f828
修复
jzy-chitong56 Aug 3, 2025
8a353b4
add custom_data_set
jzy-chitong56 Nov 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,261 changes: 1,247 additions & 1,014 deletions AMAIStrategyManager.pl

Large diffs are not rendered by default.

198 changes: 143 additions & 55 deletions Jobs/TOWER_RUSH_CHECK.eai
Original file line number Diff line number Diff line change
@@ -1,56 +1,144 @@
#IFDEF GLOBAL
boolean towerrush = false
unit array builder
location tower_target_loc = null
real first_tower_point_x = 0
real first_tower_point_y = 0
real enemy_point_x = 0
real enemy_point_y = 0
integer towers_built = 0
player rushedplayer = null
location toweringplayerloc = null
#ELSE

// ######################## Tower Rush Check ##############################
// # Created by Strategy Master 13/07/05. The conditions that check if
// # tower rush can start.
// #######################################################################

function StartTowerRush takes integer delay returns nothing
set toweringplayerloc = GetStartLocationLoc(GetPlayerStartLocation(rushedplayer))

call Trace("Starting the tower rush")
set towerrush = true
call SetPeonsRepair(false)
set towers_built = 0
call DisplayToAllies(chat_towerrush)
// set rushedplayer = GetNearestEnemy() // no longer needed as is set from the GetNearestEnemyDistance function
set tower_target_loc = GetLocationInDistanceFromLoc(toweringplayerloc,front_base_distance, true)

call TQAddJob(delay , TOWER_RUSH, 0)

endfunction

function TowerRushCheck takes nothing returns nothing
local integer i = GetRandomInt(1,100)
call DisplayToAllJobDebug("TOWER_RUSH_CHECK JOB START")

if not towerrush then
if hero_rush_bonus[hero[1]] >= race_towerrush_hero_rush_level then
// if ai_time > 60 then // 5 mins
// set towerrush = false
// //call Trace("Tower Rush - Out of Time")
// elseif GetNearestEnemyDistance() < 8000 then // Total percentage to be choosen is 33%
// call StartTowerRush()
// elseif i <= 75 and GetNearestEnemyDistance() < 11000 then // Total percentage to be choosen is 25%
// call StartTowerRush()
// elseif i <= 50 and GetNearestEnemyDistance() < 14000 then // Total percentage to be choosen is 16%
// call StartTowerRush()
// elseif i <= 20 and GetNearestEnemyDistance() < 16000 then // Total percentage to be choosen is 7%
// endif
endif
endif
// call TQAddJob(90, TOWER_RUSH_CHECK, 0)
endfunction

#IFDEF GLOBAL
boolean towerrush = false
boolean race_tower_alliancetarget = false // alliance have tower rush target?
boolean tower_used_item = false // tower rush item used done?
boolean tower_attack_run = false // tower rush attack team has left home?
boolean tower_peon_run = false // tower rush peon team has left home? just first left
boolean tower_peon_inplace = false // tower rush peon in place? use to attack
boolean Console_TR_Commands = false // tower rush Order by Player from Console?
unit array builder // hero and peon go to enemy home
location tower_target_loc = null
real first_tower_point_x = 0
real first_tower_point_y = 0
real second_attack_point_x = 0
real second_attack_point_y = 0
real enemy_point_x = 0
real enemy_point_y = 0
real tower_peon_point_x = 0
real tower_peon_point_y = 0
integer towers_built = 0
integer towers_built_count = 0
integer race_tower_shop = 0
player rushedplayer = null
group tower_rush_power = null
location toweringplayerloc = null
location towerrushsubloc = null
location towerrecoveryloc = null
#ELSE

// ######################## Tower Rush Check ##############################
// # Created by Strategy Master 13/07/05. The conditions that check if
// # tower rush can start.
// #######################################################################

function StartTowerRush takes integer delay returns nothing
//local location target_loc = null
// if GetLocationNonCreepStrength(enemy_point_x, enemy_point_y, 2000) == 0 and ai_time >= 80 then //no longer needed as is set from the GetNearestEnemyDistance, and now will set other Base
// call StartGetEnemyBase()
// loop
// exitwhen not WaitGetEnemyBase()
// call Sleep(1)
// endloop
// set u = GetEnemyBase()
// set target_loc = GetUnitLoc(u)
// set enemy_point_x = GetLocationX(target_loc)
// set enemy_point_y = GetLocationY(target_loc)
// set toweringplayerloc = Location(enemy_point_x ,enemy_point_y)
// endif
set tower_rush_power = CreateGroup()
call SetPeonsRepair(false)
call DisplayToAllies(chat_towerrush)
call DisplayToObserversImportant(chat_towerrush)
set towers_built = 0
set towers_built_count = 0
call Trace("Starting the tower rush")
set towerrush = true
call TQAddJob(RMax(delay,5), TOWER_RUSH, 0)
endfunction

function TowerRushCheck takes integer delay returns nothing
//local integer i = GetRandomInt(1,100)
local unit u = null
local player p = null
local real distance = GetNearestEnemyDistance()
local boolean mapinappropriate = (c_ally_total + c_enemy_total) > 5 or (c_ally_total - c_enemy_total < -1) or mapSize > 3 // only 1V1 OR 2V2 map
call DisplayToAllJobDebug("TOWER_RUSH_CHECK JOB START")
if rushedplayer == null or (not IsLocationFoggedToPlayer(home_location, rushedplayer) and not Console_TR_Commands) or distance > 14000 or distance < front_base_distance * 2 or builder[10] == null or mapinappropriate or (race_tower_item_must and racial_shop == 0 and not IsPointBlighted(GetUnitX(builder[10]), GetUnitY(builder[10])) and IsPointBlighted(GetLocationX(home_location), GetLocationY(home_location))) then //Distance to too far or player too many or ffa , ROC not shop
call Trace("the map unsuited tower rush")
if Console_TR_Commands then
call DisplayToAllies(chat_unsuited_towerrush)
endif
if mapinappropriate then
set race_towerrush_available = false
endif
set builder[10] = null
return
endif

//set rushedplayer = GetNearestEnemy() // no longer needed as is set from the GetNearestEnemyDistance function
if toweringplayerloc == null then
if race_tower_alliancetarget == false and ai_time <= 96 then // Priority collaboration with allies
set u = GetAllianceTarget()
if u == null or not UnitAlive(u) then
set u = I2U(GetStoredInteger(amaiCache, Int2Str(ALLIANCE_TARGET), "0"))
endif
endif
if u != null then //coordinate towertush with allies , 480 second
set p = GetOwningPlayer(u)
if IsPlayerEnemy(p, ai_player) and p != Player(PLAYER_NEUTRAL_AGGRESSIVE) then
set rushedplayer = p
set toweringplayerloc = GetStartLocationLoc(GetPlayerStartLocation(rushedplayer))
set race_tower_alliancetarget = true
set builder[10] = null
endif
set p = null
endif
if toweringplayerloc == null and builder[10] != null then
set toweringplayerloc = GetUnitLoc(builder[10]) // builder[10] from the GetNearestEnemyDistance
endif
set u = null
endif
if toweringplayerloc != null then
if GetPlayerRace(rushedplayer) == RACE_NIGHTELF and GetPlayerStructureCount(rushedplayer, true) < 6 then
set tower_target_loc = GetLocationInDistanceFromLoc(toweringplayerloc, 700, true) // ELF can be closer
else
set tower_target_loc = GetLocationInDistanceFromLoc(toweringplayerloc, front_base_distance, true) //DistanceBetweenPoints the toweringplayerloc and first_tower_point , front_base_distance now is change , so need set new
endif
if tower_target_loc != null then
set racial_rushcreep = 0 // TowerRush BR , waste time
set enemy_point_x = GetLocationX(toweringplayerloc)
set enemy_point_y = GetLocationY(toweringplayerloc)
set towerrushsubloc = GetSubtractionLoc(tower_target_loc, toweringplayerloc)
call StartTowerRush(delay)
return
endif
call RemoveLocation(toweringplayerloc)
set toweringplayerloc = null
endif
if Console_TR_Commands then
call DisplayToAllies(chat_unsuited_towerrush)
endif
set enemy_point_x = 0
set enemy_point_y = 0
set rushedplayer = null
set builder[10] = null
set race_tower_alliancetarget = false
//if not towerrush then
//if hero_rush_bonus[hero[1]] >= race_towerrush_hero_rush_level then
// if ai_time > 60 then // 5 mins
// set towerrush = false
// //call Trace("Tower Rush - Out of Time")
// elseif GetNearestEnemyDistance() < 8000 then // Total percentage to be choosen is 33%
// call StartTowerRush()
// elseif i <= 75 and GetNearestEnemyDistance() < 11000 then // Total percentage to be choosen is 25%
// call StartTowerRush()
// elseif i <= 50 and GetNearestEnemyDistance() < 14000 then // Total percentage to be choosen is 16%
// call StartTowerRush()
// elseif i <= 20 and GetNearestEnemyDistance() < 16000 then // Total percentage to be choosen is 7%
// endif
//endif
//endif
// call TQAddJob(90, TOWER_RUSH_CHECK, 0)
endfunction

#ENDIF
Loading