- Converted Noviken Heart of Progress to script

This commit is contained in:
Sol
2012-11-28 04:05:57 +00:00
parent ef4838dfeb
commit 693a9bc119
2 changed files with 1 additions and 68 deletions

View File

@@ -3,6 +3,7 @@ ManaCost:no cost
Types:Land Types:Land
Text:no text Text:no text
A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool. A:AB$ Mana | Cost$ T | Produced$ 1 | SpellDescription$ Add 1 to your mana pool.
A:AB$ PutCounter | Cost$ G U T | CounterType$ P1P1 | CounterNum$ 1 | Defined$ Creature.enteredBattlefieldThisTurn | SpellDescription$ Put a +1/+1 counter on each creature that entered the battlefield this turn.
SVar:Rarity:Uncommon SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/novijen_heart_of_progress.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/novijen_heart_of_progress.jpg
SetInfo:DIS|Uncommon|http://magiccards.info/scans/en/di/175.jpg SetInfo:DIS|Uncommon|http://magiccards.info/scans/en/di/175.jpg

View File

@@ -132,74 +132,6 @@ class CardFactoryLands {
}); });
} // *************** END ************ END ************************** } // *************** END ************ END **************************
// *************** START *********** START **************************
else if (cardName.equals("Novijen, Heart of Progress")) {
card.clearSpellKeepManaAbility();
final Predicate<Card> targets = new Predicate<Card>() {
@Override
public boolean apply(final Card c) {
return c.isInPlay() && c.isCreature()
&& (c.getTurnInZone() == Singletons.getModel().getGame().getPhaseHandler().getTurn());
}
};
class AbilityNovijenHeartOfProgress extends AbilityActivated {
public AbilityNovijenHeartOfProgress(final Card ca, final Cost co, final Target t) {
super(ca, co, t);
}
@Override
public AbilityActivated getCopy() {
AbilityActivated res = new AbilityNovijenHeartOfProgress(getSourceCard(),
getPayCosts(), getTarget() == null ? null : new Target(getTarget()));
CardFactoryUtil.copySpellAbility(this, res);
return res;
}
private static final long serialVersionUID = 1416258136308898492L;
private final List<Card> inPlay = new ArrayList<Card>();
@Override
public boolean canPlayAI() {
if (Singletons.getModel().getGame().getPhaseHandler().getPhase() != PhaseType.MAIN1
&& Singletons.getModel().getGame().getPhaseHandler().getPlayerTurn().isComputer()) {
return false;
}
this.inPlay.clear();
this.inPlay.addAll(getActivatingPlayer().getCardsIn(ZoneType.Battlefield));
return (CardLists.filter(this.inPlay, targets).size() > 1) && super.canPlayAI();
}
@Override
public void resolve() {
this.inPlay.clear();
this.inPlay.addAll(Singletons.getModel().getGame().getCardsIn(ZoneType.Battlefield));
for (final Card targ : CardLists.filter(this.inPlay, targets)) {
targ.addCounter(CounterType.P1P1, 1, true);
}
}
}
final Cost abCost = new Cost(card, "G U T", true);
final AbilityActivated ability = new AbilityNovijenHeartOfProgress(card, abCost, null);
final StringBuilder sbDesc = new StringBuilder();
sbDesc.append(abCost);
sbDesc.append("Put a +1/+1 counter on each creature that entered the battlefield this turn.");
ability.setDescription(sbDesc.toString());
final StringBuilder sbStack = new StringBuilder();
sbStack.append(cardName);
sbStack.append(" - Put a +1/+1 counter on each creature that entered the battlefield this turn.");
ability.setStackDescription(sbStack.toString());
card.addSpellAbility(ability);
}
// *************** END ************ END **************************
// *************** START *********** START ************************** // *************** START *********** START **************************
else if (cardName.equals("Sheltered Valley")) { else if (cardName.equals("Sheltered Valley")) {