Jump to content

A spell applying an effect to caster if target is hit?


Recommended Posts

Hello,

 

I thought of modifying Defensive Harmony, to work a bit differently. What I want is for it to apply its effects once a round with the duration of 1 round and the effects:

A. Simple +AC to all allies
B. Additional 5%DR to all party members except the caster
C. Each time a party member gets bonus from (B), some beneficial effect is applied to the caster (eg. additional -1AC)

 

I managed to do that by casting 2 spells. While the 1st spell is very simple, the second one (which should cover points B. and C.) is ugly and has some problems:

1. Its target is the caster (5)
2. It uses "cast spell on condition" to cast spell_b every round
3. spell_b targets caster (5)
4. spell_b is AoE
5. spell_b uses opcode_177 (use EFF file)
6. EFF file from spell_b uses opcode_146 cast spell targetting self (1) to cast spell_c
7. spell_c targets targets caster (5) but
8. EFFects of spell_c target "original_caster"

There are 3 HUGE problems with this approach
a) "cast spell on condition" works every round, but is affected by haste/slow. I want each instance of (C) to stack, but haste makes it stack 2x per party member
b) this approach floods the combat log, as I get a line, that "X cast spell Y" each time a party member is nearby, so if I'm hasted, then every 3 seconds I get up to 5 messages like that
c) there are so many nested things, it's hard to even describe that in this post

Here's an image showing basically my approach, although with slightly different spells and conditions:
 fNzEFfk.png

 

Do you know any better ways of implementing such behavior? Is there a way to reliably apply the effects every 1 round without having to worry about haste/slow?

Link to comment
On 10/19/2022 at 8:48 PM, SparrowJacek said:

I thought of modifying Defensive Harmony, to work a bit differently. What I want is for it to apply its effects once a round with the duration of 1 round and the effects:

A. Simple +AC to all allies
B. Additional 5%DR to all party members except the caster
C. Each time a party member gets bonus from (B), some beneficial effect is applied to the caster (eg. additional -1AC)

...

Is there a way to reliably apply the effects every 1 round without having to worry about haste/slow?

To solve your timing issue I would use delayed #146 to cast the AoE spell (as is already the case with True Sight).

For the AoE itself #177 ids targeted to EA = PC ensures that a beneficial subspell (effect C) will only be triggered for each party member in range, rather than each summon, just have to make sure that everything in the feature block of the subspell is target type 1.

Do you work on IA development?

Link to comment

Hey, thank you for your answer!

Quote

To solve your timing issue I would use delayed #146 to cast the AoE spell (as is already the case with True Sight).

At first I thought of using opcode 333 - static charge, since it's not affected by slow/haste, but I have no experience with it. Your suggestion sounds far better, it didn't occur to me, that I can just delay the effect! 

Quote

For the AoE itself #177 ids targeted to EA = PC ensures that a beneficial subspell (effect C) will only be triggered for each party member in range, rather than each summon, just have to make sure that everything in the feature block of the subspell is target type 1

I know that I can target only Party members, that was actually the thing that sparked my idea for this spell, otherwise players could just summon as many creatures as they want and get a MASSIVE boost, which shouldn't be gained from a 4th level spell :)

I will test your ideas and take a look at True Sight spell soon. Now the only thing left is that nasty combat log flooding. 

Quote

Do you work on IA development?

Yes, I'm working on some ways of bringing more variety to party composition in Improved Anvil.

Edited by SparrowJacek
Link to comment
On 10/19/2022 at 8:48 AM, SparrowJacek said:

"cast spell on condition" works every round, but is affected by haste/slow. I want each instance of (C) to stack, but haste makes it stack 2x per party member

Can you just do a 4-second op206 effect to prevent it happening every 3 seconds?

EDIT - hmm, I guess you want it to stack more than once  in 3 seconds if from different sources, just not once every 3 seconds from the same source. Tough nut to crack.

Maybe application of the bonus should remove the contingency from the other characters when it fires, and then re-apply it after 5  seconds.

Link to comment
20 hours ago, SparrowJacek said:

 I'm working on some ways of bringing more variety to party composition in Improved Anvil.

Although I'm not the most experienced IA player (my current record, without deaths or reloads, is getting as far as the Spellhold battle with 3 amber golems, 3 guardian spirits and the mage) I have my own ideas, are you happy for me to PM them?

16 hours ago, subtledoctor said:

Can you just do a 4-second op206 effect to prevent it happening every 3 seconds?

EDIT - hmm, I guess you want it to stack more than once  in 3 seconds if from different sources, just not once every 3 seconds from the same source. Tough nut to crack.

Maybe application of the bonus should remove the contingency from the other characters when it fires, and then re-apply it after 5  seconds.

Even if that fixes the problem of haste and relatives doubling the frequency, it doesn't fix the issue of slow effects halving it. A true time delay for the subspell via #146 or #148 is more robust.

Link to comment
22 hours ago, polytope said:

Although I'm not the most experienced IA player (my current record, without deaths or reloads, is getting as far as the Spellhold battle with 3 amber golems, 3 guardian spirits and the mage) I have my own ideas, are you happy for me to PM them?

Sure, I'll be waiting for your PM :)

22 hours ago, polytope said:

Even if that fixes the problem of haste and relatives doubling the frequency, it doesn't fix the issue of slow effects halving it. A true time delay for the subspell via #146 or #148 is more robust.

This is probably the safest way, although both this and static charge (opcode 333) won't be affected by opcode 99 "Spell Effect: Duration Modifier". I wanted to introduce longer spell duration as a bonus for some priests, but I see that it won't affect True Sight, so I might as well code Defensive Harmony, to be similar.

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...