mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48: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 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)
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user