Hello Guys,
as I started a little RPG-like Game a few days ago, I programmed most of the needed systems. Now I'm at crowd control effects like stun, slow, etc. I want to implement a diminishing returns system to prevent spamming effects and potentially stunlock an opponent.
So my idea for now is that every CC type has an internal counter which goes up every time the unit is affected by a certain CC effect. The counter reduces next CC durations by 50%, 75% and 90%. After that, the unit is immune to the cc effect. Additionally, every occuring cc effect starts a 10 second timer, which resets the counter, if reaching zero.
So far, so good. But, I stumbled upon some edge cases, where I don't know, how to handle them.
Let's say a unit is hit by a stun for 3 seconds and it's counter is currently 0, so the stun applies for the full duration, it's counter is raised by 1 and the timer for the reset starts at 10. Now, another stun hits the same unit while it is still in the 3 second stun duration. Let's say this second stun lasts for 2 seconds and it occurs when the duration of the first stun is at about 1 second left.
Should this new stun (according to the reducing rules) now only last for its reduced 1 second (50%) and line up with the first stun, or should the diminishing returns mechanic only apply after the (first) stun runs out?
I'm a bit uncertain how this should be handled, because in this example, the second stun would just be wasted.