View Single Post
dungeonguru
Senior Member
 
Join Date: May 2016
Posts: 608

Old November 19th, 2020, 08:10 AM
Here's and example of how I might set up the foreach.

Code:
var searchexpr as string
searchexpr = "thingid.(spellID) & Helper.Memorized"

foreach pick in hero from BaseSpell where searchexpr
eachpick.delete[Helper.Memorized]
nexteach
I use a variable since it's easier for me to parse or manipulate the string later if I need to.

The problem is probably with timing since both copies of the spell are picks that are assigned through different portals that probably run really close together in timing, the trick is to pick the right time. I don't know when they kick off but it might be worth digging into the timing report of a "live" character with a spellbook.

I'm going to suggest another path after thinking about how the rule as written is phrased. How hard would it be to use your spell selection to "disable" to instead throw a validation error - something like: "You must not have the spell (SPELLNAME) memorized if you have it chosen in (ABILITYNAME)."

Kinda like the Acolyte of Nature ability on the Nature Cleric Domain throws an error if you don't have the cantrip you choose memorized.
dungeonguru is offline   #6 Reply With Quote