mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
Converted Orcish Captain to script
This commit is contained in:
@@ -3034,91 +3034,6 @@ public class CardFactory_Creatures {
|
||||
ability.setStackDescription(sb.toString());
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Orcish Captain")) {
|
||||
Cost abCost = new Cost("1", cardName, true);
|
||||
Target target = new Target(card, "Select target Orc creature", "Creature.Orc".split(","));
|
||||
final Ability_Activated ability = new Ability_Activated(card, abCost, target) {
|
||||
private static final long serialVersionUID = 6724781940648179318L;
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
final Card tgt = getTargetCard();
|
||||
final boolean[] win = new boolean[1];
|
||||
if (AllZoneUtil.isCardInPlay(tgt) && CardFactoryUtil.canTarget(card, tgt)) {
|
||||
if (GameActionUtil.flipACoin(card.getController(), card)) {
|
||||
tgt.addTempAttackBoost(2);
|
||||
win[0] = true;
|
||||
} else {
|
||||
tgt.addTempDefenseBoost(-2);
|
||||
win[0] = false;
|
||||
}
|
||||
|
||||
final Command EOT = new Command() {
|
||||
private static final long serialVersionUID = -7905540871887278236L;
|
||||
|
||||
public void execute() {
|
||||
if (AllZoneUtil.isCardInPlay(tgt)) {
|
||||
if (win[0]) {
|
||||
tgt.addTempAttackBoost(-2);
|
||||
} else {
|
||||
tgt.addTempDefenseBoost(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
AllZone.getEndOfTurn().addUntil(EOT);
|
||||
|
||||
}//if (card is in play)
|
||||
}//resolve()
|
||||
};//SpellAbility
|
||||
card.addSpellAbility(ability);
|
||||
ability.setDescription(abCost + "Flip a coin. If you win the flip, target Orc creature gets +2/+0 until end of turn. If you lose the flip, it gets -0/-2 until end of turn.");
|
||||
}//*************** END ************ END **************************
|
||||
|
||||
/*
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Orcish Spy")) {
|
||||
Target target = new Target(card, "Select target player", new String[]{"Player"});
|
||||
Cost abCost = new Cost("T", cardName, true);
|
||||
final Ability_Activated ability = new Ability_Activated(card, abCost, target) {
|
||||
private static final long serialVersionUID = -7781215422160018196L;
|
||||
|
||||
@Override
|
||||
public void resolve() {
|
||||
final Player player = getTargetPlayer();
|
||||
CardList lib = AllZoneUtil.getPlayerCardsInLibrary(player);
|
||||
CardList toDisplay = new CardList();
|
||||
for (int i = 0; i < 3 && i < lib.size(); i++) {
|
||||
toDisplay.add(lib.get(i));
|
||||
}
|
||||
if (lib.size() > 0) {
|
||||
GuiUtils.getChoice("Top three cards of " + player + "'s library", toDisplay.toArray());
|
||||
} else {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getTargetPlayer()).append("'s library is empty!");
|
||||
javax.swing.JOptionPane.showMessageDialog(null, sb.toString(), "Target player's library", JOptionPane.INFORMATION_MESSAGE);
|
||||
}
|
||||
}//resolve()
|
||||
|
||||
@Override
|
||||
public boolean canPlayAI() {
|
||||
return false;
|
||||
}
|
||||
|
||||
};//SpellAbility
|
||||
|
||||
ability.setDescription(abCost + "Look at the top three cards of target player's library.");
|
||||
card.addSpellAbility(ability);
|
||||
}//*************** END ************ END **************************
|
||||
*/
|
||||
|
||||
//*************** START *********** START **************************
|
||||
else if (cardName.equals("Awakener Druid")) {
|
||||
final long[] timeStamp = {0};
|
||||
|
||||
Reference in New Issue
Block a user