[fixed/closed]Fellwar Stone & Tree of Tales
Moderators: BAgate, drool66, Aswan jaguar, gmzombie, stassy, CCGHQ Admins
[fixed/closed]Fellwar Stone & Tree of Tales
by HarlequinCasts » 29 Jul 2013, 10:18
Describe the Bug:
Fellwar Stone does not appear to interact correctly with Tree of Tales
Specifically with all five of them in play, Fellwar Stone produces all colors except for green, colorless, and also a second colorless (artifact colorless?). When isolated, Tree of Tales is giving it two colorless mana types instead of green.
Possibly related to Korath's manastripe post?
Which card did behave improperly ?
Tree of Tales or Fellwar Stone
Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Odyssey v2
What exactly should be the correct behavior/interaction ?
Fellwar Stone
Are any other cards possibly affected by this bug ?
Fellwar Stone does not appear to interact correctly with Tree of Tales
Specifically with all five of them in play, Fellwar Stone produces all colors except for green, colorless, and also a second colorless (artifact colorless?). When isolated, Tree of Tales is giving it two colorless mana types instead of green.
Possibly related to Korath's manastripe post?
Which card did behave improperly ?
Tree of Tales or Fellwar Stone
Which update are you using?(date,name)Which type(Duel,Gauntlet,Sealed Deck)
Odyssey v2
What exactly should be the correct behavior/interaction ?
Fellwar Stone
Are any other cards possibly affected by this bug ?
Last edited by Aswan jaguar on 01 Oct 2013, 18:32, edited 4 times in total.
Reason: fixed/closed
Reason: fixed/closed
-
HarlequinCasts - Posts: 922
- Joined: 07 May 2013, 14:33
- Has thanked: 68 times
- Been thanked: 30 times
Re: Fellwar Stone & Tree of Tales
by Korath » 29 Jul 2013, 10:46
The second stripe is artifact mana, yes; compare its position to the stripe on a Mishra's Workshop and on a normal colorless-producing land.
Fellwar Stone's still hardcoded. There's some weirdness going on in its EVENT_ACTIVATE handler that I don't quite follow (maybe so it auto-picks the right color mana to generate?), but the way it gets its mana stripes is fairly straightforward: there's a cache at dword_60A568 of the mana types player0's lands can generate, and one at dword_60A569 of those player1's can. (Specifically, they're each a bitwise or of the card_instance_t::card_color of all of the player's lands in play.) The appropriate cache is copied into the fellwar's card_instance_t::mana_color in response to an EVENT_VARIABLE_MANA_SRC, and that's fed into a call to choose_a_color_exe() during activation.
Fellwar Stone's still hardcoded. There's some weirdness going on in its EVENT_ACTIVATE handler that I don't quite follow (maybe so it auto-picks the right color mana to generate?), but the way it gets its mana stripes is fairly straightforward: there's a cache at dword_60A568 of the mana types player0's lands can generate, and one at dword_60A569 of those player1's can. (Specifically, they're each a bitwise or of the card_instance_t::card_color of all of the player's lands in play.) The appropriate cache is copied into the fellwar's card_instance_t::mana_color in response to an EVENT_VARIABLE_MANA_SRC, and that's fed into a call to choose_a_color_exe() during activation.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: Fellwar Stone & Tree of Tales
by Gargaroz » 29 Jul 2013, 12:45
Well, I did a new code, and now follows the standard protocol like Reflecting Pool, or the more similar Sylvok Explorer.
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Gargaroz
- Programmer
- Posts: 7097
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 595 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Aswan jaguar » 29 Jul 2013, 17:06
Ancient Den and Tree of Tales if they are on your opponents battlefield are causing Fellwar Stone to cease working,you tap it,it taps but no menu appears and no mana is produced.
1- Ancient Den adds to Fellwar Stone 3 Mana Stripes!(colourless,BLACK!!!,Artifact) and probably that indicates the bug (the csv values are fine though)
2- Tree of Tales adds 2 Mana stripes to Fellwar Stone (Colourless and Artifact).
Could it be that they occupy hardcoded slots in the exe?
All Artifact lands call the code of Basic Lands.
1- Ancient Den adds to Fellwar Stone 3 Mana Stripes!(colourless,BLACK!!!,Artifact) and probably that indicates the bug (the csv values are fine though)
2- Tree of Tales adds 2 Mana stripes to Fellwar Stone (Colourless and Artifact).
Could it be that they occupy hardcoded slots in the exe?
All Artifact lands call the code of Basic Lands.
---
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: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Korath » 29 Jul 2013, 17:41
All six of these cards have their mana_colors hardcoded to their ids in get_abilities().
The artifact lands, predictably enough, are Vault of Whispers to black, Seat of the Synod to blue, Tree of Tales to green, Great Furnace to red, and Ancient Den to white. (This is why they have the correct mana stripe when they're in play, but - except for Tree of Tales - only colorless while in hand, I assume because the cards are marked colorless in one of the csvs.) What's interesting is what comes after - for cards that fall through to get_color_of_mana_produced_by_id(), cards originally coded in the exe, cards correctly injected into get_abilities(), and cards that use the default of card_data_t::color, their card_instance_t::card_color is then set to mana_color. Tree of Tales and Ancient Den get their ids assigned there instead, which happen to match up to the colorless/artifact and colorless/black/artifact bits.
The good news is that their hardcoding comes after the call to get_color_of_mana_produced_by_id() in C. If the two broken ones get handled in there, their card_color should be set correctly; the checks for their specific ids will never be reached.
Fellwar Stone, on the other hand, assumes that card_instance_t::mana_color has already been set outside of get_abilities(), and it's checked for before the call to get_color_of_mana_produced_by_id(). If you're relying on that to set its colors, it'll never get there.
The artifact lands, predictably enough, are Vault of Whispers to black, Seat of the Synod to blue, Tree of Tales to green, Great Furnace to red, and Ancient Den to white. (This is why they have the correct mana stripe when they're in play, but - except for Tree of Tales - only colorless while in hand, I assume because the cards are marked colorless in one of the csvs.) What's interesting is what comes after - for cards that fall through to get_color_of_mana_produced_by_id(), cards originally coded in the exe, cards correctly injected into get_abilities(), and cards that use the default of card_data_t::color, their card_instance_t::card_color is then set to mana_color. Tree of Tales and Ancient Den get their ids assigned there instead, which happen to match up to the colorless/artifact and colorless/black/artifact bits.
The good news is that their hardcoding comes after the call to get_color_of_mana_produced_by_id() in C. If the two broken ones get handled in there, their card_color should be set correctly; the checks for their specific ids will never be reached.
Fellwar Stone, on the other hand, assumes that card_instance_t::mana_color has already been set outside of get_abilities(), and it's checked for before the call to get_color_of_mana_produced_by_id(). If you're relying on that to set its colors, it'll never get there.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Gargaroz » 30 Jul 2013, 00:07
Well, "get_color_of_mana_producer" looks at "cards_data[].card_color", so it'll get the right color, if it's properly set in "ct_all".
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Gargaroz
- Programmer
- Posts: 7097
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 595 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Korath » 30 Jul 2013, 01:11
I can't find a function by that name, nor anything similar (other than get_color_of_mana_produced_by_id(), which returns -1 for ids it doesn't recognize). Point me at it?
It's true that get_abilities() will fall back to card_color for ids it doesn't have a special case for, but it does special-case Ancient Den and Tree of Tales, and special-cases them wrongly.
It's true that get_abilities() will fall back to card_color for ids it doesn't have a special case for, but it does special-case Ancient Den and Tree of Tales, and special-cases them wrongly.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by HarlequinCasts » 30 Jul 2013, 02:12
Yes! I forgot this was the exact situation that caused me to start testing. Ancient Den and Tree of Tales causing Fellwar Stone to stop working even with other basic lands in play.Aswan jaguar wrote:Ancient Den and Tree of Tales if they are on your opponents battlefield are causing Fellwar Stone to cease working,you tap it,it taps but no menu appears and no mana is produced.
-
HarlequinCasts - Posts: 922
- Joined: 07 May 2013, 14:33
- Has thanked: 68 times
- Been thanked: 30 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Gargaroz » 30 Jul 2013, 13:14
Korath, I meant "get_color_of_mana_produced_by_id()". And it's directly accessing to "card_data" when dealing with Reflecting Pool, Fellwar Stone (now) and Sylvok Explorer, so there shouldn't be problem, right ?
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Gargaroz
- Programmer
- Posts: 7097
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 595 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Korath » 30 Jul 2013, 18:28
Fellwar Stone still looks like it won't ever call that function due to its special casing in get_abilities(), but I could be wrong.
Ancient Den and Tree of Tales both definitely need to be handled by get_color_of_mana_produced_by_id(), though - other things look at their card_instance_t::card_color, too. (The hardcoded version of Mana Flare, for example, though I'll probably change it.) And if they're both fixed, then original problem with the hardcoded Fellwar Stone will be, too.
Ancient Den and Tree of Tales both definitely need to be handled by get_color_of_mana_produced_by_id(), though - other things look at their card_instance_t::card_color, too. (The hardcoded version of Mana Flare, for example, though I'll probably change it.) And if they're both fixed, then original problem with the hardcoded Fellwar Stone will be, too.
-
Korath - DEVELOPER
- Posts: 3708
- Joined: 02 Jun 2013, 05:57
- Has thanked: 496 times
- Been thanked: 1108 times
Re: [fixed by Gargaroz]Fellwar Stone & Tree of Tales
by Aswan jaguar » 03 Aug 2013, 13:26
@Gargaroz have you seen this last post by Korath that says that if Ancient Den and Tree of Tales get fixed (he says how) Fellwar Stone is going to work fine and won't need new code,besides the real problem-bug was the 2 lands not the hardcoded Fellwar Stone.
---
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: [new info?]Fellwar Stone & Tree of Tales
by Gargaroz » 04 Aug 2013, 15:12
Well, I prefer to have it recoded, we could better handle the "special cases" (like "filter lands").
----
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Current / medium term task: adjusting the code for making Misdirection and such usable
- Long term task: inserting all the good stuff I left out from the "Golden Years" mod
- Gargaroz
- Programmer
- Posts: 7097
- Joined: 06 Nov 2009, 11:11
- Has thanked: 82 times
- Been thanked: 595 times
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: Google [Bot] and 33 guests