# Triggering Damage Absorbed
Grammar — Triggering damage absorbed
Flags —Native
|Function
Returns the triggering damage amount, including damage absorbed by damage modification behaviors.
Returns — fixed
native fixed EventUnitDamageAbsorbed();
# Supported triggers
- Unit Takes Damage — TriggerAddEventUnitDamaged
- Unit Absorbs Damage — TriggerAddEventUnitDamageAbsorbed
# Related
Category: Unit / Combat
- Get Unit Damage Dealt Time —
fixed
— UnitGetDamageDealtTime - Get Unit Damage Taken Time —
fixed
— UnitGetDamageTakenTime - Weapon Used In Attack —
string
<gamelink::Weapon> — EventUnitGetWeapon - Item Used In Attack —
unit
— EventUnitGetItem - Item Type Used In Attack —
string
<gamelink::Item> — EventUnitGetItemType - Unit Dies —
void
— TriggerAddEventUnitDied - Killing Unit —
unit
— libNtve_gf_KillingUnit - Killing Player —
int
— libNtve_gf_KillingPlayer - Triggering Death Type Check —
bool
— EventUnitDamageDeathCheck - Unit Is Being Removed —
void
— TriggerAddEventUnitRemoved - Unit Starts Attacking (Deprecated) —
void
— TriggerAddEventUnitStartedAttack - Unit Starts Attacking —
void
— TriggerAddEventUnitStartedAttack2 - Unit Is Attacked (Deprecated) —
void
— TriggerAddEventUnitAttacked - Unit Is Attacked —
void
— TriggerAddEventUnitAttacked2 - Attacking Unit —
unit
— EventUnitTarget - Unit Absorbs Damage —
void
— TriggerAddEventUnitDamageAbsorbed - Unit Takes Damage —
void
— TriggerAddEventUnitDamaged - Damaging Unit —
unit
— EventUnitDamageSourceUnit - Damaging Player —
int
— EventUnitDamageSourcePlayer - Damaging Effect —
string
<gamelink::Effect> — EventUnitDamageEffect - Triggering Damage Taken —
fixed
— EventUnitDamageAmount - Triggering Damage Attempted —
fixed
— EventUnitDamageAttempted - Triggering Damage Attempted Vitals —
fixed
— EventUnitDamageAttemptedVitals - Triggering Damage Absorbed —
fixed
— EventUnitDamageAbsorbed - Triggering Damage Behavior Shield —
fixed
— EventUnitDamageBehaviorShield - Triggering Vitals Leeched —
fixed
— EventUnitDamageVitalsLeeched - Triggering Unit Kill XP —
int
— EventUnitDamageKillXP - Damage Source Position —
point
— EventUnitDamageSourcePoint - Unit is Healed —
void
— TriggerAddEventUnitHealed - Healing Unit —
unit
— EventUnitHealLaunchUnit - Healing Player —
int
— EventUnitHealLaunchPlayer - Triggering Heal Vital Type —
int
<preset::UnitVitalType> — EventUnitHealVital - Triggering Heal Given —
fixed
— EventUnitHealAmount - Healing Effect —
string
<gamelink::Effect> — EventUnitHealEffect - Unit Spends Vital —
void
— TriggerAddEventUnitSpendVital - Triggering Spent Vital Type —
int
<preset::UnitVitalType> — EventUnitSpentVitalVital - Triggering Vital Spent —
fixed
— EventUnitSpentVitalAmount - Unit Acquires Target —
void
— TriggerAddEventUnitAcquiredTarget - Acquired Target —
unit
— libNtve_gf_AcquiredTarget - Unit Is Revived —
void
— TriggerAddEventUnitRevive - Triggering Victim Unit —
unit
— EventUnitVictimUnit - Triggering Item Used —
unit
— EventUnitItemUsed - Triggering Effect Used —
string
<gamelink::Effect> — EventUnitEffectUsed
# Examples
campaigns/swarm.sc2campaign — base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map/MapScript.galaxy:3583
}
if (!((EventUnitDamageAbsorbed() >= UnitGetPropertyFixed(EventUnit(), c_unitPropLife, c_unitPropCurrent)))) {
return false;
}
campaigns/swarm.sc2campaign/base.sc2maps/maps/campaign/voidprologue/voidprologue01.sc2map — MapScript.galaxy:3583
}
if (!((EventUnitDamageAbsorbed() >= UnitGetPropertyFixed(EventUnit(), c_unitPropLife, c_unitPropCurrent)))) {
return false;
}
campaigns/voidstory.sc2campaign — base.sc2data/TriggerLibs/VoidCampaignLib.galaxy:10274
}
libVoiC_gv_pC_AchievementShieldAbsorbTotal += EventUnitDamageAbsorbed();
if (((FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbTotal) - FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbLast)) > 5)) {
AchievementTermQuantityAdd(1, "SOA_ShieldOvercharge", (FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbTotal) - FixedToInt(libVoiC_gv_pC_AchievementShieldAbsorbLast)));
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6287
// Conditions
if (testConds) {
if (!((EventUnitDamageAbsorbed() > 1.0))) {
return false;
}
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:6301
}
lv_healingAvailable = (EventUnitDamageAbsorbed() * libGDHL_gv_heroArthasAntiMagicShellHealingFraction);
CatalogFieldValueSetFixed(c_gameCatalogEffect, "ArthasAntiMagicShellCreateHealer", "RechargeVitalRate", lv_arthasPlayer, lv_healingAvailable);
UnitCreateEffectUnit(lv_arthas, "ArthasAntiMagicShellCreateHealer", lv_arthas);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:8889
lv_chen = EventUnit();
lv_chenOwner = UnitGetOwner(lv_chen);
lv_damageTaken = (EventUnitDamageAbsorbed() * libGDHL_gv_heroChenStaggerDamageModification[lv_chenOwner]);
lv_damageTakenInteger = FixedToInt(lv_damageTaken);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameDataHelperLib.galaxy:18075
// Automatic Variable Declarations
// Variable Initialization
lv_damage = (EventUnitDamageAbsorbed() + EventUnitDamageAmount());
lv_image = EventUnit();
lv_imageOwner = UnitGetOwner(lv_image);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:15332
// Variable Initialization
lv_casterPlayer = UnitBehaviorEffectPlayer(EventUnit(), EventUnitBehavior(), c_effectPlayerCaster, 0);
lv_damageAbsorbed = EventUnitDamageAbsorbed();
lv_casterUnit = UnitBehaviorEffectUnit(lv_shieldedUnit, EventUnitBehavior(), c_effectUnitCaster, 0);
lv_casterUnitOwner = UnitGetOwner(lv_casterUnit);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:19447
if ((lv_eventPlayer <= libCore_gv_bALMaxPlayers) && (UnitTypeTestAttribute(lv_triggeringUnitType, c_unitAttributeHeroic) == true) && (UnitTestState(EventUnit(), c_unitStateHallucination) == false) && (UnitHasBehavior(EventUnit(), "GenericVehicleBehaviorEmpty") == false) && (UnitHasBehavior(EventUnit(), "GenericVehicleBehaviorOccupied") == false)) {
if ((lv_eventUnitDamageSourcePlayer != 15)) {
libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken += FixedToInt(EventUnitDamageAbsorbed());
libGame_gv_scoreValues[lv_eventPlayer].lv_damageSoaked += FixedToInt(EventUnitDamageAbsorbed());
libGame_gf_AddGuardianDamage(EventUnitDamageAbsorbed(), lv_eventPlayer);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:19448
if ((lv_eventUnitDamageSourcePlayer != 15)) {
libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken += FixedToInt(EventUnitDamageAbsorbed());
libGame_gv_scoreValues[lv_eventPlayer].lv_damageSoaked += FixedToInt(EventUnitDamageAbsorbed());
libGame_gf_AddGuardianDamage(EventUnitDamageAbsorbed(), lv_eventPlayer);
libGame_gf_AddScrapperDamage(lv_damageTaken, lv_eventUnitDamageSourcePlayer);
mods/heroesdata.stormmod — base.stormdata/TriggerLibs/GameLib.galaxy:19449
libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken += FixedToInt(EventUnitDamageAbsorbed());
libGame_gv_scoreValues[lv_eventPlayer].lv_damageSoaked += FixedToInt(EventUnitDamageAbsorbed());
libGame_gf_AddGuardianDamage(EventUnitDamageAbsorbed(), lv_eventPlayer);
libGame_gf_AddScrapperDamage(lv_damageTaken, lv_eventUnitDamageSourcePlayer);
libGame_gf_ScoreValuesReportIntegerValueAndLog(lv_eventPlayer, "DamageTaken", libGame_gv_scoreValues[lv_eventPlayer].lv_damageTaken);
mods/heromods/genji.stormmod — base.stormdata/LibHGen.galaxy:336
lv_genjiUnit = EventUnit();
lv_genjiPlayer = UnitGetOwner(lv_genjiUnit);
lv_incomingDamage = EventUnitDamageAbsorbed();
// Actions
mods/heromods/genji.stormmod — base.stormdata/LibHGen.galaxy:408
lv_genjiUnit = EventUnit();
lv_genjiPlayer = UnitGetOwner(lv_genjiUnit);
lv_incomingDamage = EventUnitDamageAbsorbed();
// Actions
mods/heromods/zarya.stormmod — base.stormdata/LibHZAR.galaxy:1045
lv_zaryaUnit = EventUnitBehaviorCasterUnit();
lv_zaryaPlayer = UnitGetOwner(lv_zaryaUnit);
lv_damageAbsorbed = EventUnitDamageAbsorbed();
lv_incomingBoost = lv_damageAbsorbed;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOMI.galaxy:18112
}
UnitSetPropertyFixed(EventUnit(), c_unitPropLife, (UnitGetPropertyFixed(EventUnit(), c_unitPropLife, c_unitPropCurrent) - (EventUnitDamageAbsorbed() / 2.0)));
return true;
}
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:6525
}
libCOOC_gv_cC_ScoreArtanisAbsorb[UnitGetOwner(EventUnit())] += EventUnitDamageAbsorbed();
PlayerScoreValueSetFromInt(UnitGetOwner(EventUnit()), "ArtanisShieldAbsorb", FixedToInt(libCOOC_gv_cC_ScoreArtanisAbsorb[UnitGetOwner(EventUnit())]));
if ((libCOOC_gf_ActiveCommanderForPlayer(UnitGetOwner(EventUnit())) != "ProtossArtanis")) {
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:7494
}
libCOOC_gv_cC_ScoreNovaHeal[UnitGetOwner(EventUnit())] += EventUnitDamageAbsorbed();
PlayerScoreValueSetFromInt(UnitGetOwner(EventUnit()), "NovaHealandAbsorb", FixedToInt(libCOOC_gv_cC_ScoreNovaHeal[UnitGetOwner(EventUnit())]));
return true;
mods/starcoop/starcoop.sc2mod — base.sc2data/LibCOOC.galaxy:8222
}
libCOOC_gv_cC_ScoreTychusMedicHeal[UnitGetOwner(EventUnit())] += EventUnitDamageAbsorbed();
PlayerScoreValueSetFromInt(UnitGetOwner(EventUnit()), "TychusMedicHeal", FixedToInt(libCOOC_gv_cC_ScoreTychusMedicHeal[UnitGetOwner(EventUnit())]));
return true;