Skip to content

Commit

Permalink
Effects which can be removed by a medikit are no longer removed by re…
Browse files Browse the repository at this point in the history
…vival protocol (#1438)
  • Loading branch information
BlackDog86 authored Jan 6, 2025
1 parent 1b1c354 commit b4bcf48
Showing 1 changed file with 27 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,16 @@ static function X2AbilityTemplate RevivalProtocol()

Template.AbilityTargetConditions.AddItem(new class'X2Condition_RevivalProtocol');

Template.AddTargetEffect(RemoveAdditionalEffectsForRevivalProtocolAndRestorativeMist());
// Start Issue #1435
/// HL-Docs: ref:Bugfixes; issue:1435
/// Fix bug that allows Revival Protocol to remove effects that are normally removed by a Medikit heal,
/// despite this functionality not being mentioned in the in-game localization,
/// and units with these effects not being valid targets for this ability, unless they are also mentally impaired.
/// The bug was caused by Firaxis reusing the `RemoveAdditionalEffectsForRevivalProtocolAndRestorativeMist()` function,
/// which makes sense for Restoration, as that ability also applies Medikit heal,
/// but not for Revival Protocol, which is only supposed to remove mental impairments.
Template.AddTargetEffect(RemoveImpairingEffectsByDamageTypeForRevivalProtocol_CH());
// End Issue #1435

// Start Issue #1414
/// HL-Docs: ref:Bugfixes; issue:1414
Expand Down Expand Up @@ -2154,7 +2163,24 @@ static function X2Effect_RemoveEffects RemoveAdditionalEffectsForRevivalProtocol

return RemoveEffects;
}
// Start Issue #1435 - New function for Revival Protocol which no longer removes medikit-healable status effects.
static function X2Effect_RemoveEffects RemoveImpairingEffectsByDamageTypeForRevivalProtocol_CH()
{
local X2Effect_RemoveEffectsByDamageType RemoveEffects;

RemoveEffects = new class'X2Effect_RemoveEffectsByDamageType';
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.DisorientedName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.PanickedName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2StatusEffects'.default.UnconsciousName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.DazedName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.ObsessedName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.BerserkName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.ShatteredName);
RemoveEffects.EffectNamesToRemove.AddItem(class'X2AbilityTemplateManager'.default.StunnedName);

return RemoveEffects;
}
// End Issue #1435
DefaultProperties
{
EverVigilantEffectName = "EverVigilantTriggered";
Expand Down

0 comments on commit b4bcf48

Please sign in to comment.