[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.
by 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.
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
Reason: fixed
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: Wurmcoil Engine when dies makes green artifact tokens.
by 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.
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.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: Wurmcoil Engine when dies makes green artifact tokens.
by 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.
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.
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
Re: [conf]Wurmcoil Engine when dies makes green artifact tok
by Aswan jaguar » 14 Nov 2020, 15:01
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.drool66 wrote:In token_characteristic_setting_effects() and set_token() you'll see a total of 3 references to COLOR_TEST_ANY_COLORED;

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.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.
---
Trying to squash some bugs and playtesting.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: [conf]Wurmcoil Engine when dies makes green artifact tok
by 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.
Trying to squash some bugs and playtesting.
-
Aswan jaguar - Super Tester Elite
- Posts: 8129
- Joined: 13 May 2010, 12:17
- Has thanked: 748 times
- Been thanked: 477 times
Re: Wurmcoil Engine when dies makes green artifact tokens.
by Korath » 16 Nov 2020, 03:46
There can't be all that many hits for "git grep -Ew 'CARD_ID_(WURM|BEAST)' src/cards/ src/functions/" to check.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?
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.)
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [fix]Wurmcoil Engine when dies makes green artifact toke
by 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
Fingers crossed that I haven't created more issues with it
The latest images for Manalink will be here.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
The latest Manalink installation directory will be here. Well, not quite, anymore. Check the latest patches.
-
drool66 - Programmer
- Posts: 1185
- Joined: 25 Nov 2010, 22:38
- Has thanked: 187 times
- Been thanked: 280 times
7 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 28 guests