It is currently 16 Apr 2024, 06:14
   
Text Size

[confirmed]Teferi, Mage of Zhalfir vs. you-may-cast effects

Report wrong Card behavior to get it fixed.
PLEASE ADD SAVEGAMES TO YOUR TOPIC !

Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins

[confirmed]Teferi, Mage of Zhalfir vs. you-may-cast effects

Postby Korath » 21 Jul 2017, 20:32

Describe the bug:
I can activate Isochron Scepter and successfully cast the spell imprinted on it while the AI has a Teferi, Mage of Zhalfir on the bf.

Which card behaved improperly?
Teferi, Mage of Zhalfir.

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 70a9bcf.

What exactly should be the correct behavior/interaction?
Ruling: If an ability lets an opponent cast a spell as part of its effect (such as Isochron Scepter's ability does), that opponent can't cast that spell since the currently resolving ability is still on the stack.

Are any other cards possibly affected by this bug?
From Teferi's side, no. It was an unpleasant surprise to stumble upon this ruling, and I'd have been amazed if it were working right. I don't think any other of the other cards that prevent players from casting spells has a similar timing restriction.

From the side of effects that let you cast spells, oh yes plenty. Some of these are on activated abilities (examples: Aetherworks Marvel, Kaho, Minamo Historian), some on spells (Bring to Light, Yahenni's Expertise), and some on triggers (Maelstrom Archangel, My Wish Is Your Command, Bloodbraid Elf); all should be prevented.

There's a distinction here between effects that say "You may copy [an exiled card]. If you do, you may cast the copy [usually without paying its mana cost]", like on Spellbinder or Isochron Scepter, and effects that say "Copy [a usually-targeted] spell. You may choose new targets for the copy", like on Izzet Guildmage or Hive Mind. Only the first sort should be prevented, though I think Manalink implements them the same internally.

Teferi's other rulings - "you can suspend creatures at instant speed" and "opponents' suspended cards don't unsuspend" - should probably be tested too.

As an aside, it's surprisingly easy to make "you can cast [whatever restriction] spells as though they had flash" work properly instead of the current approximation. sub_476B90 has a check of (cards_data[iid].type & dword_60A53C); just replace that with whatever special cases are appropriate. There's a similar one in reassess_all_cards_helper() at 0x477410, which solely determines whether to highlight card titles yellow or black; that's slightly less straightforward to replace, since there's a later check in the same function against current_turn and current_phase. The only hard part is to integrate it with all the existing workarounds, like "activating" Dream Halls to cast cards with alternate costs, or Rules Engine to flashback cards.

Oh, and this should be a different bug, but Isochron Scepter dumps when it enters the battlefield in dev.
backtrace | Open
Code: Select all
#0  0x77725cd4 in ntdll!KiFastSystemCallRet () from /cygdrive/c/Windows/system32/ntdll.dll
#1  0x7742073f in WaitMessage () from /cygdrive/c/Windows/system32/user32.dll
#2  0x77433c9f in USER32!DrawFocusRect () from /cygdrive/c/Windows/system32/user32.dll
#3  0x77432dc0 in USER32!SoundSentry () from /cygdrive/c/Windows/system32/user32.dll
#4  0x08e61c72 in ?? ()
#5  0x7745cd48 in USER32!SoftModalMessageBox () from /cygdrive/c/Windows/system32/user32.dll
#6  0x7745d2ca in USER32!SoftModalMessageBox () from /cygdrive/c/Windows/system32/user32.dll
#7  0x7745d3fc in USER32!MessageBoxTimeoutW () from /cygdrive/c/Windows/system32/user32.dll
#8  0x7745d4a6 in USER32!MessageBoxTimeoutA () from /cygdrive/c/Windows/system32/user32.dll
#9  0x7745d654 in USER32!MessageBoxExA () from /cygdrive/c/Windows/system32/user32.dll
#10 0x7745d6c6 in USER32!MessageBoxA () from /cygdrive/c/Windows/system32/user32.dll
#11 0x024be883 in popup (title=0x25b4c5a <lock_ids+250> "bad parameters",
    fmt=0x1556d848 "get_card_instance(0, -1)\n0: 0x024DC988\n1: 0x024929BE\n2: 0x02493408\n3: 0x022ED7A8\n4: 0x0248D2E8\n5: 0x024E6CA5\n6: 0x024E6FE9\n7: 0x022F43BD\n8: 0x024EC795\n9: 0x024CA69D\n10: 0x024CA6FF\n11: 0x024C8056\n12: 0"...) at functions/functions.c:14607
#12 0x024dca85 in show_backtrace (title=title@entry=0x25b4c5a <lock_ids+250> "bad parameters", header=header@entry=0x1556e80c "get_card_instance(0, -1)")
    at functions/show_backtrace.c:39
#13 0x024929be in get_card_instance (player=player@entry=0, card=card@entry=-1) at functions/deck.c:304
#14 0x02493408 in get_original_internal_card_id (player=player@entry=0, card=card@entry=-1) at functions/deck.c:439
#15 0x022ed7a8 in is_not_x_spell (unused1=5595, unused2=-1, player=0, card=-1) at cards/mirrodin.c:2290
#16 0x0248d2e8 in new_make_test (player=player@entry=0, to_examine=5595, test_type=-1, this_test=0x1556ec1c) at functions/global_checking.c:804
#17 0x024e6ca5 in select_card_from_zone (player=player@entry=0, targ_player=targ_player@entry=0, s_location=s_location@entry=0x1556e94c,
    zone_count=zone_count@entry=8, must_select=must_select@entry=0, ai_selection_mode=ai_selection_mode@entry=1, test_type=test_type@entry=-1,
    this_test=this_test@entry=0x1556ec1c) at functions/tutors.c:44
