You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is, if you have a three shot burst that's supposed to apply 1 stack of an effect per hit, it will instead apply 3 stacks per hit for a total of 9 stacks.
The good news is that this should be easily fixed: just remove the totally unnecessary code that does it from OnRefresh is XCGS_Effect.
The text was updated successfully, but these errors were encountered:
Yeah, so it looks like X2AbilityMultiTarget_BurstFire behaves a little differently from what XCGS_Effect is expecting. I think it's expecting to run the PostCreateInit / onRefresh only once for burst fire abilities, when in reality, because burst fire just fires three normal shots, the whole lot gets run n times instead, depending how many additional shots are taken.
Anyway, in essence, you have this code block, which is repeated in both PostCreateInit and the onRefresh of XCGS_Effect (the only difference between the two being that onInit, iStacks = 1 and onRefresh it's iStacks++, which is fine. So yeah I think we just need to take the special burst fire handling out of both functions.
if (EffectTemplate.bStackOnRefresh)
{
iStacks++;
AbilityContext = XComGameStateContext_Ability(NewGameState.GetContext());
if (AbilityContext != none && AbilityContext.InputContext.PrimaryTarget.ObjectID == ApplyEffectParameters.TargetStateObjectRef.ObjectID)
{
AbilityTemplate = class'X2AbilityTemplateManager'.static.GetAbilityTemplateManager().FindAbilityTemplate(AbilityContext.InputContext.AbilityTemplateName);
if (AbilityTemplate != none)
{
BurstFire = X2AbilityMultiTarget_BurstFire(AbilityTemplate.AbilityMultiTargetStyle);
if (BurstFire != none)
{
iStacks += BurstFire.NumExtraShots;
}
}
}
}
That is, if you have a three shot burst that's supposed to apply 1 stack of an effect per hit, it will instead apply 3 stacks per hit for a total of 9 stacks.
The good news is that this should be easily fixed: just remove the totally unnecessary code that does it from OnRefresh is XCGS_Effect.
The text was updated successfully, but these errors were encountered: