mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
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:
@@ -447,6 +447,7 @@ public class Card extends MyObservable
|
||||
|
||||
public ArrayList<Command> getReplaceMoveToGraveyard() { return replaceMoveToGraveyardCommandList; }
|
||||
public void addReplaceMoveToGraveyardCommand(Command c) { replaceMoveToGraveyardCommandList.add(c);}
|
||||
public void clearReplaceMoveToGraveyardCommandList() {replaceMoveToGraveyardCommandList.clear(); }
|
||||
public void replaceMoveToGraveyard()
|
||||
{
|
||||
for (Command var : replaceMoveToGraveyardCommandList)
|
||||
|
||||
@@ -6082,6 +6082,8 @@ public class CardFactory implements NewConstants {
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
|
||||
final Card crd = card;
|
||||
|
||||
final SpellAbility spell_two = new Spell(card)
|
||||
{
|
||||
|
||||
@@ -6113,14 +6115,11 @@ public class CardFactory implements NewConstants {
|
||||
else
|
||||
AllZone.GameAction.removeFromGame(target[0]);
|
||||
}
|
||||
done();
|
||||
else
|
||||
{
|
||||
crd.clearReplaceMoveToGraveyardCommandList();
|
||||
}
|
||||
}//resolve()
|
||||
void done()
|
||||
{
|
||||
//return card to the hand
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
||||
AllZone.GameAction.moveTo(hand, card);
|
||||
}
|
||||
};//SpellAbility
|
||||
spell_two.setManaCost("4 U U");
|
||||
|
||||
@@ -6221,6 +6220,7 @@ public class CardFactory implements NewConstants {
|
||||
//*************** START *********** START **************************
|
||||
else if(cardName.equals("Elvish Fury"))
|
||||
{
|
||||
|
||||
final SpellAbility spell_one = new Spell(card)
|
||||
{
|
||||
private static final long serialVersionUID = 3356401944678089378L;
|
||||
@@ -6252,9 +6252,14 @@ public class CardFactory implements NewConstants {
|
||||
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
}
|
||||
else{
|
||||
|
||||
}
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
|
||||
final Card crd = card;
|
||||
|
||||
final SpellAbility spell_two = new Spell(card)
|
||||
{
|
||||
private static final long serialVersionUID = 3898017438147188882L;
|
||||
@@ -6307,15 +6312,12 @@ public class CardFactory implements NewConstants {
|
||||
target[0].addTempDefenseBoost(2);
|
||||
|
||||
AllZone.EndOfTurn.addUntil(untilEOT);
|
||||
done();
|
||||
}
|
||||
else
|
||||
{
|
||||
crd.clearReplaceMoveToGraveyardCommandList();
|
||||
}
|
||||
}//resolve()
|
||||
void done()
|
||||
{
|
||||
//return card to the hand
|
||||
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, card.getController());
|
||||
AllZone.GameAction.moveTo(hand, card);
|
||||
}
|
||||
};//SpellAbility
|
||||
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 removed = AllZone.getZone(Constant.Zone.Removed_From_Play, card.getController());
|
||||
|
||||
AllZone.GameAction.sacrificeCreature(getTargetPlayer(), this);
|
||||
|
||||
grave.remove(card);
|
||||
removed.add(card);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user