mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Converted Burn the Impure to script.
This commit is contained in:
@@ -2,6 +2,9 @@ Name:Burn the Impure
|
|||||||
ManaCost:1 R
|
ManaCost:1 R
|
||||||
Types:Instant
|
Types:Instant
|
||||||
Text:no text
|
Text:no text
|
||||||
|
A:SP$ DealDamage | Cost$ 1 R | NumDmg$ 3 | ValidTgts$ Creature | TgtPrompt$ Select target creature | SubAbility$ DBDamage | SpellDescription$ CARDNAME deals 3 damage to target creature. If that creature has infect, Burn the Impure deals 3 damage to that creature's controller.
|
||||||
|
SVar:DBDamage:DB$ DealDamage | Defined$ TargetedController | NumDmg$ 3 | ConditionCheckSVar$ X | ConditionSVarCompare$ EQ1
|
||||||
|
SVar:X:Targeted$Valid Creature.withInfect
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/burn_the_impure.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/burn_the_impure.jpg
|
||||||
SetInfo:MBS|Common|http://magiccards.info/scans/en/mbs/59.jpg
|
SetInfo:MBS|Common|http://magiccards.info/scans/en/mbs/59.jpg
|
||||||
|
|||||||
@@ -621,72 +621,6 @@ public class CardFactoryInstants {
|
|||||||
card.addSpellAbility(spell);
|
card.addSpellAbility(spell);
|
||||||
} // *************** END ************ END **************************
|
} // *************** END ************ END **************************
|
||||||
|
|
||||||
// *************** START *********** START **************************
|
|
||||||
else if (cardName.equals("Burn the Impure")) {
|
|
||||||
/*
|
|
||||||
* Burn the Impure deals 3 damage to target creature. If that
|
|
||||||
* creature has infect, Burn the Impure deals 3 damage to that
|
|
||||||
* creature's controller.
|
|
||||||
*/
|
|
||||||
final Cost abCost = new Cost("1 R", cardName, false);
|
|
||||||
final SpellAbility spell = new Spell(card, abCost, new Target(card, "TgtC")) {
|
|
||||||
private static final long serialVersionUID = -3069135027502686218L;
|
|
||||||
private final int damage = 3;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void chooseTargetAI() {
|
|
||||||
|
|
||||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer());
|
|
||||||
creatures = creatures.filter(new CardListFilter() {
|
|
||||||
@Override
|
|
||||||
public boolean addCard(final Card c) {
|
|
||||||
return (c.getNetAttack() <= damage) && !c.hasKeyword("Indestructible");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
final CardList infect = creatures.getKeyword("Infect");
|
|
||||||
if (infect.size() > 0) {
|
|
||||||
final Card c = CardFactoryUtil.getBestCreatureAI(infect);
|
|
||||||
this.setTargetCard(c);
|
|
||||||
} else {
|
|
||||||
final Card c = CardFactoryUtil.getBestCreatureAI(creatures);
|
|
||||||
this.setTargetCard(c);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // chooseTargetAI()
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean canPlayAI() {
|
|
||||||
CardList creatures = AllZoneUtil.getCreaturesInPlay(AllZone.getHumanPlayer());
|
|
||||||
creatures = creatures.filter(new CardListFilter() {
|
|
||||||
@Override
|
|
||||||
public boolean addCard(final Card c) {
|
|
||||||
return (c.getNetAttack() <= damage) && !c.hasKeyword("Indestructible");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return creatures.size() > 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void resolve() {
|
|
||||||
if (AllZoneUtil.isCardInPlay(this.getTargetCard()) && this.getTargetCard().canBeTargetedBy(this)) {
|
|
||||||
final Card c = this.getTargetCard();
|
|
||||||
c.addDamage(this.damage, card);
|
|
||||||
if (c.hasKeyword("Infect")) {
|
|
||||||
c.getController().addDamage(3, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}; // SpellAbility
|
|
||||||
|
|
||||||
final StringBuilder sb = new StringBuilder();
|
|
||||||
sb.append(cardName);
|
|
||||||
sb.append(" deals 3 damage to target creature. If that creature has infect, ");
|
|
||||||
sb.append(cardName);
|
|
||||||
sb.append(" deals 3 damage to that creature's controller.");
|
|
||||||
spell.setDescription(sb.toString());
|
|
||||||
|
|
||||||
card.addSpellAbility(spell);
|
|
||||||
} // *************** END ************ END **************************
|
|
||||||
|
|
||||||
// *************** START *********** START **************************
|
// *************** START *********** START **************************
|
||||||
else if (cardName.equals("Turnabout")) {
|
else if (cardName.equals("Turnabout")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user