Advertisement

Calculating Diminishing Returns for CC Effects

Started by May 27, 2022 10:50 AM
1 comment, last by Thaumaturge 2 years, 6 months ago

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.

One option that I might suggest is that status effect durations accumulate--that is, that in your example case the stun would last for the remaining one second from the first stun, followed by the one second applied by the second stun.

Another option might be to take the longer remaining duration and set the timer to that value. So, if you apply a two second stun to a character that has one second of stun-time remaining, then the result would be that the character would exit the “stunned” state after the newly-applied two seconds. However, if you apply the same two-second stun to a character that has three seconds of stun-time remaining, then the result would be that the character would exit the “stunned” state after the original three seconds.

Dutras said:
… or should the diminishing returns mechanic only apply after the (first) stun runs out?

I would expect the diminishing returns to apply even if the effect isn't felt, I think.

So, let's say that you decide to go with the “longer duration” approach, and apply a stun that would normally last three seconds, but with diminishing returns would last only one second, to a character that already has two seconds of stun remaining. I would expect then that the second stun would effectively do nothing.

MWAHAHAHAHAHAHA!!!

My Twitter Account: @EbornIan

This topic is closed to new replies.

Advertisement