Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Effects which can be removed by a medikit are no longer removed by revival protocol #1438

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading