# Wave Get
Grammar — Get the wave at index waveIndex for player player
Flags —Native
|Function
Returns the wave at the specified index for a player.
# Arguments
int
— Playerint
— WaveIndex
Returns — wave
native wave AIWaveGet(int player, int waveName);
# Related
Category: AI Advanced / Waves / Functions
- Create Wave Info —
waveinfo
— AIWaveInfoCreate - Create Wave Info From Wave —
waveinfo
— AIWaveInfo - Create Wave —
wave
— AIWaveCreate - Wave Unit Count —
int
— AIWaveUnitCount - Wave State —
int
— AIWaveState - Wave Target Unit —
wavetarget
— AIWaveTargetUnit - Wave Target UnitGroup —
wavetarget
— AIWaveTargetUnitGroup - Wave Target Unit Point —
wavetarget
— AIWaveTargetUnitPoint - Wave Target Point —
wavetarget
— AIWaveTargetPoint - Wave Target Player —
wavetarget
— AIWaveTargetPlayer - Wave Target Melee —
wavetarget
— AIWaveTargetMelee - Wave Target Melee Harass —
wavetarget
— AIWaveTargetMeleeHarass - Wave Target Merge —
wavetarget
— AIWaveTargetMerge - Wave Target Patrol —
wavetarget
— AIWaveTargetPatrol - Wave Target Escort —
wavetarget
— AIWaveTargetEscort - Wave Target Escort No Leash —
wavetarget
— AIWaveTargetEscortNL - Wave Target Gather Offense —
wavetarget
— AIWaveTargetGatherO - Wave Target Gather Defense —
wavetarget
— AIWaveTargetGatherD - Wave Target Harass Retreat —
wavetarget
— AIWaveHarassRetreat - Wave Target Region —
wavetarget
— AIWaveTargetRegion - Wave Get Target —
wavetarget
— AIWaveGetTarget - Is Wave In Combat —
bool
— AIWaveIsInCombat - Wave Time In Combat —
int
— AIWaveGetTimeInCombat - Wave Time Since Combat —
int
— AIWaveGetTimeSinceCombat - Wave Time Since Ordered —
int
— AIWaveGetTimeSinceOrdered - Wave Eval —
int
— AIWaveEval - Wave Eval Ratio —
int
— AIWaveEvalRatio - Eval Ratio —
int
— AIEvalRatio - Wave Get —
wave
— AIWaveGet - Wave Type —
int
— AIWaveType - Get Best Attack Target Point —
point
— AIGetBestTarget - Wave To String —
string
— AIWaveToString - Wave To Text —
text
— AIWaveToText
# Examples
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:179
AIWaveSet(player, c_waveDefend, AIWaveCreate(AIWaveInfoCreate(), player, targDPoint));
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:180
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:181
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:182
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:183
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:184
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
mods/core.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:185
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
attackersLimit = 1 << diff;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:69
void DebugMelee (int player) {
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:70
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:71
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:72
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:73
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:74
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:75
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
DebugVarInt2(
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:265
//--------------------------------------------------------------------------------------------------
void AINewUnitDefault (int player, unit u) {
wave w = AIWaveGet(player, c_waveMain);
AIMergeUnit(player, u, w);
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:318
//--------------------------------------------------------------------------------------------------
void AINewDetector (int player, unit u, bool offerToScout) {
wave defendWave = AIWaveGet(player, c_waveDefend);
wave attackWave = AIWaveGet(player, c_waveAttack);
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:319
void AINewDetector (int player, unit u, bool offerToScout) {
wave defendWave = AIWaveGet(player, c_waveDefend);
wave attackWave = AIWaveGet(player, c_waveAttack);
// first offer it to the attack wave if that wave has some units in it
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:148
goAttack = true;
}
else if (AIAnyAllyNeedsDefending(player, AIWaveGet(player, c_waveMain))) {
goAttack = true;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:165
if (AIGetCoopFlag(player, c_coopWaveAttacker)) {
if (AIWaveUnitCount(AIWaveGet(player, c_waveAttack)) > 0) {
return;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:168
return;
}
if (AIWaveUnitCount(AIWaveGet(player, c_waveMain)) < 8) {
return;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeLowAI.galaxy:120
}
if (sendAttack) {
waveCount = AIWaveUnitCount(AIWaveGet(player, c_waveMain)) + AIWaveUnitCount(AIWaveGet(player, c_waveAttack));
desiredArmyCount = AIGetStockArmyCount(player);
if (waveCount < desiredArmyCount/2) {
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeLowAI.galaxy:120
}
if (sendAttack) {
waveCount = AIWaveUnitCount(AIWaveGet(player, c_waveMain)) + AIWaveUnitCount(AIWaveGet(player, c_waveAttack));
desiredArmyCount = AIGetStockArmyCount(player);
if (waveCount < desiredArmyCount/2) {
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeLowAI.galaxy:168
activateNextWave = false; // wait for the AI to activate
}
if (AIWaveUnitCount(AIWaveGet(player, c_waveAttack)) > 0) {
activateNextWave = false;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeLowAI.galaxy:171
activateNextWave = false;
}
else if (AIWaveUnitCount(AIWaveGet(player, c_waveMain)) < 8) {
activateNextWave = false;
}
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:348
// See if the clear obstruction wave is already full
waveClob = AIWaveGet(player, c_waveClearObs);
countClob = AIWaveUnitCount(waveClob);
if (countClob >= 4) {
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:355
// If the attack wave is getting weak, keep units available for it instead
waveAtck = AIWaveGet(player, c_waveAttack);
countAtck = AIWaveUnitCount(waveAtck);
evalAtck = AIWaveEvalRatio(waveAtck, c_evalRange);
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:400
}
waveAttack = AIWaveGet(player, c_waveAttack);
if (AIWaveUnitCount(waveAttack) == 0) {
return false;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:425
}
waveAttack = AIWaveGet(player, c_waveAttack);
if (AIWaveUnitCount(waveAttack) == 0) {
return c_nullPoint;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:614
}
else {
eval = AIWaveEval(w) + AIWaveEval(AIWaveGet(player, c_waveMain));
if (IntToFixed(eval) > IntToFixed(AILastAttackStartEval(w)) * 1.33) {
enoughForce = true;
mods/core.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:758
else if (state == e_attackState_Idle) {
count = AIWaveUnitCount(w) + AIWaveUnitCount(AIWaveGet(player, c_waveMain));
if ((AIWaveGetTimeSinceRetreat(w) > 120) && (AIGetUserInt(player, c_delayNextAttack) < AIGetTime())) {
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:101
//
if (type == c_PU_WarpPrism) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:116
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_PU_Zealot || type == c_PU_Stalker || type == c_PU_DarkTemplar) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:110
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_TU_Marine || type == c_TU_Reaper || type == c_TU_Marauder) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:118
if (AIGetFlag(player, e_flagsDiversion)) {
if (type == c_TU_Reaper) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert1));
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:122
}
if (type == c_TU_Banshee) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert2));
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:136
}
AIWaveAddUnitPriority(AIWaveGet(player, c_waveMain), u, c_prioWavePeon);
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:109
//
if (type == c_ZB_SpineCrawler || type == c_ZB_SporeCrawler) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:115
drop = AIGetDropoffWithFewestGuards(player, c_ZU_Queen);
if (drop == c_nullUnit) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
}
else {
mods/liberty.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:144
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_ZU_Zergling || type == c_ZU_Roach || type == c_ZU_Hydralisk) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:214
AIWaveSet(player, c_waveDefend, AIWaveCreate(AIWaveInfoCreate(), player, targDPoint));
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:215
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:216
AIWaveSetType(AIWaveGet(player, c_waveMain), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:217
AIWaveSetType(AIWaveGet(player, c_waveAttack), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:218
AIWaveSetType(AIWaveGet(player, c_waveDivert1), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:219
AIWaveSetType(AIWaveGet(player, c_waveDivert2), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/BaseAI.galaxy:220
AIWaveSetType(AIWaveGet(player, c_waveClearObs), c_waveStateIdle, targO);
AIWaveSetType(AIWaveGet(player, c_waveHome), c_waveStateIdle, targD);
AIWaveSetType(AIWaveGet(player, c_waveDefend), c_waveStateIdle, targD);
attackersLimit = 1 << diff;
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:69
void DebugMelee (int player) {
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:70
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:71
DebugWave(player, "main", AIWaveGet(player, c_waveMain));
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:72
DebugWave(player, "atck", AIWaveGet(player, c_waveAttack));
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:73
DebugWave(player, "dfnd", AIWaveGet(player, c_waveDefend));
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:74
DebugWave(player, "div1", AIWaveGet(player, c_waveDivert1));
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:75
DebugWave(player, "div2", AIWaveGet(player, c_waveDivert2));
DebugWave(player, "clob", AIWaveGet(player, c_waveClearObs));
DebugWave(player, "home", AIWaveGet(player, c_waveHome));
DebugVarInt2(
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:265
//--------------------------------------------------------------------------------------------------
void AINewUnitDefault (int player, unit u) {
wave w = AIWaveGet(player, c_waveMain);
AIMergeUnit(player, u, w);
}
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:318
//--------------------------------------------------------------------------------------------------
void AINewDetector (int player, unit u, bool offerToScout) {
wave defendWave = AIWaveGet(player, c_waveDefend);
wave attackWave = AIWaveGet(player, c_waveAttack);
mods/starcoop/starcoop.sc2mod — base.sc2data/TriggerLibs/MeleeAI.galaxy:319
void AINewDetector (int player, unit u, bool offerToScout) {
wave defendWave = AIWaveGet(player, c_waveDefend);
wave attackWave = AIWaveGet(player, c_waveAttack);
// first offer it to the attack wave if that wave has some units in it
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:110
//
if (type == c_PU_WarpPrism) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:114
}
if (type == c_PU_MothershipCore) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:141
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_PU_Zealot || type == c_PU_Stalker || type == c_PU_DarkTemplar) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:116
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_TU_Marine || type == c_TU_Reaper || type == c_TU_Marauder) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:124
if (AIGetFlag(player, e_flagsDiversion)) {
if (type == c_TU_Reaper) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert1));
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:128
}
if (type == c_TU_Banshee) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert2));
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:142
}
AIWaveAddUnitPriority(AIWaveGet(player, c_waveMain), u, c_prioWavePeon);
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:115
//
if (type == c_ZB_SpineCrawler || type == c_ZB_SporeCrawler) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:121
drop = AIGetDropoffWithFewestGuards(player, c_ZU_Queen);
if (drop == c_nullUnit) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
}
else {
mods/swarm.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:150
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_ZU_Zergling || type == c_ZU_Roach || type == c_ZU_Hydralisk) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:148
goAttack = true;
}
else if (AIAnyAllyNeedsDefending(player, AIWaveGet(player, c_waveMain))) {
goAttack = true;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:165
if (AIGetCoopFlag(player, c_coopWaveAttacker)) {
if (AIWaveUnitCount(AIWaveGet(player, c_waveAttack)) > 0) {
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/MeleeHighAI.galaxy:168
return;
}
if (AIWaveUnitCount(AIWaveGet(player, c_waveMain)) < 8) {
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:119
//
if (type == c_PU_WarpPrism) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:123
}
if (type == c_PU_MothershipCore) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Protoss/Protoss.galaxy:150
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_PU_Zealot || type == c_PU_Stalker || type == c_PU_DarkTemplar) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:122
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_TU_Marine || type == c_TU_Reaper || type == c_TU_Marauder) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:130
if (AIGetFlag(player, e_flagsDiversion)) {
if (type == c_TU_Reaper) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert1));
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:134
}
if (type == c_TU_Banshee) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert2));
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Terran/Terran.galaxy:148
}
AIWaveAddUnitPriority(AIWaveGet(player, c_waveMain), u, c_prioWavePeon);
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:121
//
if (type == c_ZB_SpineCrawler || type == c_ZB_SporeCrawler) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}
mods/void.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:127
drop = AIGetDropoffWithFewestGuards(player, c_ZU_Queen);
if (drop == c_nullUnit) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
}
else {
mods/void.sc2mod — base.sc2data/TriggerLibs/Zerg/Zerg.galaxy:156
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_ZU_Zergling || type == c_ZU_Roach || type == c_ZU_Hydralisk) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeSC.galaxy:116
if (AIWaveNeedClearObsUnits(player)) {
if (type == c_TU_Marine || type == c_TU_Reaper || type == c_TU_Marauder) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveClearObs));
return;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeSC.galaxy:124
if (AIGetFlag(player, e_flagsDiversion)) {
if (type == c_TU_Reaper) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert1));
return;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeSC.galaxy:128
}
if (type == c_TU_Banshee) {
AIMergeUnit(player, u, AIWaveGet(player, c_waveDivert2));
return;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeSC.galaxy:142
}
AIWaveAddUnitPriority(AIWaveGet(player, c_waveMain), u, c_prioWavePeon);
return;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:431
// See if the clear obstruction wave is already full
waveClob = AIWaveGet(player, c_waveClearObs);
countClob = AIWaveUnitCount(waveClob);
if (countClob >= 4) {
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:438
// If the attack wave is getting weak, keep units available for it instead
waveAtck = AIWaveGet(player, c_waveAttack);
countAtck = AIWaveUnitCount(waveAtck);
evalAtck = AIWaveEvalRatio(waveAtck, c_evalRange);
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:469
defenseEval = AISelfDefenseThreatEval(c_dtRealSelfThreat, player);
if (defenseEval >= 100) {
if (AIWaveEval(AIWaveGet(player, c_waveMain)) + AIWaveEval(AIWaveGet(player, c_waveDefend)) + 80 < defenseEval) {
return true;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:469
defenseEval = AISelfDefenseThreatEval(c_dtRealSelfThreat, player);
if (defenseEval >= 100) {
if (AIWaveEval(AIWaveGet(player, c_waveMain)) + AIWaveEval(AIWaveGet(player, c_waveDefend)) + 80 < defenseEval) {
return true;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:490
}
waveAttack = AIWaveGet(player, c_waveAttack);
if (AIWaveUnitCount(waveAttack) == 0) {
return false;
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:515
}
waveAttack = AIWaveGet(player, c_waveAttack);
if (AIWaveUnitCount(waveAttack) == 0) {
return c_nullPoint;
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:539
defenseEval = AISelfDefenseThreatEval(c_dtRealSelfThreat, player);
if (defenseEval >= 100) {
if (AIWaveEval(AIWaveGet(player, c_waveMain)) + AIWaveEval(AIWaveGet(player, c_waveDefend)) + 80 < defenseEval) {
return true;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:539
defenseEval = AISelfDefenseThreatEval(c_dtRealSelfThreat, player);
if (defenseEval >= 100) {
if (AIWaveEval(AIWaveGet(player, c_waveMain)) + AIWaveEval(AIWaveGet(player, c_waveDefend)) + 80 < defenseEval) {
return true;
}
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:698
}
else {
eval = AIWaveEval(w) + AIWaveEval(AIWaveGet(player, c_waveMain));
if (IntToFixed(eval) > IntToFixed(AILastAttackStartEval(w)) * 1.33) {
enoughForce = true;
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/MeleeWaveAI.galaxy:851
else if (state == e_attackState_Idle) {
count = AIWaveUnitCount(w) + AIWaveUnitCount(AIWaveGet(player, c_waveMain));
if ((AIWaveGetTimeSinceRetreat(w) > 2) && (AIGetUserInt(player, c_delayNextAttack) < AIGetTime())) {
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/Orc/Orc.galaxy:428
//--------------------------------------------------------------------------------------------------
bool CaptainRetreating(int player){
return AIWaveState(AIWaveGet(player,c_waveMain))==c_waveStateRetreat;
}
void setup_forceOrc (int player){
mods/warcoop/warmeleeai.sc2mod — base.sc2data/TriggerLibs/Orc/Orc.galaxy:652
}
if (type == ZEPPLIN) {
AIWaveAddUnitPriority(AIWaveGet(player, c_waveHome), u, c_prioWavePeon);
return;
}