# Units In Region With Alliance To Player Matching Condition

Grammartype, type2, and type22 units in reg having alliance alliance with player player matching unitFilter, with at most count
FlagsFunction

Returns a unit group containing all units within the alliance filter specified and match the specified unit filters.

# Arguments

  • string<gamelink::Unit> — Unit Type 1
  • string<gamelink::Unit> — Unit Type 2
  • string<gamelink::Unit> — Unit Type 3
  • int — Player
  • int<preset::UnitAllianceWithSelf> — Alliance
  • region — Region
  • unitfilter — Unit Filter
  • int — Count

Returns — unitgroup

unitgroup libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(
	string lp_type,
	string lp_type2,
	string lp_type22,
	int lp_player,
	int lp_alliance,
	region lp_reg,
	unitfilter lp_unitFilter,
	int lp_count,
);

Category: Unit Group / Useful Unit Groups

# Examples

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionbaneling.sc2map/MapScript.galaxy:3937

    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();
    UnitGroupLoopBegin(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("Baneling", "BanelingBurrowed", "", gv_pLAYER_01_USER, -1, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        UnitRemove(UnitGroupLoopCurrent());

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2map/MapScript.galaxy:2702

    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();
    gv_midRaptorZerglings = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("Zergling", "ZerglingBurrowed", "", gv_pLAYER_01_USER, -1, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    UnitGroupLoopBegin(gv_midRaptorZerglings);
    while (!UnitGroupLoopDone()) {

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zchar02.sc2map/MapScript.galaxy:1607

    autoC2102447_var = 1;
    for ( ; autoC2102447_var <= autoC2102447_ae; autoC2102447_var += 1 ) {
        if ((UnitIsAlive(gv_scourgeNestUnit[autoC2102447_var]) == true) && (libNtve_gf_UnitGroupIsDead(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("CreepTumor", "CreepTumorBurrowed", "CreepTumorUsed", gv_pLAYER_01_USER, -1, RegionCircle(gv_scourgeNest_Point[autoC2102447_var], gv_c_ScourgeActivationRange), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)) == false)) {
            gf_ShowHelperAtNest(autoC2102447_var);
        }

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zhybrid02.sc2map/MapScript.galaxy:5837

        libNtve_gf_ShowHideUnit(autoD5277DD6_var, false);
    }
    auto22D09C2B_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("HybridHoldingCellSmallUnit", "PlatformConnector", "UmojanLabStasisTubeDestructible2", c_playerAny, c_unitAllianceAny, RegionEntireMap(), UnitFilter(0, (1 << (c_targetFilterHidden - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    auto22D09C2B_u = UnitGroupCount(auto22D09C2B_g, c_unitCountAll);
    for (;; auto22D09C2B_u -= 1) {

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:1029


    // Implementation
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:1030

    // Implementation
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    autoDFA864D2_g = lv_group;

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zlab01.sc2map/MapScript.galaxy:1031

    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    autoDFA864D2_g = lv_group;
    autoDFA864D2_u = UnitGroupCount(autoDFA864D2_g, c_unitCountAll);

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionbaneling.sc2mapMapScript.galaxy:3937

    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();
    UnitGroupLoopBegin(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("Baneling", "BanelingBurrowed", "", gv_pLAYER_01_USER, -1, RegionFromId(6), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    for ( ; !UnitGroupLoopDone() ; UnitGroupLoopStep() ) {
        UnitRemove(UnitGroupLoopCurrent());

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/evolution/zevolutionzergling.sc2mapMapScript.galaxy:2702

    gv_cinematicHiddenUnits = UnitGroupEmpty();
    gv_cinematicTempUnits = UnitGroupEmpty();
    gv_midRaptorZerglings = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("Zergling", "ZerglingBurrowed", "", gv_pLAYER_01_USER, -1, RegionFromId(5), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    UnitGroupLoopBegin(gv_midRaptorZerglings);
    while (!UnitGroupLoopDone()) {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zchar02.sc2mapMapScript.galaxy:1607

    autoC2102447_var = 1;
    for ( ; autoC2102447_var <= autoC2102447_ae; autoC2102447_var += 1 ) {
        if ((UnitIsAlive(gv_scourgeNestUnit[autoC2102447_var]) == true) && (libNtve_gf_UnitGroupIsDead(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("CreepTumor", "CreepTumorBurrowed", "CreepTumorUsed", gv_pLAYER_01_USER, -1, RegionCircle(gv_scourgeNest_Point[autoC2102447_var], gv_c_ScourgeActivationRange), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0)) == false)) {
            gf_ShowHelperAtNest(autoC2102447_var);
        }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zhybrid02.sc2mapMapScript.galaxy:5837

        libNtve_gf_ShowHideUnit(autoD5277DD6_var, false);
    }
    auto22D09C2B_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("HybridHoldingCellSmallUnit", "PlatformConnector", "UmojanLabStasisTubeDestructible2", c_playerAny, c_unitAllianceAny, RegionEntireMap(), UnitFilter(0, (1 << (c_targetFilterHidden - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    auto22D09C2B_u = UnitGroupCount(auto22D09C2B_g, c_unitCountAll);
    for (;; auto22D09C2B_u -= 1) {

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:1029


    // Implementation
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:1030

    // Implementation
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    autoDFA864D2_g = lv_group;

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zlab01.sc2mapMapScript.galaxy:1031

    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabMonitorFloorDestructible1", "UmojanLabMonitorFloorDestructible2", "UmojanLabMonitorFloorDestructible3", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("UmojanLabStasisTubeDestructible1", "UmojanLabStasisTubeDestructible2", "UmojanLabHoloProjectorUnit", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    UnitGroupAddUnitGroup(lv_group, libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("DestructibleUmojanLabFloodLights", "DestructibleUmojanLabTestTube", "UmojanLabDissectionArmDestructible", gv_pLAYER_02_DOMINION22, -1, lp_rEGION, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0));
    autoDFA864D2_g = lv_group;
    autoDFA864D2_u = UnitGroupCount(autoDFA864D2_g, c_unitCountAll);

campaigns/swarmstory.sc2campaignbase.sc2data/TriggerLibs/SwarmCampaignLib.galaxy:17220

    }

    lv_nearbyTownHall = UnitGroupClosestToPoint(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("Hatchery", "Lair", "Hive", UnitGetOwner(EventUnitCreatedUnit()), -1, RegionCircle(UnitGetPosition(EventUnitCreatedUnit()), 6.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), UnitGetPosition(EventUnitCreatedUnit()));
    if ((lv_nearbyTownHall == null)) {
        return true;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:665

            if (((UnitGetType(lv_creepUnit) == "JungleGraveGolemDefender") || (UnitGetType(lv_creepUnit) == "UnderworldBoss") || (UnitGetType(lv_creepUnit) == "JunglePlantHorror"))) {
                if ((UnitGetCooldown(lv_creepUnit, "Abil/UnderworldBossStun") <= 0.0)) {
                    lv_enemyGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_creepUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_creepUnit), 5.0), UnitFilter((1 << c_targetFilterHeroic) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                    if ((UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 1)) {
                        UnitIssueOrder(lv_creepUnit, Order(AbilityCommand("UnderworldBossStun", 0)), c_orderQueueReplace);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:672

                    }
                    else {
                        lv_enemyGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_creepUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_creepUnit), 5.0), UnitFilter((1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                        if ((UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 3)) {
                            UnitIssueOrder(lv_creepUnit, Order(AbilityCommand("UnderworldBossStun", 0)), c_orderQueueReplace);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/AILib.galaxy:682

                }

                lv_enemyGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_creepUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_creepUnit), 8.0), UnitFilter((1 << c_targetFilterHeroic) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                if ((UnitGetCooldown(lv_creepUnit, "Abil/UnderworldBossRoots") <= 0.0) && (UnitGroupCount(lv_enemyGroup, c_unitCountAlive) >= 1)) {
                    auto0C71B695_g = lv_enemyGroup;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameDataHelperLib.galaxy:5527

    while ((UnitIsAlive(lv_mainSymbiote) == true) && (UnitIsAlive(lv_mainSymbioteHost) == true)) {
        if ((PlayerHasTalent(libGDHL_gf_AbathurSymbioteAbathurPlayer(), "AbathurSymbioteHivemind") == true)) {
            lv_possibleSymbioteHivemindHosts = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", lv_abathurPlayer, c_unitAllianceAllyExcludeSelf, RegionCircle(UnitGetPosition(lv_mainSymbioteHost), libGDHL_gv_abathurSymbioteHivemindCastRange_C), libCore_gv_filtersHeroicAllyandnotImmuneToFriendlyAbilitiesorBenign, (libGDHL_gv_abathurSymbioteHivemindMaxHosts_C + 1));
            autoFE393C25_g = lv_possibleSymbioteHivemindHosts;
            autoFE393C25_u = UnitGroupCount(autoFE393C25_g, c_unitCountAll);

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/GameLib.galaxy:18402

        }

        auto6F618D62_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("TownMoonwell", "TownMoonwellL2", "TownMoonwellL3", UnitGetOwner(EventUnit()), c_unitAllianceAlly, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
        auto6F618D62_u = UnitGroupCount(auto6F618D62_g, c_unitCountAll);
        for (;; auto6F618D62_u -= 1) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/MapMechanicsLib.galaxy:966


    // Implementation
    autoBBCB82D8_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lp_creep), c_unitAllianceEnemy, RegionCircle(lp_position, lp_maximumRange), UnitFilter((1 << c_targetFilterHeroic) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoBBCB82D8_u = UnitGroupCount(autoBBCB82D8_g, c_unitCountAll);
    for (;; autoBBCB82D8_u -= 1) {

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SoundLib.galaxy:1427

        	if (lv_player<0) { break; }
        	lv_heroUnit = libGame_gv_players[lv_player].lv_heroUnit;
        if ((UnitIsAlive(lv_heroUnit) == true) && (UnitHasBehavior2(lv_heroUnit, "Dead") == false) && (libAIAI_gf_HeroAIIsAIEnabledForPlayer(lv_player) == false) && (libSond_gv_heroVO_HeroGoHealCalls[lv_player] <= 2) && (libStEx_gf_PlayerIsInCombat(lv_player) == false) && (UnitHasBehavior2(lv_heroUnit, "HealingFountainCooldown") == false) && (UnitHasBehavior2(lv_heroUnit, "HallOfStormsProtectionBuff") == false) && (TimerGetElapsed(libGame_gv_gameTimer) > (libSond_gv_heroVOHeroGoHealLastT[lv_player] + libSond_gv_heroVO_HeroGoHealCooldownTime_C)) && (UnitGetPropertyFixed(lv_heroUnit, c_unitPropLifeExpectedPercent, c_unitPropCurrent) <= libSond_gv_heroVO_HeroGoHealHPPercentThreshold_C) && (UnitGroupCount(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("TownMoonwell", "TownMoonwellL2", "TownMoonwellL3", lv_player, c_unitAllianceAlly, RegionCircle(UnitGetPosition(lv_heroUnit), 25.0), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), c_unitCountAlive) > 0) && ((libGame_gv_players[lv_player].lv_heroData.lv_expandedRole != c_expandedRoleHealer) || (libGame_gv_players[lv_player].lv_heroData.lv_expandedRole != c_expandedRoleSupport) || (UnitGetPropertyFixed(lv_heroUnit, c_unitPropEnergyPercent, c_unitPropCurrent) < 50.0))) {
            lv_nearbyAllyHeroes = UnitGroupAlliance(lv_player, c_unitAllianceAllyExcludeSelf, RegionCircle(UnitGetPosition(lv_heroUnit), 15.0), libCore_gv_filtersHeroic, 0);
            autoA90464AA_g = lv_nearbyAllyHeroes;

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/UILib.galaxy:12415

    }
    UIFlyerHelperOverride(PlayerGroupAll(), libNtve_ge_FlyerHelperDisplay_c_flyerDisplayAll);
    autoD1EC9F11_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("TownMoonwell", "TownMoonwellL2", "TownMoonwellL3", UnitGetOwner(EventUnit()), c_unitAllianceAlly, RegionPlayableMap(), UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoD1EC9F11_u = UnitGroupCount(autoD1EC9F11_g, c_unitCountAll);
    for (;; autoD1EC9F11_u -= 1) {

mods/heroesmapmods/battlegroundmapmods/blackheartsbay.stormmodbase.stormdata/LibBBAY.galaxy:494

    lv_townHall = libGame_gv_townTownData[lv_town].lv_structureUnits[libGame_gv_townTownData[lv_town].lv_townHallIndex];
    if ((UnitIsAlive(lv_townHall) == false)) {
        UnitGroupRemove(lv_buildings, UnitGroupUnit(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(UnitTypeFromString("RagnarosBigRag"), "", "", c_playerAny, c_unitAllianceAny, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, (1 << (c_targetFilterAITargetableStructure - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1));
        return UnitGroupRandomUnit(lv_buildings, c_unitCountAlive);
    }

mods/heroesmapmods/battlegroundmapmods/braxisholdout.stormmodbase.stormdata/LibSCHO.galaxy:2718

                lv_foremostZergUnit = UnitGroupClosestToPoint(libSCHO_gv_mMHO_AttackGroups[libGame_gf_EnemyTeam(lv_teamIndex)][1], UnitGetPosition(libGame_gv_teams[lv_teamIndex].lv_core));
                lv_isForemostZergUnitInCombat = (OrderGetAbilityCommand(UnitOrder(lv_foremostZergUnit, 0)) == AbilityCommand("attack", 0));
                lv_nearbyDefendingHeroes = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", UnitGetOwner(lv_foremostZergUnit), c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lv_foremostZergUnit), 15.0), libCore_gv_filtersHeroic, 1);
                if ((lv_isForemostZergUnitInCombat == true) && (UnitGroupCount(lv_nearbyDefendingHeroes, c_unitCountAlive) == 0)) {
                    autoFCE8A238_val = RandomInt(1, 9);

mods/heroesmapmods/battlegroundmapmods/skytemple.stormmodbase.stormdata/LibMLCP.galaxy:1105

    lv_townHall = libGame_gv_townTownData[lv_town].lv_structureUnits[libGame_gv_townTownData[lv_town].lv_townHallIndex];
    if ((UnitIsAlive(lv_townHall) == false)) {
        UnitGroupRemove(lv_buildings, UnitGroupUnit(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(UnitTypeFromString("RagnarosBigRag"), "", "", c_playerAny, c_unitAllianceAny, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, (1 << (c_targetFilterAITargetableStructure - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1));
        return UnitGroupClosestToPoint(lv_buildings, UnitGetPosition(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple));
    }

mods/heroesmapmods/battlegroundmapmods/skytemple.stormmodbase.stormdata/LibMLCP.galaxy:1209

    lv_townHall = libGame_gv_townTownData[lv_town].lv_structureUnits[libGame_gv_townTownData[lv_town].lv_townHallIndex];
    if ((UnitIsAlive(lv_townHall) == false)) {
        UnitGroupRemove(lv_buildings, UnitGroupUnit(libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(UnitTypeFromString("RagnarosBigRag"), "", "", c_playerAny, c_unitAllianceAny, libGame_gv_townTownData[lv_town].lv_townRegion, UnitFilter(0, (1 << (c_targetFilterAITargetableStructure - 32)), (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0), 1));
        return libMLCP_gf_MMSkyTempleClosestUnits(lv_buildings, 3, UnitGetPosition(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple));
    }

mods/heromods/medivh.stormmodbase.stormdata/LibHMDV.galaxy:125

    // Implementation
    if ((lp_player >= 1) && (lp_player <= libCore_gv_bALMaxPlayers)) {
        return libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("MedivhPortal", "", "", lp_player, -1, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterSelf) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    }
    else {

mods/heromods/medivh.stormmodbase.stormdata/LibHMDV.galaxy:501

        lv_medivhUnit = libGame_gv_players[lv_portalOwner].lv_heroUnit;
    }
    auto43A3FC99_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("MedivhPortal", "", "", lv_portalOwner, c_unitAllianceAlly, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterSelf) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    auto43A3FC99_u = UnitGroupCount(auto43A3FC99_g, c_unitCountAll);
    for (;; auto43A3FC99_u -= 1) {

mods/novastoryassets.sc2modbase.sc2maps/maps/campaign/nova/nova02.sc2map/MapScript.galaxy:4746

        lv_m = Tan((PointGetFacing(lv_targetWaypoints[lv_targetWaypointIndex]) + 90.0));
        lv_b = (PointGetY(UnitGroupCenterOfGroup(lv_waveGroup))-(lv_m*PointGetX(UnitGroupCenterOfGroup(lv_waveGroup))));
        auto2433F59F_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", lv_attackWavePlayer, c_unitAllianceEnemy, RegionCircle(UnitGroupCenterOfGroup(lv_waveGroup), 15.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterUncommandable), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterInvulnerable - 32))), 0);
        auto2433F59F_u = UnitGroupCount(auto2433F59F_g, c_unitCountAll);
        for (;; auto2433F59F_u -= 1) {

mods/novastoryassets.sc2mod/base.sc2maps/maps/campaign/nova/nova02.sc2mapMapScript.galaxy:4746

        lv_m = Tan((PointGetFacing(lv_targetWaypoints[lv_targetWaypointIndex]) + 90.0));
        lv_b = (PointGetY(UnitGroupCenterOfGroup(lv_waveGroup))-(lv_m*PointGetX(UnitGroupCenterOfGroup(lv_waveGroup))));
        auto2433F59F_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", lv_attackWavePlayer, c_unitAllianceEnemy, RegionCircle(UnitGroupCenterOfGroup(lv_waveGroup), 15.0), UnitFilter((1 << c_targetFilterGround) | (1 << c_targetFilterVisible), 0, (1 << c_targetFilterMissile) | (1 << c_targetFilterUncommandable), (1 << (c_targetFilterStasis - 32)) | (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32)) | (1 << (c_targetFilterInvulnerable - 32))), 0);
        auto2433F59F_u = UnitGroupCount(auto2433F59F_g, c_unitCountAll);
        for (;; auto2433F59F_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6723

            if ((IntToFixed(lv_validPointsCount) < (lp_maxDistance * 0.33)) && (PointPathingPassable(lv_pointIter) == true) && (PointPathingCost(PlayerStartLocation(libCOMI_gv_cM_ZeratulPlayer), lv_pointIter) <= FixedToInt(lp_maxDistance)) && (DistanceBetweenPoints(PlayerStartLocation(PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 1)), lv_pointIter) >= lv_startLocationBuffer) && (DistanceBetweenPoints(PlayerStartLocation(PlayerGroupPlayer(libCOOC_gf_CommanderPlayers(), 2)), lv_pointIter) >= lv_startLocationBuffer) && ((UnitIsAlive(libCOMI_gv_cM_HeroUnit[libCOMI_gv_cM_ZeratulPlayer]) == false) || (DistanceBetweenPoints(UnitGetPosition(libCOMI_gv_cM_HeroUnit[libCOMI_gv_cM_ZeratulPlayer]), lv_pointIter) > libNtve_gf_CatalogFieldValueGetAsReal(c_gameCatalogEffect, "ProphecyArtifactRevealSearch", "AreaArray[" + IntToString(0) + "].Radius", c_playerAny)))) {
                lv_nearbyUnitHealth = 0;
                auto38554CDB_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", libCOMI_gv_cM_ZeratulPlayer, c_unitAllianceEnemy, RegionCircle(lv_pointIter, 10.0), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                auto38554CDB_u = UnitGroupCount(auto38554CDB_g, c_unitCountAll);
                for (;; auto38554CDB_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6813

                if ((lv_nearbyUnitHealthLimit > 0.0)) {
                    lv_nearbyUnitHealth = 0;
                    auto1246FD3D_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", libCOMI_gv_cM_ZeratulPlayer, c_unitAllianceEnemy, RegionCircle(lv_pointIter, 10.0), UnitFilter((1 << c_targetFilterStructure), 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                    auto1246FD3D_u = UnitGroupCount(auto1246FD3D_g, c_unitCountAll);
                    for (;; auto1246FD3D_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:6909

                if ((lv_nearbyUnitHealthLimit > 0.0)) {
                    lv_nearbyUnitHealth = 0;
                    auto977017AF_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", libCOMI_gv_cM_ZeratulPlayer, c_unitAllianceEnemy, RegionCircle(lv_pointIter, 10.0), UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
                    auto977017AF_u = UnitGroupCount(auto977017AF_g, c_unitCountAll);
                    for (;; auto977017AF_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMI.galaxy:23284

    }

    lv_siegeTankUnitGroup = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition("SiegeTankSieged_BlackOps", "", "", UnitGetOwner(EventUnit()), -1, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral) | (1 << c_targetFilterEnemy) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoB26D9C6B_g = lv_siegeTankUnitGroup;
    autoB26D9C6B_u = UnitGroupCount(autoB26D9C6B_g, c_unitCountAll);

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:709

    }

    autoF1DA6167_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, RegionCircle(UnitGetPosition(lp_killedUnit), 3.5), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoF1DA6167_u = UnitGroupCount(autoF1DA6167_g, c_unitCountAll);
    for (;; autoF1DA6167_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:6081


    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, true);
    autoE692269A_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, null, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    autoE692269A_u = UnitGroupCount(autoE692269A_g, c_unitCountAll);
    for (;; autoE692269A_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:6117

    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_OwnerChanges, true);
    TriggerEnable(libCOMU_gt_CT_SpeedFreaksMorphCleanup, true);
    autoDE23EFBF_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoDE23EFBF_u = UnitGroupCount(autoDE23EFBF_g, c_unitCountAll);
    for (;; autoDE23EFBF_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:6551

        TechTreeUpgradeAddLevel(lv_indexPlayer, "MutatorJustDie", 1);
    }
    auto743D6D35_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    auto743D6D35_u = UnitGroupCount(auto743D6D35_g, c_unitCountAll);
    for (;; auto743D6D35_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:7307

    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, true);
    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_OwnerChanges, true);
    auto1B1F4F5D_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    auto1B1F4F5D_u = UnitGroupCount(auto1B1F4F5D_g, c_unitCountAll);
    for (;; auto1B1F4F5D_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:7493

    libNtve_gf_SetUpgradeLevelForPlayer(2, "MutatorIsPlayer2", 1);
    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, true);
    autoDA41741F_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, null, UnitFilter(0, 0, (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    autoDA41741F_u = UnitGroupCount(autoDA41741F_g, c_unitCountAll);
    for (;; autoDA41741F_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:8120

    libCOMU_gv_cT_MutatorEnabledQuickList[(libCOMU_ge_CT_MutatorQuickList_CT_QuickInspiration)] = true;
    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, true);
    autoDEA1E9B8_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, null, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    autoDEA1E9B8_u = UnitGroupCount(autoDEA1E9B8_g, c_unitCountAll);
    for (;; autoDEA1E9B8_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:8155

    libCOMU_gv_cT_MutatorEnabledQuickList[(libCOMU_ge_CT_MutatorQuickList_CT_QuickHardenedWill)] = true;
    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, true);
    autoA727CC86_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, null, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    autoA727CC86_u = UnitGroupCount(autoA727CC86_g, c_unitCountAll);
    for (;; autoA727CC86_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:8505


    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_UnitCreation, false);
    autoF575554C_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, null, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32))), 0);
    autoF575554C_u = UnitGroupCount(autoF575554C_g, c_unitCountAll);
    for (;; autoF575554C_u -= 1) {

mods/starcoop/starcoop.sc2modbase.sc2data/LibCOMU.galaxy:8541

    libCOMU_gf_CT_ToggleTrigger(libCOMU_ge_CT_TriggerType_OwnerChanges, false);
    TriggerEnable(libCOMU_gt_CT_SpeedFreaksMorphCleanup, false);
    autoDE461F12_g = libNtve_gf_UnitsInRegionWithAllianceToPlayerMatchingCondition(null, "", "", 1, c_unitAllianceEnemy, RegionEntireMap(), UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), (1 << (c_targetFilterDead - 32)) | (1 << (c_targetFilterHidden - 32))), 0);
    autoDE461F12_u = UnitGroupCount(autoDE461F12_g, c_unitCountAll);
    for (;; autoDE461F12_u -= 1) {