Issues with delayed Damage

Some units have attacks that deal damage or launch missiles after a persistent effect added a delay. The problem is that not all of them are checking certain conditions.

In short: units deal damage to units that are invulnerable/stasis, lifted, teleported away, that already entered a transport. A few units already had fixes for these issues.

Target enters transport:

  • Queen, Reaper and Thor can damage targets inside a transport
  • Zealot, Mothership, Colossus cannot (prevented by validator on damage effect)
  • Banshee fires the rocket, but it does not deal damage. Visually it flies to the transport’s center (e.g. Medivac). The rocket does not deal damage in any situation (unit in transport, unit exiting transport again)

Target becomes invulnerable/enters stasis (Stasis Ward, BC Jump):

  • Zealot, Queen, Reaper, Thor, Colossus still damage the target
  • Mothership does not (not sure why. The unusual aspect is that the weapon has a teleportResetRange of 0 instead of 500 and that it can fire on targets by itself while doing other things like moving)

Target is lifted (Graviton Beam):

  • TODO

Target teleports away (Blink, Recall) and another target is within range:

  • some units have max range check of 15 for this scenario: Banshee, Viking, Missile Turret, Thor missile AA
  • Mothership has a max range of 8
  • Zealot, Queen, Colossus, Reaper still damage the target
  • Thor does NOT damage the target (This is likely caused by the enabled keepChanneling flag in the weapon)

Target becomes invisible (cloak without detection)

  • TODO

Caster is slowed down (Time Warp):

  • persistent effects are set to use the time scale of the caster
  • Colossus delayed damage effect for its area damage is the only exception (ThermalLancesDamageDelay). It always delays by 0.25 game seconds.

Caster dies

  • channeled persistent effects stop
  • Colossus still deals damage to enemies due to the 2nd delay-persistent effect (seems fine since there are still effects on the ground)
  • Thor, Zealot, Reaper, Queen do not hit multiple times

Caster is entering transport

  • Colossus still deals damage to enemies due to the 2nd delay-persistent effect (seems fine since there are still effects on the ground)
  • Thor, Zealot, Reaper, Queen do not hit multiple times

Caster is hit entering stasis (stasis ward; or BC jumping)

  • channeled persistent effects stop when the target cannot attack anymore
  • Colossus only deals 1 tick of damage to friendly targets, although the entire attack animation plays
  • Colossus still deals damage due to the 2nd delay-persistent effect(?) (seems fine since there are still effects on the ground)
  • stasis only hits ground targets

Fix:
As a fix, the target unit filter for the damage effect needs to be added/expanded. At most, a check for target unit not being hidden (= not being in a transport) for Protoss units existed.
To fix damage over great distances to recalled/blinking units, a range check should be added.
The Mothership already had a max distance. Delayed Missile launching units having a max distance of 15 as well (Banshee, Viking, Thor, Missile Turret).

    <CValidatorUnitFilters id="MultipleHitAttackTargetFilter">
        <Filters value="-;Stasis,Hidden,Invulnerable"/>
    </CValidatorUnitFilters>
    <CValidatorUnitFilters id="MultipleHitGroundOnlyAttackTargetFilter">
        <Filters value="Ground;Stasis,Hidden,Invulnerable"/>
    </CValidatorUnitFilters>
    <CValidatorUnitFilters id="MultipleHitAlliedOnlyGroundOnlyAttackTargetFilter" parent="MultipleHitGroundOnlyAttackTargetFilter">
        <Filters value="Ground;Player,Neutral,Enemy,Stasis,Hidden,Invulnerable"/>
    </CValidatorUnitFilters>
    <CValidatorLocationCompareRange id="ZealotAttackDamageMaxRange">
        <WhichLocation Value="TargetUnit"/>
        <Compare value="LE"/>
        <Range value="2.1"/>
    </CValidatorLocationCompareRange>
    <CValidatorLocationCompareRange id="QueenTalonsAGAttackDamageMaxRange">
        <WhichLocation Value="TargetUnit"/>
        <Compare value="LE"/>
        <Range value="5"/>
    </CValidatorLocationCompareRange>
    <CValidatorLocationCompareRange id="ReaperAttackDamageMaxRange">
        <WhichLocation Value="TargetUnit"/>
        <Compare value="LE"/>
        <Range value="7"/>
    </CValidatorLocationCompareRange>
    <CValidatorLocationCompareRange id="ColossusAttackDamageMaxRange">
        <WhichLocation Value="TargetUnit"/>
        <Compare value="LE"/>
        <Range value="9"/>
    </CValidatorLocationCompareRange>


    <CEffectDamage id="PsiBlades">
        <ValidatorArray index="0" value="MultipleHitGroundOnlyAttackTargetFilter"/>
        <ValidatorArray value="ZealotAttackDamageMaxRange"/>
    </CEffectDamage>
    <CEffectDamage id="Talons">
        <ValidatorArray value="MultipleHitGroundOnlyAttackTargetFilter"/>
        <ValidatorArray value="QueenTalonsAGAttackDamageMaxRange"/>
    </CEffectDamage>
    <CEffectDamage id="P38ScytheGuassPistol">
        <ValidatorArray value="MultipleHitGroundOnlyAttackTargetFilter"/>
        <ValidatorArray value="ReaperAttackDamageMaxRange"/>
    </CEffectDamage>
    <CEffectDamage id="ThermalLancesFriendlyDamage">
        <ValidatorArray index="0" value="MultipleHitAlliedOnlyGroundOnlyAttackTargetFilter"/>
        <ValidatorArray index="1" value="noMarkers"/>
        <ValidatorArray index="2" value="ColossusAttackDamageMaxRange"/>
        <ValidatorArray index="3" removed="1"/>
    </CEffectDamage>
    <CEffectDamage id="ThermalLancesMU">
        <ValidatorArray index="0" value="MultipleHitGroundOnlyAttackTargetFilter"/>
        <ValidatorArray index="1" value="noMarkers"/>
        <ValidatorArray index="2" value="ColossusAttackDamageMaxRange"/>
    </CEffectDamage>
    <CEffectDamage id="ThorsHammerDamage">
        <ValidatorArray value="MultipleHitGroundOnlyAttackTargetFilter"/>
    </CEffectDamage>
    <CEffectDamage id="MothershipBeamDamage">
        <ValidatorArray index="1" value="MultipleHitAttackTargetFilter"/>
    </CEffectDamage>

    <CUpgrade id="ExtendedThermalLance">
        <EffectArray Reference="Validator,ColossusAttackDamageMaxRange,Range" Value="2"/>
    </CUpgrade>

These values allow speedlings on creep to not just outrun the damage.

more info, documentation, etc:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.