DamageEffectModifyDamageValueHooks

Tracking Issue: #1603

Adds an improved version of ModifyDamageValue() that provides the states of the source weapon, source weapon, and ability state that can be used for more complex logic.

Additionally, the following hook in X2Effect_Persistent can be used to change the default behavior of the function for the attacker.

bool ChangeModifyDamageValueForAttacker(
        XComGameState_Effect EffectState,
        out int bIsImmuneToDamage,
        X2Effect_ApplyWeaponDamage DamageEffect,
        out WeaponDamageValue DamageValue,
        Damageable Target,
        out array<name> AppliedDamageTypes,
        XComGameState_Item SourceWeapon,
        XComGameState_Unit SourceUnit,
        XComGameState_Ability AbilityState)

If any of the effects return true, base game implementation is skipped completely and the boolean value of bIsImmuneToDamage is returned instead.

Source code references