mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Fix for Unearth mistakenly being Exiled after it Resolves
This commit is contained in:
@@ -898,72 +898,31 @@ public class CardFactoryUtil {
|
||||
|
||||
}//ability_Flashback()
|
||||
|
||||
public static Ability ability_Unearth(final Card sourceCard, String manaCost) {
|
||||
|
||||
final Ability unearth = new Ability(sourceCard, manaCost) {
|
||||
public static Ability_Activated ability_Unearth(final Card sourceCard, String manaCost) {
|
||||
|
||||
Ability_Cost cost = new Ability_Cost(manaCost, sourceCard.getName(), true);
|
||||
final Ability_Activated unearth = new Ability_Activated(sourceCard, cost, null) {
|
||||
private static final long serialVersionUID = -5633945565395478009L;
|
||||
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sourceCard.getController());
|
||||
//PlayerZone removed = AllZone.getZone(Constant.Zone.Removed_From_Play, sourceCard.getController());
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, sourceCard.getController());
|
||||
Card card = AllZone.GameAction.moveToPlay(sourceCard);
|
||||
|
||||
grave.remove(sourceCard);
|
||||
play.add(sourceCard);
|
||||
|
||||
sourceCard.addIntrinsicKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
||||
sourceCard.addIntrinsicKeyword("Haste");
|
||||
sourceCard.setUnearthed(true);
|
||||
/*
|
||||
final Command entersPlay = new Command()
|
||||
{
|
||||
public void execute()
|
||||
{
|
||||
sourceCard.setUnearthed(true);
|
||||
card.addIntrinsicKeyword("At the beginning of the end step, sacrifice CARDNAME.");
|
||||
card.addIntrinsicKeyword("Haste");
|
||||
card.setUnearthed(true);
|
||||
}
|
||||
};
|
||||
sourceCard.addComesIntoPlayCommand(entersPlay);
|
||||
|
||||
|
||||
final Command leavesPlay = new Command()
|
||||
{
|
||||
private static final long serialVersionUID = -8640915882354670864L;
|
||||
|
||||
public void execute()
|
||||
{
|
||||
AllZone.GameAction.removeUnearth(sourceCard);
|
||||
}
|
||||
};
|
||||
sourceCard.addLeavesPlayCommand(leavesPlay);
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean canPlay() {
|
||||
PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, sourceCard.getController());
|
||||
|
||||
return AllZone.GameAction.isCardInZone(sourceCard, grave)
|
||||
&& Phase.canCastSorcery(sourceCard.getController());
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
unearth.setFlashBackAbility(true);
|
||||
//unearth.setManaCost(manaCost);
|
||||
//unearth.setDescription("Unearth: " + manaCost);
|
||||
SpellAbility_Restriction restrict = new SpellAbility_Restriction();
|
||||
restrict.setActivateZone("Graveyard");
|
||||
restrict.setSorcerySpeed(true);
|
||||
unearth.setRestrictions(restrict);
|
||||
|
||||
StringBuilder sbStack = new StringBuilder();
|
||||
sbStack.append("Unearth: ").append(sourceCard.getName());
|
||||
unearth.setStackDescription(sbStack.toString());
|
||||
|
||||
return unearth;
|
||||
|
||||
}//ability_Unearth()
|
||||
|
||||
/*
|
||||
|
||||
@@ -177,9 +177,9 @@ public class GameAction {
|
||||
else moveTo(hand, c);
|
||||
}
|
||||
|
||||
public void moveToPlay(Card c) {
|
||||
public Card moveToPlay(Card c) {
|
||||
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, c.getOwner());
|
||||
moveTo(play, c);
|
||||
return moveTo(play, c);
|
||||
}
|
||||
|
||||
public void moveToTopOfLibrary(Card c) {
|
||||
|
||||
Reference in New Issue
Block a user