diff --git a/res/cards.txt b/res/cards.txt index a1b90441cbb..5280e4d187c 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,71 @@ +Barren Glory +4 W W +Enchantment +At the beginning of your upkeep, if you control no permanents other than Barren Glory and have no cards in hand, you win the game. + +Treetop Scout +G +Creature Elf Scout +no text +1/1 +This creature can't be blocked except by creatures with flying + +Treetop Rangers +2 G +Creature Elf +no text +2/2 +This creature can't be blocked except by creatures with flying + +Treetop Bracers +1 G +Enchantment Aura +Enchanted creature gets +1/+1 and can't be blocked except by creatures with flying. +Enchant creature + +Silhana Ledgewalker +1 G +Creature Elf Rogue +no text +1/1 +This creature can't be blocked except by creatures with flying +This card can't be the target of spells or abilities your opponents control. + +Auramancer +2 W +Creature Human +When Auramancer enters the battlefield, you may return target card from your graveyard to your hand. +2/2 + +Cartographer +2 G +Creature Human +When Cartographer enters the battlefield, you may return target land card from your graveyard to your hand. +2/2 + +Scarland Thrinax +B R G +Creature Lizard +no text +2/2 + +Femeref Enchantress +G W +Creature Human Druid +no text +1/2 +Whenever an enchantment is put into a graveyard from the battlefield, draw a card. + +Conqueror's Pledge +2 W W W +Sorcery +no text + +Seal of Removal +U +Enchantment +no text + Seal of Fire R Enchantment diff --git a/res/main.properties b/res/main.properties index 7de8ad359a3..6626debe692 100644 --- a/res/main.properties +++ b/res/main.properties @@ -1,6 +1,6 @@ program/mail=mtgrares@yahoo.com program/forum=http://www.slightlymagic.net/forum/viewforum.php?f=26 -program/version=MTG Forge -- official beta: 09/11/02, SVN revision: 85 +program/version=MTG Forge -- official beta: 09/11/02, SVN revision: 86 tokens--file=AllTokens.txt diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 324323cc0f4..b930a38a3b6 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -14527,13 +14527,12 @@ public class CardFactory implements NewConstants { //TODO } + public boolean canPlayAI() { return false; } };//SpellAbility //card.clearSpellAbility(); ability.setDescription("G: Discard a creature card: Search your library for a creature card, reveal that card, and put it into your hand. Then shuffle your library."); - //ability.setBeforePayMana(new Input_NoCost_TapAbility((Ability) ability)); - //ability.setBeforePayMana(new Input_PayManaCost(ability)); ability.setStackDescription("Survival of the Fittest - search for a creature card and put into hand"); card.addSpellAbility(ability); }//*************** END ************ END ************************** @@ -16687,7 +16686,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); { final Ability ability = new Ability(card, "0") { - public boolean canPlayAI() {return getCreature().size() != 0;} + public boolean canPlayAI() {return getCreature().size() != 0 || AllZone.Human_Life.getLife() < 4;} public void chooseTargetAI() { @@ -16709,7 +16708,7 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); { public boolean addCard(Card c) { - //only get 1/1 flyers or 2/1 creatures + //only get 1/1 flyers or 2/1 or bigger creatures return (2 <= c.getNetAttack()) || c.getKeyword().contains("Flying"); } }); @@ -16741,6 +16740,140 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); }, true)); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + else if(cardName.equals("Seal of Removal")) + { + final Ability ability = new Ability(card, "0") + { + public boolean canPlayAI() {return getCreature().size() != 0;} + + public void chooseTargetAI() + { + CardList list = getCreature(); + list.shuffle(); + setTargetCard(list.get(0)); + + AllZone.GameAction.sacrifice(card); + }//chooseTargetAI() + CardList getCreature() + { + CardList list = new CardList(AllZone.Computer_Play.getCards()); + list = list.filter(new CardListFilter() + { + public boolean addCard(Card c) + { + return c.isCreature() && (c.getNetAttack() >= 3|| c.getKeyword().contains("Flying") || + c.isEnchanted()); + } + }); + return list; + }//getCreature() + + public void resolve() + { + if(getTargetCard() != null) + { + + if(AllZone.GameAction.isCardInPlay(getTargetCard()) && CardFactoryUtil.canTarget(card, getTargetCard()) ) + { + PlayerZone hand = AllZone.getZone(Constant.Zone.Hand, getTargetCard().getOwner()); + AllZone.GameAction.moveTo(hand, getTargetCard()); + } + } + }//resolve() + };//SpellAbility + + card.addSpellAbility(ability); + ability.setDescription("Sacrifice Seal of Removal: return target creature to its owner's hand."); + ability.setBeforePayMana(CardFactoryUtil.input_targetCreature(ability, new Command() + { + + private static final long serialVersionUID = 2565599788533507611L; + + public void execute() + { + AllZone.GameAction.sacrifice(card); + } + })); + }//*************** END ************ END ************************** + + + //*************** START *********** START ************************** + else if(cardName.equals("Conqueror's Pledge")) + { + SpellAbility spell = new Spell(card) + { + private static final long serialVersionUID = -2902179434079334177L; + + public void resolve() + { + PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); + for (int i = 0; i < 6; i++) + { + Card c = new Card(); + + c.setOwner(card.getController()); + c.setController(card.getController()); + + c.setName("Kor Soldier"); + c.setImageName("W 1 1 Kor Soldier"); + c.setManaCost("W"); + c.setToken(true); + + c.addType("Creature"); + c.addType("Kor"); + c.addType("Soldier"); + c.setBaseAttack(1); + c.setBaseDefense(1); + + play.add(c); + }//for + }//resolve() + }; + + spell.setDescription("Put six 1/1 white Kor Soldier creature tokens onto the battlefield."); + spell.setStackDescription(card.getName() + " - " + card.getController() + " puts six 1/1 white Kor Soldier creature tokens onto the battlefield."); + + SpellAbility kicker = new Spell(card) + { + + private static final long serialVersionUID = 1376255732058673590L; + + public void resolve() + { + PlayerZone play = AllZone.getZone(Constant.Zone.Play, card.getController()); + for (int i = 0; i < 12; i++) + { + Card c = new Card(); + + c.setOwner(card.getController()); + c.setController(card.getController()); + + c.setName("Kor Soldier"); + c.setImageName("W 1 1 Kor Soldier"); + c.setManaCost("W"); + c.setToken(true); + + c.addType("Creature"); + c.addType("Kor"); + c.addType("Soldier"); + c.setBaseAttack(1); + c.setBaseDefense(1); + + play.add(c); + }//for + }//resolve() + }; + + kicker.setManaCost("8 W W W"); + kicker.setDescription("Kicker 6: If Conqueror's Pledge was kicked, put twelve of those tokens onto the battlefield instead."); + kicker.setStackDescription(card.getName() + " - " + card.getController() + " puts twelve 1/1 white Kor Soldier creature tokens onto the battlefield."); + + card.clearSpellAbility(); + card.addSpellAbility(spell); + card.addSpellAbility(kicker); + }//*************** END ************ END ************************** + // Cards with Cycling abilities // -1 means keyword "Cycling" not found diff --git a/src/forge/CardFactoryUtil.java b/src/forge/CardFactoryUtil.java index b3f39c100bf..58ad1a884f3 100644 --- a/src/forge/CardFactoryUtil.java +++ b/src/forge/CardFactoryUtil.java @@ -2407,6 +2407,21 @@ public class CardFactoryUtil return list; } + //do card1 and card2 share any colors? + public static boolean sharesColorWith(Card card1, Card card2) + { + ArrayList card1Colors = CardUtil.getColors(card1); + ArrayList card2Colors = CardUtil.getColors(card2); + + for (String color : card1Colors) + { + if (card2Colors.contains(color)) + return true; + } + + return false; + } + //may return null static public Card getRandomCard(CardList list) { diff --git a/src/forge/CardFactory_Auras.java b/src/forge/CardFactory_Auras.java index 06e6530ae90..9ff5252f4ba 100644 --- a/src/forge/CardFactory_Auras.java +++ b/src/forge/CardFactory_Auras.java @@ -246,12 +246,9 @@ class CardFactory_Auras { Command onEnchant = new Command() { - /** - * - */ private static final long serialVersionUID = 4941909585318384005L; - public void execute() + public void execute() { if (card.isEnchanting()) { @@ -5195,8 +5192,8 @@ class CardFactory_Auras { if (card.isEnchanting()) { Card crd = card.getEnchanting().get(0); - crd.addSemiPermanentAttackBoost(3); - crd.addExtrinsicKeyword("First Strike"); + crd.addSemiPermanentAttackBoost(3); + crd.addExtrinsicKeyword("First Strike"); } }//execute() @@ -5548,6 +5545,110 @@ class CardFactory_Auras { spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell)); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Treetop Bracers")) + { + final SpellAbility spell = new Spell(card) + { + + private static final long serialVersionUID = -2869740221361303938L; + public boolean canPlayAI() + { + CardList list = new CardList(AllZone.Computer_Play.getCards()); + list = list.getType("Creature"); + + if(list.isEmpty()) + return false; + + //else + CardListUtil.sortAttack(list); + CardListUtil.sortFlying(list); + + for (int i=0;i