clintbellanger/flare-engine — pull request #441 by josephbleau (2013-03-13 02:07:02+00:00)
Title: PROPOSAL: A fix for being "stunlocked" due to multiple enemies attacking & being stuck in HIT animation. Also applies to enemies.

This is a proposal, please review.

I've also pushed this logic into the enemy behavior, which /will/ affect the minion branch balance. This will make enemies considerably less useless against multiple minions (probably a good thing, quite honestly.)

My initial analysis: Most (if not all) HIT (the animation played when you or an enemy is truck) animations are 8 ticks. Most (if not all) swing/melee animations are 16 ticks. This means that if you swing non-stop you will be locking an enemy out of doing anything other than play the hit animation for 8 ticks per every 16 frames. This may be okay, but the problem is that: a) it imbalances future minion patches, where multiple targets are swinging at the enemy, and b)

it puts the player in the same position when multiple enemies are hitting him.

My solution: Introduce a variable cooldown timer to the hit animation via a statistic I named resillience. By default resillience_base it is set to 8. You (and enemies) may only enter the hit animation when resillience is at 8, and when the animation is up, resillience is set to resillience_base. If you are struck, resillience is set to resillience_base-1 (essentially including this current frame as a tick) and is decremented once per frame until it reaches zero again, during which time you may not be hit (clarification: will not enter hit animation, damage still applies.)

OH GOD DOES THIS AFFECT THE GAMEPLAY?? You can now navigate away and through a large group of monsters. This has no affect on how you can fight monsters (again, unless you're in the minion branch). You will have no perceptible difference when attacking a monster. This will only prevent scenarios where you are being attacked by 2+ monsters and cannot move because their swing times are adequately staggered.