FORUM ARCHIVED

Two quick questions

Discussion in 'Modding' started by vacantVisionary, Jul 23, 2012.

  1. So, I'm pretty sure the answer to both these questions is "no" but I figure I should double check before I spend time implementing the more complicated workarounds.

    1. Is it possible to have a long string of "if a then SPELL else if b then SPELL else if c then SPELL.... else SPELL" without using a different spell for each if statement?
    2. Can you have a spell that does something different depending on whether you're targeting yourself or an enemy/other tile?
     
  2. OmniaNigrum

    OmniaNigrum Member

  3. Aegho

    Aegho Member

    1. No, you have to use a spell for each statement, with a few exceptions. (For a bolean IF THEN/ELSE, you can have both of those in the same spell, if there are more options you have to do a chain, requirebuffontrigger and requirebuffonnottrigger).
    2. Yes. Start it with a dummy buff, then trigger the next spell that checks for that buff, as above, with requirebuffontrigger and requirebuffonnottrigger. The spell that triggers on yourself goes on requirebuffontrigger, the one that goes on enemies goes on requirebuffonnottrigger. Put a removebuffbyname on the end spell to keep it clean.

    You can check out my Hermetic Gadgetry mod for an example of 2.
    http://community.gaslampgames.com/threads/skill-hermetic-gadgetry-beta.3909/
    Search the spellDB.xml for vibrating wand.
     
  4. Oh, cool, thanks!
    ((I actually dug into the Archmage code, but all its spells are based on where else they're targeting - none of them work on "self"))
     
  5. OmniaNigrum

    OmniaNigrum Member

    In any situation where Aegho says something contradicting me, that means I am mistaken. He knows his code.

    And I could have sword that Archmage gave some effects specifically when cast on your own tile. But I will have to read it again to see if I can find it. (I do not have time today. I have to cut down a few trees and avoid disaster while doing that.)