Bug Reports (snapshot builds)
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Bug Reports (snapshot builds)
by Bog Wraith » 11 Jun 2015, 18:12
Ok, I will keep an eye on the interaction of Precursor Golem with the different removal/damage spells that I can hurl at it. Thanks!Agetian wrote:Fixed (r29624). The fix is a bit radical, let me know if there are any issues.Bog Wraith wrote:r29619
Cast a Banefire for 3x at a Precursor Golem destroying it. Both tokens should have gone with it but as you can see, the Precursor Golem is in the graveyard while the two tokens survive on the battlefield. I should have been able to attack with a clean board on my opponents side. It looks like the 3 damage was applied to the Precursor Golem which is id'd as #271, all 3 times instead of having the other 2 times being targeted at the tokens.
- Agetian
'Twas in the bogs of Cannelbrae
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
My mate did meet an early grave
'Twas nothing left for us to save
In the peat-filled bogs of Cannelbrae.
-
Bog Wraith - Global Mod 1 (Ret)
- Posts: 1108
- Joined: 28 May 2008, 22:40
- Location: Shandalar
- Has thanked: 425 times
- Been thanked: 153 times
Re: Bug Reports (snapshot builds)
by Marek14 » 13 Jun 2015, 15:11
I played a creature with Llanowar Reborn on the battlefield. Opponent killed it. I tried to answer the Graft prompt with "yes" and the counter was removed from Llanowar Reborn, which is incorrect -- moving counters has some fairly strict guidelines and if the counter can't be put on the destination card for whatever reason, than it can't be removed from the source card either.
Re: Bug Reports (snapshot builds)
by Agetian » 13 Jun 2015, 20:22
Not sure how to fix this one, pushed it to the tracker for now. Does anyone have an idea how to correct this?Marek14 wrote:I played a creature with Llanowar Reborn on the battlefield. Opponent killed it. I tried to answer the Graft prompt with "yes" and the counter was removed from Llanowar Reborn, which is incorrect -- moving counters has some fairly strict guidelines and if the counter can't be put on the destination card for whatever reason, than it can't be removed from the source card either.
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by friarsol » 14 Jun 2015, 01:20
Seems related to the Animate Dead issue from a week or two ago. The card the getDefinedCards returns is actually the current card state, and the CountersMoveEffect doesn't check a) if the card is the same timestamped version of the one it expects. (i.e. not necessarily the current state of the card) and b) if that card is in the "expected" zone, in general this for MoveCounters this is going to be the Battlefield.Agetian wrote:Not sure how to fix this one, pushed it to the tracker for now. Does anyone have an idea how to correct this?
This might be a scenario where Triggers need to differentiate, whether or not you need the current state of the triggered card, or the actual card that triggered.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by excessum » 14 Jun 2015, 01:40
This seems to be working with most cards. The only exception I found so far is the -X/-X from Profane Command.Agetian wrote:Fixed (r29624). The fix is a bit radical, let me know if there are any issues.Bog Wraith wrote:r29619
Cast a Banefire for 3x at a Precursor Golem destroying it. Both tokens should have gone with it but as you can see, the Precursor Golem is in the graveyard while the two tokens survive on the battlefield. I should have been able to attack with a clean board on my opponents side. It looks like the 3 damage was applied to the Precursor Golem which is id'd as #271, all 3 times instead of having the other 2 times being targeted at the tokens.
- Agetian
Re: Bug Reports (snapshot builds)
by Agetian » 14 Jun 2015, 04:28
@ Friarsol: Thanks a lot for the clarification and for the fix!
About the issue mentioned by Excessum (with Profane Command not being copied by Precursor Golem even if it's the only card targeted): this is interesting - I'm working on it and there seem to be two related issues: one is that TriggerSpellAbilityCast doesn't always count the number of targeted objects correctly (it can count the same target twice if the same object is targeted by two different subabilities), and even if that part is remedied, then AB CopySpellAbility only copies the first part of the spell but not the subabilities (e.g. if Profane Command is cast in the "-X/-X" and "gains Fear" mode, then only the "-X/-X" part is copied).Still looking into it...
EDIT: Tried to fix this in r29653. This should take care of both of the issues above for the most part. However, there is still at least one remaining issue that I was unable to fix - Radiate does not even detect the possibility of copying a one-target Profane Command for some reason, and its code path does not go through any of the target number detection branches that I've found. I tried trapping some other code but the breakpoints did not hit. Any ideas where it might be acquiring the (wrong) target number information from?
- Agetian
About the issue mentioned by Excessum (with Profane Command not being copied by Precursor Golem even if it's the only card targeted): this is interesting - I'm working on it and there seem to be two related issues: one is that TriggerSpellAbilityCast doesn't always count the number of targeted objects correctly (it can count the same target twice if the same object is targeted by two different subabilities), and even if that part is remedied, then AB CopySpellAbility only copies the first part of the spell but not the subabilities (e.g. if Profane Command is cast in the "-X/-X" and "gains Fear" mode, then only the "-X/-X" part is copied).
EDIT: Tried to fix this in r29653. This should take care of both of the issues above for the most part. However, there is still at least one remaining issue that I was unable to fix - Radiate does not even detect the possibility of copying a one-target Profane Command for some reason, and its code path does not go through any of the target number detection branches that I've found. I tried trapping some other code but the breakpoints did not hit. Any ideas where it might be acquiring the (wrong) target number information from?
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by Agetian » 14 Jun 2015, 12:36
r29657: I tried to fix the Profane Command/other similar spells being copyable by Radiate, however, my fix may be too permissive and may have unwanted side effects. If you think it's going to cause problems with some cases, please let me know.
- Agetian
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by friarsol » 15 Jun 2015, 03:49
r29659
AI bounced my Deep-Sea Kraken after it was cast via Suspend. Now it appears I'm unable to re-cast or re-suspend it.
AI bounced my Deep-Sea Kraken after it was cast via Suspend. Now it appears I'm unable to re-cast or re-suspend it.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Bug Reports (snapshot builds)
by Agetian » 15 Jun 2015, 05:13
Seems true for any bounced creature cast via Suspend... Sadly, haven't found the cause for it yet.friarsol wrote:r29659
AI bounced my Deep-Sea Kraken after it was cast via Suspend. Now it appears I'm unable to re-cast or re-suspend it.
EDIT: Pushed it to bug tracker and seems like I found the issue, investigating.
EDIT 2: After several hours of experimentation all I was able to achieve was implement a hacky workaround that works but that pollutes the code...

- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by Marek14 » 18 Jun 2015, 11:26
When flood counters from Quicksilver Fountain are removed, the lands stop being Islands, but they retain the ability to tap for blue mana.
Re: Bug Reports (snapshot builds)
by Agetian » 19 Jun 2015, 06:06
This appears to be a visual glitch (if you tap e.g. a Forest after the flood counters are removed it taps for green, but the card detail box says it taps for blue), looks like a missed updateStateForView call or something like that... if anybody knows where this should be updated, please assist.Marek14 wrote:When flood counters from Quicksilver Fountain are removed, the lands stop being Islands, but they retain the ability to tap for blue mana.
- Agetian
Last edited by Agetian on 19 Jun 2015, 06:28, edited 1 time in total.
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by Agetian » 19 Jun 2015, 06:17
I was investigating a bug report that indicated that Stolen Goods did not work correctly (did not allow the player to cast the card without paying its mana cost). In trying to fix it I revealed a rather big issue in the code that I'm not sure what to make of or how to fix.
Some cards that make you able to cast spells from cards owned by your opponent work using the MayPlay/MayPlayWithoutManaCost mechanism (which works but has a couple visual glitches - in particular, the ability is not visually cleared from the card after it stops being active; also, if you're able to cast a spell without paying its mana cost, you're also allowed to choose an option to cast it and pay its mana cost - this is probably incorrect). Some other cards try to make it work by adding a hidden keyword to the card, for example "May be played by opponent without paying its mana cost". While there are a couple references to these hidden keywords in the code, they're not hooked to anything that may allow them to work (for instance, they do not participate in checking for zone restrictions or for activator restrictions for spells). Therefore, they literally do nothing, and any card that currently depends on them does not work.
Is the MayPlay/MayPlayWithoutManaCost mechanism "newer" than the keywords? Was it supposed to replace it? Or were the keywords a part of the code that someone started and did not finish / that got broken later?... At any rate, I'm not sure what to do with these cards. I converted a couple of them to MayPlay/MayPlayWithoutManaCost (see r29676), and visual glitches aside, that at least makes them functional. If you have an idea how this *should* be implemented / what should be done, your assistance is highly welcome!
Will also track this on the bug tracker as Issue 19.
- Agetian
Some cards that make you able to cast spells from cards owned by your opponent work using the MayPlay/MayPlayWithoutManaCost mechanism (which works but has a couple visual glitches - in particular, the ability is not visually cleared from the card after it stops being active; also, if you're able to cast a spell without paying its mana cost, you're also allowed to choose an option to cast it and pay its mana cost - this is probably incorrect). Some other cards try to make it work by adding a hidden keyword to the card, for example "May be played by opponent without paying its mana cost". While there are a couple references to these hidden keywords in the code, they're not hooked to anything that may allow them to work (for instance, they do not participate in checking for zone restrictions or for activator restrictions for spells). Therefore, they literally do nothing, and any card that currently depends on them does not work.
Is the MayPlay/MayPlayWithoutManaCost mechanism "newer" than the keywords? Was it supposed to replace it? Or were the keywords a part of the code that someone started and did not finish / that got broken later?... At any rate, I'm not sure what to do with these cards. I converted a couple of them to MayPlay/MayPlayWithoutManaCost (see r29676), and visual glitches aside, that at least makes them functional. If you have an idea how this *should* be implemented / what should be done, your assistance is highly welcome!
Will also track this on the bug tracker as Issue 19.
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Bug Reports (snapshot builds)
by Hanmac » 19 Jun 2015, 07:19
still problems with status checking when sacrificing creatures,
it should check the last known status while it was on the battlefield.
===
Creature equipped with Mortarpod and soulbond to Nightshade Peddler got sacrificed by the effect of Mortarpod.
The damage should be deadly because of Deathtouch but its not.
---
might be related to my problem with Savra, Queen of the Golgari
and sacrificing a non-green/non-black creature while controlling Painter's Servant (and changing the color to green or black)
---
happens for Ashmouth Hound with Basilisk Collar too.
I attack, enemy blocks but before the damage effect resolves Ashmouth Hound is send to hand, but it had deathtouch while it was on the field
it should check the last known status while it was on the battlefield.
===
Creature equipped with Mortarpod and soulbond to Nightshade Peddler got sacrificed by the effect of Mortarpod.
The damage should be deadly because of Deathtouch but its not.
---
might be related to my problem with Savra, Queen of the Golgari
and sacrificing a non-green/non-black creature while controlling Painter's Servant (and changing the color to green or black)
---
happens for Ashmouth Hound with Basilisk Collar too.
I attack, enemy blocks but before the damage effect resolves Ashmouth Hound is send to hand, but it had deathtouch while it was on the field
Re: Bug Reports (snapshot builds)
by Marek14 » 26 Jun 2015, 08:09
The ability of Rekindled Flame should be optional.
Re: Bug Reports (snapshot builds)
by tojammot » 29 Jun 2015, 11:58
March of the Machines + Mycosynth Lattice combo doesn't work if the former came first.
Who is online
Users browsing this forum: No registered users and 21 guests