magefree / mage

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

Bug: Cost Reduction/Permission is using wrong player when card is not cast by its owner #11166

Open Susucre opened 1 year ago

Susucre commented 1 year ago

11165 uncovered a bunch of bugged interaction between cards that allow to cast cards owned by another player (like [[Gonti, Lord of Luxury]]) and cost reduction/permission that is checking/counting something depending on who the caster is.

Some of the impacted cards:

A few of other cards that were confirmed bugged [[Animist's Might]] [[Blizzard]] [[Jaya's Immolating Inferno]] A few I did not test, but no reason to suspect they are not bugged too: [[Bedlam Reveler]] [[Dargo, the Shipwrecker]] [[Korvold, Gleeful Glutton]] [[Serra Avenger]]

github-actions[bot] commented 1 year ago

Gonti, Lord of Luxury - (Gatherer) (Scryfall) (EDHREC)

{2}{B}{B} Legendary Creature — Aetherborn Rogue 2/3 Deathtouch When Gonti, Lord of Luxury enters the battlefield, look at the top four cards of target opponent's library, exile one of them face down, then put the rest on the bottom of that library in a random order. You may cast that card for as long as it remains exiled, and mana of any type can be spent to cast it.

The Great Henge - (Gatherer) (Scryfall) (EDHREC)

{7}{G}{G} Legendary Artifact This spell costs {X} less to cast, where X is the greatest power among creatures you control. {T}: Add {G}{G}. You gain 2 life. Whenever a nontoken creature enters the battlefield under your control, put a +1/+1 counter on it and draw a card.

Ghalta, Primal Hunger - (Gatherer) (Scryfall) (EDHREC)

{10}{G}{G} Legendary Creature — Elder Dinosaur 12/12 This spell costs {X} less to cast, where X is the total power of creatures you control. Trample

Academy Journeymage - (Gatherer) (Scryfall) (EDHREC)

{4}{U} Creature — Human Wizard 3/2 This spell costs {1} less to cast if you control a Wizard. When Academy Journeymage enters the battlefield, return target creature an opponent controls to its owner's hand.

Animist's Might - (Gatherer) (Scryfall) (EDHREC)

{2}{G} Sorcery This spell costs {2} less to cast if it targets a legendary creature you control. Target creature you control deals damage equal to twice its power to target creature or planeswalker you don't control.

Blizzard - (Gatherer) (Scryfall) (EDHREC)

{G}{G} Enchantment Cast this spell only if you control a snow land. Cumulative upkeep {2} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) Creatures with flying don't untap during their controllers' untap steps.

Bedlam Reveler - (Gatherer) (Scryfall) (EDHREC)

{6}{R}{R} Creature — Devil Horror 3/4 This spell costs {1} less to cast for each instant and sorcery card in your graveyard. Prowess When Bedlam Reveler enters the battlefield, discard your hand, then draw three cards.

Dargo, the Shipwrecker - (Gatherer) (Scryfall) (EDHREC)

{6}{R} Legendary Creature — Giant Pirate 7/5 As an additional cost to cast this spell, you may sacrifice any number of artifacts and/or creatures. This spell costs {2} less to cast for each permanent sacrificed this way and {2} less to cast for each other artifact or creature you've sacrificed this turn. Trample Partner (You can have two commanders if both have partner.)

Korvold, Gleeful Glutton - (Gatherer) (Scryfall) (EDHREC)

{5}{B}{R}{G} Legendary Creature — Dragon Noble 4/4 This spell costs {1} less to cast for each card type among permanents you've sacrificed this turn. Flying, trample, haste Whenever Korvold deals combat damage to a player, put X +1/+1 counters on Korvold and draw X cards, where X is the number of permanent types among cards in your graveyard.

github-actions[bot] commented 1 year ago

Serra Avenger - (Gatherer) (Scryfall) (EDHREC)

{W}{W} Creature — Angel 3/3 You can't cast this spell during your first, second, or third turns of the game. Flying, vigilance

github-actions[bot] commented 1 year ago

Jaya's Immolating Inferno - (Gatherer) (Scryfall) (EDHREC)

{X}{R}{R} Legendary Sorcery (You may cast a legendary sorcery only if you control a legendary creature or planeswalker.) Jaya's Immolating Inferno deals X damage to each of up to three targets.

Susucre commented 1 year ago

[[The Skullspore Nexus]] and [[The Great Henge]] will have the correct behavior next update. It is actually a regression on the great henge with V6-beta2 to be wrong. Bug was reintroduced in an attempt to simplify the code, and we lacked an unit test there.

github-actions[bot] commented 1 year ago

The Skullspore Nexus - (Gatherer) (Scryfall) (EDHREC)

{6}{G}{G} Legendary Artifact This spell costs {X} less to cast, where X is the greatest power among creatures you control. Whenever one or more nontoken creatures you control die, create a green Fungus Dinosaur creature token with base power and toughness each equal to the total power of those creatures. {2}, {T}: Double target creature's power until end of turn.

The Great Henge - (Gatherer) (Scryfall) (EDHREC)

{7}{G}{G} Legendary Artifact This spell costs {X} less to cast, where X is the greatest power among creatures you control. {T}: Add {G}{G}. You gain 2 life. Whenever a nontoken creature enters the battlefield under your control, put a +1/+1 counter on it and draw a card.