Jump to content

spell targeting with opcode 146 - who is the CASTER?


subtledoctor

Recommended Posts

If I cant a spell at an enemy target, and one of the effects of the spell uses opcode 146 to cast a second spell, can I make the second spell turn around and target me?

 

Specifically: I want to make an ability that affects the target - say, Hold for 10 rounds on a failed save. But I want it to come at a cost to the caster, in the form of hit point loss. I want the hit point loss to last for the duration of the effect; so, if the target *makes* their save, the hit points should immediately begin to regenerate.

 

I don't know how to have an effect happen when someone *makes* their save... so my thought is this:

 

1) Cast Spell 1 at target. One of the effects is directed at the caster, causing a hp loss.

2) Another one of the effects of Spell 1 directed at the caster uses opcode 146 on a 6-decond delay, casting Spell 2. Spell 2 initiates the regeneration effect.

3) If the target makes their save, that's it.

4) If the target *fails* their save, they are affected by the Hold, and there is also an opcode 146 effect. This effect has to be targeted at the target to be affected by the saving throw; but it would cast Spell 3 which has target = Caster. Spell 3 uses opcode 206 to protect the caster from Spell 2, for 12 seconds or so. Thus the hp regeneration from Spell 2 does not happen.

5) Finally, another effect on the failed saving throw (on a delay so it only occurs at the end of Spell 1) using opcode 146 to cast Spell 2. So if the target fails their save, they are Held for 10 rounds, and the caster suffer the hp loss for those same 10 rounds.

 

But that all depends on whether Spell 2 and Spell 3, targeted at "Caster," can affect the caster of Spell 1 even though the effect that causes them to be cast is targeted at someone else.

 

(Hope that's clear...)

Link to comment

You can do the same via summoning an invisible creature that then checks if the target gets stunned/held what ever and casts spells with their script to LastSummonerOf(Myself) aka the original caster. And then kills itself. ...

Link to comment

Spell1:

Effect1: (HP loss Caster), OP18, Target:Self(1)

Effect2: (Spell2) - OP146, Target:Preset(2), Saving Throw, Delay:60

Effect3: (Spell3) - OP146, Target:Preset(2), Timing:Instant(0), Saving Throw

Effect4: (Immunity) - OP206, Target: Preset(2), Timing:Instant(0), Saving Throw, Resource:(Spell1)

Effect5: (Spell2) - OP146, Target:Preset(2), Timing:Delayed(4), Delay:6, No Save

 

Spell2:

Effect1: (HP Regen Caster), OP18, Target:Original Caster(9)

 

Spell3:

Effect1: (Hold), OP175, Target:Preset(2), Timing:Instant(0), Duration:60, No Save

 

If they Succeed the saving throw for Spell1, Spell2 is applied 6 seconds later affecting the caster, and nothing else happens.

If they Fail the saving throw for Spell1, Spell3 is applied to the target, and Spell2 is applied 60 seconds later, affecting the caster

Link to comment

Why does effect 3 need to use 146 to trigger the Hold? Can't it just use 175 directly on the target?

I was still trying to understand what you wanted when I did that. But yes, Spell3 is redundant in this case, you could just put the Hold effect in as effect3 of spell1.

Link to comment

Ultimately I would like it to be maintained as long as you want - pay the cost in hp and if the target fails their save, they are your thrall. And you would get an innate ability which would cancel the effect, after which the hp regenerate. But if the target makes their save, you would regenerate the hp immediately and would not get the cancellation ability.

 

But I may just scrap this idea.

Link to comment

Off my hazy memory, you can only enforce conditional application of effects on the primary target. Bouncing secondary payload back at self is not possible. You could flag the caster somehow and then make their target use a global effect (target type = 4) to make sure the original caster gets caught in regardless, but frankly I find it overcomplicated.

 

Ultimately I would like it to be maintained as long as you want - pay the cost in hp and if the target fails their save, they are your thrall. And you would get an innate ability which would cancel the effect, after which the hp regenerate. But if the target makes their save, you would regenerate the hp immediately and would not get the cancellation ability.

I'm not optimistic about the stability. If bouncing would only create one second long window of opportunity for something to go awry (e.g. in case of multiple casters and targets), maintaining the link would extend that duration correspondingly.
Link to comment

Kjeron's idea, posted over in the mod's thread, seems to be to use the 'aura' technique - a repeating .eff - except acting on a single target instead of everyone within the aura. I haven't looked at the code yet but I guess the 'cancellation' just uses 206 (or something similar) and/or 321 on the caster, which interrupts the aura and thus frees the target. And thus, no need for a bounce-back. Clever!

 

I still may or may not do it. There's a decent argument that only self-targeted powers should be maintainable at will, and that enemy-targeted abilities should fade with time and need to be renewed (and offer another chance to make a saving throw) every so often.

 

Plus there are technical arguments - the cancellation is range-limited just like any aura. Plus what if the target dies - I'm not sure placing a contingency effect on the target's death could cast the cancellation spell on the caster (same bounce-back issue... maybe).

 

Eh, we'll see. Not sure when I'll have the time to experiment with this anyway. But thanks for the input/advice, in any event!

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...