From d0d00f3b7661aa721d56163e9ce5cb67e9f5e9f1 Mon Sep 17 00:00:00 2001 From: jendave Date: Sat, 6 Aug 2011 05:58:54 +0000 Subject: [PATCH] *Added Sutured Ghoul *Added Rarity SVars to a bunch of cards. --- res/cards.txt | 18 +++++++ src/forge/CardFactory_Creatures.java | 71 +++++++++++++++++++++++++++- 2 files changed, 88 insertions(+), 1 deletion(-) diff --git a/res/cards.txt b/res/cards.txt index 32f4b54ef91..db9d515dd29 100644 --- a/res/cards.txt +++ b/res/cards.txt @@ -1,3 +1,11 @@ +Sutured Ghoul +4 B B B +Creature Zombie +As Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness. +1/1 +Trample +SVar:Rarity:Rare + Patriarch's Bidding 3 B B Sorcery @@ -9,6 +17,7 @@ Death Baron Creature Zombie Wizard Skeleton creatures you control and other Zombie creatures you control get +1/+1 and have deathtouch. 2/2 +SVar:Rarity:Rare Squadron Hawk 1 W @@ -17,6 +26,7 @@ no text 1/1 Flying When CARDNAME enters the battlefield, you may search your library for up to three cards named CARDNAME, reveal them, and put them into your hand. If you do, shuffle your library. +SVar:Rarity:Common Skyshroud Sentinel 2 G @@ -24,6 +34,7 @@ Creature Elf no text 1/1 When CARDNAME enters the battlefield, you may search your library for up to three cards named CARDNAME, reveal them, and put them into your hand. If you do, shuffle your library. +SVar:Rarity:Common Nesting Wurm 4 G G @@ -31,6 +42,7 @@ Creature Wurm no text 4/3 When CARDNAME enters the battlefield, you may search your library for up to three cards named CARDNAME, reveal them, and put them into your hand. If you do, shuffle your library. +SVar:Rarity:Uncommon Howling Wolf 2 G G @@ -38,6 +50,7 @@ Creature Wolf no text 2/2 When CARDNAME enters the battlefield, you may search your library for up to three cards named CARDNAME, reveal them, and put them into your hand. If you do, shuffle your library. +SVar:Rarity:Common Lovisa Coldeyes 3 R R @@ -45,6 +58,7 @@ Legendary Creature Human Barbarian Warrior, Berserker, and/or other Barbarian creatures get +2/+2 and have haste. 3/3 SVar:PlayMain1:TRUE +SVar:Rarity:Rare Dragon Tyrant 8 R R @@ -56,6 +70,7 @@ Trample Double Strike At the beginning of your upkeep, sacrifice CARDNAME unless you pay:R R R R abPump R:+1/+0 +SVar:Rarity:Rare Chaosphere 2 R @@ -65,6 +80,7 @@ StaticEffect:Play:All Permanents:Keyword/CARDNAME can block only creatures with StaticEffect:Play:All Permanents:Keyword/Reach:Type.Creature!without.Flying:Creatures without flying have reach. (They can block creatures with flying.) SVar:PlayMain1:TRUE SVar:RemAIDeck:True +SVar:Rarity:Rare Dense Canopy 1 G @@ -73,6 +89,7 @@ no text StaticEffect:Play:All Permanents:Keyword/CARDNAME can block only creatures with flying.:Type.Creature!with.Flying:Creatures with flying can block only creatures with flying. SVar:PlayMain1:TRUE SVar:RemAIDeck:True +SVar:Rarity:Uncommon Seething Pathblazer 2 R @@ -80,6 +97,7 @@ Creature Elemental Warrior no text 2/2 abPump 0 Sac-Elemental:+2/+0/First Strike +SVar:Rarity:Common Abandoned Outpost no cost diff --git a/src/forge/CardFactory_Creatures.java b/src/forge/CardFactory_Creatures.java index b90e4d50c4e..0ca45c82089 100644 --- a/src/forge/CardFactory_Creatures.java +++ b/src/forge/CardFactory_Creatures.java @@ -20863,7 +20863,76 @@ public class CardFactory_Creatures { };//Ability_Mana card.addSpellAbility(ability); - }//*************** END ************ END ************************** + }//*************** END ************ END ************************** + + //*************** START *********** START ************************** + if(cardName.equals("Sutured Ghoul")) { + + //final String player = card.getController(); + final int[] numCreatures = new int[1]; + final int[] sumPower = new int[1]; + final int[] sumToughness = new int[1]; + + Command intoPlay = new Command() { + private static final long serialVersionUID = -75234586897814L; + + public void execute() { + int intermSumPower,intermSumToughness; + intermSumPower = intermSumToughness = 0; + PlayerZone grave = AllZone.getZone(Constant.Zone.Graveyard, card.getController()); + CardList creats = new CardList(grave.getCards()); + creats = creats.filter(new CardListFilter() { + public boolean addCard(Card c) { + return c.isCreature() && !c.equals(card); + } + }); + + //System.out.println("Creats size: " + creats.size()); + + if(card.getController().equals(Constant.Player.Human)) { + if (creats.size() > 0) + { + List selection = AllZone.Display.getChoicesOptional("Select creatures to sacrifice", creats.toArray()); + + numCreatures[0] = selection.size(); + for(int m = 0; m < selection.size(); m++) { + intermSumPower += selection.get(m).getBaseAttack(); + intermSumToughness += selection.get(m).getBaseDefense(); + AllZone.GameAction.removeFromGame(selection.get(m)); + } + } + + }//human + else { + int count = 0; + for(int i = 0; i < creats.size(); i++) { + Card c = creats.get(i); + if(c.getNetAttack() <= 2 && c.getNetDefense() <= 3) { + intermSumPower += c.getBaseAttack(); + intermSumToughness += c.getBaseDefense(); + AllZone.GameAction.removeFromGame(c); + count++; + } + //is this needed? + AllZone.Computer_Play.updateObservers(); + } + numCreatures[0] = count; + } + sumPower[0] = intermSumPower; + sumToughness[0] = intermSumToughness; + card.setBaseAttack(sumPower[0]); + card.setBaseDefense(sumToughness[0]); + //AllZone.Stack.add(suture); + } + }; + + //suture.setStackDescription(card.getName() + " - has power equal to the sum of the power of all exiled creatures and toughness equal to the sum of their toughness."); + //suture.setDescription("When Sutured Ghoul enters the battlefield, exile any number of creature cards from your graveyard. Sutured Ghoul's power is equal to the total power of the exiled cards and its toughness is equal to their total toughness."); + //card.addSpellAbility(suture); + card.addComesIntoPlayCommand(intoPlay); + + //card.addSpellAbility(CardFactoryUtil.ability_Devour(card, magnitude)); + }//*************** END ************ END ************************** // Cards with Cycling abilities // -1 means keyword "Cycling" not found