FORUM ARCHIVED

AI casting and spell templates

Discussion in 'Modding' started by OneMoreNameless, Oct 13, 2012.

  1. I'm going to regret asking this. But here we go anyway, then I'm off to sleep and will stop nagging these forums for at least eight hours, I promise.

    Is it possible to let monsters cast spells with anchored templates or other targeting restrictions (adjacent, knightlyleap etc.) and not have them waste turns failing to cast whenever the player isn't within the area?
     
  2. Essence

    Essence Will Mod for Digglebucks

    Nope. AI's first decision every turn is "cast or advance/attack?" Everything else comes after that.
     
  3. That isn't strictly true, I've since found. <ai hint="mine" /> will cause the monster to both cast the spell and move/attack in the same turn. The spell is initially targets random floor (and is cast twice), but with delayed triggers and a dummy buff or two you can get some passive abilities or template effects working from it ... though as the spell is cast AFTER movement, it would be pretty unfair in most cases and you can't neatly paralyze the monster for the rest of their turn if the spell hits the player or anything convenient like that. There's still some shenanigans you can pull anyway.
     
    Kazeto likes this.
  4. Essence

    Essence Will Mod for Digglebucks

    I had no idea...that's fascinating.