diff --git a/projects/mtg/bin/Res/sets/10E/_cards.dat b/projects/mtg/bin/Res/sets/10E/_cards.dat index 1b21378c1..345e2f145 100644 --- a/projects/mtg/bin/Res/sets/10E/_cards.dat +++ b/projects/mtg/bin/Res/sets/10E/_cards.dat @@ -659,7 +659,7 @@ mana={3}{U}{U} text=Elven Riders can't be blocked except by Walls and/or creatures with flying. id=135266 name=Elven Riders -auto=cantbeblockedby(creature[-walls;-flying]) +auto=cantbeblockedby(creature[-flying]) rarity=U color=Green type=Creature @@ -2148,6 +2148,18 @@ subtype=Serpent toughness=6 [/card] [card] +text=Untap all permanents you control during each other player's untap step. +id=129722 +name=Seedborn Muse +rarity=R +color=Green +type=Creature +mana={3}{G}{G} +power=2 +subtype=Spirit +toughness=4 +[/card] +[card] text=Discard a land card: Seismic Assault deals 2 damage to target creature or player. auto={S(land|myhand)}:damage:2 target(creature,player) id=129884 diff --git a/projects/mtg/bin/Res/sets/10E/todo.dat b/projects/mtg/bin/Res/sets/10E/todo.dat index f3da5759d..ae318aef6 100644 --- a/projects/mtg/bin/Res/sets/10E/todo.dat +++ b/projects/mtg/bin/Res/sets/10E/todo.dat @@ -1008,18 +1008,6 @@ subtype=Wurm toughness=7 [/card] [card] -text=Untap all permanents you control during each other player's untap step. -id=129722 -name=Seedborn Muse -rarity=R -color=Green -type=Creature -mana={3}{G}{G} -power=2 -subtype=Spirit -toughness=4 -[/card] -[card] text=Flying (This creature can't be blocked except by creatures with flying or reach.) Whenever a creature dealt damage by Sengir Vampire this turn is put into a graveyard, put a +1/+1 counter on Sengir Vampire. id=129724 name=Sengir Vampire diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index c2255ea9d..40aae8f89 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3740,4 +3740,32 @@ class ARampageAbility:public MTGAbility{ } }; +// Dreamborn Muse +class ASeedbornMuse: public TriggeredAbility{ + public: + int nbcards; + ASeedbornMuse(int _id, MTGCardInstance * _source):TriggeredAbility(_id, _source){ + } + + 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]; + current->tapped = 0; + } + return 1; + } + virtual ostream& toString(ostream& out) const + { + out << "ASeedbornMuse ::: ("; + return TriggeredAbility::toString(out) << ")"; + } +}; + #endif diff --git a/projects/mtg/include/MTGAbility.h b/projects/mtg/include/MTGAbility.h index d7babb576..5174380df 100644 --- a/projects/mtg/include/MTGAbility.h +++ b/projects/mtg/include/MTGAbility.h @@ -234,6 +234,7 @@ class AbilityFactory{ int moveAll(TargetChooser * tc, string destinationZone); int damageAll(TargetChooser * tc, int damage); int TapAll(TargetChooser * tc); + int UntapAll(TargetChooser * tc); void addAbilities(int _id, Spell * spell); }; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index dd416cd32..807cf9155 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -104,6 +104,21 @@ int AbilityFactory::TapAll(TargetChooser * tc){ return 1; } +int AbilityFactory::UntapAll(TargetChooser * tc){ + MTGCardInstance * source = tc->source; + tc->source = NULL; // This is to prevent protection from... + GameObserver * g = GameObserver::GetInstance(); + for (int i = 0; i < 2 ; i++){ + for (int j = g->players[i]->game->inPlay->nb_cards-1; j >=0 ; j--){ + MTGCardInstance * current = g->players[i]->game->inPlay->cards[j]; + if (tc->canTarget(current)){ + current->tapped = 0; + } + } + } + tc->source = source; //restore source + return 1; +} int AbilityFactory::putInPlayFromZone(MTGCardInstance * card, MTGGameZone * zone, Player * p){ MTGCardInstance * copy = p->game->putInZone(card, zone, p->game->stack); @@ -357,13 +372,17 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ break; } if (tc){ - game->addObserver(NEW AUntaper(id, card, cost, tc)); - }else{ - if (cost){ - game->addObserver(NEW AUntapManaBlocker(id, card, cost)); - }else{ - target->tapped = 0; - } + if (all){ + UntapAll(tc); + }else{ + game->addObserver(NEW AUntaper(id, card, cost, tc)); + } + }else{ + if (cost){ + game->addObserver(NEW AUntapManaBlocker(id, card, cost)); + }else{ + target->tapped = 0; + } } result++; continue; @@ -718,7 +737,6 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ string starget = s.substr(found + 18,end - found - 18); TargetChooserFactory tcf; tc = tcf.createTargetChooser(starget,card); - // TypeTargetChooser * tc = createTargetChooser(starget,card); if (dryMode){ dryModeResult = BAKA_EFFECT_GOOD; break; @@ -726,9 +744,10 @@ int AbilityFactory::magicText(int id, Spell * spell, MTGCardInstance * card){ for (int i = 0; i < 2 ; i++){ for (int j = game->players[i]->game->inPlay->nb_cards-1; j >=0 ; j--){ MTGCardInstance * current = game->players[i]->game->inPlay->cards[j]; - if (tc->canTarget(current));{ - if (card->canBlock (current)) return 1; - } + if (tc->canTarget(current)){ + MTGCardInstance * canBlock = tc->source; + current->canBlock(0); + } } } result++; @@ -1940,7 +1959,11 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ game->addObserver( NEW ALavaborn(_id ,card, Constants::MTG_PHASE_UPKEEP, -3,-3)); break; } - + case 129722 : //Seddborn Muse + { + game->addObserver( NEW ASeedbornMuse(_id ,card)); + break; + } case 135246: //Dreamborn Muse { game->addObserver( NEW ADreambornMuse(_id ,card)); @@ -2073,6 +2096,18 @@ void AbilityFactory::addAbilities(int _id, Spell * spell){ break; } + // --- addon ARB--- + case 179614: // Morbid Bloom + { + card->target->controller()->game->putInZone(card->target, card->target->controller()->game->inPlay,card->owner->game->removedFromGame); + int x = card->target->toughness; + ATokenCreator * tok = NEW ATokenCreator(id,card,NEW ManaCost(),"Saproling","creature Saproling",1,1,"green",0); + for (int i=0; i < x; i++){ + tok->resolve(); + } + break; + } + default: break; }