Fixed a problem with Regrowth asking for input twice when played from Cascade.

Added a Serial UID to the Command created in playSpellAbilityForFree().
This commit is contained in:
jendave
2011-08-06 04:38:59 +00:00
parent 1ab417d7c3
commit 4328e597dd
2 changed files with 17 additions and 4 deletions

View File

@@ -10506,9 +10506,23 @@ public class CardFactory implements NewConstants {
spell.setTargetCard((Card) o);
if(this.isFree())
{
// WARNING: Read this before copying!
// When we have an 'if (this.isFree())' in most input objects,
// it's inside 'selectCard' not 'showMessage', and the usual
// order is
// AllZone.Stack.add(spell);
// stop();
// Here, we had to reverse the order of those two lines, or
// else the dialog for Regrowth would get put up twice
// when the card was played from Cascade. I think this
// has to do with when showMessage() is called versus
// selectCard().
// This appears to be the only place we use this pattern. Be
// careful when copying this code, and test your card with
// Cascade or Isochron Scepter.
this.setFree(false);
AllZone.Stack.add(spell);
stop();
AllZone.Stack.add(spell);
}
else
stopSetNext(new Input_PayManaCost(spell));

View File

@@ -1439,8 +1439,7 @@ public class GameAction {
if (sa.isKickerAbility()) {
Command paid1 = new Command() {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = -6531785460264284794L;
public void execute() {
AllZone.Stack.add(sa);