Jump to content

SpellCastOnMe does not actually trigger with AoE spells


Guest Spellcaster

Recommended Posts

Just a note to modders, I tested with the gate lich and unexpectedly,

 SpellCastOnMe([ANYONE],WIZARD_TRUE_SIGHT)

doesn't match, not even on the first invocation. I haven't tested with the subspell, but perhaps that would work. Potentially something to address with the fixpack.

Link to comment
On 8/18/2020 at 8:57 PM, kjeron said:

It still triggers when Area-Effect spells are actually cast on a creature (and not a point/location), such as through scripts and opcodes.

The trigger is quite literal - the spell must be cast targeting the creature, not just affect the creature.

It's not working for me, even when I directly click on a specific sprite.

Spoiler

IF
	OR(2)
		SpellCastOnMe(Protagonist,WIZARD_TRUE_DISPEL_MAGIC)  // SPWI326.SPL (Dispel Magic)
		SpellCastOnMeRES("SPPR950",Protagonist)  // True Sight
THEN
	RESPONSE #100
		DisplayStringHead(Myself,1080)  // Druid
END

 

What am I missing?

In any case, this trigger should probably fire even when the spell just affects the creature @Galactygon

Link to comment
2 hours ago, Luke said:

It's not working for me, even when I directly click on a specific sprite.

A location/point-targeted spell (ability target 4) cannot be cast on a creature through the UI* - even if you click on the sprite, it's still targeting their location, not the creature.

* They can target a creature while in a contingency or sequencer, though the sequencer must also contain a creature-targeted spell.

Edited by kjeron
Link to comment
On 8/30/2020 at 7:14 PM, kjeron said:

A location/point-targeted spell (ability target 4) cannot be cast on a creature through the UI* - even if you click on the sprite, it's still targeting their location, not the creature.

Oh, that means Nishruus and Hakeashars have always been (partially) broken? That's kinda bad...

In the current v2.6 beta "SpellCastOnMe()" keeps ignoring Ability Target 4, so that script trigger is probably intended to work that way... Any idea how to fix them?

  • First of all, spell description doesn't state that Remove Magic and the like are supposed to kill them (only Death Spell), so I'm not sure why they're scripted to die if hit by those spells...
  • As far as
    IF
    	SpellCastOnMe([ANYONE],0)
    THEN
    	RESPONSE #100
    		ApplySpell(Myself,CLERIC_CURE_LIGHT_WOUNDS)  // SPPR103.SPL (Cure Light Wounds)
    END

    is concerned, you could remove that block from their script and patch all SPWI and SPPR spells (including those that target "Living actor") with a leading 326 effect (power = 0, resist_dispel = 0, savetype = 0, resource = "SPPR103") followed by a 318 effect to prevent further effects from affecting these creatures. The condition for the 326/318 effects could be "SPECIFIC = specified value" or "SPLSTATE = specified value", since "RACE = MIST" or "CLASS = MIST" sounds too generic... What do you think?

Edited by Luke
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...