convert Rats of Rath to AF_Destroy

This commit is contained in:
jendave
2011-08-06 13:56:31 +00:00
parent 7ae79414b2
commit 3c0e16b3d5
2 changed files with 1 additions and 137 deletions

View File

@@ -3,6 +3,7 @@ ManaCost:1 B
Types:Creature Rat
Text:no text
PT:2/1
A:AB$Destroy|Cost$B|ValidTgts$Artifact.YouCtrl,Creature.YouCtrl,Land.YouCtrl|TgtPrompt$Select target artifact, creature or land you control.|SpellDescription$Destroy target artifact, creature, or land you control.
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/rats_of_rath.jpg
SetInfo:TMP|Common|http://magiccards.info/scans/en/tp/44.jpg

View File

@@ -9171,108 +9171,6 @@ public class CardFactory_Creatures {
card.addComesIntoPlayCommand(gain2Life);
}//*************** END ************ END **************************
/*
//*************** START *********** START **************************
else if(cardName.equals("Tradewind Rider")) {
String select = "Select target permanent to return to owner's hand.";
final String Tgts[] = {"Permanent"};
Target target = new Target(select, Tgts);
final Ability_Cost cost = new Ability_Cost("T tapXType<2/Creature>", card.getName(), true);
final SpellAbility bounce = new Ability_Activated(card, cost, target) {
private static final long serialVersionUID = 3438865371487994984L;
@Override
public void chooseTargetAI() {
if(getCreature().size() != 0) {
Card bestCreature = CardFactoryUtil.AI_getBestCreature(getCreature());
if(getEnchantment().size() != 0) {
Card bestEnchantment = CardFactoryUtil.AI_getBestEnchantment(getEnchantment(), card,
true);
if(CardUtil.getConvertedManaCost(bestCreature.getManaCost()) > CardUtil.getConvertedManaCost(bestEnchantment.getManaCost())) {
setTargetCard(bestCreature);
} else {
setTargetCard(bestEnchantment);
}
} else {
setTargetCard(bestCreature);
}
} else if(getArtifact().size() != 0) {
Card bestArtifact = CardFactoryUtil.AI_getBestArtifact(getArtifact());
setTargetCard(bestArtifact);
}
}//ChooseTargetAI()
CardList getCreature() {
CardList list = CardFactoryUtil.AI_getHumanCreature(card, true);
return list;
}//getEnchantment()
CardList getArtifact() {
CardList list = CardFactoryUtil.AI_getHumanArtifact(card, true);
return list;
}//getArtifact()
CardList getEnchantment() {
CardList list = CardFactoryUtil.AI_getHumanEnchantment(card, true);
return list;
}
@Override
public boolean canPlayAI() {
PlayerZone play = AllZone.getZone(Constant.Zone.Battlefield, AllZone.HumanPlayer);
CardList cards = new CardList();
cards.addAll(play.getCards());
cards = cards.filter(new CardListFilter() {
public boolean addCard(Card c) {
return (c.isArtifact() || c.isEnchantment() || c.isCreature())
&& CardFactoryUtil.canTarget(card, c);
}
});
return cards.size() > 0;
}
@Override
public boolean canPlay() {
Player controller = card.getController();
CardList creats = AllZoneUtil.getCreaturesInPlay(controller);
creats = creats.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isUntapped() && !c.equals(card);
}
});
if(creats.size() > 1 && AllZone.GameAction.isCardInPlay(card) && card.isUntapped()
&& !card.hasSickness() && super.canPlay()) return true;
else return false;
}
@Override
public void resolve() {
if(getTargetCard() == null) return;
Card c = getTargetCard();
if(c.isToken()) AllZone.getZone(c).remove(c);
else {
PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, c.getOwner());
AllZone.GameAction.moveTo(hand, c);
}
}
};//a1
bounce.setDescription("tap, Tap two untapped creatures you control: Return target permanent to its owner's hand.");
card.addSpellAbility(bounce);
}//*************** END ************ END **************************
*/
//*************** START *********** START **************************
else if(cardName.equals("Gilt-Leaf Archdruid")) {
@@ -9460,41 +9358,6 @@ public class CardFactory_Creatures {
}//*************** END ************ END **************************
//*************** START ************ START **************************
else if(cardName.equals("Rats of Rath")) {
final Ability ability = new Ability(card, "B") {
@Override
public boolean canPlayAI() {
return false;
};
@Override
public void resolve() {
AllZone.GameAction.destroy(getTargetCard());
};
};
ability.setBeforePayMana(new Input() {
private static final long serialVersionUID = 7691864588170864421L;
@Override
public void showMessage() {
CardList choices = new CardList(
AllZone.getZone(Constant.Zone.Battlefield, card.getController()).getCards());
choices.filter(new CardListFilter() {
public boolean addCard(Card c) {
return c.isArtifact() || c.isCreature() || c.isLand();
}
});
stopSetNext(CardFactoryUtil.input_targetSpecific(ability, choices,
"Select an artifact, creature, or land you control", true, false));
}
});
ability.setDescription("B: Destroy target artifact, creature, or land you control.");
card.addSpellAbility(ability);
}
//*************** END ************ END **************************
//*************** START *********** START **************************
else if(cardName.equals("Lich Lord of Unx")) {
final Ability ability2 = new Ability(card, "U U B B") {