mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Convert AEther Tradewinds to ChangeZone
This commit is contained in:
@@ -2,6 +2,8 @@ Name:AEther Tradewinds
|
|||||||
ManaCost:2 U
|
ManaCost:2 U
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
Text:no text
|
||||||
|
A:SP$ChangeZone | Cost$ 2 U | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Permanent.YouCtrl | TgtPrompt$ Select target permanent you control | SubAbility$ SVar=DBChange | SpellDescription$ Return target permanent you control and target permanent you don't control to their owners' hands.
|
||||||
|
SVar:DBChange:DB$ChangeZone | Origin$ Battlefield | Destination$ Hand | ValidTgts$ Permanent.YouDontCtrl | TgtPrompt$ Select target permanent you don't control
|
||||||
SVar:RemAIDeck:True
|
SVar:RemAIDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/aether_tradewinds.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/aether_tradewinds.jpg
|
||||||
|
|||||||
@@ -695,7 +695,10 @@ public class AbilityFactory_ChangeZone {
|
|||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
Card host = af.getHostCard();
|
Card host = af.getHostCard();
|
||||||
|
|
||||||
sb.append(host.getName()).append(" - ");
|
if (!(sa instanceof Ability_Sub))
|
||||||
|
sb.append(host.getName()).append(" -");
|
||||||
|
|
||||||
|
sb.append(" ");
|
||||||
|
|
||||||
String destination = params.get("Destination");
|
String destination = params.get("Destination");
|
||||||
String origin = params.get("Origin");
|
String origin = params.get("Origin");
|
||||||
|
|||||||
@@ -4359,70 +4359,6 @@ public class CardFactory_Instants {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if(cardName.equals("AEther Tradewinds")) {
|
|
||||||
final Card[] target = new Card[2];
|
|
||||||
final SpellAbility spell = new Spell(card) {
|
|
||||||
private static final long serialVersionUID = -3811167493596209322L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
for(int i = 0; i < target.length; i++) {
|
|
||||||
if(AllZone.GameAction.isCardInPlay(target[i]) && CardFactoryUtil.canTarget(card, target[i])) {
|
|
||||||
AllZone.GameAction.moveToHand(target[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
final Input runtime = new Input() {
|
|
||||||
private static final long serialVersionUID = -8139950662809697287L;
|
|
||||||
boolean firstTarget = true;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
if(firstTarget) sb.append(card.getName()).append(" - Select target permanent you control");
|
|
||||||
else sb.append(card.getName()).append(" - Select target permanent you don't control");
|
|
||||||
AllZone.Display.showMessage(sb.toString());
|
|
||||||
ButtonUtil.enableOnlyCancel();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonCancel() {
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
|
||||||
Player player = firstTarget ? AllZone.HumanPlayer : AllZone.ComputerPlayer;
|
|
||||||
if(zone.is(Constant.Zone.Battlefield, player) && CardFactoryUtil.canTarget(card, c)) {
|
|
||||||
if(null == target[0]) {
|
|
||||||
target[0] = c;
|
|
||||||
firstTarget = false;
|
|
||||||
showMessage();
|
|
||||||
}
|
|
||||||
else if(null == target[1]) {
|
|
||||||
target[1] = c;
|
|
||||||
stopSetNext(new Input_PayManaCost(spell));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
spell.setDescription("Return target permanent you control and target permanent you don't control to their owners' hands.");
|
|
||||||
spell.setStackDescription(cardName+" - Return target permanents to their owners' hands.");
|
|
||||||
spell.setBeforePayMana(runtime);
|
|
||||||
|
|
||||||
card.clearSpellAbility();
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
|
|
||||||
return card;
|
return card;
|
||||||
}//getCard
|
}//getCard
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user