# Damaging Effect

Grammar — Damaging effect
FlagsNative | Function

Returns the damaging effect.

Returns — string<gamelink::Effect>

native string EventUnitDamageEffect();

Category: Unit / Combat

# Examples

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:1378

    TriggerEnable(gt_CiviliansAttackedandCower, false);
    TriggerAddEventUnitDied(gt_CiviliansAttackedandCower, null);
    TriggerAddEventUnitDamaged(gt_CiviliansAttackedandCower, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:4908

    gt_TransmissionCivilianSquishArea1Q = TriggerCreate("gt_TransmissionCivilianSquishArea1Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea1Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea1Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:4948

    gt_TransmissionCivilianSquishArea2Q = TriggerCreate("gt_TransmissionCivilianSquishArea2Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea2Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea2Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:4988

    gt_TransmissionCivilianSquishArea3Q = TriggerCreate("gt_TransmissionCivilianSquishArea3Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea3Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea3Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5028

    gt_TransmissionCivilianSquishArea4Q = TriggerCreate("gt_TransmissionCivilianSquishArea4Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea4Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea4Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner04.sc2map/MapScript.galaxy:5068

    gt_TransmissionCivilianSquishArea5Q = TriggerCreate("gt_TransmissionCivilianSquishArea5Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea5Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea5Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8034

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "TossGrenadeDamage"))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8065

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "RaynorWeaponU"))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8096

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage"))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8131

        }

        if (!(((EventUnitDamageEffect() == "TossGrenadeDamage") || (EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage")))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/campaign/thorner05s.sc2map/MapScript.galaxy:8131

        }

        if (!(((EventUnitDamageEffect() == "TossGrenadeDamage") || (EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage")))) {
            return false;
        }

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:603

    else {
    }
    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageEffect() != "SalvageDeath") && (UnitGetType(EventUnit()) != "MULE") && (UnitGetType(EventUnit()) != "Nuke") && (UnitGetType(EventUnit()) != "AutoTurret") && (UnitGetType(EventUnit()) != "PointDefenseDrone")) {
        gv_currentRoundPlayerDeaths += 1;
        gv_zerglingRushScoreCurrent = gv_currentRoundPlayerDeaths;

campaigns/liberty.sc2campaignbase.sc2maps/maps/challenges/rushdefense.sc2map/MapScript.galaxy:951

    else {
    }
    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageEffect() != "SalvageDeath") && (UnitGetType(EventUnit()) != "MULE") && (UnitGetType(EventUnit()) != "Nuke") && (UnitGetType(EventUnit()) != "AutoTurret") && (UnitGetType(EventUnit()) != "PointDefenseDrone")) {
        gv_currentRoundPlayerDeaths += 1;
        gv_protossRushScoreCurrent = gv_currentRoundPlayerDeaths;

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:1378

    TriggerEnable(gt_CiviliansAttackedandCower, false);
    TriggerAddEventUnitDied(gt_CiviliansAttackedandCower, null);
    TriggerAddEventUnitDamaged(gt_CiviliansAttackedandCower, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4908

    gt_TransmissionCivilianSquishArea1Q = TriggerCreate("gt_TransmissionCivilianSquishArea1Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea1Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea1Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4948

    gt_TransmissionCivilianSquishArea2Q = TriggerCreate("gt_TransmissionCivilianSquishArea2Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea2Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea2Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:4988

    gt_TransmissionCivilianSquishArea3Q = TriggerCreate("gt_TransmissionCivilianSquishArea3Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea3Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea3Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5028

    gt_TransmissionCivilianSquishArea4Q = TriggerCreate("gt_TransmissionCivilianSquishArea4Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea4Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea4Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner04.sc2mapMapScript.galaxy:5068

    gt_TransmissionCivilianSquishArea5Q = TriggerCreate("gt_TransmissionCivilianSquishArea5Q_Func");
    TriggerAddEventUnitDied(gt_TransmissionCivilianSquishArea5Q, null);
    TriggerAddEventUnitDamaged(gt_TransmissionCivilianSquishArea5Q, null, c_unitDamageTypeAny, c_unitDamageEither, EventUnitDamageEffect());
}

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8034

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "TossGrenadeDamage"))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8065

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "RaynorWeaponU"))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8096

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage"))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8131

        }

        if (!(((EventUnitDamageEffect() == "TossGrenadeDamage") || (EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage")))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/campaign/thorner05s.sc2mapMapScript.galaxy:8131

        }

        if (!(((EventUnitDamageEffect() == "TossGrenadeDamage") || (EventUnitDamageEffect() == "ExperimentalPlasmaGunDamage")))) {
            return false;
        }

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:603

    else {
    }
    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageEffect() != "SalvageDeath") && (UnitGetType(EventUnit()) != "MULE") && (UnitGetType(EventUnit()) != "Nuke") && (UnitGetType(EventUnit()) != "AutoTurret") && (UnitGetType(EventUnit()) != "PointDefenseDrone")) {
        gv_currentRoundPlayerDeaths += 1;
        gv_zerglingRushScoreCurrent = gv_currentRoundPlayerDeaths;

campaigns/liberty.sc2campaign/base.sc2maps/maps/challenges/rushdefense.sc2mapMapScript.galaxy:951

    else {
    }
    if ((UnitGetOwner(EventUnit()) == gv_pLAYER_USER) && (EventUnitDamageEffect() != "SalvageDeath") && (UnitGetType(EventUnit()) != "MULE") && (UnitGetType(EventUnit()) != "Nuke") && (UnitGetType(EventUnit()) != "AutoTurret") && (UnitGetType(EventUnit()) != "PointDefenseDrone")) {
        gv_currentRoundPlayerDeaths += 1;
        gv_protossRushScoreCurrent = gv_currentRoundPlayerDeaths;

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/swarm/zspace01.sc2map/MapScript.galaxy:5303


    gv_totalDamageTaken += EventUnitDamageAmount();
    if ((EventUnitDamageEffect() == "SJCloakedMineWeaponSearchDamage")) {
        gv_hyperionHitByMagMine = true;
        gv_totalMagMineDamageTaken += EventUnitDamageAmount();

campaigns/swarm.sc2campaignbase.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2map/MapScript.galaxy:7958

        }

        if (!((EventUnitDamageEffect() == "ShadowBladeDamage"))) {
            return false;
        }

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/swarm/zspace01.sc2mapMapScript.galaxy:5303


    gv_totalDamageTaken += EventUnitDamageAmount();
    if ((EventUnitDamageEffect() == "SJCloakedMineWeaponSearchDamage")) {
        gv_hyperionHitByMagMine = true;
        gv_totalMagMineDamageTaken += EventUnitDamageAmount();

campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue03.sc2mapMapScript.galaxy:7958

        }

        if (!((EventUnitDamageEffect() == "ShadowBladeDamage"))) {
            return false;
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:4515

        }

        if (!(((EventUnitDamageEffect() == "SOAOrbitalStrikeDamage") || (EventUnitDamageEffect() == "SOAThermalLanceDamage")))) {
            return false;
        }

campaigns/void.sc2campaignbase.sc2maps/maps/campaign/void/pkorhal01.sc2map/MapScript.galaxy:4515

        }

        if (!(((EventUnitDamageEffect() == "SOAOrbitalStrikeDamage") || (EventUnitDamageEffect() == "SOAThermalLanceDamage")))) {
            return false;
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2mapMapScript.galaxy:4515

        }

        if (!(((EventUnitDamageEffect() == "SOAOrbitalStrikeDamage") || (EventUnitDamageEffect() == "SOAThermalLanceDamage")))) {
            return false;
        }

campaigns/void.sc2campaign/base.sc2maps/maps/campaign/void/pkorhal01.sc2mapMapScript.galaxy:4515

        }

        if (!(((EventUnitDamageEffect() == "SOAOrbitalStrikeDamage") || (EventUnitDamageEffect() == "SOAThermalLanceDamage")))) {
            return false;
        }

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10759

        }

        if ((EventUnitDamageEffect() != null)) {
            auto150101B6_ai = 1;
            auto150101B6_ae = UserDataInstanceCount("CampaignPerk")+1;

campaigns/voidstory.sc2campaignbase.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10765

                lv_indexPerk = UserDataInstance("CampaignPerk", auto150101B6_ai);
                auto150101B6_ai = auto150101B6_ai+1;
                if ((UserDataGetGameLink("CampaignPerk", lv_indexPerk, "Effect", 1) == EventUnitDamageEffect())) {
                    lv_previousValue = DataTableGetInt(true, ("DmgDone_" + (lv_indexPerk)));
                    DataTableSetInt(true, ("DmgDone_" + (lv_indexPerk)), (lv_previousValue+FixedToInt(EventUnitDamageAmount())));

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

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() != "HeroGenericFakeHeroDuplicationDamage"))) {
            return false;
        }

mods/heroesdata.stormmodbase.stormdata/TriggerLibs/SupportLib.galaxy:2485

    lv_damageAttempted = EventUnitDamageAttempted();
    lv_damageDone = EventUnitDamageAmount();
    lv_damagingEffect = EventUnitDamageEffect();
    lv_damagingEffectName = (lv_damagingEffect);
    lv_damagingEffectPlayerAsStr = IntToString(lv_damagingPlayer);

mods/heromods/auriel.stormmodbase.stormdata/LibHAUR.galaxy:615

        }

        if (!((EventUnitDamageEffect() != "BribeKillEffect"))) {
            return false;
        }

mods/heromods/samuro.stormmodbase.stormdata/LibHSAM.galaxy:1355

        }

        if (!((EventUnitDamageEffect() != "HeroGenericFakeHeroDuplicationDamage"))) {
            return false;
        }

mods/heromods/thefirelords.stormmodbase.stormdata/LibHMaj.galaxy:735

    // Automatic Variable Declarations
    // Variable Initialization
    lv_effect = EventUnitDamageEffect();
    lv_damagedUnit = EventUnit();
    lv_ragnarosUnit = EventUnitDamageSourceUnit();

mods/heromods/thefirelords.stormmodbase.stormdata/LibHMaj.galaxy:810

    // Automatic Variable Declarations
    // Variable Initialization
    lv_effect = EventUnitDamageEffect();
    lv_damagedUnit = EventUnit();
    lv_ragnarosUnit = EventUnitDamageSourceUnit();

mods/heromods/yrel.stormmodbase.stormdata/LibHYRL.galaxy:533

    // Conditions
    if (testConds) {
        if (!((EventUnitDamageEffect() != "HeroGenericDummyInterruptDamage"))) {
            return false;
        }

mods/heromods/zarya.stormmodbase.stormdata/LibHZAR.galaxy:821

        }

        if (!((EventUnitDamageEffect() != "BribeKillEffect"))) {
            return false;
        }

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

        }

        if (!((EventUnitDamageEffect() == "VultureSpiderMinesDamage"))) {
            return false;
        }

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

        }

        if (!((EventUnitDamageEffect() == "VultureSpiderMinesDamage"))) {
            return false;
        }

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

    // Conditions
    if (testConds) {
        if (!(((UnitGetType(EventUnit()) != "Locust") && (PlayerCommander(lv_killedPlayer) == "Abathur") && ((UnitHasBehavior2(EventUnit(), "BiomassBuff1") == true) || (UnitHasBehavior2(EventUnit(), "BiomassBuff10") == true) || (UnitHasBehavior2(EventUnit(), "BiomassBuff100") == true)) && (UnitFilterMatch(EventUnit(), 1, UnitFilter(0, 0, (1 << c_targetFilterStructure) | (1 << c_targetFilterMissile), 0)) == true) && ((libNtve_gf_UnitIsHidden(EventUnit()) == false) || (EventUnitDamageEffect() == libCOMI_gv_cM_CargoDeathKillEffect)) && (lv_biomassRefundChance > 0.0)))) {
            return false;
        }

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

    UnitCreateEffectUnit(libCOMI_gv_cM_SoACasterUnit[EventPlayer()], "SOASummonFenixHeroSummonCasterBehaviorCleanup", libCOMI_gv_cM_SoACasterUnit[EventPlayer()]);
    libCOUI_gv_cU_HeroExists[UnitGetOwner(EventUnit())][libCOMI_gv_cMC_Fenix_HeroIndex] = false;
    if ((libNtve_gf_KillingUnit() == EventUnit()) && (libCOMI_gv_cM_Fenix_KilledSelf[lv_player] == false) && (EventUnitDamageEffect() == "FenixSuicide")) {
        libCOMI_gv_cM_Fenix_KilledSelf[lv_player] = true;
        libCOMI_gv_cM_Fenix_KillCount[lv_player] += 1;

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

    // Variable Initialization
    lv_killingplayer = UnitGetOwner(EventUnitDamageSourceUnit());
    lv_killingeffect = EventUnitDamageEffect();

    // Conditions

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

    // Conditions
    if (testConds) {
        if (!((CatalogFieldValueGet(c_gameCatalogEffect, EventUnitDamageEffect(), "Death", EventUnitDamageSourcePlayer()) == "Fire"))) {
            return false;
        }

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


    // Implementation
    if (((libCOMU_gv_cT_MutatorEnabledQuickList[(libCOMU_ge_CT_MutatorQuickList_CT_QuickDamageBounce)] == false) || (EventUnitDamageEffect() == "AttackDummyImpact") || (EventUnitDamageEffect() == "DiffusionDummyImpact") || (PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), UnitGetOwner(lp_damagedUnit)) == true) || (UnitFilterMatch(lp_damagedUnit, 1, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral), 0)) == false) || (UnitIsAlive(lp_damagedUnit) == false))) {
        return true;
    }

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


    // Implementation
    if (((libCOMU_gv_cT_MutatorEnabledQuickList[(libCOMU_ge_CT_MutatorQuickList_CT_QuickDamageBounce)] == false) || (EventUnitDamageEffect() == "AttackDummyImpact") || (EventUnitDamageEffect() == "DiffusionDummyImpact") || (PlayerGroupHasPlayer(libCOOC_gf_HumanPlayers(), UnitGetOwner(lp_damagedUnit)) == true) || (UnitFilterMatch(lp_damagedUnit, 1, UnitFilter(0, 0, (1 << c_targetFilterPlayer) | (1 << c_targetFilterAlly) | (1 << c_targetFilterNeutral), 0)) == false) || (UnitIsAlive(lp_damagedUnit) == false))) {
        return true;
    }

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

    libCOMU_gf_CT_ApplyLifeLeech(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount());
    libCOMU_gf_CT_ApplyFoodHuntAggro(EventUnit(), EventUnitDamageSourceUnit());
    libCOMU_gf_CT_ApplyDamageBounce2(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount(), EventUnitDamageEffect());
    libCOMU_gf_CT_ApplyTempDamageReflect(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount(), EventUnitDamageEffect());
    libCOMU_gf_CT_NullifyDamage(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount());

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

    libCOMU_gf_CT_ApplyFoodHuntAggro(EventUnit(), EventUnitDamageSourceUnit());
    libCOMU_gf_CT_ApplyDamageBounce2(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount(), EventUnitDamageEffect());
    libCOMU_gf_CT_ApplyTempDamageReflect(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount(), EventUnitDamageEffect());
    libCOMU_gf_CT_NullifyDamage(EventUnit(), EventUnitDamageSourceUnit(), EventUnitDamageAmount());
    if ((RandomInt(0, libCOMI_gf_DifficultyValueInt2(libCOMI_gf_GetMissionDifficulty(), 500, 400, 300, 200, 0, 0)) <= FixedToInt(EventUnitDamageAmount()))) {