Page 1 of 2

[still bugged]Alphabetize don't work-with triggers in a row.

PostPosted: 27 Nov 2013, 03:15
by RanDomino
Describe the Bug:
When you put a Hideaway Land into play with effects like Primeval Titan or Crop Rotation while AlphabetizeDeck in config.txt is set to 1, then the hideaway land will look at the top four cards of your deck while the search effect is still resolving- meaning your choices for the Hideaway will be one of the alphabetically first four cards in your deck.

Which card did behave improperly ?
Howltooth Hollow, Mosswort Bridge,Shelldock Isle, Spinerock Knoll, Windbrisk Heights

Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
PTT

What exactly should be the correct behavior/interaction ?
The Hideaway effect shouldn't start resolving until the search effect is done and your deck is shuffled.

[confirmed-wait]Halimar Depths

PostPosted: 14 Dec 2013, 03:47
by Althuna
Have this weird bug with Halimar Depths where every time I use it, it shows me 3 Birds of Paradise and then when I next draw cards, they are not the birds of paradise.

Re: Halimar Depths

PostPosted: 14 Dec 2013, 03:51
by BAgate
Works for me in a clean game. Could you give us a save game (and this is why we ask for these)?

Also, please use the proper format, it only takes a few seconds longer and really helps.

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 04:19
by Althuna
got a save game here. I suspect its something to do with all the fetching I do with the ponder and scry stuff. But I don't know. Or did I play it with a Primeval Titan? It might be his fault.

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 08:58
by HarlequinCasts
Confirmed via your save game - thanks.

What's going on here is that Primeval Titan has alphabetized your library (if you have alphabetize enabled by default)to let you choose a land, and before that is done resolving (and thus shuffling your library), Halimar Depths is triggering and showing you the top 3 alphabetical cards in your library (3 Birds of Paradise). Title should change to "Primeval Titan" or at least "Primeval Titan & Halimar Depths"

A developer is going to have to chime in here on how to proceed though. Obviously both lands should be chosen and the library shuffled before any enter the battlefield effects happen.

EDIT: Pic attached showing the bug with a deck where Black Lotus is alphabetically the first card.

EDIT2: Mentioned AlphabetizeDeck:1

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 09:30
by stassy
Disable alphbetize deck option in config.txt and try again?

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 11:09
by HarlequinCasts
Disabling alphabetize does seem to fix it as a work around. I think the root problem though is still that Primeval Titan is allowing other things to trigger before it is finished resolving.

Ideally when Primeval Titan is done fetching two lands with enter the battlefield effects, both lands should be on the battlefield with orange triggered abilities lighting up and the player chooses which to resolve first.

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 15:18
by Aswan jaguar
No problems for me with this savegame and alphabetize option disabled(as I always do)for me also that in config.txt we have preselected alphabetize option on is wrong.Imho the preselected option should be the normal one as the order of the cards are shuffled in the beginning.

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 17:12
by stassy
I think (not 100% sure though), that the alphabetize issue only happen when you look at your lib either by an effect or by debug mode. If you start a game a successively draw cards (either by an effect or debug mode) with that option on, the cards won't be drawn in alphabetized order.

This is the intended effect, however the issue is if you look only once your lib, the cards will not be "shuffled" back to their original order and will stay alphabetized.

Re: [unconfirmed]Halimar Depths

PostPosted: 20 Dec 2013, 17:40
by HarlequinCasts
Aswan jaguar wrote:No problems for me with this savegame and alphabetize option disabled(as I always do)for me also that in config.txt we have preselected alphabetize option on is wrong.Imho the preselected option should be the normal one as the order of the cards are shuffled in the beginning.
I still maintain that this is only a workaround. The real problem here is that Primeval Titan is letting a land trigger happen before it finishes resolving.

In paper magic, if my Primeval Titan attacks and I select a Vesuva and a Halimar Depths, they both enter the battlefield at the same time AFTER Primeval Titan 's triggered ability has finished resolving. At that point both lands trigger and their controller chooses in what order to resolve them.

Whether or not alphabatizedeck is on or off, the problem is still that Primeval Titan allows the lands to trigger before it is finished resolving. It should therefore still be considered a bug that if you have Alphabetizedeck:1 Halimar Depths will not work with Primeval Titan because the deck will just be shuffled after.

Re: [unconfirmed]Halimar Depths

PostPosted: 21 Dec 2013, 03:27
by Korath
Confirmed. Not properly fixable since triggers don't use the stack, but don't close since we may be able to work around it in code.

Disabling AlphabetizeDeck can't possibly work, and won't do anything but disguise the bug; the land's going to come into play and run its trigger before Primeval Titan shuffles your library.

Re: [unconfirmed]Halimar Depths

PostPosted: 21 Dec 2013, 11:48
by RanDomino
This is the same bug as viewtopic.php?f=86&t=12699
Should they be merged somehow?

HarlequinCasts wrote:In paper magic, if my Primeval Titan attacks and I select a Vesuva and a Halimar Depths, they both enter the battlefield at the same time AFTER Primeval Titan 's triggered ability has finished resolving.
Technically, they enter the battlefield during the resolution of Prime Time's ability.

Re: [confirmed]Hideaway Lands

PostPosted: 10 Apr 2014, 02:21
by Korath
I've been running into this lately a lot with cards like Sea Gate Oracle when tutored into play with things like Birthing Pod. It is very irritating, and not really fixable at the source of the problem because so many tutoring cards call shuffle() themselves instead of letting new_global_tutor() or whatever do it for them. Worse, new_global_tutor() is broken by design, in that you can't let it do the shuffling for you if you're tutoring more than one object.

Re: [confirmed]Hideaway Lands

PostPosted: 12 Apr 2014, 23:48
by Korath
The proper fix, of course, is to make triggers use the stack, so they don't resolve until the tutoring effect fully resolves. But that's a long ways off still.

Plan of attack in the meantime:
  1. Eliminate test_definition_t::no_shuffle and the side effect of test_definition_t::qty > 1 that suppresses shuffling. Always shuffle within new_global_tutor(), never the caller.
  2. Instead of putting each card directly in its destination (whether it's the battlefield, or a graveyard, or wherever) in each iteration of new_global_tutor(), just remove it from the source and add it to a local array; after all cards are chosen and (if tutoring from library) shuffling, then move them to the destination one by one.
Step 2 also prevents odd interactions with e.g. Gravedigger, as already worked around in Champion of Stray Souls, Proclamation of Rebirth, Death or Glory, Chandra Ablaze, and flashback, though oddly enough not in reanimate_all().

Re: [confirmed]Hideaway Lands

PostPosted: 15 Jul 2014, 12:33
by Gargaroz
Well, I implemented the changes Korath mentioned, apart from one : if the "test_definition_t::qty > 1", "no_shuffle" should be leaft to 1 by default, since is used by cards like Impulse and such, which requires no shuffle at all usually.
Consider this fixed until further notice.