# Unit Is Invulnerable

Grammaru is invulnerable
FlagsFunction

Returns true if a unit is invulnerable.

# Arguments

  • unit — Unit

Returns — bool

bool libNtve_gf_UnitIsInvulnerable(unit lp_u);

Category: Unit / Properties

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/tvalerian02a.sc2map/MapScript.galaxy:8166

        }

        if (!((libNtve_gf_UnitIsInvulnerable(EventUnit()) == false))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/tvalerian02a.sc2mapMapScript.galaxy:8166

        }

        if (!((libNtve_gf_UnitIsInvulnerable(EventUnit()) == false))) {
            return false;
        }

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

        lv_indexUnit = UnitGroupUnitFromEnd(auto6300CFDC_g, auto6300CFDC_u);
        if (lv_indexUnit == null) { break; }
        if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
            UnitGroupRemove(lv_candidates, lv_indexUnit);
        }

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

        lv_indexUnit = UnitGroupUnitFromEnd(auto6300CFDC_g, auto6300CFDC_u);
        if (lv_indexUnit == null) { break; }
        if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
            UnitGroupRemove(lv_candidates, lv_indexUnit);
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/sc2epilogue01.sc2map/MapScript.galaxy:4934

                lv_indexUnit = UnitGroupUnitFromEnd(auto436C441D_g, auto436C441D_u);
                if (lv_indexUnit == null) { break; }
                if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
                    UnitGroupRemove(lv_candidates, lv_indexUnit);
                }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/sc2epilogue01.sc2map/MapScript.galaxy:5154

                lv_indexUnit = UnitGroupUnitFromEnd(auto5C87A617_g, auto5C87A617_u);
                if (lv_indexUnit == null) { break; }
                if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
                    UnitGroupRemove(lv_candidates, lv_indexUnit);
                }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue01.sc2mapMapScript.galaxy:4934

                lv_indexUnit = UnitGroupUnitFromEnd(auto436C441D_g, auto436C441D_u);
                if (lv_indexUnit == null) { break; }
                if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
                    UnitGroupRemove(lv_candidates, lv_indexUnit);
                }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/sc2epilogue01.sc2mapMapScript.galaxy:5154

                lv_indexUnit = UnitGroupUnitFromEnd(auto5C87A617_g, auto5C87A617_u);
                if (lv_indexUnit == null) { break; }
                if ((libNtve_gf_UnitIsInvulnerable(lv_indexUnit) == true)) {
                    UnitGroupRemove(lv_candidates, lv_indexUnit);
                }

mods/heroesbrawlmods/arenamodemods/templearena.stormmodbase.stormdata/LibAMCT.galaxy:324

            }

            if (((UnitIsAlive(libAMCT_gv_aRMSkyTemple[lp_templeIndex].lv_targetUnit) == false) || (libNtve_gf_UnitIsInvulnerable(libAMCT_gv_aRMSkyTemple[lp_templeIndex].lv_targetUnit) == true) || (libNtve_gf_PlayerIsEnemy(UnitGetOwner(libAMCT_gv_aRMSkyTemple[lp_templeIndex].lv_temple), UnitGetOwner(libAMCT_gv_aRMSkyTemple[lp_templeIndex].lv_targetUnit), libNtve_ge_PlayerRelation_Enemy) == false))) {
                libAMCT_gf_ARMSkyTempleClearTempleTargetRevealers(lp_templeIndex, 6.0);
                lv_target = libAMCT_gf_ARMSkyTempleNextTempleTarget(lp_templeIndex);

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

            }

            if ((libNtve_gf_UnitIsInvulnerable(libGame_gv_teams[lv_itTeam].lv_core) == true)) {
                auto5EBC0634_val = lv_itTeam;
                if (auto5EBC0634_val == libGame_gv_teamOrderIndex_C) {

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

            }

            if ((libNtve_gf_UnitIsInvulnerable(libGame_gv_teams[lv_itTeam].lv_core) == false)) {
                libGame_gf_AfkResetWarningTimerForPlayer(lv_itPlayer);
            }

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

    if ((lv_nextTown <= 0)) {
        libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_attackTownTargetingIndex[lv_team] = 7;
        if ((UnitIsAlive(lv_enemyCore) == true) && (libNtve_gf_UnitIsInvulnerable(lv_enemyCore) == false)) {
            return lv_enemyCore;
        }

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

            }

            if (((UnitIsAlive(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_targetUnit) == false) || (libNtve_gf_UnitIsInvulnerable(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_targetUnit) == true) || (libNtve_gf_PlayerIsEnemy(UnitGetOwner(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_temple), UnitGetOwner(libMLCP_gv_mMSkyTemples[lp_templeIndex].lv_targetUnit), libNtve_ge_PlayerRelation_Enemy) == false))) {
                libMLCP_gf_MMSkyTempleClearTargetRevealers(lp_templeIndex, 6.0);
                lv_target = libMLCP_gf_MMSkyTempleNextTarget(lp_templeIndex);