Spells casting spells

Does anyone know if a spell can call up another spell?

for example:

could i apply autodefend as a unit gamemodifier in the salted pork, or would i have to copy all the code of autodefend into salted pork so that it goes off properly.

 

cast a spell that targets three random enemy units with flame dart.

 

summon three ice elementals to random tiles within a 4x4 zone.

 

In the meantime i will just copy the code over into salted pork and other consumables.

6,705 views 7 replies
Reply #1 Top

A spell cannot cast another spell.

Reply #2 Top

heh. .Reminds me of Two worlds magic.

Reply #3 Top

Quoting Heavenfall, reply 1
A spell cannot cast another spell.
End of Heavenfall's quote

 

why, oh, why not?

Reply #4 Top


I would say mainly because we are only passing data back and forth, we can't call scripts.

Reply #5 Top

Yes, that would be welcome functionality.

Reply #6 Top

I didn't check it, but it might be possible.

If you check the _effect abilities in corespells, you can see that it's possible to call a spell at the start of combat, and when being hit. While I doubt using tags that aren't there will work (just because they usually don't), it's worth testing and worth checking. (Do note, however, that chances are very very slim)

I am not sure if this will work, but adding the         <SpellTargetType>RandomEnemyUnit</SpellTargetType> makes it go for random unit. Try to add to your spell, and make 3 different game modifiers to shoot bolts. I am not entirely sure if it will cast on the same target 3 times or 3 random, but it's worth checking.

Reply #7 Top

Thats' an interesting catch, i'll check it out.

apply spell on hit, spell applied when hit, autocast at beginning of combat all use this feature. Perhaps it can be adapted for potions.