mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
remove Java code for Political Trickery and Vedalken Plotter (converted to script by moomarc)
This commit is contained in:
@@ -296,98 +296,6 @@ public class CardFactoryCreatures {
|
||||
card.addComesIntoPlayCommand(intoPlay);
|
||||
}
|
||||
|
||||
private static void getCard_VedalkenPlotter(final Card card, final String cardName) {
|
||||
final Card[] target = new Card[2];
|
||||
final int[] index = new int[1];
|
||||
|
||||
final Ability ability = new Ability(card, "") {
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
final Card crd0 = target[0];
|
||||
final Card crd1 = target[1];
|
||||
|
||||
if ((crd0 != null) && (crd1 != null)) {
|
||||
final Player p0 = crd0.getController();
|
||||
final Player p1 = crd1.getController();
|
||||
crd0.addController(p1);
|
||||
crd1.addController(p0);
|
||||
}
|
||||
|
||||
} // resolve()
|
||||
}; // SpellAbility
|
||||
|
||||
final Input input = new Input() {
|
||||
|
||||
private static final long serialVersionUID = -7143706716256752987L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
if (index[0] == 0) {
|
||||
CMatchUI.SINGLETON_INSTANCE.showMessage("Select target land you control.");
|
||||
} else {
|
||||
CMatchUI.SINGLETON_INSTANCE.showMessage("Select target land opponent controls.");
|
||||
}
|
||||
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectCard(final Card c, final PlayerZone zone) {
|
||||
// must target creature you control
|
||||
if ((index[0] == 0) && !c.getController().equals(card.getController())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// must target creature you don't control
|
||||
if ((index[0] == 1) && c.getController().equals(card.getController())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (c.isLand() && zone.is(ZoneType.Battlefield) && c.canBeTargetedBy(ability)) {
|
||||
// System.out.println("c is: " +c);
|
||||
target[index[0]] = c;
|
||||
index[0]++;
|
||||
this.showMessage();
|
||||
|
||||
if (index[0] == target.length) {
|
||||
AllZone.getStack().add(ability);
|
||||
this.stop();
|
||||
}
|
||||
}
|
||||
} // selectCard()
|
||||
}; // Input
|
||||
|
||||
final Command comesIntoPlay = new Command() {
|
||||
private static final long serialVersionUID = 6513203926272187582L;
|
||||
|
||||
@Override
|
||||
public void execute() {
|
||||
index[0] = 0;
|
||||
if (card.getController().isHuman()) {
|
||||
AllZone.getInputControl().setInput(input);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
sb.append(cardName);
|
||||
sb.append(" - Exchange control of target land you control ");
|
||||
sb.append("and target land an opponent controls.");
|
||||
ability.setStackDescription(sb.toString());
|
||||
|
||||
card.addComesIntoPlayCommand(comesIntoPlay);
|
||||
}
|
||||
|
||||
private static void getCard_PainterServant(final Card card, final String cardName) {
|
||||
final long[] timeStamp = new long[1];
|
||||
final String[] color = new String[1];
|
||||
@@ -1586,8 +1494,6 @@ public class CardFactoryCreatures {
|
||||
getCard_PhylacteryLich(card, cardName);
|
||||
} else if (cardName.equals("Sky Swallower")) {
|
||||
getCard_SkySwallower(card, cardName);
|
||||
} else if (cardName.equals("Vedalken Plotter")) {
|
||||
getCard_VedalkenPlotter(card, cardName);
|
||||
} else if (cardName.equals("Painter's Servant")) {
|
||||
getCard_PainterServant(card, cardName);
|
||||
} else if (cardName.equals("Stangg")) {
|
||||
|
||||
@@ -76,106 +76,7 @@ public class CardFactorySorceries {
|
||||
public static Card getCard(final Card card, final String cardName) {
|
||||
|
||||
// *************** START *********** START **************************
|
||||
if (cardName.equals("Political Trickery")) {
|
||||
final Card[] target = new Card[2];
|
||||
final int[] index = new int[1];
|
||||
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
|
||||
private static final long serialVersionUID = -3075569295823682336L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
|
||||
final Card crd0 = target[0];
|
||||
final Card crd1 = target[1];
|
||||
|
||||
if ((crd0 != null) && (crd1 != null)) {
|
||||
final Player p0 = crd0.getController();
|
||||
final Player p1 = crd1.getController();
|
||||
crd0.addController(p1);
|
||||
crd1.addController(p0);
|
||||
// Singletons.getModel().getGameAction().changeController(new
|
||||
// CardList(crd0), p0, p1);
|
||||
// Singletons.getModel().getGameAction().changeController(new
|
||||
// CardList(crd1), p1, p0);
|
||||
}
|
||||
|
||||
} // resolve()
|
||||
}; // SpellAbility
|
||||
|
||||
final Input input = new Input() {
|
||||
|
||||
private static final long serialVersionUID = -1017253686774265770L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
if (index[0] == 0) {
|
||||
CMatchUI.SINGLETON_INSTANCE.showMessage("Select target land you control.");
|
||||
} else {
|
||||
CMatchUI.SINGLETON_INSTANCE.showMessage("Select target land opponent controls.");
|
||||
}
|
||||
|
||||
ButtonUtil.enableOnlyCancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectButtonCancel() {
|
||||
this.stop();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void selectCard(final Card c, final PlayerZone zone) {
|
||||
// must target creature you control
|
||||
if ((index[0] == 0) && !c.getController().equals(card.getController())) {
|
||||
return;
|
||||
}
|
||||
|
||||
// must target creature you don't control
|
||||
if ((index[0] == 1) && c.getController().equals(card.getController())) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (c.isLand() && zone.is(ZoneType.Battlefield) && c.canBeTargetedBy(spell)) {
|
||||
target[index[0]] = c;
|
||||
index[0]++;
|
||||
this.showMessage();
|
||||
|
||||
if (index[0] == target.length) {
|
||||
if (this.isFree()) {
|
||||
this.setFree(false);
|
||||
AllZone.getStack().add(spell);
|
||||
this.stop();
|
||||
} else {
|
||||
this.stopSetNext(new InputPayManaCost(spell));
|
||||
}
|
||||
}
|
||||
}
|
||||
} // selectCard()
|
||||
}; // Input
|
||||
|
||||
final Input runtime = new Input() {
|
||||
|
||||
private static final long serialVersionUID = 4003351872990899418L;
|
||||
|
||||
@Override
|
||||
public void showMessage() {
|
||||
index[0] = 0;
|
||||
this.stopSetNext(input);
|
||||
}
|
||||
}; // Input
|
||||
|
||||
card.addSpellAbility(spell);
|
||||
spell.setBeforePayMana(runtime);
|
||||
} // *************** END ************ END **************************
|
||||
|
||||
// *************** START *********** START **************************
|
||||
else if (cardName.equals("Brilliant Ultimatum")) {
|
||||
if (cardName.equals("Brilliant Ultimatum")) {
|
||||
final SpellAbility spell = new Spell(card) {
|
||||
private static final long serialVersionUID = 1481112451519L;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user