Ahli / sc2xml

11 stars 1 forks source link

Blinding Cloud reduces range of melee units #162

Open Joshua-Leibold opened 1 month ago

Joshua-Leibold commented 1 month ago

Blinding Cloud is supposed to "reduce attack range of units and structures to melee range".

However, in the behaviour the range reduction does not discriminate between attacks which have the melee flag set and ones that don't. This is a big problem because the range reduction doesn't just reduce the range of the attack, it also affects the range slop (the distance the target can move away from the caster before the caster's attack is cancelled)

The most egregious example are zerglings and ultralisks (although all melee units are affected, from banelings to zealots and so on).

A zergling underneath the effects of a friendly blinding cloud becomes unable to attack enemy units that are moving even slightly away from them: https://gyazo.com/9ed57afb0acf8877f66521664cbbd118

Ultralisks are even more comical, as their melee range of 1 combined with their (relatively recently increased!) range slop of 1.25 means the ultralisk can sometimes be effectively nerfed by 2.25 range! https://gyazo.com/e4f5f67ea1173c0b01cf358fc94e9a56

Blinding Cloud should only reduce the range of units which usually are "ranged" to "melee range" (or 0 as a default proxy), and should not modify the range of units which already must get in their "melee range" to attack. Fortunately, this is a very easy fix as there is an existing field for dilineating between melee and ranged attacks:

<CBehaviorBuff id="BlindingCloud">
    <Modification WeaponRange="0" RangedWeaponRange="-20"/>
</CBehaviorBuff>