mtgrares wrote:MTG Forge doesn't implement any replacement effects like
Yixlid Jailer but I know that Incantus does, how do you do it? And does anyone else have any ideas about replacement effects. Could events be replaced, changed, or filtered? This reminds of me of software pattern Chain of Responsibility but I'm not sure if it would be useful.
Yixlid Jailer isn't a replacement effect. It's just a static ability that removes all abilities from cards in graveyards. We do
that by simply having a static_tracking ability track the graveyard and say card.abilities.remove_all() for each card in the graveyard.
Replacement effects in Incantus are done by taking a function and replacing it with an object that
pretends to be a function and winds up calling various replacement effects after asking the user which replacement effects to use first. It's one of those advanced constructs that I don't really understand the specifics of all that well, although I know (in general terms) what it's doing.