Developing Bugs
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins
Re: Developing Bugs
by friarsol » 29 Dec 2013, 23:18
Max, I see you moving around a bunch of stuff related to newGame and Match, but now I see this in forge-gui\...\game\Match.java
In addition, if you are playing in this area, I'd like to re-state a bug that cards lost to ante in earlier games are not removed from your deck in later games.
i.e. I lost a Balance to ante game 1 (the only one in my deck) but then in game 2, I see Balance in my library when I'm tutoring for something else. This should not be the game.
Edit: Ok, it looks like the OverrideAnte is in Match.java now, the phanton param comment just never got cleared out of the NewGame function, when the same parameter got moved.
- Code: Select all
* @param forceAnte Forces ante on or off no matter what your preferences
*/
private void newGame(final Game game, final boolean canRandomFoil) {
In addition, if you are playing in this area, I'd like to re-state a bug that cards lost to ante in earlier games are not removed from your deck in later games.
i.e. I lost a Balance to ante game 1 (the only one in my deck) but then in game 2, I see Balance in my library when I'm tutoring for something else. This should not be the game.
Edit: Ok, it looks like the OverrideAnte is in Match.java now, the phanton param comment just never got cleared out of the NewGame function, when the same parameter got moved.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Developing Bugs
by Max mtg » 30 Dec 2013, 10:38
the overrideAnte param remains in Match ctor, where it used to be,
the resulting useAnte variable is a field of Match class and does not need to be passed as a parameter to instance's methods.
It's in my nearest plans (before my NY vacation) to move ante executor from gui to Match, and fix the mentioned bug on the go.
the resulting useAnte variable is a field of Match class and does not need to be passed as a parameter to instance's methods.
It's in my nearest plans (before my NY vacation) to move ante executor from gui to Match, and fix the mentioned bug on the go.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Max mtg » 30 Dec 2013, 21:21
Sol, have a look at ante-ing now. I've finished the intended changes there, so it does take the card away and allows you to choose which of cards that you won should be added to deck.
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by friarsol » 30 Dec 2013, 21:54
Thanks I'll check it out. Hopefully I can reuse it with the Ownership exchanging cards that remain.Max mtg wrote:Sol, have a look at ante-ing now. I've finished the intended changes there, so it does take the card away and allows you to choose which of cards that you won should be added to deck.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Developing Bugs
by friarsol » 31 Dec 2013, 03:37
Hey Max,
It looks like the original deck isn't restored after the match ends. Example: In game 2 I sideboarded in a Tsunamai against a UW deck. When I opened up my deck back in the deck editor, the Tsunamai was in my main deck, and the card I sideboarded out was in my sideboard.
It looks like the original deck isn't restored after the match ends. Example: In game 2 I sideboarded in a Tsunamai against a UW deck. When I opened up my deck back in the deck editor, the Tsunamai was in my main deck, and the card I sideboarded out was in my sideboard.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Developing Bugs
by Max mtg » 31 Dec 2013, 04:36
Does that refer to quest mode or constructed one?
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by friarsol » 31 Dec 2013, 13:21
Ah sorry. Quest. Not sure about Constructed.Max mtg wrote:Does that refer to quest mode or constructed one?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Developing Bugs
by Max mtg » 31 Dec 2013, 18:41
Anyway, I believe it works correctly after r24112 in either mode.friarsol wrote:Ah sorry. Quest. Not sure about Constructed.Max mtg wrote:Does that refer to quest mode or constructed one?
Decks are now always copied when they are added to RegisteredPlayer, so that there'll remain an unchanged original deck for the subsequent games.
As for quest mode, the card loss code should handle all quest decks (and remove lost cards from those)
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Agetian » 14 Feb 2014, 15:23
A question about the diff between r24842 and r24843: the modification of draft rankings in r24843 gets rid of the apostrophes (') in card names for BNG and THS definitions. Interestingly, the previous draft rankings (e.g. M14 and older) have apostrophes in their definitions. So, which approach is correct? :\
P.S. Draft rankings seem to work fine in r24842 for cards with apostrophes in their name... haven't tried r24843 yet, will try that next.
EDIT: r24843 seems to work fine as well. Hmm, does it work both ways?
- Agetian
P.S. Draft rankings seem to work fine in r24842 for cards with apostrophes in their name... haven't tried r24843 yet, will try that next.
EDIT: r24843 seems to work fine as well. Hmm, does it work both ways?

- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by Max mtg » 15 Feb 2014, 19:58
Cannot start application (using that skin with dwarves) - after r24848
- Code: Select all
Read decks (500 ms): 25 constructed, 2 sealed, 1 draft, 3 cubes, 0 scheme, 0 planar, 0 commander.
main > java.lang.ArrayIndexOutOfBoundsException: Coordinate out of bounds!
at sun.awt.image.ByteInterleavedRaster.getDataElements(Unknown Source)
at java.awt.image.BufferedImage.getRGB(Unknown Source)
at forge.gui.toolbox.FSkin$Colors.updateColor(FSkin.java:405)
at forge.gui.toolbox.FSkin$Colors.updateAll(FSkin.java:383)
at forge.gui.toolbox.FSkin.loadFull(FSkin.java:1448)
at forge.control.FControl.initialize(FControl.java:189)
at forge.view.Main.main(Main.java:42)
Single class for single responsibility.
- Max mtg
- Programmer
- Posts: 1997
- Joined: 02 Jul 2011, 14:26
- Has thanked: 173 times
- Been thanked: 334 times
Re: Developing Bugs
by Agetian » 16 Feb 2014, 04:13
@ Max: Oops, sorry, my bad - the irony is that I tested this on pretty much all skins except Smith (and maybe one other skin, forgot which), and it was Smith that happened to have an odd sprite_icons compared to everything else
Anyhow, fixed in r24857. Thanks for the heads-up!
And looks like now I know what your favorite Forge skin is. 
- Agetian



- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by moomarc » 17 Feb 2014, 05:30
As far as I know, those color swatches are the only part of the skin that won't revert to the default skin if there is nothing at the indicated coordinates. Are you aware of any other parts that have to be in each skin sprite?
-Marc
-
moomarc - Pixel Commander
- Posts: 2091
- Joined: 04 Jun 2010, 15:22
- Location: Johannesburg, South Africa
- Has thanked: 371 times
- Been thanked: 372 times
Re: Developing Bugs
by Agetian » 17 Feb 2014, 05:55
Hmm, probably not, I think they're the only thing that is mandatory.moomarc wrote:As far as I know, those color swatches are the only part of the skin that won't revert to the default skin if there is nothing at the indicated coordinates. Are you aware of any other parts that have to be in each skin sprite?
- Agetian
- Agetian
- Programmer
- Posts: 3489
- Joined: 14 Mar 2011, 05:58
- Has thanked: 684 times
- Been thanked: 572 times
Re: Developing Bugs
by Sloth » 12 Mar 2014, 22:56
When i try to start a constructed match against or with an quest challenge deck, i get:
The best solution would be to change their item names to the titles, but i wasn't able to figure out where to look in the UI jungle.
- NoSuchElementException | Open
- Code: Select all
java.util.NoSuchElementException
at com.google.common.collect.AbstractIterator.next(AbstractIterator.java:154)
at com.google.common.collect.Iterators.find(Iterators.java:712)
at com.google.common.collect.Iterables.find(Iterables.java:642)
at forge.gui.deckchooser.DeckgenUtil.getQuestEvent(DeckgenUtil.java:98)
at forge.gui.deckchooser.FDeckChooser.getPlayer(FDeckChooser.java:227)
at forge.gui.home.sanctioned.CSubmenuConstructed.startGame(CSubmenuConstructed.java:193)
at forge.gui.home.sanctioned.CSubmenuConstructed.access$3(CSubmenuConstructed.java:186)
at forge.gui.home.sanctioned.CSubmenuConstructed$2.actionPerformed(CSubmenuConstructed.java:158)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$200(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.awt.EventQueue$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.awt.EventQueue$4.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
The best solution would be to change their item names to the titles, but i wasn't able to figure out where to look in the UI jungle.
-
Sloth - Programmer
- Posts: 3498
- Joined: 23 Jun 2009, 19:40
- Has thanked: 125 times
- Been thanked: 507 times
Re: Developing Bugs
by mark » 25 Mar 2014, 14:34
There is a bug with Yawgmoth's Will.
Play the card, then select a card to play from the grave, but as you are asked to pay the mana cost, click cancel - the card disappears from the grave.
Play the card, then select a card to play from the grave, but as you are asked to pay the mana cost, click cancel - the card disappears from the grave.
Who is online
Users browsing this forum: No registered users and 59 guests