- Convert MercSearch to AFs

This commit is contained in:
jendave
2011-08-07 00:40:47 +00:00
parent f1dc5c21f3
commit 2f11f1f20e
11 changed files with 11 additions and 113 deletions

View File

@@ -3,7 +3,7 @@ ManaCost:2 B
Types:Creature Horror Mercenary
Text:no text
PT:2/2
K:SearchMerc:2
A:AB$ ChangeZone | Cost$ 2 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE2 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 2 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_brute.jpg

View File

@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
Text:no text
PT:4/3
K:Fear
K:SearchMerc:4
A:AB$ ChangeZone | Cost$ 4 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE4 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 4 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_enforcer.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:2 B B
Types:Creature Human Mercenary
Text:no text
PT:4/2
K:SearchMerc:3
A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE3 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_kidnappers.jpg

View File

@@ -3,9 +3,9 @@ ManaCost:4 B B B
Types:Creature Horror Mercenary
Text:no text
PT:7/5
K:SearchMerc:6
SVar:RemRandomDeck:True
A:AB$ ChangeZone | Cost$ 6 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE6 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 6 or less and put it onto the battlefield. Then shuffle your library.
A:AB$ Regenerate | Cost$ Sac<1/Creature> | SpellDescription$ Regenerate CARDNAME.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_overlord.jpg
SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/123.jpg

View File

@@ -3,7 +3,7 @@ ManaCost:B B
Types:Creature Human Mercenary
Text:no text
PT:2/1
K:SearchMerc:1
A:AB$ ChangeZone | Cost$ 1 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE1 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 1 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_persuader.jpg

View File

@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
Text:no text
PT:5/5
K:Swampwalk
K:SearchMerc:5
A:AB$ ChangeZone | Cost$ 5 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE5 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 5 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_slaver.jpg

View File

@@ -3,9 +3,9 @@ ManaCost:2 B B
Types:Creature Zombie Mercenary Assassin
Text:no text
PT:2/2
K:SearchMerc:3
SVar:RemRandomDeck:True
A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE3 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library.
A:AB$ Destroy | Cost$ 1 B B T | ValidTgts$ Creature.tapped+nonBlack | TgtPrompt$ Select target tapped nonblack creature | SpellDescription$ Destroy target tapped nonblack creature.
SVar:RemRandomDeck:True
SVar:Rarity:Rare
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_assassin.jpg
SetInfo:NMS|Rare|http://magiccards.info/scans/en/ne/67.jpg

View File

@@ -5,7 +5,7 @@ Text:no text
PT:2/2
T:Mode$ ChangesZone | Origin$ Any | Destination$ Battlefield | ValidCard$ Card.Self | Execute$ TrigLoseLife | TriggerDescription$ When CARDNAME enters the battlefield, each player loses 3 life.
SVar:TrigLoseLife:AB$LoseLife | Cost$ 0 | Defined$ Each | LifeAmount$ 3
K:SearchMerc:3
A:AB$ ChangeZone | Cost$ 3 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE3 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 3 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Uncommon
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_fiend.jpg

View File

@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
Text:no text
PT:2/1
K:Fear
K:SearchMerc:2
A:AB$ ChangeZone | Cost$ 2 T | Origin$ Library | Destination$ Battlefield | ChangeType$ Permanent.Mercenary+cmcLE2 | ChangeNum$ 1 | SpellDescription$ Search your library for a Mercenary permanent card with converted mana cost 2 or less and put it onto the battlefield. Then shuffle your library.
SVar:RemRandomDeck:True
SVar:Rarity:Common
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_intimidator.jpg

View File

@@ -517,19 +517,6 @@ public class CardFactory implements NewConstants {
}
}//Rebel search
if(hasKeyword(card, "SearchMerc") != -1) {
int n = hasKeyword(card, "SearchMerc");
if(n != -1) {
String parse = card.getKeyword().get(n).toString();
card.removeIntrinsicKeyword(parse);
String k[] = parse.split(":");
final String manacost = k[1];
card.addSpellAbility(CardFactoryUtil.ability_Merc_Search(card, manacost));
}
}//Merc search
if(hasKeyword(card, "Morph") != -1) {
int n = hasKeyword(card, "Morph");
if(n != -1) {

View File

@@ -846,95 +846,6 @@ public class CardFactoryUtil {
return morph_up;
}
public static SpellAbility ability_Merc_Search(final Card sourceCard, String cost) {
final int intCost = Integer.parseInt(cost);
final Cost abCost = new Cost("T", sourceCard.getName(), true);
abCost.setMana(cost);
final SpellAbility ability = new Ability_Activated(sourceCard, abCost, null){
private static final long serialVersionUID = 4988299801575232348L;
@Override
public boolean canPlay() {
SpellAbility sa;
for(int i = 0; i < AllZone.Stack.size(); i++) {
sa = AllZone.Stack.peek(i);
if(sa.getSourceCard().equals(sourceCard)) return false;
}
if(AllZoneUtil.isCardInPlay(sourceCard) && !sourceCard.hasSickness()
&& !sourceCard.isTapped() && super.canPlay()) return true;
else return false;
}
@Override
public boolean canPlayAI() {
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, sourceCard.getController());
CardList mercs = new CardList();
CardList list = new CardList(lib.getCards());
list = list.filter(new CardListFilter() {
public boolean addCard(Card c) {
return ((c.getType().contains("Mercenary") || c.getKeyword().contains("Changeling")))
&& c.isPermanent();
}
});
if(list.size() == 0) return false;
for(int i = 0; i < list.size(); i++) {
if(CardUtil.getConvertedManaCost(list.get(i).getManaCost()) <= intCost) {
mercs.add(list.get(i));
}
}
if(AllZone.Phase.getPhase().equals(Constant.Phase.Main2) && mercs.size() > 0) return true;
else return false;
}
@Override
public void resolve() {
PlayerZone lib = AllZone.getZone(Constant.Zone.Library, sourceCard.getController());
CardList mercs = new CardList();
CardList list = new CardList(lib.getCards());
list = list.getType("Mercenary");
if(list.size() == 0) return;
for(int i = 0; i < list.size(); i++) {
if(CardUtil.getConvertedManaCost(list.get(i).getManaCost()) <= intCost) {
mercs.add(list.get(i));
}
}
if(mercs.size() == 0) return;
if(sourceCard.getController().isComputer()) {
Card merc = AI_getBestCreature(mercs);
AllZone.GameAction.moveToPlay(merc);
} else //human
{
Object o = GuiUtils.getChoiceOptional("Select target Mercenary", mercs.toArray());
if(o != null) {
Card merc = (Card) o;
AllZone.GameAction.moveToPlay(merc);
}
}
sourceCard.getController().shuffle();
}
};
StringBuilder sbDesc = new StringBuilder();
sbDesc.append(cost).append(", tap: Search your library for a Mercenary permanent card with converted mana cost ");
sbDesc.append(cost).append(" or less and put it onto the battlefield. Then shuffle your library.");
ability.setDescription(sbDesc.toString());
StringBuilder sbStack = new StringBuilder();
sbStack.append(sourceCard.getName()).append(" - search for a Mercenary and put it onto the battlefield.");
ability.setStackDescription(sbStack.toString());
return ability;
}
public static SpellAbility ability_Rebel_Search(final Card sourceCard, String cost) {
final int converted = Integer.parseInt(cost) - 1;