Ahli / sc2xml

11 stars 1 forks source link

Baneling causes double damage on ramps due to different cliff level #138

Open Ahli opened 7 months ago

Ahli commented 7 months ago

https://github.com/Ahli/sc2xml/issues/63 causes the fallback damage to hit the targeted unit twice when the unit is on a different cliff level

video

Fix

The issue can be fixed via markers. The Hellion uses the same solution to only damage units once.

Here, the fallback damage will only execute when the unit has not been damaged by the weapon, yet.

    <CEffectDamage id="VolatileBurstDirectFallbackEnemyNeutralBuilding">
        <ValidatorArray value="noMarkers"/>
    </CEffectDamage>
    <CEffectDamage id="VolatileBurstDirectFallbackEnemyNeutralUnit">
        <ValidatorArray value="noMarkers"/>
    </CEffectDamage>
   <!-- clean up Set having two effects registered that do not exist and were not necessary -->
    <CEffectSet id="BanelingVolatileBurstDirectFallbackSet">
        <EffectArray index="2" removed="1"/>
        <EffectArray index="3" removed="1"/>
    </CEffectSet>

    <CWeaponLegacy id="VolatileBurst">
        <Marker>
            <MatchFlags index="Id" value="1"/>
        </Marker>
    </CWeaponLegacy>
    <CWeaponLegacy id="VolatileBurstBuilding">
        <Marker>
            <MatchFlags index="Id" value="1"/>
        </Marker>
    </CWeaponLegacy>

test map

Summary

original Blizzard implementation

fix from last year

this version