Page 94 of 441

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 05:52
by nantuko84
unfortunately I can't build and try it myself ;(
1. btw, what about adding ant build script?
2. and still can't understand why you don't use cardforge svn (I mean google code svn repository where MTGForge can be downloaded from)? I've commited the code there once, but it wasn't used as planned ;( why not to renew it to current version?

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 12:00
by apthaven
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

Index: 7, Size: 6

Detailed error trace:
java.lang.IndexOutOfBoundsException: Index: 7, Size: 6
   at java.util.ArrayList.add(Unknown Source)
   at CardList.add(CardList.java:69)
   at GameAction.smoothComputerManaCurve(GameAction.java:831)
   at GameAction.newGame(GameAction.java:783)
   at Gui_NewGame.startButton_actionPerformed(Gui_NewGame.java:433)
   at Gui_NewGame$5.actionPerformed(Gui_NewGame.java:272)
   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.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)
I was trying to let the AI use a "test" deck with fewer cards than the normal and this came up.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 12:10
by Chris H.
apthaven wrote:I was trying to let the AI use a "test" deck with fewer cards than the normal and this came up.
`
Try turning the "Stack AI Land" check box to off and then try to start the game again.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 14:21
by apthaven
Chris H. wrote:
Try turning the "Stack AI Land" check box to off and then try to start the game again.
It worked! Thanks.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 16:36
by DennisBergkamp
nantuko84 wrote:I had the similar problems with flashback cards with targets long ago, and as far as I remember it was solved just by copying target parameters.
I've looked into your CardFactoryUtil, could you try the following (not tested, just idea):

Code: Select all
public static SpellAbility ability_Flashback(...)
...
SpellAbility spell = sourceCard.getSpellAbility()[0];
... // at the end
flashback.setStackDescription("Flashback: " + sourceCard.getName());
flashback.setBeforePayMana(spell.getBeforePayMana());
won't it call CardFactoryUtil.input_targetCreaturePlayer(...)?
if it does, probably you'll also need to copy target in flashback.resolve()

does that make sense?
Oh, that might work too. I'll give that a shot... I was thinking I probably just had to write a custom flashback for both of those cards. Which should be pretty easy actually, but your solution is better (if it works, that is :) ).

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 18:18
by indicatie
When you use the activated ability from Godsire it asks "Pay mana cost:". Just tapping Godsire again is enough to get it working, but wasn't this solved earlier (I remember Chandra having the same problem).

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 19:17
by mtgrares
Apparently some cards don't have any spellAbilities (maybe some lands?)...
(To the best of my knowledge) Yes, the only cards, (Card objects), that do not hold any SpellAbility objects is lands. I would have added SpellAbility objects to lands if I had a mana pool like the one we have now or at the top of CardFactory you could convert "tap: add G" into a SpellAbility object. I originally implemented mana abilities as strings because it was the easiest solution at the time.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 19:43
by mtgrares
nantuko84 wrote:I had the similar problems with flashback cards with targets long ago, and as far as I remember it was solved just by copying target parameters.
I've looked into your CardFactoryUtil, could you try the following (not tested, just idea):

Code: Select all
public static SpellAbility ability_Flashback(...)
...
SpellAbility spell = sourceCard.getSpellAbility()[0];
... // at the end
flashback.setStackDescription("Flashback: " + sourceCard.getName());
flashback.setBeforePayMana(spell.getBeforePayMana());
won't it call CardFactoryUtil.input_targetCreaturePlayer(...)?
if it does, probably you'll also need to copy target in flashback.resolve()

does that make sense?
The main idea, SpellAbility.setBeforePayMana() does not have to be set if it is a spell that doesn't need any targets. If it is an ability, you must always call SpellAbility.setBeforePayMana(Input), the easiest way is to find a similar card in CardFactory. The specific Input for an ability depends if the ability has any targets, mana costs, or "tap cost" like Royal Assassin. The reason (I think) that I had to have separate Input classes to pay the mana costs of spells and abilities is that spells are removed from the players hand and put into the graveyard and abilities are not. With some modifications you probably can have the same code handle spells and abilities and thus reduce the number of Input_PayaManaCost classes.

I'll tell you what I know and hopefully it will help. SpellAbility.setBeforePayMana(Input) is a horrible name for a method, sorry, a better name would be SpellAbility.chooseTargets(). I had weird ideas that Plow Under (a very popular card at the time, 8th Edition?) would let the player put the two lands on the top of his library in any order.

SpellAbility.setBeforePayMana(Input) the argument is ran BEFORE the use pays the mana cost. Input.getMessage() is always the first method executed so you can do wierd stuff with it, see tap abilities and planeswalkers in CardFactory for messy examples. CardFactoryUtil.input_targetCreaturePlayer() is trying to implement reusable code instead of me cutting and pasting everywhere.

If a card doesn't need any targets like Wrath of God, SpellAbility.setBeforePayMana() does not have to be set because if SpellAbility.getBeforePayMana() returns null and the program presumes that the Input should be Input_PayManaCost. (When you click on a card many methods are called Input_Main.selectCard() calls InputUtil.playAnyCard() which calls GameAction.playSpellAbility() which checks to see if SpellAbility.getBeforePayMana() returns null and presumes Input_PayManaCost).

I hope that helps.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 21:10
by Marek14
Remember for later that apart from Armadillo Cloak, Mourning Thrull, Exalted Angel, Essence Sliver, Kjeldoran Gargoyle, Horned Cheetah, Warrior Angel, Zebra Unicorn and El-Hajjaj no longer have lifelink.

If you ever include the "new" lifelink, you should keep the old code around for these cards.

Edit: a new bug I've seen. I played Weathered Wayfarer, attacked with a creature equipped with Loxodon Warhammer, resolved the lifelink trigger, then I cast Empty the Warrens and got six tokens instead of four. I guess the ability was somehow counted into the storm? Computer cast nothing.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 21:22
by DennisBergkamp
Ah, thanks for listing these. I will probably add this as a keyword (Whenever this creature deals damage, you gain that much life) in the next version, it's a little bit trickier for Armadillo Cloak and Spirit Link, since they look at the controller of the Aura, not the creature.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 21:25
by Marek14
Modular bug: when computer's Arcbound Worker died, I got to choose the target for modular ability.

Edit: Would it be possible to make an option for megarandom five-colored deck I mentioned before? (6 lands of each basic type + 70 completely random cards from the whole list, including lands, perhaps with increased starting life to compensate and allow for longer games). Would be great for random testing.

Also a question - does the AI ever use regeneration? I've never seen it do so.

As for "old lifelink" - Essence Sliver is worded differently than others. It doesn't actually grant the triggered ability, instead it's:

Whenever a Sliver deals damage, its controller gains that much life.

Other possible cards with old lifelink code:

Descendant of Kiyomaro
Doubtless One
Flash Conscription
Necravolver
Paladin of Prahv
Phantom Nishoba
Rakavolver
Stir the Pride
Sunhome Enforcer

Variants:
Noble Purpose
Tamanoa

Spirit Link-like variants:
Soul Link
Spirit Loop
Spiritualize
Vampiric Link

You might also try mirrored ability on Emberwilde Caliph.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 21:49
by DennisBergkamp
The modular bug was an easy fix, just a single else in the modular code.

I guess a mega-random option should be possible (might end up with a lot of lands though).

Don't think the AI uses regeneration (since it can't really cast stuff at instant speed), it's possible it might activate the regeneration shield right before attacking though (very stupid and inefficient obviously). Hmm, this might be something I could hack in, much like the AI counterspell functionality.

Re: Current Known Bugs list

PostPosted: 08 Oct 2009, 22:27
by zerker2000
Marek14 wrote:Modular bug: when computer's Arcbound Worker died, I got to choose the target for modular ability.
Weird, I thought I fixed that bug. :(

Re: Current Known Bugs list

PostPosted: 09 Oct 2009, 01:04
by DennisBergkamp
Mox Diamond doesn't seem to want to tap for mana anymore (it also shows up in both panels, but I'll fix that).

Re: Current Known Bugs list

PostPosted: 09 Oct 2009, 06:30
by silly freak
using 1007, i was playing UB Faeries against Lord Of Extinction. I played watery grave twice, once with and once without paying 2 life. I wasn't able to tap any of them. I was able to create mana from my mox, however

edit: restarted the game and ran it in the terminal; no exceptions occured, it was just that nothing happened on my click