It is currently 26 Apr 2024, 15:21
   
Text Size

[fix]Wurmcoil Engine when dies makes green artifact tokens.

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

[fix]Wurmcoil Engine when dies makes green artifact tokens.

Postby Aswan jaguar » 25 Jan 2020, 15:20

Describe the Bug:
Wurmcoil Engine when dies makes green artifact tokens.

Which card did behave improperly?
Wurmcoil Engine

Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Manalink dev 566b672e version - duel

What exactly should be the correct behavior/interaction?
Wurmcoil Engine when dies makes colorless artifact tokens.

Are any other cards possibly affected by this bug?
-
I tried to use Phyrexian Rebirth - Horror as an example which works fine
but didn't work.
Last edited by drool66 on 22 Dec 2020, 21:47, edited 2 times in total.
Reason: fixed
---
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: Wurmcoil Engine when dies makes green artifact tokens.

Postby Aswan jaguar » 14 Nov 2020, 13:53

The token.color_forced = COLOR_TEST_COLORLESS; doesn't force color to change to colorless.

I can fix the bug by changing the color to colorless in both csv's for Wurm and Beast tokens ( same bug for Architect of the Untamed ) but then I have to check and fix accordingly all Wurm and Beast tokens to force green color. korath do you know if there is another way now, without having to check and fix all those tokens? Otherwise besides this fix we have to keep in mind that whenever WOTC makes colorless tokens for the first time for tokens that are of another color in csv's we have to follow this routine, too.
---
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: Wurmcoil Engine when dies makes green artifact tokens.

Postby drool66 » 14 Nov 2020, 14:40

I have some good news - this can probably be handled by changing just 3 lines in token_generation.c
In token_characteristic_setting_effects() and set_token() you'll see a total of 3 references to COLOR_TEST_ANY_COLORED; these can probably be safely changed to COLOR_TEST_ANY. Doing this does indeed make colorless wurms, but I'm trying to think if it breaks anything else.
User avatar
drool66
Programmer
 
Posts: 1163
Joined: 25 Nov 2010, 22:38
Has thanked: 186 times
Been thanked: 267 times

Re: [conf]Wurmcoil Engine when dies makes green artifact tok

Postby Aswan jaguar » 14 Nov 2020, 15:01

drool66 wrote:In token_characteristic_setting_effects() and set_token() you'll see a total of 3 references to COLOR_TEST_ANY_COLORED;
I thought the change of COLOR_TEST_ANY_COLORED to COLOR_TEST_ANY but I changed it in another function that I thought it would matter somewhere in event.c which Korath placed when fixing Wurmcoil Engine to make Wurm tokens instead of Wurmcoil Engine tokens that it made before back in 2015. But what I tried didn't work. #-o

drool66 wrote: these can probably be safely changed to COLOR_TEST_ANY. Doing this does indeed make colorless wurms, but I'm trying to think if it breaks anything else.
It would be nice if korath chipped in with some info if that breaks anything. I could test a couple of tokens alone and vs Sleight to see if everything works but I can't think of any other cases to test.
---
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: [conf]Wurmcoil Engine when dies makes green artifact tok

Postby Aswan jaguar » 14 Nov 2020, 15:54

I did some testing with your proposal and we also need to change COLOR_TEST_ANY_COLORED to COLOR_TEST_ANY in int copy_token_characteristics_for_clone() otherwise if you copy the tokens I used Copy Artifact for that, the tokens are green instead of colorless.
---
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: Wurmcoil Engine when dies makes green artifact tokens.

Postby Korath » 16 Nov 2020, 03:46

Aswan jaguar wrote:I can fix the bug by changing the color to colorless in both csv's for Wurm and Beast tokens ( same bug for Architect of the Untamed ) but then I have to check and fix accordingly all Wurm and Beast tokens to force green color. korath do you know if there is another way now, without having to check and fix all those tokens?
There can't be all that many hits for "git grep -Ew 'CARD_ID_(WURM|BEAST)' src/cards/ src/functions/" to check.

Last I looked at Manalink's token-customization system, none of it worked properly. To create, say, a 5/2 Zombie, it makes a 2/2 Zombie token (as usual) with the equivalent of "if (event == EVENT_POWER && affect_me(player, card)) event_result += 3;". Which does the wrong thing if there's an effect with an earlier timestamp saying "all creatures have base power and toughness 1/1".

The traditional horrible hacky quick fix here is to change card_wurm_token() to look for whatever it is token_generation_t::set_special_infos translates on the token's instance - looks like instance->targets[14].player - and add a special case to set color to colorless.

(The actual clean way to do it is to create_a_card_type() for tokens that don't exactly match the base type, like Shandalar's Token::resolve_iid() does. Then not only do the timestamps work right, but the bigcard on the left side of the screen shows that individual token's base characteristics, and you can treat tokens like any other card instead of the pages and pages and pages of special cases for them in functions/token_generation.c.)
User avatar
Korath
DEVELOPER
 
Posts: 3707
Joined: 02 Jun 2013, 05:57
Has thanked: 496 times
Been thanked: 1106 times

Re: [fix]Wurmcoil Engine when dies makes green artifact toke

Postby drool66 » 22 Dec 2020, 21:48

Fixed for create_a_card_type() in 7275d09
Fingers crossed that I haven't created more issues with it
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: Bing [Bot] and 24 guests


Who is online

In total there are 25 users online :: 1 registered, 0 hidden and 24 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: Bing [Bot] and 24 guests

Login Form