Modular
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			39 posts
			 • Page 3 of 3 • 1, 2, 3
		
	
Re: Modular
 by DennisBergkamp » 06 Oct 2009, 03:14
by DennisBergkamp » 06 Oct 2009, 03:14 
Well, there's other ways. Other less effective ways apparently... when I tried merging your code, I used some file by file text comparator tool  
			
		
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
 by zerker2000 » 06 Oct 2009, 03:52
by zerker2000 » 06 Oct 2009, 03:52 
Ah, the .diff files... miserably outdated, I'm afraid  .
.
			 .
.O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
		Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
 by Chris H. » 07 Oct 2009, 17:40
by Chris H. » 07 Oct 2009, 17:40 
Using zerker's mana pool code update I modified Sunastian Falconer to look like this:
Sunastian Falconer
3 R G
Legendary Creature Human Shaman
no text
4/4
tap: add 2
I ran a test and was able to select a spell to cast and then tapped the Sunastian Falconer for 2 mana, wow, success.
I then tried tapping the Sunastian Falconer to place 2 man in the mana pool and when I tapped the mana pool to cast a spell I got the following error:
			
		Sunastian Falconer
3 R G
Legendary Creature Human Shaman
no text
4/4
tap: add 2
I ran a test and was able to select a spell to cast and then tapped the Sunastian Falconer for 2 mana, wow, success.
I then tried tapping the Sunastian Falconer to place 2 man in the mana pool and when I tapped the mana pool to cast a spell I got the following error:
- 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
 mtgrares@yahoo.com
 String index out of range: 2
 Detailed error trace:
 java.lang.StringIndexOutOfBoundsException: String index out of range: 2
 at java.lang.String.charAt(String.java:686)
 at ManaPool.oraclize(ManaPool.java:98)
 at ManaPool.subtractMana(ManaPool.java:212)
 at Input_PayManaCostUtil.tapCard(Input_PayManaCostUtil.java:10)
 at Input_PayManaCost.selectCard(Input_PayManaCost.java:42)
 at GuiInput.selectCard(GuiInput.java:35)
 at GuiDisplay3$8.mousePressed(GuiDisplay3.java:309)
 at java.awt.Component.processMouseEvent(Component.java:6345)
 at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
 at java.awt.Component.processEvent(Component.java:6113)
 at java.awt.Container.processEvent(Container.java:2085)
 at java.awt.Component.dispatchEventImpl(Component.java:4714)
 at java.awt.Container.dispatchEventImpl(Container.java:2143)
 at java.awt.Component.dispatchEvent(Component.java:4544)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
 at java.awt.Container.dispatchEventImpl(Container.java:2129)
 at java.awt.Window.dispatchEventImpl(Window.java:2475)
 at java.awt.Component.dispatchEvent(Component.java:4544)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
- 
				 
 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: Modular
 by DennisBergkamp » 07 Oct 2009, 18:57
by DennisBergkamp » 07 Oct 2009, 18:57 
Strange, I can't reproduce this. Everything works fine for me...Chris H. wrote:Using zerker's mana pool code update I modified Sunastian Falconer to look like this:
Sunastian Falconer
3 R G
Legendary Creature Human Shaman
no text
4/4
tap: add 2
I ran a test and was able to select a spell to cast and then tapped the Sunastian Falconer for 2 mana, wow, success.
I then tried tapping the Sunastian Falconer to place 2 man in the mana pool and when I tapped the mana pool to cast a spell I got the following error:
- 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
mtgrares@yahoo.com
String index out of range: 2
Detailed error trace:
java.lang.StringIndexOutOfBoundsException: String index out of range: 2
at java.lang.String.charAt(String.java:686)
at ManaPool.oraclize(ManaPool.java:98)
at ManaPool.subtractMana(ManaPool.java:212)
at Input_PayManaCostUtil.tapCard(Input_PayManaCostUtil.java:10)
at Input_PayManaCost.selectCard(Input_PayManaCost.java:42)
at GuiInput.selectCard(GuiInput.java:35)
at GuiDisplay3$8.mousePressed(GuiDisplay3.java:309)
at java.awt.Component.processMouseEvent(Component.java:6345)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6113)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4714)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4618)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4279)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2475)
at java.awt.Component.dispatchEvent(Component.java:4544)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:635)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
I like the fact that it's possible now to use multi mana sources directly to pay for a spell.
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
 by Chris H. » 07 Oct 2009, 21:37
by Chris H. » 07 Oct 2009, 21:37 
When I built zerkers mana pool mods code I received several warnings, I did not bother to try to make any corrections. Could explain it.DennisBergkamp wrote:Strange, I can't reproduce this. Everything works fine for me...
I like the fact that it's possible now to use multi mana sources directly to pay for a spell.
I'm sure you have the code in place on your end and it is working correctly with no warnings.
I'm still learning.

- 
				 
 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: Modular
 by DennisBergkamp » 07 Oct 2009, 22:48
by DennisBergkamp » 07 Oct 2009, 22:48 
Hmm, well it's possible there's some bug. Warnings don't mean much... I had a few too, but I fixed them.
What spell were you trying to cast with the mana from Sunastian Falconer ?
			
		What spell were you trying to cast with the mana from Sunastian Falconer ?
- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
 by Chris H. » 07 Oct 2009, 23:14
by Chris H. » 07 Oct 2009, 23:14 
`DennisBergkamp wrote:Hmm, well it's possible there's some bug. Warnings don't mean much... I had a few too, but I fixed them.
What spell were you trying to cast with the mana from Sunastian Falconer ?
I am trying to remember. The deck had 5 mox to cast Sunastian Falconer and then there was one last card with a total cost of seven. I think that I may have picked Loamdragger Giant.
Could this have been related to hybrid mana?
- 
				 
 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: Modular
 by DennisBergkamp » 07 Oct 2009, 23:23
by DennisBergkamp » 07 Oct 2009, 23:23 
You're right, yes it probably is hybrid mana. I'm getting the same error.
			
		- 
				 
 DennisBergkamp
- AI Programmer
- Posts: 2602
- Joined: 09 Sep 2008, 15:46
- Has thanked: 0 time
- Been thanked: 0 time
Re: Modular
 by zerker2000 » 08 Oct 2009, 00:25
by zerker2000 » 08 Oct 2009, 00:25 
I think those were serialVersionUID's.Chris H. wrote:When I built zerkers mana pool mods code I received several warnings, I did not bother to try to make any corrections. Could explain it.
Weird, I thought the code used manaCost.isNeeded, one mana at a time.DennisBergkamp wrote:You're right, yes it probably is hybrid mana. I'm getting the same error.
O forest, hold thy wand'ring son
Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
		Though fears assail the door.
O foliage, cloak thy ravaged one
In vestments cut for war.
--Eladamri, the Seed of Freyalise
- zerker2000
- Programmer
- Posts: 569
- Joined: 09 May 2009, 21:40
- Location: South Pasadena, CA
- Has thanked: 0 time
- Been thanked: 0 time
			39 posts
			 • Page 3 of 3 • 1, 2, 3
		
	
Who is online
Users browsing this forum: No registered users and 20 guests
