It is currently 25 Apr 2024, 07:48
   
Text Size

[fixed] Tokens v. Sleight of Mind

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

[fixed] Tokens v. Sleight of Mind

Postby Korath » 25 Aug 2021, 23:01

Describe the bug:
Token generation usually doesn't handle Sleight of Mind properly.
  1. generate_token_by_id() and generate_tokens_by_id() never sleight, and don't even look at token_generation_t::no_sleight.
  2. generate_token() only sleights if token_generation_t::color_forced is nonzero.
    1. In well over half the cases where it is, it's also sleighted at the call site, so it's sleighted twice.
Which card behaved improperly?
I can't remember the last time this question was truly relevant for a bug I've reported.

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

What exactly should be the correct behavior/interaction?
A: Cast Empyrial Storm, Sleight of Mind it from white to blue while it's on the stack: it should make one or more blue Angels instead of white ones.
B: Cast Regal Caracal, Sleight of Mind it from white to blue while it's on the stack: it should make two blue Cats instead of white ones.
B1: Cast Lord Windgrace with two copies of Doubling Season on the bf (or debug extra counters onto it), Sleight of Mind it from black to red, let the Sleight resolve, observe that the displayed card text correctly remains unchanged, Sleight of Mind it again from green to black, observe that the displayed card text correctly claims it should make black Cat Warriors, activate its -11 ability: it should make black Cat Warriors with Forestwalk instead of red ones. Not really the best testcase, though - Lord Windgrace doesn't need to set color_forced anyway, since the Cat Warrior token defaults to green.

Are any other cards possibly affected by this bug?
More than aren't.

Specific cards and mechanics that create tokens shouldn't ever mention anything sleight-related except to set token_generation_t::no_sleight = 1 when the effect says to choose the token's color. The token generation functions are the only place that should be calling anything in the get_sleight*() family of functions. (Ditto with Magical Hack, but the difference is that they used to deal with sleight themselves, and some of them still try to, while IIRC landwalks have always had to be dealt with by the creating effect.)

First observed with Batterskull, which I expected to incorrectly create sleighted Phyrexian Germ tokens. (Living weapon, like the fear keyword, only says "black" in its reminder text, so it shouldn't be affected by color text-changing abilities.)
Last edited by drool66 on 27 Aug 2021, 22:25, edited 1 time in total.
Reason: fixed
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: Tokens v. Sleight of Mind

Postby drool66 » 27 Aug 2021, 22:21

Fixed, I think, in 29b877f; behavior of A, B & B1 is correct
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times


Return to Archived Reports

Who is online

Users browsing this forum: No registered users and 30 guests


Who is online

In total there are 30 users online :: 0 registered, 0 hidden and 30 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 30 guests

Login Form