magefree / mage

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

Miss ProcessAction after card move in some color dependent effects (Chandra, Dressed to Kill and other) #12279

Open JayDi85 opened 3 months ago

JayDi85 commented 3 months ago

From 8002cdf88fd4df21923cf46a931c654316aed68d

Some multi-steps effects must move card to another zone and apply another color depended effect. It must check color of the actual card (e.g. card's color in destination zone):

+1: Exile the top card of your library. If it's red, you may cast it this turn.

So effect must call game.processAction() to apply color/ability changing effects like [[Celestial Dawn]] with:

Nonland cards you own that aren't on the battlefield, spells you control, and nonland permanents you control are white.

Code search example: card.getColor(game).is shot_240523_070325

Potentially buggy cards:

github-actions[bot] commented 3 months ago

Celestial Dawn - (Gatherer) (Scryfall) (EDHREC)

{1}{W}{W} Enchantment Lands you control are Plains. Nonland permanents you control are white. The same is true for spells you control and nonland cards you own that aren't on the battlefield. You may spend white mana as though it were mana of any color. You may spend other mana only as though it were colorless mana.

Chandra, Dressed to Kill - (Gatherer) (Scryfall) (EDHREC)

{1}{R}{R} Legendary Planeswalker — Chandra 3 +1: Add {R}. Chandra, Dressed to Kill deals 1 damage to up to one target player or planeswalker. +1: Exile the top card of your library. If it's red, you may cast it this turn. −7: Exile the top five cards of your library. You may cast red spells from among them this turn. You get an emblem with "Whenever you cast a red spell, this emblem deals X damage to any target, where X is the amount of mana spent to cast that spell."

Chandra Ablaze - (Gatherer) (Scryfall) (EDHREC)

{4}{R}{R} Legendary Planeswalker — Chandra 5 +1: Discard a card. If a red card is discarded this way, Chandra Ablaze deals 4 damage to any target. −2: Each player discards their hand, then draws three cards. −7: Cast any number of red instant and/or sorcery cards from your graveyard without paying their mana costs.

Specter's Shriek - (Gatherer) (Scryfall) (EDHREC)

{B} Sorcery Target opponent reveals their hand. You may choose a nonland card from it. If you do, that player exiles that card. If a nonblack card is exiled this way, exile a card from your hand.

Tamiyo, Inquisitive Student // Tamiyo, Seasoned Scholar - (Gatherer) (Scryfall) (EDHREC)

{U} Legendary Creature — Moonfolk Wizard 0/3 Flying Whenever Tamiyo, Inquisitive Student attacks, investigate. (Create a Clue token. It's an artifact with "{2}, Sacrifice this artifact: Draw a card.") When you draw your third card in a turn, exile Tamiyo, then return her to the battlefield transformed under her owner's control. :arrows_counterclockwise: Legendary Planeswalker — Tamiyo 2 +2: Until your next turn, whenever a creature attacks you or a planeswalker you control, it gets -1/-0 until end of turn. −3: Return target instant or sorcery card from your graveyard to your hand. If it's a green card, add one mana of any color. −7: Draw cards equal to half the number of cards in your library, rounded up. You get an emblem with "You have no maximum hand size."

Stormscale Anarch - (Gatherer) (Scryfall) (EDHREC)

{2}{R}{R} Creature — Viashino Shaman 2/2 {2}{R}, Discard a card at random: Stormscale Anarch deals 2 damage to any target. If the discarded card was multicolored, Stormscale Anarch deals 4 damage instead.