It is currently 14 Nov 2019, 19:07
   
Text Size

Developing Bugs

Post MTG Forge Related Programming Questions Here

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

Re: Developing Bugs

Postby Agetian » 29 Jan 2015, 03:29

friarsol wrote:Uba Mask should probably only be granting the static trigger to the card that it remembers exactly, including timestamp. I think this is where the main issue is. It just remembers the card by ID since IDs don't change when moving zones.
Yes, I agree that this should help Uba Mask properly remember/forget the cards that are exiled with it. I still can't understand the mystery of clearing the (already empty) triggers on the exiled card in order to make the card castable again from the exile - is it also because the timestamp changes but the ID of the card remains the same?..

- Agetian
Agetian
Programmer
 
Posts: 3359
Joined: 14 Mar 2011, 05:58
Has thanked: 644 times
Been thanked: 499 times

Re: Developing Bugs

Postby friarsol » 29 Jan 2015, 04:31

Are you sure it's not the "getCurrentState()" that's causing this effect?
friarsol
Global Moderator
 
Posts: 7477
Joined: 15 May 2010, 04:20
Has thanked: 241 times
Been thanked: 936 times

Re: Developing Bugs

Postby Agetian » 29 Jan 2015, 11:24

friarsol wrote:Are you sure it's not the "getCurrentState()" that's causing this effect?
I tested this assumption and came to a conclusion that it's not the case... it's indeed the trigger-clearing call that produces the effect.

By the way, one more related observation: I noticed that without any tweaks like the one mentioned above, if you try casting a spell from the exile, then cancel it, it disappears from Uba Mask's remembered list (and that's why it becomes uncastable). Making the clear triggers call tweak above seems to fully recreate Uba Mask's list, adding even cards that should theoretically no longer be on that list (already played, for example).

- Agetian
Agetian
Programmer
 
Posts: 3359
Joined: 14 Mar 2011, 05:58
Has thanked: 644 times
Been thanked: 499 times

Re: Developing Bugs

Postby Marek14 » 02 Feb 2015, 09:46

Marek14 wrote:
elcnesh wrote:Dan, I'm planning some changes to the structure of the Trackable objects, namely getting rid of the static part and delegating that responsibility to a Tracker object associated to a single Game. This is necessary for a single computer to run multiple Games simultaneously, which hopefully can be done sometime in the future. Do you know a priori of anything that might break? So far everything seems to work just fine in my tests, but I thought I'd just quickly check it with you.
Oh, that might allow to implement Ass Whuppin' :D
BTW, more seriously, could this also allow for Shahrazad?
Marek14
Tester
 
Posts: 2667
Joined: 07 Jun 2008, 07:54
Has thanked: 0 time
Been thanked: 270 times

Re: Developing Bugs

Postby elcnesh » 02 Feb 2015, 10:17

Well theoretically, yes, although I'd like to give the card a Chaos Orb treatment... Just imagine the number of bugs we'd get just to implement a card that no-one really likes :P (or at least, a lot of players hate)
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

Re: Developing Bugs

Postby friarsol » 02 Feb 2015, 15:15

elcnesh wrote:Well theoretically, yes, although I'd like to give the card a Chaos Orb treatment... Just imagine the number of bugs we'd get just to implement a card that no-one really likes :P (or at least, a lot of players hate)
What are you talking about, CHAOS ORB IS AWESOME.

http://archive.wizards.com/Magic/magazi ... arcana/348
friarsol
Global Moderator
 
Posts: 7477
Joined: 15 May 2010, 04:20
Has thanked: 241 times
Been thanked: 936 times

Re: Developing Bugs

Postby hervebronnimann » 04 Feb 2015, 02:16

By the way, here's a bug that's been there ever since I started playing with Forge. When I get mana-screwed, and am left with more than 7 cards in my hand, I can keep them until the next turn (i.e., skip the discard at the End Turn phase) if I press Enter continuously. Did anyone else notice that? It's very easily reproducible, just don't play any land and keep your cards.

I don't know why it happens in terms of the code, but I imagine several keystrokes are being enqueued and resolved at the same time, and there must be some synchronization missing between the gameplay and the gui. I'm happy to learn about that part of the code and help fixing it, I imagine it may not be so simple though...
hervebronnimann
 
Posts: 20
Joined: 29 Nov 2014, 22:34
Has thanked: 1 time
Been thanked: 0 time

Re: Developing Bugs

Postby swordshine » 10 Feb 2015, 08:49

