magefree / mage

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

Emiel The Blessed is bugged, please help! :( #11836

Open wwwmagnottait opened 8 months ago

wwwmagnottait commented 8 months ago

Hi! First of all thanks for your great efforts with XMage, a fantastic resource for all Magic players....THANKS! Then...I want to report a bug on the activated ability of Emiel the Blessed. i.e.: "{3}: Exile another target creature you control, then return it to the battlefield under its owner's control".

I played a lot of local Commander test matches (free for all) against bots on localhost with my cEDH deck Sisay Weatherlight Captain. Having Emiel The Blessed onboard often it allows only one activation of its ability, while other times not even that, even if you have a large amount of mana available! The ability of Emiel can also be activated at any time when you have priority (and does not require tapping Emiel), however with XMage it seems possible to use it only in the main phase and only once (or never, as happened in some matches!). Once used it can no longer be used.

See below a log of one of the match: as you can see I was on my 1st Main Phase, I tutored Emiel with Sisay ability, I had a lot of mana but I couldn't activate Emiel's ability even once and I was forced to go ahead to next step!

"10.10, T6.M1: wwwmagnottait searches their library (source: Sisay, Weatherlight Captain [924]) 10.10, T6.M1: wwwmagnottait puts Emiel the Blessed [90d] from library onto the Battlefield (source: Sisay, Weatherlight Captain [924]) 10.10, T6.M1: wwwmagnottait's library is shuffled (source: Sisay, Weatherlight Captain [924]) 10.11, T6.DA: wwwmagnottait skip attack"

This bug significantly weakens the Sisay's deck and all the other decks that use Emiel as a combo outlet. Would you kindly check this issue and try to solve it? Many many thanks!

tiera3 commented 8 months ago

I found Nephalia Sumggler that has the same activated ability (for 3U{tap} instead of 3). Or Eldrazi Displacer that has the almost the same activated ability (for 2C) but can target any creature, and the creatures return to the battlefield tapped.

Looks at code:

Emiel The Blessed has Ability ability = new SimpleActivatedAbility(new ExileThenReturnTargetEffect(false, false), new GenericManaCost(3));

Nephalia Smuggler has Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new ExileThenReturnTargetEffect(true, true), new ManaCostsImpl<>("{3}{U}"));

Eldrazi Displacer has Ability ability = new SimpleActivatedAbility(new ExileThenReturnTargetEffect(false, false, PutCards.BATTLEFIELD_TAPPED), new ManaCostsImpl<>("{2}{C}"));

The differences with Nephalia Smuggler I note are:

It seems to match with Eldrazi Displacer, the only difference being the PutCards.BATTLEFIELD_TAPPED and of course the differing mana costs. There is a different line of code that deals with the applicable targets, so that doesn't seem relevant to this line.

JayDi85 commented 8 months ago

[[Emiel the Blessed]]

github-actions[bot] commented 8 months ago

Emiel the Blessed - (Gatherer) (Scryfall) (EDHREC)

{2}{W}{W} Legendary Creature — Unicorn 4/4 {3}: Exile another target creature you control, then return it to the battlefield under its owner's control. Whenever another creature enters the battlefield under your control, you may pay {G/W}. If you do, put a +1/+1 counter on it. If it's a Unicorn, put two +1/+1 counters on it instead. ({G/W} can be paid with either {G} or {W}.)

JayDi85 commented 8 months ago

If you haven't another creature under control then it will be disabled. Xmage checks target validation and mana available to enable ability for a player.

wwwmagnottait commented 7 months ago

If you haven't another creature under control then it will be disabled. Xmage checks target validation and mana available to enable ability for a player.

I obviously had creatures under my control :) Anyway it is weird...I made some other tests and now it seems to work, but it seems kinda random!