mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Converted Echoing Courage to script.
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
Name:Echoing Courage
|
Name:Echoing Courage
|
||||||
ManaCost:1 G
|
ManaCost:1 G
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:Target creature and all other creatures with the same name as that creature get +2/+2 until end of turn.
|
Text:no text
|
||||||
SVar:RemAIDeck:True
|
A:SP$ Pump | Cost$ 1 G | ValidTgts$ Creature | TgtPrompt$ Select target creature | NumAtt$ +2 | NumDef$ +2 | SubAbility$ DBPumpAll | RememberTargets$ True | ForgetOtherTargets$ True | SpellDescription$ Target creature and all other creatures with the same name as that creature get +2/+2 until end of turn.
|
||||||
|
SVar:DBPumpAll:DB$PumpAll | Cost$ 0 | ValidCards$ Remembered.Creature+Other+sameName | NumAtt$ +2 | NumDef$ +2 | SubAbility$ DBCleanup
|
||||||
|
SVar:DBCleanup:DB$Cleanup | ClearRemembered$ True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/echoing_courage.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/echoing_courage.jpg
|
||||||
SetInfo:DST|Common|http://magiccards.info/scans/en/ds/74.jpg
|
SetInfo:DST|Common|http://magiccards.info/scans/en/ds/74.jpg
|
||||||
|
|||||||
@@ -944,7 +944,7 @@ public class AbilityFactory_Pump {
|
|||||||
if (params.containsKey("ValidCards"))
|
if (params.containsKey("ValidCards"))
|
||||||
valid = params.get("ValidCards");
|
valid = params.get("ValidCards");
|
||||||
|
|
||||||
list = list.getValidCards(valid.split(","), hostCard.getController(), hostCard);
|
list = AbilityFactory.filterListByType(list, valid, sa);
|
||||||
|
|
||||||
final int a = getNumAttack(sa);
|
final int a = getNumAttack(sa);
|
||||||
final int d = getNumDefense(sa);
|
final int d = getNumDefense(sa);
|
||||||
|
|||||||
@@ -649,7 +649,7 @@ public class CardFactory_Instants {
|
|||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if (cardName.equals("Echoing Courage")) {
|
/*else if (cardName.equals("Echoing Courage")) {
|
||||||
Cost cost = new Cost(card.getManaCost(), cardName, false);
|
Cost cost = new Cost(card.getManaCost(), cardName, false);
|
||||||
Target tgt = new Target(card, "C");
|
Target tgt = new Target(card, "C");
|
||||||
final SpellAbility spell = new Spell(card, cost, tgt) {
|
final SpellAbility spell = new Spell(card, cost, tgt) {
|
||||||
@@ -708,7 +708,7 @@ public class CardFactory_Instants {
|
|||||||
}; //SpellAbility
|
}; //SpellAbility
|
||||||
|
|
||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
} //*************** END ************ END **************************
|
}*/ //*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
@@ -994,180 +994,6 @@ public class CardFactory_Instants {
|
|||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
/*
|
|
||||||
else if (cardName.equals("Vengeful Dreams")) {
|
|
||||||
final CardList targets = new CardList();
|
|
||||||
final SpellAbility spell = new Spell(card) {
|
|
||||||
private static final long serialVersionUID = 1593405082929818055L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
for (Card c : targets) {
|
|
||||||
if (AllZoneUtil.isCardInPlay(c) && CardFactoryUtil.canTarget(card, c)) {
|
|
||||||
AllZone.getGameAction().exile(c);
|
|
||||||
}//if isCardInPlay
|
|
||||||
}
|
|
||||||
targets.clear();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Input runtime = new Input() {
|
|
||||||
private static final long serialVersionUID = 4656252051002867111L;
|
|
||||||
int max = 0;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
PlayerZone hand = AllZone.getHumanPlayer().getZone(Constant.Zone.Hand);
|
|
||||||
AllZone.getGameAction().moveToStack(card);
|
|
||||||
hand.updateObservers();
|
|
||||||
max = AllZoneUtil.getPlayerHand(card.getController()).size();
|
|
||||||
if (max == targets.size()) done();
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card.getName()).append(" - Select target attacking creatures. Currently, (");
|
|
||||||
sb.append(targets.size()).append(") selected.");
|
|
||||||
sb.append(" Press OK when done.");
|
|
||||||
AllZone.getDisplay().showMessage(sb.toString());
|
|
||||||
ButtonUtil.enableAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonCancel() {
|
|
||||||
targets.clear();
|
|
||||||
AllZone.getGameAction().moveToHand(card);
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
|
||||||
if (zone.is(Constant.Zone.Battlefield) && !targets.contains(c)
|
|
||||||
&& CardFactoryUtil.canTarget(card, c) && c.isAttacking()) {
|
|
||||||
targets.add(c);
|
|
||||||
showMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonOK() {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void done() {
|
|
||||||
if (targets.size() > AllZoneUtil.getPlayerHand(card.getController()).size()) stop();
|
|
||||||
else {
|
|
||||||
card.getController().discard(targets.size(), spell, false);
|
|
||||||
stopSetNext(new Input_PayManaCost(spell));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
spell.setStackDescription(cardName + " - exile X attacking creatures.");
|
|
||||||
spell.setBeforePayMana(runtime);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
*/
|
|
||||||
/*
|
|
||||||
//*************** START *********** START **************************
|
|
||||||
else if (cardName.equals("Firestorm")) {
|
|
||||||
final ArrayList<Object> targets = new ArrayList<Object>();
|
|
||||||
final SpellAbility spell = new Spell(card) {
|
|
||||||
private static final long serialVersionUID = -3763504534745192451L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
int dmg = targets.size();
|
|
||||||
for (Object o : targets) {
|
|
||||||
if (o instanceof Player) {
|
|
||||||
if (((Player) o).canTarget(this)) {
|
|
||||||
((Player) o).addDamage(dmg, card);
|
|
||||||
}
|
|
||||||
} else if (o instanceof Card) {
|
|
||||||
if (AllZoneUtil.isCardInPlay((Card) o) && CardFactoryUtil.canTarget(card, (Card) o)) {
|
|
||||||
((Card) o).addDamage(dmg, card);
|
|
||||||
}//if isCardInPlay
|
|
||||||
}
|
|
||||||
}
|
|
||||||
targets.clear();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
Input runtime = new Input() {
|
|
||||||
private static final long serialVersionUID = 5261183989797221059L;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void showMessage() {
|
|
||||||
PlayerZone hand = AllZone.getHumanPlayer().getZone(Constant.Zone.Hand);
|
|
||||||
AllZone.getGameAction().moveToStack(card);
|
|
||||||
hand.updateObservers();
|
|
||||||
StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(card.getName()).append(" - Select target creatures, players, and/or planeswalkers. Currently, (");
|
|
||||||
sb.append(targets.size()).append(") selected.");
|
|
||||||
sb.append(" Press OK when done.");
|
|
||||||
AllZone.getDisplay().showMessage(sb.toString());
|
|
||||||
ButtonUtil.enableAll();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonCancel() {
|
|
||||||
targets.clear();
|
|
||||||
AllZone.getGameAction().moveToHand(card);
|
|
||||||
stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectCard(Card c, PlayerZone zone) {
|
|
||||||
if (zone.is(Constant.Zone.Battlefield) && !targets.contains(c)
|
|
||||||
&& CardFactoryUtil.canTarget(card, c) &&
|
|
||||||
(c.isCreature() || c.isPlaneswalker())) {
|
|
||||||
targets.add(c);
|
|
||||||
showMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectPlayer(Player p) {
|
|
||||||
if (p.canTarget(spell) && !targets.contains(p)) {
|
|
||||||
targets.add(p);
|
|
||||||
showMessage();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void selectButtonOK() {
|
|
||||||
done();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void done() {
|
|
||||||
if (targets.size() > AllZoneUtil.getPlayerHand(card.getController()).size()) stop();
|
|
||||||
else {
|
|
||||||
card.getController().discard(targets.size(), spell, true);
|
|
||||||
stopSetNext(new Input_PayManaCost(spell));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
spell.setStackDescription(cardName + " - deals X damage to each of X target creatures and/or players.");
|
|
||||||
spell.setBeforePayMana(runtime);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
}//*************** END ************ END **************************
|
|
||||||
*/
|
|
||||||
|
|
||||||
//*************** START *********** START **************************
|
//*************** START *********** START **************************
|
||||||
else if (cardName.equals("Cryptic Command")) {
|
else if (cardName.equals("Cryptic Command")) {
|
||||||
final SpellAbility[] m_spell = new SpellAbility[1];
|
final SpellAbility[] m_spell = new SpellAbility[1];
|
||||||
@@ -1522,9 +1348,6 @@ public class CardFactory_Instants {
|
|||||||
}
|
}
|
||||||
} //resolve()
|
} //resolve()
|
||||||
}; //SpellAbility
|
}; //SpellAbility
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
} //*************** END ************ END **************************
|
} //*************** END ************ END **************************
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user