mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Converted Adarkar Valkyrie to script.
This commit is contained in:
@@ -5,6 +5,10 @@ Text:no text
|
||||
PT:4/5
|
||||
K:Flying
|
||||
K:Vigilance
|
||||
A:AB$ Effect | Cost$ T | Name$ Adarkar Valkyrie Effect | ValidTgts$ Creature.Other | TgtPrompt$ Select target creature other than Adarkar Valkyrie | Triggers$ TrigChangesZone | SVars$ TrigChangeZone,DBGainControl | RememberObjects$ Targeted | SpellDescription$ When target creature other than CARDNAME dies this turn, return that card to the battlefield under your control.
|
||||
SVar:TrigChangesZone:Mode$ ChangesZone | Origin$ Battlefield | Destination$ Graveyard | ValidCard$ Creature.IsRemembered | Execute$ TrigChangeZone | TriggerDescription$ If the targeted creature of Adarkar Valkyrie dies this turn, return it to the battlefield and you gain control of it.
|
||||
SVar:TrigChangeZone:AB$ ChangeZone | Cost$ 0 | Defined$ Remembered | Origin$ Graveyard | Destination$ Battlefield | SubAbility$ DBGainControl
|
||||
SVar:DBGainControl:DB$ GainControl | Defined$ Remembered
|
||||
SVar:Rarity:Rare
|
||||
SVar:Picture:http://resources.wizards.com/magic/cards/csp/en-us/card121196.jpg
|
||||
SetInfo:CSP|Rare|http://magiccards.info/scans/en/cs/1.jpg
|
||||
|
||||
@@ -464,7 +464,7 @@ public class CardFactoryCreatures {
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
AllZone.getDisplay().showMessage("Select target artifact you control");
|
||||
AllZone.getDisplay().showMessage("Select an artifact you control");
|
||||
ButtonUtil.disableAll();
|
||||
}
|
||||
|
||||
@@ -635,10 +635,6 @@ public class CardFactoryCreatures {
|
||||
final Player p1 = crd1.getController();
|
||||
crd0.addController(p1);
|
||||
crd1.addController(p0);
|
||||
// AllZone.getGameAction().changeController(new
|
||||
// CardList(crd0), p0, p1);
|
||||
// AllZone.getGameAction().changeController(new
|
||||
// CardList(crd1), p1, p0);
|
||||
}
|
||||
|
||||
} // resolve()
|
||||
@@ -711,82 +707,6 @@ public class CardFactoryCreatures {
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Adarkar Valkyrie")) {
|
||||
// tap ability - no cost - target creature - EOT
|
||||
|
||||
final Card[] target = new Card[1];
|
||||
|
||||
final Command destroy = new Command() {
|
||||
private static final long serialVersionUID = -2433442359225521472L;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("Adarkar Valkyrie - Return ").append(target[0]);
|
||||
sb.append(" from graveyard to the battlefield");
|
||||
AllZone.getStack().addSimultaneousStackEntry(new Ability(card, "0", sb.toString()) {
|
||||
@Override
|
||||
public void resolve() {
|
||||
final PlayerZone grave = AllZone.getZoneOf(target[0]);
|
||||
// checks to see if card is still in the
|
||||
// graveyard
|
||||
|
||||
if ((grave != null) && grave.contains(target[0])) {
|
||||
final PlayerZone play = card.getController().getZone(Constant.Zone.Battlefield);
|
||||
target[0].addController(card.getController());
|
||||
AllZone.getGameAction().moveTo(play, target[0]);
|
||||
}
|
||||
}
|
||||
});
|
||||
} // execute()
|
||||
};
|
||||
|
||||
final Command untilEOT = new Command() {
|
||||
private static final long serialVersionUID = 2777978927867867610L;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
// resets the Card destroy Command
|
||||
target[0].removeDestroyCommand(destroy);
|
||||
}
|
||||
};
|
||||
|
||||
final Cost abCost = new Cost("T", cardName, true);
|
||||
final StringBuilder sbTgt = new StringBuilder();
|
||||
sbTgt.append("Target creature other than ").append(cardName);
|
||||
final Target tgt = new Target(card, sbTgt.toString(), "Creature.Other".split(","));
|
||||
final AbilityActivated ability = new AbilityActivated(card, abCost, tgt) {
|
||||
private static final long serialVersionUID = -8454685126878522607L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
if (AllZoneUtil.isCardInPlay(this.getTargetCard())) {
|
||||
target[0] = this.getTargetCard();
|
||||
|
||||
if (!target[0].isToken()) { // not necessary, but will
|
||||
// help speed up stack
|
||||
// resolution
|
||||
AllZone.getEndOfTurn().addUntil(untilEOT);
|
||||
target[0].addDestroyCommand(destroy);
|
||||
}
|
||||
} // if
|
||||
} // resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
}; // SpellAbility
|
||||
|
||||
card.addSpellAbility(ability);
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append("tap: When target creature other than Adarkar Valkyrie is put into a ");
|
||||
sb.append("graveyard this turn, return that card to the battlefield under your control.");
|
||||
ability.setDescription(sb.toString());
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Painter's Servant")) {
|
||||
|
||||
Reference in New Issue
Block a user