magefree / mage

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

Tests: on strictMode, can not set a "no choice" for a Player::choose with a target with no valid choice. #12542

Open Susucre opened 6 days ago

Susucre commented 6 days ago

I could not properly test [[Early Winter]] second mode, when the targetted opponent control no enchantment to exile:

https://github.com/magefree/mage/blob/65828866ece43130ffb0961b3b2d4b43c2981d31/Mage.Tests/src/test/java/org/mage/test/cards/single/blb/EarlyWinterTest.java#L64-L84

I feel like this is on the TestPlayer's choose method not being able to handle that situation properly. The card's implementation is quite straightforward:

https://github.com/magefree/mage/blob/65828866ece43130ffb0961b3b2d4b43c2981d31/Mage.Sets/src/mage/cards/e/EarlyWinter.java#L76-L89

Of note, the situation works properly on live test (there is no choice to make, and the spell just resolve with no effect)

github-actions[bot] commented 6 days ago

Early Winter - (Gatherer) (Scryfall) (EDHREC)

{4}{B} Instant Choose one — • Exile target creature. • Target opponent exiles an enchantment they control.