# Effect History Entry Ability

Grammar — Ability for effect history history entry index
FlagsNative | Function

Returns the ability that originated the effect that was logged in the Effect History at the specified Index. If the effect came from a weapon rather than an ability, this will return No Game Link.

# Arguments

  • effecthistory — History
  • int — Index

Returns — string<gamelink::Abil>

native string EffectHistoryGetAbil(
	effecthistory inHistory,
	int inIndex,
);

Category: Effect History / Entries

# Examples

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

        if ((lv_foundSpecialDamageEffect == true)) {
            lv_effectTypePreset = c_effectAmountDamaged;
            lv_specialDamageEffectAbilityLink = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
            lv_effectAmount = FixedToInt(CatalogFieldValueGetAsFixed(c_gameCatalogAbil, lv_specialDamageEffectAbilityLink, "Cost.Vital[" + IntToString(0) + "]", lv_effectingPlayer));
        }

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

            lv_sourceButton = (CatalogFieldValueGet(c_gameCatalogEffect, EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent), "SourceButtonFace", c_playerAny));
        }
        if (((lv_effectingUnitType == null) || ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetWeapon(lv_effectHistory, lv_itEffectHistoryEntry) == "") && (EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) == "")))) {
            lv_effectHistoryEntryAbility = "DebugUnknownAbility";
            lv_debugString = (EffectHistoryGetEffect(lv_effectHistory, lv_itEffectHistoryEntry, c_effectHistoryEffectCurrent));

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

                }

                if ((EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry) != "") && ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) == "") || (CatalogFieldValueGet(c_gameCatalogBehavior, EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry), "Face", c_playerAny) != ""))) {
                    lv_effectHistoryEntryBehavior = EffectHistoryGetSourceBehavior(lv_effectHistory, lv_itEffectHistoryEntry);
                    if ((lv_sourceButton == null)) {

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

                }
                else {
                    if ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) != "")) {
                        lv_effectHistoryEntryAbility = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
                    }

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

                else {
                    if ((EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry) != "")) {
                        lv_effectHistoryEntryAbility = EffectHistoryGetAbil(lv_effectHistory, lv_itEffectHistoryEntry);
                    }
                    else {

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

    lv_itEntry = 1;
    for ( ; ( (autoAAD5E102_ai >= 0 && lv_itEntry <= autoAAD5E102_ae) || (autoAAD5E102_ai < 0 && lv_itEntry >= autoAAD5E102_ae) ) ; lv_itEntry += autoAAD5E102_ai ) {
        lv_dataAbility = EffectHistoryGetAbil(lv_history, lv_itEntry);
        lv_dataBehavior = EffectHistoryGetSourceBehavior(lv_history, lv_itEntry);
        lv_dataAmount = EffectHistoryGetAmountFixed(lv_history, lv_itEntry, c_effectAmountDamaged, false);