mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
Converted Orcish Captain to script
This commit is contained in:
@@ -3,6 +3,9 @@ ManaCost:R
|
|||||||
Types:Creature Orc Warrior
|
Types:Creature Orc Warrior
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:1/1
|
PT:1/1
|
||||||
|
A:AB$ FlipACoin | Cost$ 1 | ValidTgts$ Creature.Orc | TgtPrompt$ Select target Orc creature | WinSubAbility$ DBPumpPlus | LoseSubAbility$ DBPumpMinus | SpellDescription$ 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.
|
||||||
|
SVar:DBPumpPlus:DB$ Pump | Cost$ 0 | Defined$ Targeted | NumAtt$ 2 | NumDef$ 0
|
||||||
|
SVar:DBPumpMinus:DB$ Pump | Cost$ 0 | Defined$ Targeted | NumAtt$ 0 | NumDef$ -2
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/orcish_captain.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/orcish_captain.jpg
|
||||||
|
|||||||
@@ -3034,91 +3034,6 @@ public class CardFactory_Creatures {
|
|||||||
ability.setStackDescription(sb.toString());
|
ability.setStackDescription(sb.toString());
|
||||||
}//*************** END ************ END **************************
|
}//*************** 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 **************************
|
//*************** START *********** START **************************
|
||||||
else if (cardName.equals("Awakener Druid")) {
|
else if (cardName.equals("Awakener Druid")) {
|
||||||
final long[] timeStamp = {0};
|
final long[] timeStamp = {0};
|
||||||
|
|||||||
Reference in New Issue
Block a user