Ahli / sc2xml

11 stars 1 forks source link

Viper's tongue continues to grab the unit despite the Viper dying #161

Open Ahli opened 1 month ago

Ahli commented 1 month ago

When a Viper abducts and dies just after casting it, the green tongue will still continue and grab a unit.

https://clips.twitch.tv/UnsightlyGloriousRamenArgieB8-snIbCizWcU4x8BfX (e.g. here the Viper dies from Feedback, but it still manages to abducht the Stalker)

It would feel better, if Abduct is cancelled, if the Viper dies before the green tongue hits the unit.

⚠️ balance implications ⚠️

Joshua-Leibold commented 1 month ago

In theory, this should make it so that if the abduct tentacle reaches the target prior to the Viper's death then the abduct will go through, but if the Viper dies before the tentacle reaches the target then the abduct will cancel

<CEffectSet id="YoinkSet">
    <ValidatorArray value="CasterIsAlive"/>
</CEffectSet>
<CEffectSet id="YoinkSetVikingAir">
    <ValidatorArray index="0" value="CasterIsAlive"/>
</CEffectSet>
<CEffectSet id="YoinkSetVikingGround">
    <ValidatorArray index="0" value="CasterIsAlive"/>
</CEffectSet>

https://gyazo.com/c0659db0977ee24d63b5dcf98f377d2d

There is one debate I'm not picking a side on and it's what to do with the marker from a failed abduct. With just the changes above, if the Viper dies before the tentacle reaches the target, there is a short period where the target retains the marker from the initial (failed) abduct making the target immune from having a second abduct casted on it. It's a matter of perspective whether this is good game design. If one takes the position that this is considered bad design, one can remove the marker upon the caster's death using the XML below. However, this can result in scenarios where Viper 1 fires the tentacle, the tentacle reaches the target, Viper 1 dies, the target starts flying to the yoink location, and Viper 2 casts abduct on the mid-air unit to "chain" a second abduct that will go through once the target reaches the current abduct location (something usually not possible as the marker usually prevents chaining abduction, although is sometimes still possible because the marker only lasts for 2s which does occasionally last less than the time it takes for the target to travel the full abduct range).

<CBehaviorBuff id="YoinkMarker">
    <RemoveValidatorArray value="CasterIsAlive"/>
</CBehaviorBuff>

Whoops, copy pasted wrong. Above should now be accurate