From 7c3464e3bad3c5131d8a9bfc1ed1e1d150e00b82 Mon Sep 17 00:00:00 2001 From: "wagic.laurent" Date: Sun, 21 Jun 2009 01:59:28 +0000 Subject: [PATCH] Laurent - 10E - 6 cards added Added Graveborn Muse (just missing one muse now, too complicated for me). Added Beacon of destruction,unrest and immortality. Added Traumatize Added Verdant Force All tested (except beacon of unrest) and working. --- projects/mtg/bin/Res/sets/10E/_cards.dat | 67 ++++++++++++++++++++ projects/mtg/bin/Res/sets/10E/todo.dat | 60 ------------------ projects/mtg/include/AllAbilities.h | 81 +++++++++++++++++++++++- projects/mtg/src/MTGAbility.cpp | 55 +++++++++++++++- 4 files changed, 200 insertions(+), 63 deletions(-) diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 345e2f145..b66ee0cfa 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -186,6 +186,39 @@ color=Land type=Land [/card] [card] +text=Beacon of Destruction deals 5 damage to target creature or player. Shuffle Beacon of Destruction into its owner's library. +id=135262 +name=Beacon of Destruction +target=creature,player +auto=damage:5 +rarity=R +color=Red +type=Instant +mana={3}{R}{R} +[/card] +[card] +text=Double target player's life total. Shuffle Beacon of Immortality into its owner's library. +id=130553 +target=player +name=Beacon of Immortality +rarity=R +color=White +type=Instant +mana={5}{W} +[/card] +[card] +text=Put target artifact or creature card in a graveyard into play under your control. Shuffle Beacon of Unrest into its owner's library. +id=135270 +target=creature,artifact|graveyard +auto=moveto(myinplay) +alias=135262 +name=Beacon of Unrest +rarity=R +color=Black +type=Sorcery +mana={3}{B}{B} +[/card] +[card] text=Flash (You may play this spell any time you could play an instant.) First strike (This creature deals combat damage before creatures without first strike.) abilities=flash,first strike id=136279 @@ -992,6 +1025,18 @@ subtype=Goblin Warrior toughness=2 [/card] [card] +text=At the beginning of your upkeep, you draw X cards and you lose X life, where X is the number of Zombies you control. +id=135256 +name=Graveborn Muse +rarity=R +color=Black +type=Creature +mana={2}{B}{B} +power=3 +subtype=Zombie Spirit +toughness=3 +[/card] +[card] text=When Gravedigger comes into play, you may return target creature card from your graveyard to your hand. auto=may moveTo(myhand) target(creature|mygraveyard) id=129584 @@ -2681,6 +2726,16 @@ type=Sorcery mana={3}{U}{U} [/card] [card] +text=Target player puts the top half of his or her library, rounded down, into his or her graveyard. +id=129774 +target=player +name=Traumatize +rarity=R +color=Blue +type=Sorcery +mana={3}{U}{U} +[/card] +[card] text=When Treasure Hunter comes into play, you may return target artifact card from your graveyard to your hand. auto=may moveTo(myhand) target(artifact|mygraveyard) id=135232 @@ -2795,6 +2850,18 @@ subtype=Human Monk Cleric toughness=2 [/card] [card] +text=At the beginning of each upkeep, put a 1/1 green Saproling creature token into play under your control. +id=129788 +name=Verdant Force +rarity=R +color=Green +type=Creature +mana={5}{G}{G}{G} +power=7 +subtype=Elemental +toughness=7 +[/card] +[card] text=When Viridian Shaman comes into play, destroy target artifact. id=129792 name=Viridian Shaman diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index ae318aef6..5c830014d 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -135,33 +135,6 @@ type=Instant mana={W} [/card] [card] -text=Beacon of Destruction deals 5 damage to target creature or player. Shuffle Beacon of Destruction into its owner's library. -id=135262 -name=Beacon of Destruction -rarity=R -color=Red -type=Instant -mana={3}{R}{R} -[/card] -[card] -text=Double target player's life total. Shuffle Beacon of Immortality into its owner's library. -id=130553 -name=Beacon of Immortality -rarity=R -color=White -type=Instant -mana={5}{W} -[/card] -[card] -text=Put target artifact or creature card in a graveyard into play under your control. Shuffle Beacon of Unrest into its owner's library. -id=135270 -name=Beacon of Unrest -rarity=R -color=Black -type=Sorcery -mana={3}{B}{B} -[/card] -[card] text=When Bogardan Firefiend is put into a graveyard from play, it deals 2 damage to target creature. id=130534 name=Bogardan Firefiend @@ -452,18 +425,6 @@ type=Enchantment mana={1}{B}{B}{B} [/card] [card] -text=At the beginning of your upkeep, you draw X cards and you lose X life, where X is the number of Zombies you control. -id=135256 -name=Graveborn Muse -rarity=R -color=Black -type=Creature -mana={2}{B}{B} -power=3 -subtype=Zombie Spirit -toughness=3 -[/card] -[card] text=Guerrilla Tactics deals 2 damage to target creature or player. When a spell or ability an opponent controls causes you to discard Guerrilla Tactics, Guerrilla Tactics deals 4 damage to target creature or player. id=129588 name=Guerrilla Tactics @@ -1258,15 +1219,6 @@ type=Sorcery mana={8}{U}{U} [/card] [card] -text=Target player puts the top half of his or her library, rounded down, into his or her graveyard. -id=129774 -name=Traumatize -rarity=R -color=Blue -type=Sorcery -mana={3}{U}{U} -[/card] -[card] text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) Enchanted creature gets +1/+1 and can't be blocked except by creatures with flying. id=129777 name=Treetop Bracers @@ -1345,18 +1297,6 @@ type=Enchantment mana={3}{G} [/card] [card] -text=At the beginning of each upkeep, put a 1/1 green Saproling creature token into play under your control. -id=129788 -name=Verdant Force -rarity=R -color=Green -type=Creature -mana={5}{G}{G}{G} -power=7 -subtype=Elemental -toughness=7 -[/card] -[card] text=Viashino Runner can't be blocked except by two or more creatures. id=130531 name=Viashino Runner diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 40aae8f89..e1bc3d981 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3740,10 +3740,9 @@ class ARampageAbility:public MTGAbility{ } }; -// Dreamborn Muse +// Seedborn Muse class ASeedbornMuse: public TriggeredAbility{ public: - int nbcards; ASeedbornMuse(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){ } @@ -3768,4 +3767,82 @@ class ASeedbornMuse: public TriggeredAbility{ } }; +// Graveborn Muse +class AGravebornMuse: public TriggeredAbility{ + public: + int nbcards_life; + AGravebornMuse(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){ + nbcards_life=0; + } + + int trigger(){ + if (newPhase != currentPhase && newPhase == Constants::MTG_PHASE_UPKEEP && ((MTGCardInstance *) source)->controller()== game->currentPlayer){ + return 1; + } + return 0; + } + + int resolve(){ + for (int j = source->controller()->game->inPlay->nb_cards-1; j >=0 ; j--){ + MTGCardInstance * current = source->controller()->game->inPlay->cards[j]; + if (current->hasSubtype("zombie")){ + nbcards_life++; + } + } + source->controller()->life-=nbcards_life; + game->mLayers->stackLayer()->addDraw(source->controller(),nbcards_life); + return 1; + } + virtual ostream& toString(ostream& out) const + { + out << "AGravebornMuse ::: nbcards_life : " << nbcards_life + << " ("; + return TriggeredAbility::toString(out) << ")"; + } +}; + +// Verdant Force +class AVerdantForce: public TriggeredAbility{ + public: + listtypes; + AVerdantForce(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){ + string s = "Saproling Creature"; + while (s.size()){ + unsigned int found = s.find(" "); + if (found != string::npos){ + int id = Subtypes::subtypesList->Add(s.substr(0,found)); + types.push_back(id); + s = s.substr(found+1); + }else{ + int id = Subtypes::subtypesList->Add(s); + types.push_back(id); + s = ""; + } + } + } + int trigger(){ + if (newPhase != currentPhase && newPhase == Constants::MTG_PHASE_UPKEEP) return 1; + return 0; + } + int resolve(){ + Token * myToken = NEW Token("Saproling",source,1,1); + list::iterator it; + for ( it=types.begin() ; it != types.end(); it++ ){ + myToken->addType(*it); + } + myToken->setColor(Constants::MTG_COLOR_GREEN); + source->controller()->game->stack->addCard(myToken); + Spell * spell = NEW Spell(myToken); + spell->resolve(); + delete spell; + return 1; + } + virtual ostream& toString(ostream& out) const + { + out << "AVerdantForce ::: ("; + return TriggeredAbility::toString(out) << ")"; + } +}; + + #endif diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 807cf9155..86fdb77b0 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1969,13 +1969,66 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver( NEW ADreambornMuse(_id ,card)); break; } + case 135256: //Graveborn Muse + { + game->addObserver( NEW AGravebornMuse(_id ,card)); + break; + } + case 129774: // Traumatize + { + int nbcards; + Player * player = spell->getNextPlayerTarget(); + MTGLibrary * library = player->game->library; + nbcards = (library->nb_cards)/2; + for (int i = 0; i < nbcards; i++){ + if (library->nb_cards) + player->game->putInZone(library->cards[library->nb_cards-1],library, player->game->graveyard); + } + break; + } + + case 129788: // Verdant Force + { + game->addObserver( NEW AVerdantForce(_id,card)); + break; + } case 135215: //Sylvan Basilisk { game->addObserver( NEW ABasilik (_id ,card)); break; } - + case 130553:// Beacon of Immortality + { + int life; + Player * player = spell->getNextPlayerTarget(); + MTGLibrary * library = card->controller()->game->library; + MTGGraveyard * graveyard = card->controller()->game->graveyard; + life = player->life; + player->life+=life; + MTGGameZone * zones[] = {card->controller()->game->inPlay,card->controller()->game->graveyard,card->controller()->game->hand}; + for (int k = 0; k < 3; k++){ + MTGGameZone * zone = zones[k]; + if (zone->hasCard(card)){ + card->controller()->game->putInZone(card,zone,library); + library->shuffle(); + } + } + break; + } + case 135262:// Beacon of Destruction & unrest + { + MTGLibrary * library = card->controller()->game->library; + MTGGameZone * zones[] = {card->controller()->game->inPlay,card->controller()->game->graveyard,card->controller()->game->hand}; + for (int k = 0; k < 3; k++){ + MTGGameZone * zone = zones[k]; + if (zone->hasCard(card)){ + card->controller()->game->putInZone(card,zone,library); + library->shuffle(); + } + } + break; + } case 129750: //Sudden Impact { Damageable * target = spell->getNextDamageableTarget();