Phase Work
Post MTG Forge Related Programming Questions Here
Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
65 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Re: Phase Work
by friarsol » 02 Nov 2010, 18:06
Ugh. I had tested a few things with Whenever keyword without issues, so I was hoping it'd be fine. I'll have to dive into this later.
Timmer, it has nothing to do with that. There were some major changes to how the input structure works, the cancel button doesn't work because the displayed message isn't the active Input because of older code is assuming things about the state of the input than the newer code.
Timmer, it has nothing to do with that. There were some major changes to how the input structure works, the cancel button doesn't work because the displayed message isn't the active Input because of older code is assuming things about the state of the input than the newer code.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Phase Work
by slapshot5 » 02 Nov 2010, 18:23
Another bug, maybe related to the last:
If the Human casts Funeral Charm targeting himself (for the discard ability), you cannot discard. It tries to play the spell for the card you are trying to discard.
-slapshot5
If the Human casts Funeral Charm targeting himself (for the discard ability), you cannot discard. It tries to play the spell for the card you are trying to discard.
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Phase Work
by friarsol » 02 Nov 2010, 19:23
Sounds related. I think there may be an issue for any Input that occurs during the resolution of a SA.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Phase Work
by Hellfish » 02 Nov 2010, 19:46
Something I found while poking at Rebound:
The AI chooses not to play more than one zero-cost creature a turn,unless I play a spell during his turn but then see the next point.
In addition, the AI can place creatures (Ornithopter was the creature in question) on the stack while I still have an instant there.
The AI chooses not to play more than one zero-cost creature a turn,unless I play a spell during his turn but then see the next point.
In addition, the AI can place creatures (Ornithopter was the creature in question) on the stack while I still have an instant there.
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Phase Work
by friarsol » 02 Nov 2010, 20:18
Oh excellent. That is the issue where the Player was being told the stack wasn't empty when it was. Apparently, priority wasn't being reset properly (in some circumstances) to the AI.
However, I never experienced the Creature being put on top of my Instant. I don't have any code in the location to respond to spells on the stack so I'm not sure how it would be possible?
Sync to 3199 and if it's still going on give me a step-by-step so I can debug it over here.
However, I never experienced the Creature being put on top of my Instant. I don't have any code in the location to respond to spells on the stack so I'm not sure how it would be possible?
Sync to 3199 and if it's still going on give me a step-by-step so I can debug it over here.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Phase Work
by Hellfish » 02 Nov 2010, 20:31
I does not do that anymore, AFAICT. What's with you and being a step ahead of my bug reports? 
So now you're
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
Screaming for the blood of the cookie monster
Evil puppet demon of obesity
Time to change the tune of his fearful ballad
C is for "Lettuce," that's good enough for me
-

Hellfish - Programmer
- Posts: 1297
- Joined: 07 Jun 2009, 10:41
- Location: South of the Pumphouse
- Has thanked: 110 times
- Been thanked: 169 times
Re: Phase Work
by friarsol » 02 Nov 2010, 20:42
Haha. Actually, I was semi-aware of the problem but I your scenario was simple to reproduce and allowed me to figure out what the issue was. Plus I have been swamped in this code for the last two weeks, so I know where things sound like they are just be reading the issue.
Oh and slapshot, I believe I've fixed the issue with inputs being set during resolution of a spell. I was able to get the Kitsune and Funeral Charm to be functional.
Oh and slapshot, I believe I've fixed the issue with inputs being set during resolution of a spell. I was able to get the Kitsune and Funeral Charm to be functional.
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
Re: Phase Work
by slapshot5 » 03 Nov 2010, 03:17
Confirmed. Thanks.friarsol wrote:Oh and slapshot, I believe I've fixed the issue with inputs being set during resolution of a spell. I was able to get the Kitsune and Funeral Charm to be functional.
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Phase Work
by slapshot5 » 03 Nov 2010, 03:21
I've been having a bit of trouble reading the Phase description info at a glance.
Perhaps if we put a newline in there, it would be easier to read:
When I see computer and human on the same line, I find myself doing a double check on whose turn it actually is.
This is where the graphical phase bar may help a lot.
Anyone else in this boat?
-slapshot5
Perhaps if we put a newline in there, it would be easier to read:
- Code: Select all
StringBuilder sb = new StringBuilder();
sb.append(AllZone.Phase.getPlayerTurn()).append("'s ").append(phase);
sb.append("\n"); <=========================== added
sb.append(": ").append(player).append(" has priority for Spells or Abilities. Stack is ");
if (AllZone.Stack.size() != 0)
sb.append("not ");
sb.append("Empty");
AllZone.Display.showMessage(sb.toString());
When I see computer and human on the same line, I find myself doing a double check on whose turn it actually is.
This is where the graphical phase bar may help a lot.
Anyone else in this boat?
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Phase Work
by friarsol » 03 Nov 2010, 03:34
A graphical bar would be a huge boon there. Maybe we should just simplify the wording all the way down to:
Edit: That looks much more consistent. See what you think
- Code: Select all
Turn: Computer
Phase: Main1
Stack: Empty
Priority: Human
Edit: That looks much more consistent. See what you think
- Code: Select all
StringBuilder sb = new StringBuilder();
sb.append("Turn : ").append(AllZone.Phase.getPlayerTurn()).append("\n");
sb.append("Phase: ").append(phase).append("\n");
sb.append("Stack: ");
if (AllZone.Stack.size() != 0)
sb.append(AllZone.Stack.size()).append(" to Resolve.");
else
sb.append("Empty");
sb.append("\n");
sb.append("Priority: ").append(player);
AllZone.Display.showMessage(sb.toString());
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
- jeffwadsworth
- Super Tester Elite
- Posts: 1172
- Joined: 20 Oct 2010, 04:47
- Location: USA
- Has thanked: 287 times
- Been thanked: 70 times
Re: Phase Work
by slapshot5 » 03 Nov 2010, 04:58
I like it more
-slapshot5
I like it more.friarsol wrote:Edit: That looks much more consistent. See what you think
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Phase Work
by Chris H. » 03 Nov 2010, 12:31
I also had some trouble reading the new phase messages in the message panel. I pasted in the new code and rebuilt the project and tried it out while playing a game.
I like the new wording. At some point, it also might be nice to re-add the border color to these new phases. I think that people are getting used to the border color scheme. I think that we are still getting the red border during combat. It looks like we are missing the blue to denote a main phase and the orange to denote the other steps.
No rush, there may still be a few bugs to find and to fix.
I like the new wording. At some point, it also might be nice to re-add the border color to these new phases. I think that people are getting used to the border color scheme. I think that we are still getting the red border during combat. It looks like we are missing the blue to denote a main phase and the orange to denote the other steps.
No rush, there may still be a few bugs to find and to fix.
-

