Skip to content

Reflecting the caster's stats in spell effects

chimericchimeric Member Posts: 1,163
If I want an effect to take place only when the target creature is of a certain sex, or has an ability higher than, or lower than, some number, and so on, I can use Apply Effects List or Use EFF file to set up a filter. But how do I reflect facts about the caster in spell effects? What if I want the spell to be more effective if, e.g., the caster's Charisma is over 18? Or what if I want a different effect if the caster is male or neutral-aligned?

All that I can think of is summoning an invisible creature with a script which will take account of some of these properties. For instance, it can play different sounds for male and female casters, as I did with Taunt. It's also possible to make the creature cast secondary spells at RESPONSE # values less than 100, depending on the caster's stats. But all this is outside and later than the main spell. Right now I don't see a way to, for instance, impose a penalty to the creature's save if the caster's Wisdom is higher than the target's. In fact, I don't know if it's even possible to compare those values in a script outside, and if it was, it would only be good for some after-effects.

Or am I wrong? Do you know better ways?

P.S. Another thing: is it possible to make the target cast a spell on itself?

Comments

  • ArdanisArdanis Member Posts: 1,736
    P.S. Another thing: is it possible to make the target cast a spell on itself?

    There's "original caster (9)" target value, though I've never really tried it.
  • chimericchimeric Member Posts: 1,163
    I think that one is still for the spell that is being cast.
  • ArdanisArdanis Member Posts: 1,736
    edited September 2016
    There's "Spell: Bounce Specified Spell [207]" opcode, which, with a bit of shaman dancing and a load of shell files, might do what you want to accomplish. But again, I haven't tried it myself, because the engine is just not suited for this kind of thing.
  • chimericchimeric Member Posts: 1,163
    It'll have to be suited, then. :smiley: I'm not giving up so easily. Thanks for the tip.
  • chimericchimeric Member Posts: 1,163
    Okay, what's up with this code - also on the same topic:

    IF True() THEN RESPONSE #100 Wait(2) Continue() END IF Gender(Nearest,MALE) RandomNumGT(20,10) THEN RESPONSE #100 Wait(2) ReallyForceSpellRES("SPWI105",Nearest) // Color Spray DestroySelf() END IF Gender(Nearest,MALE) RandomNumLT(20,11) THEN RESPONSE #100 DestroySelf() END

    The first possibility, under the first RandomNum, never comes true. The creature always disappears after a couple of seconds, or sometimes longer. It's like it keeps going through the script until it draws the second option, to disappear.
  • OlvynChuruOlvynChuru Member Posts: 3,079
    Can't Apply Effects List check if the target has a certain stat value?
  • chimericchimeric Member Posts: 1,163
    Yes, but it can't check if the caster has a certain stat value - unless, of course, the caster IS the target... B)
Sign In or Register to comment.