elcnesh wrote:swordshine, in r28689 you changed the way ZoneChange Triggers work. I believe this has caused some bugs with triggers running twice or not at all (see viewtopic.php?f=26&t=16670#p171880), which is probably related to the fact that ZC Triggers do not have a specified TriggerZone, since the triggering object is the LKI of the one leaving its zone. I'm not entirely sure how this code behaves or should behave, but I do believe its related to this commit.
Those ZCTriggers I changed in r28689 are actually commands (they didn't use the stack). I didn't change ZoneChange Triggers.
Edit: Actually, when I tested some FRF cards during the spoiler season, I encountered the same bugs occasionally (Whisperwood Elemental).
swordshine
 
Posts: 682
Joined: 11 Jul 2010, 02:37
Has thanked: 116 times
Been thanked: 87 times

Re: Developing Bugs

Postby elcnesh » 11 Feb 2015, 14:53

swordshine wrote:
elcnesh wrote:swordshine, in r28689 you changed the way ZoneChange Triggers work. I believe this has caused some bugs with triggers running twice or not at all (see viewtopic.php?f=26&t=16670#p171880), which is probably related to the fact that ZC Triggers do not have a specified TriggerZone, since the triggering object is the LKI of the one leaving its zone. I'm not entirely sure how this code behaves or should behave, but I do believe its related to this commit.
Those ZCTriggers I changed in r28689 are actually commands (they didn't use the stack). I didn't change ZoneChange Triggers.
Edit: Actually, when I tested some FRF cards during the spoiler season, I encountered the same bugs occasionally (Whisperwood Elemental).
Ok, good to know.

Dan, I think you're still compiling the Android version against an old Forge version... The changes you made in r28816 actually cause a compile error for me, since I added the new Tracker argument to the CardView constructor (although admittedly a constructor not requiring one would be cleaner than passing it null all the time...)
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

Re: Developing Bugs

Postby drdev » 12 Feb 2015, 05:33

Sorry about that. Feel free to fix it and I'll be sure to update the module versions before making further changes.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Developing Bugs

Postby elcnesh » 07 Apr 2015, 09:42

Dan, isn't it tricky to compare Replacement effects and Triggers by toString for determining whether to ask for ordering them? I'm not sure if there can be a situation where the strings are the same, but for example the sources of the effects are different, and the order can still matter...

(Although I'm definitely in favour of this change if there's no difference, can save a lot of clicks!)
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

Re: Developing Bugs

Postby drdev » 07 Apr 2015, 12:20

elcnesh wrote:Dan, isn't it tricky to compare Replacement effects and Triggers by toString for determining whether to ask for ordering them? I'm not sure if there can be a situation where the strings are the same, but for example the sources of the effects are different, and the order can still matter...

(Although I'm definitely in favour of this change if there's no difference, can save a lot of clicks!)
I can't think of any case where the string value would be the same and they wouldn't function the same. We use the string value of triggered abilities for auto-yields as well so that auto-yielding one auto-yields all with the same string value. I see this as being no different.

Besides, all you have to go by to decide the order manually is the string value, so if they're all the same, there's nothing useful you can really do to differentiate your picks. So the system might as well do it for you at that point.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Developing Bugs

Postby squee1968 » 07 Apr 2015, 14:07

I don't think this is working as intended when multiple exalted triggers going on the stack.
squee1968
 
Posts: 189
Joined: 18 Nov 2011, 03:28
Has thanked: 107 times
Been thanked: 24 times

Re: Developing Bugs

Postby drdev » 07 Apr 2015, 16:51

squee1968 wrote:I don't think this is working as intended when multiple exalted triggers going on the stack.
Is the text of all the triggers the same? If even a single trigger is different, you'll have to order them all.
drdev
Programmer
 
Posts: 1958
Joined: 27 Jul 2013, 02:07
Has thanked: 189 times
Been thanked: 565 times

Re: Developing Bugs

Postby elcnesh » 20 Apr 2015, 11:11

@Dan, r29237: you added a lot of switch-case statements to RandomDeckGenerator that my IDE picks out because they're all falling through, ie. no breaks. Is this supposed to happen? Judging from the code I'd say no...

@Sol, 29256: sorry about that throw in RepeatEachEffect, not quite sure why I added it. I think my IDE found that an NPE was going to be thrown and I sought to prevent it, but should definitely have tested before committing. Also, preventing one exception by throwing another isn't really helping a lot :P
elcnesh
 
Posts: 290
Joined: 16 May 2014, 15:11
Location: Netherlands
Has thanked: 34 times
Been thanked: 92 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 6 guests


Who is online

In total there are 6 users online :: 0 registered, 0 hidden and 6 guests (based on users active over the past 10 minutes)
Most users ever online was 427 on 11 Nov 2019, 13:00

Users browsing this forum: No registered users and 6 guests

Login Form