Re: Modular
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 
High Quality Resources for Collectible Card Games and Home of the CCGHQ Team
https://www.slightlymagic.net/forum/
https://www.slightlymagic.net/forum/viewtopic.php?f=52&t=1660
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)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)
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.
`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 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.