diff --git a/res/card-pictures.txt b/res/card-pictures.txt index f782c80bb15..1c5bd338d77 100644 --- a/res/card-pictures.txt +++ b/res/card-pictures.txt @@ -18,6 +18,45 @@ forest.jpg http://resources.wizards.com/magic/cards/unh/en-us/card73946.jpg forest1.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=2748 forest2.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=587 forest3.jpg http://gatherer.wizards.com/handlers/image.ashx?type=card&multiverseid=586 +adun_oakenshield.jpg http://www.wizards.com/global/images/magic/general/adun_oakenshield.jpg +ayumi_the_last_visitor.jpg http://www.wizards.com/global/images/magic/general/ayumi_the_last_visitor.jpg +azorius_first_wing.jpg http://www.wizards.com/global/images/magic/general/azorius_first_wing.jpg +bant_sureblade.jpg http://www.wizards.com/global/images/magic/general/bant_sureblade.jpg +bartel_runeaxe.jpg http://www.wizards.com/global/images/magic/general/bartel_runeaxe.jpg +benalish_heralds.jpg http://www.wizards.com/global/images/magic/general/benalish_heralds.jpg +benalish_hero.jpg http://www.wizards.com/global/images/magic/general/benalish_hero.jpg +boris_devilboon.jpg http://www.wizards.com/global/images/magic/general/boris_devilboon.jpg +buoyancy.jpg http://www.wizards.com/global/images/magic/general/buoyancy.jpg +dakkon_blackblade.jpg http://www.wizards.com/global/images/magic/general/dakkon_blackblade.jpg +dakmor_ghoul.jpg http://www.magickartenmarkt.de/img/cards/Starter_1999/dakmor_ghoul.jpg +esper_stormblade.jpg http://www.wizards.com/global/images/magic/general/esper_stormblade.jpg +feast_of_the_unicorn.jpg http://www.wizards.com/global/images/magic/general/feast_of_the_unicorn.jpg +grixis_grimblade.jpg http://www.wizards.com/global/images/magic/general/grixis_grimblade.jpg +gwendlyn_di_corci.jpg http://www.wizards.com/global/images/magic/general/gwendlyn_di_corci.jpg +jacques_le_vert.jpg http://www.wizards.com/global/images/magic/general/jacques_le_vert.jpg +jund_hackblade.jpg http://www.wizards.com/global/images/magic/general/jund_hackblade.jpg +karakas.jpg http://www.wizards.com/global/images/magic/general/karakas.jpg +livonya_silone.jpg http://www.wizards.com/global/images/magic/general/livonya_silone.jpg +magefire_wings.jpg http://www.wizards.com/global/images/magic/general/magefire_wings.jpg +magetas_boon.jpg http://www.wizards.com/global/images/magic/general/magetas_boon.jpg +magnivore.jpg http://www.wizards.com/global/images/magic/general/magnivore.jpg +maniacal_rage.jpg http://www.wizards.com/global/images/magic/general/maniacal_rage.jpg +mask_of_law_and_grace.jpg http://www.wizards.com/global/images/magic/general/mask_of_law_and_grace.jpg +mystic_enforcer.jpg http://www.wizards.com/global/images/magic/general/mystic_enforcer.jpg +naya_hushblade.jpg http://www.wizards.com/global/images/magic/general/naya_hushblade.jpg +no_dachi.jpg http://www.wizards.com/global/images/magic/general/no_dachi.jpg +reflexes.jpg http://www.wizards.com/global/images/magic/general/reflexes.jpg +sacred_nectar.jpg http://www.wizards.com/global/images/magic/general/sacred_nectar.jpg +scavenged_weaponry.jpg http://www.wizards.com/global/images/magic/general/scavenged_weaponry.jpg +shield_of_duty_and_reason.jpg http://www.wizards.com/global/images/magic/general/shield_of_duty_and_reason.jpg +shuko.jpg http://www.wizards.com/global/images/magic/general/shuko.jpg +stangg.jpg http://www.wizards.com/global/images/magic/general/stangg.jpg +tethered_griffin.jpg http://www.wizards.com/global/images/magic/general/tethered_griffin.jpg +tetsuo_umezawa.jpg http://www.wizards.com/global/images/magic/general/tetsuo_umezawa.jpg +tiger_claws.jpg http://www.wizards.com/global/images/magic/general/tiger_claws.jpg +vigilance.jpg http://www.wizards.com/global/images/magic/general/vigilance.jpg +xira_arien.jpg http://www.wizards.com/global/images/magic/general/xira_arien.jpg +zuberi_golden_feather.jpg http://www.wizards.com/global/images/magic/general/zuberi_golden_feather.jpg orcish_cannonade.jpg http://www.wizards.com/global/images/magic/general/orcish_cannonade.jpg kindle.jpg http://www.wizards.com/global/images/magic/general/kindle.jpg ire_of_kaminari.jpg http://www.wizards.com/global/images/magic/general/ire_of_kaminari.jpg diff --git a/res/cards.txt b/res/cards.txt index b806ac216a1..8424238d11b 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,78 @@ +Disentomb +B +Sorcery +no text +spRaiseDead:1 + +Raise Dead +B +Sorcery +no text +spRaiseDead:1 + +Recover +2 B +Sorcery +Draw a card. +spRaiseDead:1 +Cantrip + +Return to Battle +B +Sorcery +no text +spRaiseDead:1 + +Lich Lord of Unx +1 U B +Creature Zombie Wizard +no text +2/2 + +Jund Battlemage +2 R +Creature Human Shaman +no text +2/2 + +Rejuvenate +3 G +Sorcery +You gain 6 life. Cycling 2. + +Absolute Grace +1 W +Enchantment +All creatures gain protection from black. + +Absolute Law +1 W +Enchantment +All creatures gain protection from red. + +Braidwood Cup +3 +Artifact +no text + +Onyx Goblet +2 B +Artifact +no text + +Lightning Talons +2 R +Enchantment Aura +Enchanted creature gets +3/+0 and has first strike. +Enchant creature + +Despondency +1 B +Enchantment Aura +Enchanted creature gets -2/+0. +When this card is put into a graveyard from the battlefield, return this card to its owner's hand +Enchant creature + Snow-Covered Forest no cost Basic Snow Land Forest @@ -68,6 +143,103 @@ Comes into play tapped. tap: add B tap: add R +No-Dachi +2 +Artifact Equipment +Equipped creature gets +2/+0 and has first strike. + +Shuko +1 +Artifact Equipment +Equipped creature gets +1/+0. + +Tiger Claws +2 G +Enchantment Aura +Enchanted creature gets +1/+1 and has trample. +Enchant creature +Flash + +Mageta's Boon +1 W +Enchantment Aura +Enchanted creature gets +1/+2. +Enchant creature +Flash + +Buoyancy +1 U +Enchantment Aura +Enchanted creature has Flying. +Enchant creature +Flash + +Feast of the Unicorn +3 B +Enchantment Aura +Enchanted creature gets +4/+0. +Enchant creature + +Vigilance +W +Enchantment Aura +Enchanted creature has vigilance. +Enchant creature + +Mask of Law and Grace +W +Enchantment Aura +Enchanted creature has protection from black and from red. +Enchant creature + +Benalish Heralds +3 W +Creature Human Soldier +no text +2/4 + +Magefire Wings +U R +Enchantment Aura +Enchanted creature gets +2/+0 and has flying. +Enchant creature + +Benalish Hero +1 W +Creature Human Soldier +no text +1/2 + +Sacred Nectar +1 W +Sorcery +You gain 4 life. + +Maniacal Rage +1 R +Enchantment Aura +Enchanted creature gets +2/+2 and this creature cannot block. +Enchant creature + +Scavenged Weaponry +2 B +Enchantment Aura +Enchanted creature gets +1/+1. +Enchant creature +Cantrip + +Shield of Duty and Reason +W +Enchantment Aura +Enchanted creature has first protection from green and from blue. +Enchant creature + +Reflexes +R +Enchantment Aura +Enchanted creature has first strike. +Enchant creature + Dakmor Ghoul 2 B B Creature Zombie @@ -111,7 +283,7 @@ spDamageTgtCP:Count$NamedInAllYards.Kindle/Plus.2:Kindle deals X damage to targe Ire of Kaminari 3 R -Instant � Arcane +Instant — Arcane no text spDamageTgtCP:Count$TypeInYourYard.Arcane:Ire of Kaminari deals damage to target creature or player equal to the number of Arcane cards in your graveyard. @@ -155,7 +327,7 @@ Thermal Blast 4 R Instant no text -spDamageTgtC:Count$Hellbent.5.3:Thermal Blast deals 3 damage to target creature. Threshold � Thermal Blast deals 5 damage to that creature instead if seven or more cards are in your graveyard. +spDamageTgtC:Count$Hellbent.5.3:Thermal Blast deals 3 damage to target creature. Threshold — Thermal Blast deals 5 damage to that creature instead if seven or more cards are in your graveyard. Spitting Earth 1 R @@ -218,7 +390,7 @@ Legendary Creature Zombie Wizard no text 2/2 -Aedun Oakenshield +Adun Oakenshield G R B Legendary Creature Human Knight no text @@ -279,7 +451,7 @@ Legendary Creature Human Warrior When Stangg enters the battlefield, if Stangg is on the battlefield, put a legendary 3/4 red and green Human Warrior creature token named Stangg Twin onto the battlefield. When Stangg leaves the battlefield, exile that token. When that token leaves the battlefield, sacrifice Stangg. 3/4 -Bartel Runaxe +Bartel Runeaxe 3 G R B Legendary Creature Giant Warrior no text @@ -335,7 +507,7 @@ no text Azusa, Lost but Seeking 2 G Legendary Creature Human Monk -no text +You may play two additional lands on each of your turns. 1/2 Temporal Spring @@ -1111,7 +1283,7 @@ Enchanted creature has double strike. Enchant creature Uncontrollable Anger -2 R +2 R R Enchantment Aura Enchanted creature gets +2/+2 and attacks each turn if able. Flash @@ -1469,12 +1641,6 @@ G Instant no text -Recover -2 B -Sorcery -Return target creature card from your graveyard to your hand. Draw a card. -Cantrip - Dunerider Outlaw B B Creature Human Rebel Rogue @@ -2016,11 +2182,6 @@ Creature Human Soldier When Shu Grain Caravan enters the battlefield, you gain 2 life. 2/2 -Return to Battle -B -Sorcery -Return target creature card from your graveyard to your hand. - Corrupt Court Official 1 B Creature Human Advisor @@ -2816,11 +2977,6 @@ Creature Fungus Snake Whenever an opponent casts a blue or black spell, you may put a +1/+1 counter on Mold Adder. 1/1 -Disentomb -B -Sorcery -Return target creature card from your graveyard to your hand. - Planar Cleansing 3 W W W Sorcery @@ -5598,12 +5754,12 @@ When Oubliette comes into play, remove target creature and all Auras attached to Exploration G Enchantment -no text +You may play an additional land each of your turns. Fastbond G Enchantment -no text +You may play as many lands as you choose on your turn. Whenever you play a land other than the first land of the turn, Fastbond deals 1 damage to you. Tempest of Light 2 W @@ -11909,11 +12065,6 @@ Douse in Gloom Instant Douse in Gloom deals 2 damage to target creature and you gain 2 life. -Raise Dead -B -Sorcery -Return target creature card from your graveyard to your hand. - Infest 1 B B Sorcery diff --git a/src/forge/CardFactory.java b/src/forge/CardFactory.java index 2a78a77eae9..4423f011a91 100644 --- a/src/forge/CardFactory.java +++ b/src/forge/CardFactory.java @@ -351,6 +351,16 @@ public class CardFactory implements NewConstants { return -1; } + + // spRaiseDead + private final int shouldSpRaiseDead(Card c){ + ArrayList a = c.getKeyword(); + for (int i = 0; i < a.size(); i++) + if (a.get(i).toString().startsWith("spRaiseDead")) + return i; + + return -1; + } private final int shouldManaAbility(Card c){ ArrayList a = c.getIntrinsicKeyword(); @@ -2590,6 +2600,174 @@ public class CardFactory implements NewConstants { card.clearSpellAbility(); card.addSpellAbility(spPump); } + + if (shouldSpRaiseDead(card) != -1) + { + int n = shouldSpRaiseDead(card); + if (n != -1) + { + String parse = card.getKeyword().get(n).toString(); + card.removeIntrinsicKeyword(parse); + String k[] = parse.split(":"); // charm descriptions will appear at k[2] and k[3] + final String kk[] = k[1].split("/"); // numCreatures = kk[0], other fields = kk[1] through kk[2] + int numFieldsKK = kk.length; + final int numCreatures = Integer.parseInt(kk[0]); + boolean quantifier = false; + String tmpTgt = "Creature"; + + for (int i=2; i<=numFieldsKK; i++) + { + if (kk[(i-1)].equals ("Some")) + { + quantifier = true; + } + else // can only be a specific creature type at his time, Goblin for goblin creatures and Tarfire + { + tmpTgt = kk[i-1]; + } + } + + final String targetTypeToReturn = tmpTgt; + final boolean weReturnUpTo = quantifier; + final String spDesc[] = {"none"}; + final String stDesc[] = {"none"}; + + if (k.length > 2) + spDesc[0] = k[2]; + if (k.length > 3) + stDesc[0] = k[3]; + + final SpellAbility spell = new Spell(card) + { + private static final long serialVersionUID = 6938982619919149188L; + public boolean canPlayAI() {return getGraveCreatures().size() >= numCreatures;} + + CardList targets; + public void chooseTargetAI() + { + CardList grave = getGraveCreatures(); + targets = new CardList(); + + if (targetTypeToReturn.equals ("Creature")) + { + for (int i=0; i numCreatures) // this is for spells which state Return target creature card + for (int i=0; i= numCreatures; + } + + CardList getGraveCreatures() + { + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController()); + CardList list = new CardList(grave.getCards()); + String cardController = card.getController(); + + if (cardController.equals ("Human") || (cardController.equals ("Computer")) && (targetTypeToReturn.equals ("Creature"))) + { + list = list.getType(targetTypeToReturn); + } + else // prevent the computer from using a Boggart Birth Rite to return a Boggart Birth Rite + { + CardList tempList = new CardList(grave.getCards()); + tempList = list.getType(targetTypeToReturn); + list = new CardList(); + for (int i=0; i 1) + { spDesc[0] = (spDesc[0] + numCreatures + " "); } + spDesc[0] = (spDesc[0] + "target "); + if (targetTypeToReturn.equals ("Creature")) + { spDesc[0] = (spDesc[0] + "creature"); } + else + { spDesc[0] = (spDesc[0] + targetTypeToReturn); } + if (numCreatures > 1) + { spDesc[0] = (spDesc[0] + "s"); } + spDesc[0] = (spDesc[0] + " card"); + if (numCreatures > 1) + { spDesc[0] = (spDesc[0] + "s"); } + spDesc[0] = (spDesc[0] + " from your graveyard to your hand."); + } + + if (stDesc[0].equals("none")) // create the card stack descriptiopn + { + stDesc[0] = (card.getName() + " - returns target card"); + if (numCreatures > 1) + { stDesc[0] = (stDesc[0] + "s"); } + stDesc[0] = (stDesc[0] + " from " + card.getController() + "'s graveyard to " + card.getController() + "'s hand."); + } + + spell.setDescription(spDesc[0]); + spell.setStackDescription(stDesc[0]); + card.clearSpellAbility(); + card.addSpellAbility(spell); + } + }// spRaiseDead while (shouldManaAbility(card) != -1) @@ -3873,6 +4051,7 @@ public class CardFactory implements NewConstants { + /* //*************** START *********** START ************************** if(cardName.equals("Raise Dead") || cardName.equals("Disentomb") || cardName.equals("Return to Battle") || cardName.equals("Recover")) @@ -3919,7 +4098,7 @@ public class CardFactory implements NewConstants { card.addSpellAbility(spell); }//*************** END ************ END ************************** - + */ //*************** START *********** START ************************** @@ -16591,6 +16770,48 @@ return land.size() > 1 && CardFactoryUtil.AI_isMainPhase(); }//*************** END ************ END ************************** + //*************** START *********** START ************************** + if(cardName.equals("Onyx Goblet")) + { + final Ability_Tap ability = new Ability_Tap(card) + { + private static final long serialVersionUID = -5726693225692494554L; + + public boolean canPlayAI() {return AllZone.Phase.getPhase().equals(Constant.Phase.Main2);} + + public void resolve() + { + String opponent = AllZone.GameAction.getOpponent(card.getController()); + AllZone.GameAction.getPlayerLife(opponent).subtractLife(1); + } + };//SpellAbility + card.addSpellAbility(ability); + ability.setDescription("tap: Target player loses 1 life."); + ability.setStackDescription(card.getName() + " - Opponent loses 1 life."); + ability.setBeforePayMana(new Input_NoCost_TapAbility(ability)); + }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + if(cardName.equals("Braidwood Cup")) + { + final Ability_Tap ability = new Ability_Tap(card) + { + private static final long serialVersionUID = -7784976576326683976L; + + public boolean canPlayAI() {return AllZone.Phase.getPhase().equals(Constant.Phase.Main2);} + + public void resolve() + { + AllZone.GameAction.getPlayerLife(card.getController()).addLife(1); + } + };//SpellAbility + card.addSpellAbility(ability); + ability.setDescription("tap: You gain 1 life."); + ability.setStackDescription("Braidwood Cup -"+card.getController() + " gains 1 life."); + ability.setBeforePayMana(new Input_NoCost_TapAbility(ability)); + }//*************** END ************ END ************************** + + // Cards with Cycling abilities // -1 means keyword "Cycling" not found if (shouldCycle(card) != -1) diff --git a/src/forge/CardFactory_Auras.java b/src/forge/CardFactory_Auras.java index 881f843eb31..ebcda421214 100644 --- a/src/forge/CardFactory_Auras.java +++ b/src/forge/CardFactory_Auras.java @@ -5139,6 +5139,209 @@ class CardFactory_Auras { spell.setBeforePayMana(CardFactoryUtil.input_targetCreature(spell)); }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + else if(cardName.equals("Lightning Talons")) + { + final SpellAbility spell = new Spell(card) + { + + private static final long serialVersionUID = -5377796694870681717L; + 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= 3; + } + + public void resolve() + { + if (getTargetPlayer() != null) { + PlayerZone lib = AllZone.getZone(Constant.Zone.Library, getTargetPlayer()); + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, getTargetPlayer()); + + for (int i=0;i