diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 60cd63bba..486b1baf5 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -538,6 +538,18 @@ type=Artifact mana={2} [/card] [card] +text=At the beginning of each player's upkeep, that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand. +id=135246 +name=Dreamborn Muse +rarity=R +color=Blue +type=Creature +mana={2}{U}{U} +power=2 +subtype=Spirit +toughness=2 +[/card] +[card] text= id=135216 name=Dross Crocodile diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index 5ff6bf52c..2e2214038 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -380,19 +380,6 @@ color=Artifact type=Artifact mana={2} [/card] - -[card] -text=At the beginning of each player's upkeep, that player puts the top X cards of his or her library into his or her graveyard, where X is the number of cards in his or her hand. -id=135246 -name=Dreamborn Muse -rarity=R -color=Blue -type=Creature -mana={2}{U}{U} -power=2 -subtype=Spirit -toughness=2 -[/card] [card] text={1}{R}: Target creature can't block Duct Crawler this turn. id=129579 diff --git a/projects/mtg/bin/Res/sets/ICE/_cards.dat b/projects/mtg/bin/Res/sets/ICE/_cards.dat index 4f900bcb5..86745bcab 100644 --- a/projects/mtg/bin/Res/sets/ICE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ICE/_cards.dat @@ -1042,6 +1042,17 @@ type=Instant mana={W}{W} [/card [card] +text=Target player puts the top card of his or her library into his or her graveyard. Draw a card at the beginning of the next turn's upkeep. +id=2529 +target=player +auto=deplete:1 +auto=@next upkeep:draw:1 +name=Ray of Erasure +rarity=C +type=Instant +mana={U} +[/card] +[card] text=Enchant creature (Target a creature as you play this. This card comes into play attached to that creature.) {G}: Regenerate enchanted creature. (The next time that creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) target=creature auto={G}:regenerate diff --git a/projects/mtg/bin/Res/sets/ICE/todo.dat b/projects/mtg/bin/Res/sets/ICE/todo.dat index ca44a6e18..1ff23e617 100644 --- a/projects/mtg/bin/Res/sets/ICE/todo.dat +++ b/projects/mtg/bin/Res/sets/ICE/todo.dat @@ -1650,14 +1650,6 @@ type=Instant mana={3}{U} [/card] [card] -text=Target player puts the top card of his or her library into his or her graveyard. Draw a card at the beginning of the next turn's upkeep. -id=2529 -name=Ray of Erasure -rarity=C -type=Instant -mana={U} -[/card] -[card] text=Cumulative upkeep {1}{U}{U} (At the beginning of your upkeep, put an age counter on this permanent, then sacrifice it unless you pay its upkeep cost for each age counter on it.) If tapped for mana, Plains produce {R}, Swamps produce {G}, Mountains produce {W}, and Forests produce {B} instead of any other type. id=2530 name=Reality Twist diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index b2844eb78..f6d780cce 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3399,6 +3399,37 @@ class ADamageForTypeControlled: public TriggeredAbility{ } }; +// Dreamborn Muse +class ADreambornMuse: public TriggeredAbility{ + public: + int nbcards; + ADreambornMuse(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){ + } + + int trigger(){ + if (newPhase != currentPhase && newPhase == Constants::MTG_PHASE_UPKEEP) return 1; + return 0; + } + + int resolve(){ + int nbcards = game->currentPlayer->game->hand->nb_cards; + MTGLibrary * library = game->currentPlayer->game->library; + for (int i = 0; i < nbcards; i++){ + if (library->nb_cards) + game->currentPlayer->game->putInZone(library->cards[library->nb_cards-1],library,game->currentPlayer->game->graveyard); + } + return 1; + } + + virtual ostream& toString(ostream& out) const + { + out << "ADamageForTypeControlled ::: nbcards : " << nbcards + << " ("; + return TriggeredAbility::toString(out) << ")"; + } +}; + + //ShieldOfTheAge class AShieldOfTheAge: public TargetAbility{ public: diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 934528603..2cd355323 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1802,6 +1802,13 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver( NEW ALavaborn(_id ,card, Constants::MTG_PHASE_UPKEEP, -2,-3)); break; } + + case 135246: //Dreamborn Muse + { + game->addObserver( NEW ADreambornMuse(_id ,card)); + break; + } + case 135215: //Sylvan Basilisk { game->addObserver( NEW ABasilik (_id ,card));