Programming question regarding "dashing."

Better Jungler·2/18/2018, 12:03:52 AM·1 votes·284 views

To make this as simple as possible, look at the

"Sudden Impact" rune.

Gain a burst of lethality and magic pen_** after using a dash leap blink teleport (etc)**_

when someone in dashes in game, I assume they trigger a bool/flag that basically says "This person is dashing" so that if any abilities interact with dashes, it will check to see if that flag is triggered. This could be like Poppy's w (? i think) or taliyahs ground mines. So when the dash is over, the flag would set itself back to "This character is not dashing" and those abilities wouldn't interact with that champion anymore.

How does Sudden impact work? Would there be another flag that says "This character recently finished dashing" which would turn itself off after a couple of seconds of the previous flag triggering?

Sorry if thats confusing, I can't find a better way to word it.

3 Comments

Vacus2/18/2018, 12:08:52 AM1 votes

It is more likely that the function called when beginning a dash (the skill is used) has a hook for Sudden Impact, and applies the buff.

The game doesn't need to remember anything. Just put the buff on when you start the dash, the buff has its own duration and tracks down like any other buff.

ADC Bard2/18/2018, 12:09:21 AM1 votes

Maybe they are using the observer pattern

https://en.wikipedia.org/wiki/Observer_pattern

Bard