Chris H. - Forge Moderator
- Posts: 6320
- Joined: 04 Nov 2008, 12:11
- Location: Mac OS X Yosemite
- Has thanked: 644 times
- Been thanked: 643 times
Re: Phase Work
by slapshot5 » 03 Nov 2010, 12:40
The triggered ability of Blight is causing Exceptions:
-slapshot5
- Code: Select all
An error has occured. You can copy/paste this message or save it to a file.
Please report this, plus what you tried to do, to:
http://www.slightlymagic.net/forum/viewforum.php?f=26
If you don't want to register an account, you can mail it directly to
mtgerror@yahoo.com
null
Version:
Forge -- official beta: $Date: 2010-09-14 07:34:27 -0500 (Tue, 14 Sep 2010) $, SVN revision: $Revision: 2039 $
OS: Windows XP Version: 5.1 Architecture: x86
Java Version: 1.6.0_21 Vendor: Sun Microsystems Inc.
Detailed error trace:
java.util.ConcurrentModificationException
at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
at java.util.AbstractList$Itr.next(Unknown Source)
at forge.GameActionUtil.executeTapSideEffects(GameActionUtil.java:247)
at forge.Card.tap(Card.java:1694)
at forge.ComputerUtil.payManaCost(ComputerUtil.java:410)
at forge.ComputerUtil.playCards(ComputerUtil.java:41)
at forge.ComputerAI_General.playCards(ComputerAI_General.java:30)
at forge.ComputerAI_General.main2(ComputerAI_General.java:24)
at forge.ComputerAI_Input.think(ComputerAI_Input.java:65)
at forge.ComputerAI_Input.showMessage(ComputerAI_Input.java:31)
at forge.GuiInput.setInput(GuiInput.java:27)
at forge.GuiInput.update(GuiInput.java:21)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at forge.MyObservable.updateObservers(MyObservable.java:9)
at forge.Phase.nextPhase(Phase.java:395)
at forge.GuiDisplay4$25.actionPerformed(GuiDisplay4.java:776)
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$Actions.actionPerformed(Unknown Source)
at javax.swing.SwingUtilities.notifyAction(Unknown Source)
at javax.swing.JComponent.processKeyBinding(Unknown Source)
at javax.swing.JComponent.processKeyBindings(Unknown Source)
at javax.swing.JComponent.processKeyEvent(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.KeyboardFocusManager.redispatchEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(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.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)
-slapshot5
- slapshot5
- Programmer
- Posts: 1391
- Joined: 03 Jan 2010, 17:47
- Location: Mac OS X
- Has thanked: 25 times
- Been thanked: 68 times
Re: Phase Work
by friarsol » 03 Nov 2010, 14:48
It looks like this was an issue with modifying an element inside a foreach loop. Probably because the enchantment is being destroyed after the land is. I'm not sure how this ever worked properly. Maybe the timing slightly changed on when it would goto the graveyard?
- friarsol
- Global Moderator
- Posts: 7593
- Joined: 15 May 2010, 04:20
- Has thanked: 243 times
- Been thanked: 965 times
65 posts
• Page 3 of 5 • 1, 2, 3, 4, 5
Who is online
Users browsing this forum: No registered users and 20 guests