Jump to content

contingency effect based on who hits you?


Recommended Posts

I have this idea... but not sure it would work. I'm rusty. The idea is, apply a 232 contingency with a [hit by / anyone] condition, but limit the contingency effect based on a characteristic of the attacker.

And yes, it has to be a contingency on the target, not an op248 or something on the attacker. Sorry.

So maybe: when hit, it fires a spell at [LastHitter]. That spell uses op146 to fire a spell on [LastHitter]. This secondary spell hast effects targeting [9 / Original Caster], but they are preceded by an op324 effect preventing them if self [LastHitter] has a particular state. So the contingency fires a spell at the attacker, which fires a spell back at the target, and the second spell is gated by a characteristic of the attacker.

Maybe? Could that work? I can't tell if I might be overthinking it, or underthinking it. Which is a bit of a weird thing to not be sure of.

Link to comment
28 minutes ago, subtledoctor said:

So the contingency fires a spell at the attacker, which fires a spell back at the target, and the second spell is gated by a characteristic of the attacker.

This would interrupt the attackers spells and scripts... not a good idea.

Link to comment
40 minutes ago, Jarno Mikkola said:

This would interrupt the attackers spells and scripts... not a good idea.

Wut.

Honestly I can tell if you are posting nonsense, or if you are making an important point that I am missing. How could using op146 to cast a spell on someone interrupt their script??

19 minutes ago, jmerry said:

How about opcode 326? Do your 232 effect, which casts a subspell that consists only of an opcode 326 (Preset Target) filter to cast the final subspell if the victim fits the criteria.

That's basically it, I just want to make sure I've got it all straight. Let's say, it's a special contingency that says you are instantly healed if you are ever injured by someone named "Joe." Op232 fires a spell when anyone hits you, so the name condition needs to happen in the resulting healing spell(s).

  • Joe attacks Harold with a sword
  • Harold has a contingency; it fires when the sword hits him
  • The contingency casts SpellA targeting Joe
  • SpellA uses op326 to cast SpellB if the caster's name is "Joe" (true in this case)
  • SpellB targets Harold

Ultimately that's the trick: the contingency needs to be fired from the target; the name condition needs to be considering the attacker; and the final result needs to affect the target.

Edited by subtledoctor
Link to comment
1 hour ago, subtledoctor said:

That's basically it, I just want to make sure I've got it all straight. Let's say, it's a special contingency that says you are instantly healed if you are ever injured by someone named "Joe." Op232 fires a spell when anyone hits you, so the name condition needs to happen in the resulting healing spell(s).

  • Joe attacks Harold with a sword
  • Harold has a contingency; it fires when the sword hits him
  • The contingency casts SpellA targeting Joe
  • SpellA uses op326 to cast SpellB if the caster's name is "Joe" (true in this case)
  • SpellB targets Harold

Ultimately that's the trick: the contingency needs to be fired from the target; the name condition needs to be considering the attacker; and the final result needs to affect the target.

Wait ... that's not what I was thinking. And that looks weird to me ... check the IESDP on opcode 326 ...

Quote

Unlike opcode #146, when targeting Self or Original Caster, the resource is still cast on the ability target, not the caster.

For the purpose of dispelling effects only, the opcode target (not necessarily the caster) determines the caster level for effects in its resource. It also determines the "Caster location" saved to the V2 effect on creatures. It doesn't transfer full ownership though – the caster is still credited for damage.

If the resource uses projectile #0 (default):

  • The resource will ignore its projectile field, defaulting to use projectile #1|None for all effects.
  • Effects in the resource that target Self, Projectile Target, or Original Caster will all affect the target of this effect.
  • If this effect is reflected/turned, the target of effects in the resource is reflected.

Otherwise:

  • Effects in the resource that target Self will affect the target of this effect, not the caster.
  • If this effect is reflected/turned, only effects in the resource targeting Original Caster will be affected, now affecting the target.

Troublesome. How can we get the effect to apply to Harold, when Joe is the one being tested by the filter? My best guess based on the above is to use a projectile for SpellB that isn't the default #0 - say, #1 instead. Then have the effects of SpellB apply to "Original Caster (9)", which should be Harold.

Testing required. Hopefully, this works. [In summary: Op232 contingency: when hit, target LastHitter with SpellA. SpellA uses op326 with effect target 2 to cast SpellB if (condition). SpellB uses projectile #1 and has effect target #9.]

Link to comment
7 hours ago, subtledoctor said:

I have this idea... but not sure it would work. I'm rusty. The idea is, apply a 232 contingency with a [hit by / anyone] condition, but limit the contingency effect based on a characteristic of the attacker.

And yes, it has to be a contingency on the target, not an op248 or something on the attacker. Sorry.

So maybe: when hit, it fires a spell at [LastHitter]. That spell uses op146 to fire a spell on [LastHitter]. This secondary spell hast effects targeting [9 / Original Caster], but they are preceded by an op324 effect preventing them if self [LastHitter] has a particular state. So the contingency fires a spell at the attacker, which fires a spell back at the target, and the second spell is gated by a characteristic of the attacker.

Maybe? Could that work? I can't tell if I might be overthinking it, or underthinking it. Which is a bit of a weird thing to not be sure of.

well, spells stored in contingencies  changing dynamically according to the situation on the battlefield is a really good idea. BUT "and the second spell is gated" - no, that will never happen. (technically) I have absolutly no idea what I am talking about but still I am telling you "second spell will never be gated", contingecy will fire stored spell or the game will crash.

well, I think using my primitive peasant mind that In order for the second spell to be gated and casted (like for example replace PTFMW with improved mantle) that second spell must also be stored somewhere or at least checked to be cast. stored where?  sry, my brain lacks capacity for this problem. ;pppp

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...