#18 0x024e6fe9 in new_select_a_card (player=player@entry=0, targ_player=targ_player@entry=0, search_location=search_location@entry=4,
    must_select=must_select@entry=0, ai_selection_mode=ai_selection_mode@entry=1, test_type=test_type@entry=-1, this_test=this_test@entry=0x1556ec1c)
    at functions/tutors.c:186
#19 0x022f43bd in card_isochron_scepter (player=0, card=9, event=EVENT_ETB_ABILITY) at cards/mirrodin.c:2327
#20 0x024ec795 in call_card_fn_impl () from manalinkeh.dll
#21 0x024ca69d in call_card_fn (address=address@entry=0x2001740 <CodeSectionEx+1850>, instance=0x4effcc, player=player@entry=0, card=card@entry=9,
    event=event@entry=EVENT_ETB_ABILITY) at functions/events.c:36
#22 0x024ca6ff in call_card_function (player=player@entry=0, card=card@entry=9, event=event@entry=EVENT_ETB_ABILITY) at functions/events.c:17
#23 0x024c8056 in etb_ability (player=player@entry=0, card=card@entry=9, event=event@entry=EVENT_RESOLVE_TRIGGER,
    trigger_mode=trigger_mode@entry=RESOLVE_TRIGGER_MANDATORY) at functions/functions.c:16342
#24 0x022f40a2 in card_isochron_scepter (player=0, card=9, event=EVENT_RESOLVE_TRIGGER) at cards/mirrodin.c:2311
#25 0x024ec795 in call_card_fn_impl () from manalinkeh.dll
#26 0x024ca69d in call_card_fn (address=0x2001740 <CodeSectionEx+1850>, instance=0x4effcc, player=player@entry=0, card=card@entry=9,
    event=event@entry=EVENT_RESOLVE_TRIGGER) at functions/events.c:36
#27 0x024cb204 in dispatch_event_raw (event=event@entry=EVENT_RESOLVE_TRIGGER) at functions/events.c:108
#28 0x024cb5b6 in dispatch_trigger_to_one_card (player=0, card=9, event=EVENT_RESOLVE_TRIGGER) at functions/events.c:321
#29 0x004367c3 in ?? ()
#30 0x024cb6f0 in resolve_trigger (player=0, card=9, TENTATIVE_reason_for_trigger_controller=0) at functions/events.c:585
#31 0x004766dc in ?? ()
#32 0x024ca93f in dispatch_trigger_impl (player=player@entry=0, trig=trig@entry=TRIGGER_COMES_INTO_PLAY, xtrig=xtrig@entry=0,
    prompt=prompt@entry=0x787108 "Card into play", TENTATIVE_allow_response=<optimized out>, TENTATIVE_allow_response@entry=0) at functions/events.c:404
#33 0x024cb035 in dispatch_trigger2 (player=0, trig=trig@entry=TRIGGER_COMES_INTO_PLAY, prompt=prompt@entry=0x787108 "Card into play",
    TENTATIVE_allow_response=TENTATIVE_allow_response@entry=0, new_trigger_cause_controller=new_trigger_cause_controller@entry=0,
    new_trigger_cause=new_trigger_cause@entry=9) at functions/events.c:509
#34 0x024a11e8 in comes_into_play_trigger (card=9, player=0) at functions/engine.c:1739
#35 put_card_on_stack3 (player=0, card=9) at functions/engine.c:1814
#36 0x0043bfaa in ?? ()
#37 0x004399bd in ?? ()
#38 0x0047902c in ?? ()
#39 0x004946e9 in ?? ()
#40 0x75e6d2e9 in KERNEL32!BaseThreadInitThunk () from /cygdrive/c/Windows/system32/kernel32.dll
#41 0x77701603 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/system32/ntdll.dll
#42 0x777015d6 in ntdll!RtlInitializeExceptionChain () from /cygdrive/c/Windows/system32/ntdll.dll
#43 0x00000000 in ?? ()
Last edited by Aswan jaguar on 23 Jul 2017, 12:48, edited 1 time in total.
Reason: confirmed bug
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Teferi, Mage of Zhalfir vs. you-may-cast effects

Postby Aswan jaguar » 23 Jul 2017, 12:47

I confirm original bug and these, too:
Korath wrote:From the side of effects that let you cast spells, oh yes plenty. Some of these are on activated abilities (examples: Aetherworks Marvel, Kaho, Minamo Historian), some on spells (Bring to Light, Yahenni's Expertise), and some on triggers (Maelstrom Archangel, My Wish Is Your Command, Bloodbraid Elf); all should be prevented.
You can't suspend creatures with Teferi, Mage of Zhalfir ability when you own him.Teferi, Mage of Zhalfir doesn't prevent opponent to cast suspended cards.

In public version Isochron Scepter doesn't dump though.
---
Trying to squash some bugs and playtesting.
User avatar
Aswan jaguar
Super Tester Elite
 
Posts: 8078
Joined: 13 May 2010, 12:17
Has thanked: 730 times
Been thanked: 458 times

Re: [confirmed]Teferi, Mage of Zhalfir vs. you-may-cast effe

Postby Korath » 23 Jul 2017, 22:44

The AI's Iona, Shield of Emeria set to red doesn't prevent me from casting a Lightning Bolt imprinted on Isochron Scepter either, so I'm thinking none of the "you may cast" effects check any of the "you can't cast" ones.
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 25 guests


Who is online

In total there are 25 users online :: 0 registered, 0 hidden and 25 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 25 guests

Login Form