magefree / mage

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

[VOW] Savior of Ollenbock can't target creatures on the battlefield #9561

Open LegionedintheDamned opened 2 years ago

LegionedintheDamned commented 2 years ago

Attacked with Isshin + Savior. Other player exiled Isshin in response to the attack, but all triggers were on the stack. When it came time to exile... the only valid targets were an opponents graveyard. image

Alex-Vasile commented 2 years ago

[[Savior of Ollenbock]]

github-actions[bot] commented 2 years ago

Savior of Ollenbock - (Gatherer) (Scryfall) (EDHREC)

{1}{W}{W} Creature — Human Soldier 1/2 Training (Whenever this creature attacks with another creature with greater power, put a +1/+1 counter on this creature.) Whenever Savior of Ollenbock trains, exile up to one other target creature from the battlefield or creature card from a graveyard. When Savior of Ollenbock leaves the battlefield, put the exiled cards onto the battlefield under their owners' control.

PurpleCrowbar commented 2 years ago

This issue also applies to [[Angel of Serenity]]

github-actions[bot] commented 2 years ago

Angel of Serenity - (Gatherer) (Scryfall) (EDHREC)

{4}{W}{W}{W} Creature — Angel 5/6 Flying When Angel of Serenity enters the battlefield, you may exile up to three other target creatures from the battlefield and/or creature cards from graveyards. When Angel of Serenity leaves the battlefield, return the exiled cards to their owners' hands.

PurpleCrowbar commented 2 years ago

It also applies to [[Daretti, Ingenious Iconoclast]]. The issue is with TargetCardInGraveyardBattlefieldOrStack

github-actions[bot] commented 2 years ago

Daretti, Ingenious Iconoclast - (Gatherer) (Scryfall) (EDHREC)

{1}{B}{R} Legendary Planeswalker — Daretti 3 +1: Create a 1/1 colorless Construct artifact creature token with defender. −1: You may sacrifice an artifact. If you do, destroy target artifact or creature. −6: Choose target artifact card in a graveyard or artifact on the battlefield. Create three tokens that are copies of it.

PurpleCrowbar commented 1 year ago

Was looking into this and discovered that TargetCardInGraveyardBattlefieldOrStack actually does work, and so does Savior of Ollenbock, Angel of Serenity, etc by extension. The problem is not with the function of the code, but the fact that permanents on the battlefield are not highlighted yellow so as to show them as valid targets. Clicking on them regardless will correctly select them.

I'm not entirely sure how xmage handles drawing the UI with yellow / green borders on cards when allowing a user to target objects and so haven't been able to find how to fix this, but this UI issue is the root of the problem.