Elvish Fury and Capsize's buyback abilities shouldn't happen if the spell is countered in the case of illegal target.

This commit is contained in:
jendave
2011-08-06 02:47:44 +00:00
parent 7dbe8ea57a
commit 0ab479e3b3
2 changed files with 19 additions and 14 deletions

View File

@@ -447,6 +447,7 @@ public class Card extends MyObservable
public ArrayList<Command> getReplaceMoveToGraveyard() { return replaceMoveToGraveyardCommandList; } public ArrayList<Command> getReplaceMoveToGraveyard() { return replaceMoveToGraveyardCommandList; }
public void addReplaceMoveToGraveyardCommand(Command c) { replaceMoveToGraveyardCommandList.add(c);} public void addReplaceMoveToGraveyardCommand(Command c) { replaceMoveToGraveyardCommandList.add(c);}
public void clearReplaceMoveToGraveyardCommandList() {replaceMoveToGraveyardCommandList.clear(); }
public void replaceMoveToGraveyard() public void replaceMoveToGraveyard()
{ {
for (Command var : replaceMoveToGraveyardCommandList) for (Command var : replaceMoveToGraveyardCommandList)

View File

@@ -6082,6 +6082,8 @@ public class CardFactory implements NewConstants {
}//resolve() }//resolve()
};//SpellAbility };//SpellAbility
final Card crd = card;
final SpellAbility spell_two = new Spell(card) final SpellAbility spell_two = new Spell(card)
{ {
@@ -6113,14 +6115,11 @@ public class CardFactory implements NewConstants {
else else
AllZone.GameAction.removeFromGame(target[0]); AllZone.GameAction.removeFromGame(target[0]);
} }
done(); else
{
crd.clearReplaceMoveToGraveyardCommandList();
}
}//resolve() }//resolve()
void done()
{
//return card to the hand
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
AllZone.GameAction.moveTo(hand, card);
}
};//SpellAbility };//SpellAbility
spell_two.setManaCost("4 U U"); spell_two.setManaCost("4 U U");
@@ -6221,6 +6220,7 @@ public class CardFactory implements NewConstants {
//*************** START *********** START ************************** //*************** START *********** START **************************
else if(cardName.equals("Elvish Fury")) else if(cardName.equals("Elvish Fury"))
{ {
final SpellAbility spell_one = new Spell(card) final SpellAbility spell_one = new Spell(card)
{ {
private static final long serialVersionUID = 3356401944678089378L; private static final long serialVersionUID = 3356401944678089378L;
@@ -6252,9 +6252,14 @@ public class CardFactory implements NewConstants {
AllZone.EndOfTurn.addUntil(untilEOT); AllZone.EndOfTurn.addUntil(untilEOT);
} }
else{
}
}//resolve() }//resolve()
};//SpellAbility };//SpellAbility
final Card crd = card;
final SpellAbility spell_two = new Spell(card) final SpellAbility spell_two = new Spell(card)
{ {
private static final long serialVersionUID = 3898017438147188882L; private static final long serialVersionUID = 3898017438147188882L;
@@ -6307,15 +6312,12 @@ public class CardFactory implements NewConstants {
target[0].addTempDefenseBoost(2); target[0].addTempDefenseBoost(2);
AllZone.EndOfTurn.addUntil(untilEOT); AllZone.EndOfTurn.addUntil(untilEOT);
done(); }
else
{
crd.clearReplaceMoveToGraveyardCommandList();
} }
}//resolve() }//resolve()
void done()
{
//return card to the hand
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
AllZone.GameAction.moveTo(hand, card);
}
};//SpellAbility };//SpellAbility
spell_two.setManaCost("4 G"); spell_two.setManaCost("4 G");
@@ -16536,6 +16538,8 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase();
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard , card.getController()); PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard , card.getController());
PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, card.getController()); PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, card.getController());
AllZone.GameAction.sacrificeCreature(getTargetPlayer(), this);
grave.remove(card); grave.remove(card);
removed.add(card); removed.add(card);
} }