It is currently 06 Sep 2025, 15:45
   
Text Size

Developing Bugs

Post MTG Forge Related Programming Questions Here

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

Re: Developing Bugs

Postby 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

Code: Select all
     * @param forceAnte Forces ante on or off no matter what your preferences
     */
    private void newGame(final Game game, final boolean canRandomFoil) {
Sooo my question is.. what happened to this parameter? I added this parameter previously to allow certain formats to Force ante on or off (basically allowing a specific format to ignore a user's preference for ante). Most specifically I added it for the Sorin vs Tibalt Duel deck challenge, that needed to disable Ante for the match, since the potential cards you were "anteing" didn't actually belong to you.


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

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

Postby 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

Postby friarsol » 30 Dec 2013, 21:54

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.
Thanks I'll check it out. Hopefully I can reuse it with the Ownership exchanging cards that remain.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developing Bugs

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

Re: Developing Bugs

Postby 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

Postby friarsol » 31 Dec 2013, 13:21

Max mtg wrote:Does that refer to quest mode or constructed one?
Ah sorry. Quest. Not sure about Constructed.
friarsol
Global Moderator
 
Posts: 7593
Joined: 15 May 2010, 04:20
Has thanked: 243 times
Been thanked: 965 times

Re: Developing Bugs

Postby Max mtg » 31 Dec 2013, 18:41

friarsol wrote:
Max mtg wrote:Does that refer to quest mode or constructed one?
Ah sorry. Quest. Not sure about Constructed.
Anyway, I believe it works correctly after r24112 in either mode.

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

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

Re: Developing Bugs

Postby 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)
UPD: Skin is named 'Smith'. The sprite_icons file does not contain pixels at (70, 290) and (70,290) - hardcoded positions for targeting arrows colors. Agetian added 2 more colors in sprite_icons, but didn't test all skins.
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

Postby 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 :D Anyhow, fixed in r24857. Thanks for the heads-up! :) And looks like now I know what your favorite Forge skin is. :D

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

Re: Developing Bugs

Postby 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
User avatar
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

Postby Agetian » 17 Feb 2014, 05:55

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?
Hmm, probably not, I think they're the only thing that is mandatory.

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

Re: Developing Bugs

Postby Sloth » 12 Mar 2014, 22:56

When i try to start a constructed match against or with an quest challenge deck, i get:

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)
looks like the quest challenges as items are named quest1,...,quest29, but when loading the decks they are supposed to have their title as name (for example "The King's Contest").

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.
User avatar
Sloth
Programmer
 
Posts: 3498
Joined: 23 Jun 2009, 19:40
Has thanked: 125 times
Been thanked: 507 times

Re: Developing Bugs

Postby 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.
mark
 
Posts: 138
Joined: 28 Dec 2011, 11:32
Has thanked: 6 times
Been thanked: 11 times

PreviousNext

Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 59 guests

Main Menu

User Menu

Our Partners


Who is online

In total there are 59 users online :: 0 registered, 0 hidden and 59 guests (based on users active over the past 10 minutes)
Most users ever online was 7303 on 15 Jul 2025, 20:46

Users browsing this forum: No registered users and 59 guests

Login Form