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

Revival Protocol restores action points to disoriented units #1235

Closed
Iridar opened this issue Aug 6, 2023 · 1 comment
Closed

Revival Protocol restores action points to disoriented units #1235

Iridar opened this issue Aug 6, 2023 · 1 comment
Assignees

Comments

@Iridar
Copy link
Contributor

Iridar commented Aug 6, 2023

The blame is with the Revival Protocol blindly applying X2Effect_RestoreActionPoints to all targets.

The effect itself is poorly coded as well:

simulated protected function OnEffectAdded(const out EffectAppliedData ApplyEffectParameters, XComGameState_BaseObject kNewTargetState, XComGameState NewGameState, XComGameState_Effect NewEffectState)
{
	local XComGameState_Unit TargetUnit;

	TargetUnit = XComGameState_Unit(kNewTargetState);
	if (TargetUnit != none)
	{
		while (TargetUnit.NumActionPoints(class'X2CharacterTemplateManager'.default.StandardActionPoint) < class'X2CharacterTemplateManager'.default.StandardActionsPerTurn)
		{
			TargetUnit.ActionPoints.AddItem(class'X2CharacterTemplateManager'.default.StandardActionPoint);
		}
	}
}

Arguably it should call TargetUnit.GiveStandardActionPoints() instead.

This bug and others is addressed by RM's [WotC] Revival Protocol Fixes.

@Iridar
Copy link
Contributor Author

Iridar commented Nov 28, 2024

Closing this in favor of #1414, which covers more bugs.

@Iridar Iridar closed this as completed Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment