Ahli / sc2xml

11 stars 1 forks source link

Neuraled Carrier's Interceptors do not keep Interceptor upgrades (weapon/armor) #118

Open Ahli opened 9 months ago

Ahli commented 9 months ago

Neural-parasited Carriers' Interceptors do not carry over their Interceptors' weapon upgrades.

clip on twitch

Joshua-Leibold commented 3 months ago

So I'm sort of speculating here but I think what is going on is if you gain ownership of a unit, you automatically get ownership of the magazine units and it's this process which fails to transfer the upgrades. I also don't think the Neural Parasite Children behaviour is actually doing anything (especially to rectify this because it doesn't have its Behavior: Player value set). Even when it does, I think the effect chain is too limited to the carrier/interceptor at the point it's invoked for it to change ownership properly, although I'm not sure if that's really the effect chain limitation or if it's just the game being confused that you're trying to switch ownership from the now-carrier-owning-casting player to the same carrier-owning-caster player

My solution:

<!-- Effects -->
<CEffectSet id="NeuralParasitePersistentSet">
    <EffectArray index="0" value="ApplyNeuralAcquireToAllChildren"/>
    <EffectArray index="1" value="NeuralParasiteDroneCheck"/>
    <EffectArray index="2" value="NeuralParasitePersistent"/>
    <EffectArray value="NeuralParasiteLockOnRemove"/>
</CEffectSet>

<!-- Behaviours -->
<CBehaviorBuff id="NeuralParasiteChildren">
    <Player Value="Caster"/>
</CBehaviorBuff>

Basically, the projectile will now first have the infestor iterate through the target's magazine to neural them while the Infestor is still considered direct caster in the chain, and only then will the carrier be neuralled to prevent the two from interacting in strange ways

Seems to work™️