Buffs/Debuffs caused by counter, not lasting.

CPMP
974 posts Member
edited March 2016
When a hero attacks someone with counter, the other hero counters back, outside of his turn. During that attack, any buffs/debuffs that happened, they dissipate immediately when the attacking hero's turn is over. This probably happens because after the buff/debuff happen, the attacking hero's turn is over, and the game counts it as if 1 turn has passed.
Examples of the bug :
1st example on buffs
*Savage attacks Kylo with retribution
*Kylo attacks back
*Savage gains offence buff
*Savage's turn ends
*Savage loses offence buff
2nd example on debuffs
*Jedi consular attacks Dooku
*Dooku counter attacks JC
*JC gets stunned
*JC's turn is over
*Dooku's stun get removed

About the 2nd example, i noticed that sometimes the stun stays, some other times it fades instantly.
Also, the same buff bug was happening to Ventress. I see that the Ventress bug got fixed, but on Savage it stays the same.
So instead of adding exceptions to everyone's buffs/debuffs that get caused outside of their turn, i think a working global fix would be something like this:
Suggestion
Add a function that get's called on every application on possitive/negative buff. That function would check during the buff/debuff application, if it's the hero's turn when applies it (eg Dooku's stun | Was it dooku's turn when it got applied?) or someone's else turn, and add +1 turn duration extra.
If it's hard to distinguish which hero's turn was in code, then counter could be used instead.
I noticed that the bug only happens with counter attacks. So when a counter happens, it could be stored on a bool variable. Then during the application of positive buffs (eg savage offence) or negative (dooku stun) it would check if counter is TRUE. If it is, then add +1 turn duration for that buff/debuff, so it won't dissipate instantly. The counter bool variable should turn TRUE right after the counter begins, then switch to FALSE as soon as the countering attack finished.
I think this would work if i'm not missing something (and if the code is as i imagine it and not more complicated :) )
Sign In or Register to comment.