[CMB1] Implement Innocuous Insect (#11143)

This commit is contained in:
Susucre 2023-09-15 23:56:08 +02:00 committed by GitHub
parent ecf4b11d2e
commit 8859637844
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 60 additions and 1 deletions

View file

@ -191,7 +191,14 @@ class BuybackEffect extends ReplacementEffectImpl {
if (event.getTargetId().equals(source.getSourceId())) {
ZoneChangeEvent zEvent = (ZoneChangeEvent) event;
// if spell fizzled, the sourceId is null
return zEvent.getFromZone() == Zone.STACK && zEvent.getToZone() == Zone.GRAVEYARD
return zEvent.getFromZone() == Zone.STACK
&& (zEvent.getToZone() == Zone.GRAVEYARD ||
// Innocuous Insect from Mystery Boosters is stretching a little what Buyback can do.
// Although that does not impact normal Buyback usage on instants/sorceries.
//
// (2019-11-12) If you pay the buyback cost for a permanent spell, it doesn't enter
// the battlefield as it resolves. It moves from the stack to its owner's hand.
zEvent.getToZone() == Zone.BATTLEFIELD)
&& source.getSourceId().equals(event.getSourceId());
}
return false;