It is currently 18 Sep 2025, 20:42
   
Text Size

Bug Reports (snapshot builds)

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Re: Bug Reports (snapshot builds)

Postby Bog Wraith » 11 Jun 2015, 18:12

Agetian wrote:
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.
Fixed (r29624). The fix is a bit radical, let me know if there are any issues.

- Agetian
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!
'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.
User avatar
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)

Postby 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.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 13 Jun 2015, 20:22

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.
Not sure how to fix this one, pushed it to the tracker for now. Does anyone have an idea how to correct this?

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby friarsol » 14 Jun 2015, 01:20

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?
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.

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)

Postby excessum » 14 Jun 2015, 01:40

Agetian wrote:
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.
Fixed (r29624). The fix is a bit radical, let me know if there are any issues.

- Agetian
This seems to be working with most cards. The only exception I found so far is the -X/-X from Profane Command.
excessum
 
Posts: 177
Joined: 21 Oct 2013, 02:30
Has thanked: 0 time
Been thanked: 19 times

Re: Bug Reports (snapshot builds)

Postby 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
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby 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
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby 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.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 15 Jun 2015, 05:13

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.
Seems true for any bounced creature cast via Suspend... Sadly, haven't found the cause for it yet.
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... :( (r29662). The problem is - suspend-cast bounced cards do not set the zone correctly somewhere deep in the code such that they end up being in the hand but they're treated as if they were on the battlefield. That's why the checkZoneRestrictions check in SpellAbilityRestriction.java fails and the card becomes uncastable. The only way I've found to make it work is to change the zone of the original (uncopied) card in ChangeZone early, in that case it's later processed correctly. I tried experimenting with the various view-updating functions (updateStateForView, updating the zone for view, etc.) but none of that helped. Moreover, if the suspend-cast card does *not* get copied inside ChangeZone at all (e.g. if I route if through the simple "copied = c" code path), then Unsummon doesn't work on it at all (?), the spell resolves but the card is not returned to hand. I'm baffled as to why this code behaves so strangely with suspend-cast bounced cards in particular, but if anyone is good with this area of code, please help!

- Agetian
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby 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.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby Agetian » 19 Jun 2015, 06:06

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.
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.

- 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)

Postby 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
Agetian
Programmer
 
Posts: 3489
Joined: 14 Mar 2011, 05:58
Has thanked: 684 times
Been thanked: 572 times

Re: Bug Reports (snapshot builds)

Postby 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
Hanmac
 
Posts: 954
Joined: 06 May 2013, 18:44
Has thanked: 229 times
Been thanked: 158 times

Re: Bug Reports (snapshot builds)

Postby Marek14 » 26 Jun 2015, 08:09

The ability of Rekindled Flame should be optional.
Marek14
Tester
 
Posts: 2773
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 303 times

Re: Bug Reports (snapshot builds)

Postby tojammot » 29 Jun 2015, 11:58

March of the Machines + Mycosynth Lattice combo doesn't work if the former came first.
tojammot
 
Posts: 195
Joined: 06 Jun 2008, 07:38
Has thanked: 1 time
Been thanked: 3 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 21 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 21 users online :: 0 registered, 0 hidden and 21 guests (based on users active over the past 10 minutes)
Most users ever online was 7967 on 09 Sep 2025, 23:08

Users browsing this forum: No registered users and 21 guests

Login Form