magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.91k stars 778 forks source link

[NCC] Change of Plans bugs #9101

Closed Susucre closed 1 month ago

Susucre commented 2 years ago

[[Change of Plans]] is missing proper implementation for its conniving effect, not enforcing the following rule points:

701.47c If a permanent changes zones before an effect causes it to connive, its last known information is used to determine which object connived and who controlled it. 701.47d If multiple permanents are instructed to connive at the same time, the first player in APNAP order who controls one or more of those permanents chooses one of them and it connives. Then if any permanents remain on the battlefield which have been instructed to connive and have not done so, this process is repeated.

See https://github.com/magefree/mage/pull/9100 for an attempt at implementing [[Lethal Scheme]], the only other card so far having as an effect multiple conniving permanents.

github-actions[bot] commented 2 years ago

Change of Plans - (Gatherer) (Scryfall) (EDHREC)

{X}{1}{U} Instant Each of X target creatures you control connive. You may have any number of them phase out. (To have a creature connive, draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature. Treat phased out permanents and anything attached to them as though they don't exist until their controller's next turn.)

Lethal Scheme - (Gatherer) (Scryfall) (EDHREC)

{2}{B}{B} Instant Convoke (Your creatures can help cast this spell. Each creature you tap while casting this spell pays for {1} or one mana of that creature's color.) Destroy target creature or planeswalker. Each creature that convoked Lethal Scheme connives. (Draw a card, then discard a card. If you discarded a nonland card, put a +1/+1 counter on that creature.)

JayDi85 commented 1 month ago

Change of Plans implementation is fine. Whole spell will be fizzled due invalid target, so no connivie effect apply. I added LKI usage in ccb1a0aeedb6d95e6444ec3317140d2d1f68c6a9, but it's for better code style (any connivie related code must use lki).