mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
- Convert MercSearch to AFs
This commit is contained in:
@@ -3,7 +3,7 @@ ManaCost:2 B
|
|||||||
Types:Creature Horror Mercenary
|
Types:Creature Horror Mercenary
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/2
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_brute.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_brute.jpg
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
|
|||||||
Text:no text
|
Text:no text
|
||||||
PT:4/3
|
PT:4/3
|
||||||
K:Fear
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_enforcer.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_enforcer.jpg
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:2 B B
|
|||||||
Types:Creature Human Mercenary
|
Types:Creature Human Mercenary
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:4/2
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_kidnappers.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_kidnappers.jpg
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ ManaCost:4 B B B
|
|||||||
Types:Creature Horror Mercenary
|
Types:Creature Horror Mercenary
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:7/5
|
PT:7/5
|
||||||
K:SearchMerc:6
|
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.
|
||||||
SVar:RemRandomDeck:True
|
|
||||||
A:AB$ Regenerate | Cost$ Sac<1/Creature> | SpellDescription$ Regenerate CARDNAME.
|
A:AB$ Regenerate | Cost$ Sac<1/Creature> | SpellDescription$ Regenerate CARDNAME.
|
||||||
|
SVar:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_overlord.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_overlord.jpg
|
||||||
SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/123.jpg
|
SetInfo:MMQ|Rare|http://magiccards.info/scans/en/mm/123.jpg
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ ManaCost:B B
|
|||||||
Types:Creature Human Mercenary
|
Types:Creature Human Mercenary
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/1
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_persuader.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_persuader.jpg
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
|
|||||||
Text:no text
|
Text:no text
|
||||||
PT:5/5
|
PT:5/5
|
||||||
K:Swampwalk
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Rare
|
SVar:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_slaver.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/cateran_slaver.jpg
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ ManaCost:2 B B
|
|||||||
Types:Creature Zombie Mercenary Assassin
|
Types:Creature Zombie Mercenary Assassin
|
||||||
Text:no text
|
Text:no text
|
||||||
PT:2/2
|
PT:2/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
|
|
||||||
A:AB$ Destroy | Cost$ 1 B B T | ValidTgts$ Creature.tapped+nonBlack | TgtPrompt$ Select target tapped nonblack creature | SpellDescription$ Destroy target tapped nonblack creature.
|
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:Rarity:Rare
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_assassin.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_assassin.jpg
|
||||||
SetInfo:NMS|Rare|http://magiccards.info/scans/en/ne/67.jpg
|
SetInfo:NMS|Rare|http://magiccards.info/scans/en/ne/67.jpg
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Text:no text
|
|||||||
PT:2/2
|
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.
|
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
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Uncommon
|
SVar:Rarity:Uncommon
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_fiend.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_fiend.jpg
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ Types:Creature Horror Mercenary
|
|||||||
Text:no text
|
Text:no text
|
||||||
PT:2/1
|
PT:2/1
|
||||||
K:Fear
|
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:RemRandomDeck:True
|
||||||
SVar:Rarity:Common
|
SVar:Rarity:Common
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_intimidator.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/rathi_intimidator.jpg
|
||||||
|
|||||||
@@ -517,19 +517,6 @@ public class CardFactory implements NewConstants {
|
|||||||
}
|
}
|
||||||
}//Rebel search
|
}//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) {
|
if(hasKeyword(card, "Morph") != -1) {
|
||||||
int n = hasKeyword(card, "Morph");
|
int n = hasKeyword(card, "Morph");
|
||||||
if(n != -1) {
|
if(n != -1) {
|
||||||
|
|||||||
@@ -846,95 +846,6 @@ public class CardFactoryUtil {
|
|||||||
return morph_up;
|
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) {
|
public static SpellAbility ability_Rebel_Search(final Card sourceCard, String cost) {
|
||||||
final int converted = Integer.parseInt(cost) - 1;
|
final int converted = Integer.parseInt(cost) - 1;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user