# Triggering Damage Attempted

Grammar — Triggering damage attempted
FlagsNative | Function

Returns the triggering damage amount attempted. This is the damage done before clamping against the amount of life the target unit has. Not modified by damage responses.

Returns — fixed

native fixed EventUnitDamageAttempted();

# Supported triggers

Category: Unit / Combat

# Examples

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

    lv_chen = EventUnit();
    lv_chenOwner = UnitGetOwner(lv_chen);
    lv_damageTaken = EventUnitDamageAttempted();
    lv_damageTakenInteger = FixedToInt((lv_damageTaken * -1.0));

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

    // Automatic Variable Declarations
    // Variable Initialization
    lv_damageDealt = EventUnitDamageAttempted();
    lv_damageScale = 1.75;
    lv_tyrande = EventUnitDamageSourceUnit();

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

    }

    lv_damageAttempted = EventUnitDamageAttempted();
    lv_damageDone = EventUnitDamageAmount();
    lv_damagingEffect = EventUnitDamageEffect();

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

        }

        if (!((EventUnitDamageAttempted() > 0))) {
            return false;
        }

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

    }

    lv_damageAmount = (libHYRL_gv_heroYrelArdentDefenderDamageConversionScale * (EventUnitDamageAttempted() + EventUnitDamageBehaviorShield()));
    CatalogFieldValueSetFixed(c_gameCatalogEffect, "YrelArdentDefenderCreateHealer", "RechargeVitalRate", lv_yrelPlayer, lv_damageAmount);
    UnitCreateEffectUnit(lv_yrelUnit, "YrelArdentDefenderHealSet", lv_yrelUnit);

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

    }

    lv_damageDone = EventUnitDamageAttempted();
    UnitSetCustomValue(EventUnit(), 62, (UnitGetCustomValue(EventUnit(), 62) + lv_damageDone));
    return true;