Not really, because I was talking about blastZone, even though I wrote spellZone by mistake. One difference is that the latter would have to deal with many kinds of spell.
But it might not be hopeless. The way spellZone is currently implemented is by tracking the piece that casts it, so that its location is known, and then before move generation create a board-size array, and mark the squares in it around the casting piece. The latter could be replaced by a move generation for the dummy piece, where each valid destination would not push a move on the move stack, but would mark the destination square. Or better, the capture square (which normally would be the same). By using c or d in the zone descriptor you could then decide whether the spell affects friends or foes (which would the need distinguishable marking).
Not really, because I was talking about blastZone, even though I wrote spellZone by mistake. One difference is that the latter would have to deal with many kinds of spell.
But it might not be hopeless. The way spellZone is currently implemented is by tracking the piece that casts it, so that its location is known, and then before move generation create a board-size array, and mark the squares in it around the casting piece. The latter could be replaced by a move generation for the dummy piece, where each valid destination would not push a move on the move stack, but would mark the destination square. Or better, the capture square (which normally would be the same). By using c or d in the zone descriptor you could then decide whether the spell affects friends or foes (which would the need distinguishable marking).