mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
added Jester's Cap (from Ice Age) - not implemented for AI
This commit is contained in:
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1820,6 +1820,7 @@ res/cardsfolder/jedits_dragoons.txt -text svneol=native#text/plain
|
|||||||
res/cardsfolder/jenara_asura_of_war.txt -text svneol=native#text/plain
|
res/cardsfolder/jenara_asura_of_war.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/jerrard_of_the_closed_fist.txt -text svneol=native#text/plain
|
res/cardsfolder/jerrard_of_the_closed_fist.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/jeska_warrior_adept.txt -text svneol=native#text/plain
|
res/cardsfolder/jeska_warrior_adept.txt -text svneol=native#text/plain
|
||||||
|
res/cardsfolder/jesters_cap.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/jet_medallion.txt -text svneol=native#text/plain
|
res/cardsfolder/jet_medallion.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/jhessian_infiltrator.txt -text svneol=native#text/plain
|
res/cardsfolder/jhessian_infiltrator.txt -text svneol=native#text/plain
|
||||||
res/cardsfolder/jhessian_lookout.txt -text svneol=native#text/plain
|
res/cardsfolder/jhessian_lookout.txt -text svneol=native#text/plain
|
||||||
|
|||||||
8
res/cardsfolder/jesters_cap.txt
Normal file
8
res/cardsfolder/jesters_cap.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
Name:Jester's Cap
|
||||||
|
ManaCost:4
|
||||||
|
Types:Artifact
|
||||||
|
Text:2, Tap, Sacrifice Jester's Cap: Search target player's library for three cards and exile them. Then that player shuffles his or her library.
|
||||||
|
K:SVars:RemAIDeck:True
|
||||||
|
K:SVars:Rarity:Rare
|
||||||
|
K:SVars:Picture:http://www.wizards.com/global/images/magic/general/jesters_cap.txt
|
||||||
|
End
|
||||||
@@ -381,6 +381,24 @@ public class AllZoneUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void exileNCardsFromZone(final PlayerZone zone, final CardListFilter filter, final int n, final boolean shuffle) {
|
||||||
|
CardList cards = new CardList(zone.getCards());
|
||||||
|
if(null != filter) {
|
||||||
|
cards = cards.filter(filter);
|
||||||
|
}
|
||||||
|
int maxCards = n;
|
||||||
|
int numCards = cards.size();
|
||||||
|
maxCards = Math.min(maxCards, numCards);
|
||||||
|
for(int i = 1; i <= maxCards; i++) {
|
||||||
|
String title = "Select card to exile: " + i + "/" + maxCards;
|
||||||
|
Object o = AllZone.Display.getChoiceOptional(title, cards.toArray());
|
||||||
|
if(o == null) break;
|
||||||
|
Card card = (Card) o;
|
||||||
|
AllZone.GameAction.exile(card);
|
||||||
|
}
|
||||||
|
if(shuffle) AllZone.GameAction.shuffle(zone.getPlayer());
|
||||||
|
}
|
||||||
|
|
||||||
public static int CompareTypeAmountInPlay(final String player, String type)
|
public static int CompareTypeAmountInPlay(final String player, String type)
|
||||||
{
|
{
|
||||||
// returns the difference between player's
|
// returns the difference between player's
|
||||||
|
|||||||
@@ -10190,6 +10190,42 @@ public class CardFactory implements NewConstants {
|
|||||||
a1.setBeforePayMana(new Input_PayManaCost_Ability(a1.getManaCost(), paid1));
|
a1.setBeforePayMana(new Input_PayManaCost_Ability(a1.getManaCost(), paid1));
|
||||||
}//*************** END ************ END **************************
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
//*************** START *********** START **************************
|
||||||
|
else if(cardName.equals("Jester's Cap")) {
|
||||||
|
/*
|
||||||
|
* 2, Tap, Sacrifice Jester's Cap: Search target player's library
|
||||||
|
* for three cards and exile them. Then that player shuffles his
|
||||||
|
* or her library.
|
||||||
|
*/
|
||||||
|
final Ability_Tap ability = new Ability_Tap(card, "2") {
|
||||||
|
private static final long serialVersionUID = 222308932796127795L;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean canPlayAI() {
|
||||||
|
//TODO
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void resolve() {
|
||||||
|
String target = getTargetPlayer();
|
||||||
|
String player = card.getController();
|
||||||
|
PlayerZone zone = AllZone.getZone(Constant.Zone.Library, target);
|
||||||
|
if(player.equals(Constant.Player.Human)) {
|
||||||
|
AllZoneUtil.exileNCardsFromZone(zone, null, 3, true);
|
||||||
|
}
|
||||||
|
else { //computer
|
||||||
|
|
||||||
|
}
|
||||||
|
AllZone.GameAction.sacrifice(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
};//Ability
|
||||||
|
|
||||||
|
card.addSpellAbility(ability);
|
||||||
|
ability.setBeforePayMana(CardFactoryUtil.input_targetPlayer(ability));
|
||||||
|
}//*************** END ************ END **************************
|
||||||
|
|
||||||
|
|
||||||
// Cards with Cycling abilities
|
// Cards with Cycling abilities
|
||||||
// -1 means keyword "Cycling" not found
|
// -1 means keyword "Cycling" not found
|
||||||
|
|||||||
Reference in New Issue
Block a user