SC2Mapster Forums

Development > Data

Workaround for validating a damage response

  • 6 posts
    #1 Jan 17, 2013 at 08:37 UTC - 0 likes

    How would I validate the effect (or just its source and target units) that triggers a damage response, before the damage response runs? There's no validator field in the damage responses dialog, just require/exclude effect fields.

    It also has to be dynamic so I can't just make copies of all the effects then use the require/exclude thing.

    Last edited Jan 17, 2013 by zorbotron

    Cyber Jorts

    #2 Jan 17, 2013 at 18:40 UTC - 0 likes

    Could get it to apply a marker buff on the desired target that a second buff then uses and validates to simulate a damage response. Wonder if getting the first damage response to create a buff that validates the target, then damages the caster from the source to trigger a second damage response would work?

    #3 Jan 17, 2013 at 20:42 UTC - 0 likes
    Quote from DrSuperEvil: Go

    Could get it to apply a marker buff on the desired target that a second buff then uses and validates to simulate a damage response. Wonder if getting the first damage response to create a buff that validates the target, then damages the caster from the source to trigger a second damage response would work?

    The problem is transferring the damage, how would I do that? Damage response behaviors are ignored after the first one has run, and while the units (Caster and Target) are transferred properly when the 'handled' effect runs and can be validated, I don't see how I can get the damage.

    #4 Jan 17, 2013 at 21:17 UTC - 0 likes

    So you want a thorns aura like damage reflect?

    Use a dummy damage effect and triggers to do the rest.

    #5 Jan 17, 2013 at 21:25 UTC - 0 likes

    @DrSuperEvil: Go

    Nah, it's actually a chance to miss, except I need to validate both units to figure out whether the attack should miss or not.

    Looks like I might end up using a switch for every effect and validate there.

    #6 Jan 17, 2013 at 21:49 UTC - 0 likes

    What's the context of your map? Is adding an effect to every weapon/unit an option?

    One option is to give the target an aura that's guaranteed to reach all attackers and have the aura buff implement the miss chance on the attacker. You can make a validator for "Target attacking Caster", the Caster being your attack target in this case and the Target the attacker. My main concerns with this are

    a) running an aura on all enemy units in 15+ range (the maximum range any enemy can attack from, basically)

    and b) the validator being linked to the Attack ability, so it might fail with units that shoot while moving and doesn't work for any method of dealing damage that's not a weapon.

  • 6 posts

You must login to post a comment. Don't have an account? Register to get one!