Consider spells for all affected periods
Up to this point, if a spell affects several periods, it is only considered for the last period. It would be better to consider the (partial) spell for every period that it touches.
Up to this point, if a spell affects several periods, it is only considered for the last period. It would be better to consider the (partial) spell for every period that it touches.