From 71a9ef00ee5d2871892b3af33a4bf5bffe494a49 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 03:52:10 +0800 Subject: [PATCH 01/54] Support transforms for nonpermanent fix startled awake to persistent nightmare --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 9 ++++++--- projects/mtg/include/WEvent.h | 6 ++++++ projects/mtg/src/AllAbilities.cpp | 20 ++++++++++++++++++-- projects/mtg/src/GuiPlay.cpp | 2 ++ projects/mtg/src/WEvent.cpp | 11 +++++++++++ 5 files changed, 43 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 20114f48e..9f6fdc0e3 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -79025,7 +79025,9 @@ type=Sorcery [/card] [card] name=Persistent Nightmare -auto=@combatdamaged(player) from(this):moveto(myhand) and!(flip(Startled Awake) )! +abilities=skulk +auto=@combatdamaged(player) from(this):moveto(ownerhand) +color=blue text=Skulk (This creature can't be blocked by creatures with greater power.) -- When Persistent Nightmare deals combat damage to a player, return it to its owner's hand. type=Creature subtype=Nightmare @@ -104779,8 +104781,9 @@ type=Instant [/card] [card] name=Startled Awake -auto=deplete:13 opponent -autograveyard={3}{U}{U}:moveto(mybattlefield) and!(flip(Persistant Nightmare) )! assorcery +target=opponent +auto=deplete:13 targetedplayer +autograveyard={{3}{U}{U}}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery text=Target opponent puts the top thirteen cards of his or her library into his or her graveyard. -- {3}{U}{U}: Put Startled Awake from your graveyard onto the battlefield transformed. Activate this ability only any time you could cast a sorcery. mana={2}{U}{U} type=Sorcery diff --git a/projects/mtg/include/WEvent.h b/projects/mtg/include/WEvent.h index 33d70fe31..b4713c542 100644 --- a/projects/mtg/include/WEvent.h +++ b/projects/mtg/include/WEvent.h @@ -301,6 +301,12 @@ struct WEventCardControllerChange : public WEventCardUpdate { virtual Targetable * getTarget(int target); }; +//event when card transforms +struct WEventCardTransforms : public WEventCardUpdate { + WEventCardTransforms(MTGCardInstance * card); + virtual Targetable * getTarget(int target); +}; + std::ostream& operator<<(std::ostream&, const WEvent&); #endif diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 386d77396..d3ead137e 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -3280,6 +3280,11 @@ int AAFlip::resolve() } SAFE_DELETE(myFlip); _target->mPropertiesChangedSinceLastUpdate = true; + if(!isflipcard) + { + WEvent * e = NEW WEventCardTransforms(_target); + game->receiveEvent(e); + } } currentAbilities.clear(); @@ -4112,7 +4117,7 @@ int AAMover::resolve() //inplay is a special zone ! for (int i = 0; i < 2; i++) { - if (!_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone + if (!_target->hasSubtype(Subtypes::TYPE_INSTANT) && !_target->hasSubtype(Subtypes::TYPE_SORCERY) && !_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone != game->players[i]->opponent()->game->inPlay) { MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp); @@ -4172,6 +4177,17 @@ int AAMover::resolve() } else { + if(_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY) && + (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay)) + { + if(andAbility) + { + if(!dynamic_cast(andAbility)) + return 0; + } + else + return 0; + } p->game->putInZone(_target, fromZone, destZone); while(_target->next) _target = _target->next; @@ -7077,7 +7093,7 @@ void ABlink::resolveBlink() void ABlink::returnCardIntoPlay(MTGCardInstance* _target) { MTGCardInstance * Blinker = NULL; - if(!_target->blinked) + if(!_target->blinked || _target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) { this->forceDestroy = 1; return; diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index f0d14aa46..4c1e01ed6 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -424,6 +424,8 @@ int GuiPlay::receiveEventPlus(WEvent * e) Replace(); else if (dynamic_cast (e)) Replace(); + else if (dynamic_cast (e)) + Replace(); Replace(); return 0; } diff --git a/projects/mtg/src/WEvent.cpp b/projects/mtg/src/WEvent.cpp index 3aa726596..f1aef1574 100644 --- a/projects/mtg/src/WEvent.cpp +++ b/projects/mtg/src/WEvent.cpp @@ -231,6 +231,11 @@ WEventCardControllerChange::WEventCardControllerChange(MTGCardInstance * card) : { } +WEventCardTransforms::WEventCardTransforms(MTGCardInstance * card) : + WEventCardUpdate(card) +{ +} + WEventCombatStepChange::WEventCombatStepChange(CombatStep step) : WEvent(), step(step) { @@ -397,6 +402,12 @@ Targetable * WEventCardControllerChange::getTarget(int target) return NULL; } +Targetable * WEventCardTransforms::getTarget(int target) +{ + if (target) return card; + return NULL; +} + std::ostream& WEvent::toString(std::ostream& out) const { return out << "EVENT"; From c38c99677339ca286b466ca36ecff867068d9317 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 04:43:54 +0800 Subject: [PATCH 02/54] Revised "putinplay" in castcard --- projects/mtg/src/AllAbilities.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index d3ead137e..d20ce4d9f 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -7656,12 +7656,24 @@ int AACastCard::resolveSpell() if (game->targetChooser) { game->targetChooser->Owner = source->controller(); - spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,game->targetChooser,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, game->targetChooser, NULL, 1, 0); game->targetChooser = NULL; } else { - spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); + if(putinplay) + { + spell = NEW Spell(game, 0,copy,NULL,NULL, 1); + spell->resolve(); + } + else + spell = game->mLayers->stackLayer()->addSpell(copy, NULL, NULL, 1, 0); } if (copy->has(Constants::STORM)) From d825c7e4ea1e8cf79d546b8e3a4a0d87e282ab8d Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 04:49:04 +0800 Subject: [PATCH 03/54] parenthesis --- projects/mtg/src/AllAbilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index d20ce4d9f..f0b6cba18 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4177,7 +4177,7 @@ int AAMover::resolve() } else { - if(_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY) && + if((_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay)) { if(andAbility) From 223e2e04b0ebf149b4af4b3e298514db54a60e64 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 11:44:07 +0800 Subject: [PATCH 04/54] Correction --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 4 ++-- projects/mtg/include/CardPrimitive.h | 2 ++ projects/mtg/src/AllAbilities.cpp | 10 ++++++---- projects/mtg/src/CardPrimitive.cpp | 12 ++++++++++++ 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 9f6fdc0e3..2a3f3bd26 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -78315,7 +78315,7 @@ type=Sorcery [card] name=Path to Exile target=creature -auto=transforms((,newability[moveto(exile)],newability[may name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!(tap(noevent))!])) oneshot +auto=transforms((,newability[moveto(exile)],newability[name(fetch basic land) notatarget(land[basic]|mylibrary) moveTo(mybattlefield) and!( tap(noevent) )! ])) oneshot text=Exile target creature. Its controller may search his or her library for a basic land card, put that card onto the battlefield tapped, then shuffle his or her library. mana={W} type=Instant @@ -104783,7 +104783,7 @@ type=Instant name=Startled Awake target=opponent auto=deplete:13 targetedplayer -autograveyard={{3}{U}{U}}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery +autograveyard={3}{U}{U}:moveto(mybattlefield) and!(flip(Persistent Nightmare))! assorcery text=Target opponent puts the top thirteen cards of his or her library into his or her graveyard. -- {3}{U}{U}: Put Startled Awake from your graveyard onto the battlefield transformed. Activate this ability only any time you could cast a sorcery. mana={2}{U}{U} type=Sorcery diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index afcfb9604..035ea23a0 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -115,6 +115,8 @@ public: bool isCreature(); bool isLand(); bool isSpell(); + bool isPermanent(); + bool isSorceryorInstant(); int dredge(); void setPower(int _power); int getPower(); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index f0b6cba18..ac62bdcc4 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -4117,8 +4117,11 @@ int AAMover::resolve() //inplay is a special zone ! for (int i = 0; i < 2; i++) { - if (!_target->hasSubtype(Subtypes::TYPE_INSTANT) && !_target->hasSubtype(Subtypes::TYPE_SORCERY) && !_target->hasSubtype(Subtypes::TYPE_AURA) && destZone == game->players[i]->game->inPlay && fromZone != game->players[i]->game->inPlay && fromZone - != game->players[i]->opponent()->game->inPlay) + if (!_target->isSorceryorInstant() && + !_target->hasSubtype(Subtypes::TYPE_AURA) && + destZone == game->players[i]->game->inPlay && + fromZone != game->players[i]->game->inPlay && + fromZone != game->players[i]->opponent()->game->inPlay) { MTGCardInstance * copy = game->players[i]->game->putInZone(_target, fromZone, game->players[i]->game->temp); Spell * spell = NEW Spell(game, copy); @@ -4177,8 +4180,7 @@ int AAMover::resolve() } else { - if((_target->hasSubtype(Subtypes::TYPE_INSTANT) || _target->hasSubtype(Subtypes::TYPE_SORCERY)) && - (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay)) + if(_target->isSorceryorInstant() && (destZone == game->players[0]->game->inPlay || destZone == game->players[1]->game->inPlay)) { if(andAbility) { diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index 30c5c2e5f..a73267f80 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -110,6 +110,18 @@ bool CardPrimitive::isSpell() return (!isCreature() && !isLand()); } +bool CardPrimitive::isPermanent() +{ + return (!isSorceryorInstant()); +} + +bool CardPrimitive::isSorceryorInstant() +{ + if(hasSubtype(Subtypes::TYPE_SORCERY)||hasSubtype(Subtypes::TYPE_INSTANT)) + return true; + return false; +} + int CardPrimitive::dredge() { return dredgeAmount; From 969511953aaedb83f0375d33962e0d3ac1b73c8a Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 14:45:57 +0800 Subject: [PATCH 05/54] vector count of abilities remove unused ones --- projects/mtg/include/AllAbilities.h | 12 +++++++----- projects/mtg/include/CardPrimitive.h | 2 +- projects/mtg/include/MTGCardInstance.h | 1 - projects/mtg/src/AllAbilities.cpp | 4 ---- projects/mtg/src/CardPrimitive.cpp | 7 +++++-- projects/mtg/src/GameObserver.cpp | 8 ++------ projects/mtg/src/MTGCardInstance.cpp | 4 ---- 7 files changed, 15 insertions(+), 23 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 139f9e9c8..867439b56 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -2211,7 +2211,12 @@ public: assert(modifier < 2); ((MTGCardInstance *) target)->basicAbilities.set(ability, modifier > 0); - + //---add or subtract so we can keep track - for future use + ((MTGCardInstance *) target)->modbasicAbilities[ability] += modifier; + //---make sure no negative values + if(((MTGCardInstance *) target)->modbasicAbilities[ability] < 0) + ((MTGCardInstance *) target)->modbasicAbilities[ability] = 0; + //---end add or subtract abilities return MTGAbility::addToGame(); } @@ -2262,7 +2267,7 @@ public: assert(value < 2); _target->basicAbilities.set(ability, value > 0); - _target->modifiedbAbi += 1; + return InstantAbility::addToGame(); } @@ -2275,10 +2280,7 @@ public: { MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) - { _target->basicAbilities.set(ability, stateBeforeActivation); - _target->modifiedbAbi -= 1; - } return 1; } diff --git a/projects/mtg/include/CardPrimitive.h b/projects/mtg/include/CardPrimitive.h index 035ea23a0..51f5dbcd0 100644 --- a/projects/mtg/include/CardPrimitive.h +++ b/projects/mtg/include/CardPrimitive.h @@ -57,8 +57,8 @@ public: uint8_t colors; typedef std::bitset BasicAbilitiesSet; + vector modbasicAbilities; BasicAbilitiesSet basicAbilities; - BasicAbilitiesSet origbasicAbilities; BasicAbilitiesSet LKIbasicAbilities; map magicTexts; diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index 4e78569ac..aad75beaa 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -256,7 +256,6 @@ public: bool bypassTC; bool discarded; int copiedID; - int modifiedbAbi; bool StackIsEmptyandSorcerySpeed(); bool isTargetted(); int cardistargetted; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index ac62bdcc4..20f475a4c 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -3940,8 +3940,6 @@ int AACloner::resolve() { spell->source->addType(*it); } - spell->source->modifiedbAbi = _target->modifiedbAbi; - //spell->source->basicAbilities = _target->origbasicAbilities; for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) { if(_target->model->data->basicAbilities[k]) @@ -5652,7 +5650,6 @@ for (it = types.begin(); it != types.end(); it++) for (it = abilities.begin(); it != abilities.end(); it++) { _target->basicAbilities.set(*it); - _target->modifiedbAbi += 1; } if(newAbilityFound) @@ -5801,7 +5798,6 @@ int ATransformer::destroy() for (it = abilities.begin(); it != abilities.end(); it++) { _target->basicAbilities.reset(*it); - _target->modifiedbAbi -= 1; } for (it = oldcolors.begin(); it != oldcolors.end(); it++) diff --git a/projects/mtg/src/CardPrimitive.cpp b/projects/mtg/src/CardPrimitive.cpp index a73267f80..b1c1df544 100644 --- a/projects/mtg/src/CardPrimitive.cpp +++ b/projects/mtg/src/CardPrimitive.cpp @@ -41,7 +41,10 @@ CardPrimitive::CardPrimitive(CardPrimitive * source) if(!source) return; basicAbilities = source->basicAbilities; - origbasicAbilities = source->basicAbilities; + for(int k=0; k < Constants::NB_BASIC_ABILITIES; k++) + { + modbasicAbilities.push_back(source->basicAbilities[k]); + } LKIbasicAbilities = source->basicAbilities; for (size_t i = 0; i < source->types.size(); ++i) @@ -79,7 +82,7 @@ CardPrimitive::~CardPrimitive() int CardPrimitive::init() { basicAbilities.reset(); - origbasicAbilities.reset(); + modbasicAbilities.clear(); types.clear(); diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 35990bb8e..bc212c5b8 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -954,12 +954,8 @@ void GameObserver::gameStateBasedEffects() p->game->putInExile(c); } - }/* - if(c->modifiedbAbi > 0) - { - c->modifiedbAbi = 0; - c->basicAbilities = c->origbasicAbilities; - }*///disabled this failed logic I introduce... when copying/cloning a card copy orig basic abilities... + } + if(nbcards > z->nb_cards) { t = 0; diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 1c24782e9..b0dd57f9e 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -64,7 +64,6 @@ MTGCardInstance::MTGCardInstance(MTGCard * card, MTGPlayerCards * arg_belongs_to bypassTC = false; discarded = false; copiedID = getId(); - modifiedbAbi = 0; LKIpower = power; LKItoughness = toughness; cardistargetted = 0; @@ -100,15 +99,12 @@ void MTGCardInstance::copy(MTGCardInstance * card) MTGCard * source = card->model; CardPrimitive * data = source->data; - //basicAbilities = card->origbasicAbilities; for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) { if(card->model->data->basicAbilities[k]) basicAbilities[k] = card->model->data->basicAbilities[k]; } - origbasicAbilities = card->origbasicAbilities; - modifiedbAbi = card->modifiedbAbi; for (size_t i = 0; i < data->types.size(); i++) { types.push_back(data->types[i]); From c1df10e0646480a1be1b3b4765685f032d532a0a Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 22:17:53 +0800 Subject: [PATCH 06/54] Minor Proportioning --- projects/mtg/include/CardGui.h | 2 +- projects/mtg/src/CardGui.cpp | 30 ++++++++++++++++++++++++------ 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 0060d79db..5a660c1ed 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -54,7 +54,7 @@ public: CardGui(MTGCardInstance* card, const Pos& ref); virtual void Render(); virtual void Update(float dt); - + bool isBlackBorder(string set); void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); static void DrawBorder(string setname, const Pos& inPosition, float x, bool noborder = false, bool smallscale = false); diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index d82d0b533..29b51f199 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -254,11 +254,13 @@ void CardGui::Render() highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); if(fakeborder) { + int rgb = isBlackBorder(setlist[card->setId].c_str())?15:240; if(card->has(Constants::CANPLAYFROMGRAVEYARD)||card->has(Constants::CANPLAYFROMEXILE)||card->has(Constants::PAYZERO)) fakeborder->SetColor(ARGB((int)(actA),7,235,7));//green border else - fakeborder->SetColor(ARGB((int)(actA),15,15,15)); + fakeborder->SetColor(ARGB((int)(actA),rgb,rgb,rgb)); renderer->RenderQuad(fakeborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); + renderer->DrawRect(actX, (actY-yy),((28 * (actZ*zz) + 1) / 16),(40 * (actZ*zz) / 16),ARGB((int)(actA),240,240,240)); } //draw border for highlighting if (game) @@ -438,7 +440,7 @@ void CardGui::Render() else if(card->chooseacolor == 5) buff += "\n-White"; } - if(!alternate && buff != "" && game->gameType() == GAME_TYPE_CLASSIC)//it seems that other game modes makes cards as tokens!!! hmmm... + if(buff != "")//enable indicator at all times { mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); char buffer[200]; @@ -1160,7 +1162,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder smallerscale = cardsetname=="LEA"||cardsetname=="LEB"?true:smallerscale; //Draw card if(smallerscale) - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.01f, scale-0.01f); + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.001f, scale-0.001f); else renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); RenderCountersBig(card, pos); @@ -1190,8 +1192,8 @@ void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool nobor if(cardsetname == "LEA") {//BETA HAS REGULAR BORDER //Draw more rounder black border - renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(255,5,5,5)); - renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.5f,(pos.actY - (pos.actZ * 119.7f))-11.5f,pos.actZ * 168.f + 0.5f,pos.actZ * 239.4f + 4.f,10.f,ARGB(50,240,240,240)); + renderer->FillRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(255,5,5,5)); + renderer->DrawRoundRect((pos.actX - (pos.actZ * 84.f))-10.f,(pos.actY - (pos.actZ * 119.7f))-14.f,pos.actZ * 168.f - 0.5f,pos.actZ * 239.4f + 8.f,10.f,ARGB(50,240,240,240)); } else {//draw black border @@ -1206,13 +1208,29 @@ void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool nobor if(alphabeta.get()) { alphabeta->SetHotSpot(static_cast (alphabeta->mWidth / 2), static_cast (alphabeta->mHeight / 2)); - float myscale = pos.actZ * 250 / alphabeta->mHeight; + float myscale = pos.actZ * 254 / alphabeta->mHeight; alphabeta->SetColor(ARGB((int)pos.actA,255,255,255)); renderer->RenderQuad(alphabeta.get(), x, pos.actY, pos.actT, myscale, myscale); } } } +bool CardGui::isBlackBorder(string cardsetname) +{ + if(cardsetname == "2ED"|| + cardsetname == "RV"|| + cardsetname == "4ED"|| + cardsetname == "5ED"|| + cardsetname == "6ED"|| + cardsetname == "7ED"|| + cardsetname == "8ED"|| + cardsetname == "9ED"|| + cardsetname == "CHR"|| + cardsetname == "DM") + return false; + return true; +} + string CardGui::FormattedData(string data, string replace, string value) { size_t found = data.find(replace.c_str()); From 98de361bf4ceb37bebed0d3bac1d1bdd2e5d4874 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 1 Aug 2016 22:34:28 +0800 Subject: [PATCH 07/54] change comment enable the indicator at all modes... --- projects/mtg/src/CardGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 29b51f199..145884c06 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -440,7 +440,7 @@ void CardGui::Render() else if(card->chooseacolor == 5) buff += "\n-White"; } - if(buff != "")//enable indicator at all times + if(buff != "")//enable indicator at all modes { mFont->SetScale(DEFAULT_MAIN_FONT_SCALE); char buffer[200]; From 4753f7bb5114bf4af73e432d077e463eaa1c2d8f Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 16:10:53 +0800 Subject: [PATCH 08/54] andAbility on ATokenCreator, Extend AAFlip, --- projects/mtg/bin/Res/sets/ALL/_cards.dat | 5 - projects/mtg/bin/Res/sets/BFZ/_cards.dat | 120 -------- projects/mtg/bin/Res/sets/EMN/_cards.dat | 45 --- projects/mtg/bin/Res/sets/FRF/_cards.dat | 5 - projects/mtg/bin/Res/sets/ISD/_cards.dat | 5 - projects/mtg/bin/Res/sets/M14/_cards.dat | 10 - projects/mtg/bin/Res/sets/M15/_cards.dat | 5 - projects/mtg/bin/Res/sets/OGW/_cards.dat | 85 ------ projects/mtg/bin/Res/sets/ROE/_cards.dat | 5 - projects/mtg/bin/Res/sets/SOI/_cards.dat | 275 ------------------ projects/mtg/bin/Res/sets/ZVE/_cards.dat | 15 - projects/mtg/bin/Res/sets/primitives/mtg.txt | 282 ++++++------------- projects/mtg/include/AllAbilities.h | 22 +- projects/mtg/src/AllAbilities.cpp | 42 ++- projects/mtg/src/MTGAbility.cpp | 21 ++ projects/mtg/src/MTGCardInstance.cpp | 10 +- 16 files changed, 173 insertions(+), 779 deletions(-) diff --git a/projects/mtg/bin/Res/sets/ALL/_cards.dat b/projects/mtg/bin/Res/sets/ALL/_cards.dat index 249099b70..b887edcbc 100644 --- a/projects/mtg/bin/Res/sets/ALL/_cards.dat +++ b/projects/mtg/bin/Res/sets/ALL/_cards.dat @@ -786,11 +786,6 @@ id=3118 rarity=U [/card] [card] -primitive=Splinter Token -id=-3148 -rarity=T -[/card] -[card] primitive=Splintering Wind id=3148 rarity=R diff --git a/projects/mtg/bin/Res/sets/BFZ/_cards.dat b/projects/mtg/bin/Res/sets/BFZ/_cards.dat index 4dca3bfb5..625afae02 100644 --- a/projects/mtg/bin/Res/sets/BFZ/_cards.dat +++ b/projects/mtg/bin/Res/sets/BFZ/_cards.dat @@ -291,11 +291,6 @@ id=401859 rarity=C [/card] [card] -primitive=Dragon -id=-401860 -rarity=T -[/card] -[card] primitive=Dragonmaster Outcast id=401860 rarity=M @@ -331,106 +326,11 @@ id=401866 rarity=C [/card] [card] -primitive=Elemental -rarity=T -id=-401806 -[/card] -[card] -primitive=Elemental -rarity=T -id=-401973 -[/card] -[card] -primitive=Eldrazi -rarity=T -id=-401857 -[/card] -[card] primitive=Eldrazi Devastator id=401867 rarity=C [/card] [card] -primitive=Eldrazi Scion -rarity=T -id=-401803 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401819 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401825 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401832 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401833 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401836 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401838 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401839 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401893 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-402092 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401900 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401863 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401868 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401875 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-401915 -[/card] -[card] -primitive=Eldrazi Scion -rarity=T -id=-402046 -[/card] -[card] primitive=Eldrazi Skyspawner id=401868 rarity=C @@ -756,21 +656,11 @@ id=401932 rarity=C [/card] [card] -primitive=Knight Ally -rarity=T -id=-401897 -[/card] -[card] primitive=Kor Ally rarity=T id=-402007 [/card] [card] -primitive=Kor Ally -rarity=T -id=-402084 -[/card] -[card] primitive=Kor Bladewhirl id=401933 rarity=U @@ -971,11 +861,6 @@ id=401972 rarity=M [/card] [card] -primitive=Octopus -rarity=T -id=-401931 -[/card] -[card] primitive=Omnath, Locus of Rage id=401973 rarity=M @@ -1091,11 +976,6 @@ id=401995 rarity=R [/card] [card] -primitive=Plant -rarity=T -id=-401904 -[/card] -[card] primitive=Plated Crusher id=401996 rarity=U diff --git a/projects/mtg/bin/Res/sets/EMN/_cards.dat b/projects/mtg/bin/Res/sets/EMN/_cards.dat index c6efbb6c5..4f5fcee85 100644 --- a/projects/mtg/bin/Res/sets/EMN/_cards.dat +++ b/projects/mtg/bin/Res/sets/EMN/_cards.dat @@ -1120,52 +1120,7 @@ id=414301 rarity=C [/card] [card] -primitive=Zombie -id=414513 -rarity=T -[/card] -[card] primitive=Eldrazi Horror id=414514 rarity=T [/card] -[card] -primitive=Human -id=414515 -rarity=T -[/card] -[card] -primitive=Human -id=414516 -rarity=T -[/card] -[card] -primitive=Spirit -id=414517 -rarity=T -[/card] -[card] -primitive=Spider -id=414518 -rarity=T -[/card] -[card] -primitive=Insect -id=414519 -rarity=T -[/card] -[card] -primitive=Devil -id=414520 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=414521 -rarity=T -[/card] -[card] -primitive=Wolf -id=414522 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/FRF/_cards.dat b/projects/mtg/bin/Res/sets/FRF/_cards.dat index bd46c03d1..c1fbe503e 100644 --- a/projects/mtg/bin/Res/sets/FRF/_cards.dat +++ b/projects/mtg/bin/Res/sets/FRF/_cards.dat @@ -521,11 +521,6 @@ id=391883 rarity=M [/card] [card] -primitive=Monk Token -id=-391883 -rarity=T -[/card] -[card] primitive=Monastery Siege id=391884 rarity=R diff --git a/projects/mtg/bin/Res/sets/ISD/_cards.dat b/projects/mtg/bin/Res/sets/ISD/_cards.dat index 202981d90..71eddf33d 100644 --- a/projects/mtg/bin/Res/sets/ISD/_cards.dat +++ b/projects/mtg/bin/Res/sets/ISD/_cards.dat @@ -1425,8 +1425,3 @@ primitive=Wreath of Geists id=237017 rarity=U [/card] -[card] -primitive=Zombie Token -id=-229968 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/M14/_cards.dat b/projects/mtg/bin/Res/sets/M14/_cards.dat index ee9dcd082..fdd245029 100644 --- a/projects/mtg/bin/Res/sets/M14/_cards.dat +++ b/projects/mtg/bin/Res/sets/M14/_cards.dat @@ -625,11 +625,6 @@ id=370740 rarity=R [/card] [card] -primitive=Liliana's Reaver Zombie -id=-370740 -rarity=T -[/card] -[card] primitive=Liturgy of Blood id=370652 rarity=C @@ -1250,11 +1245,6 @@ id=370619 rarity=R [/card] [card] -primitive=Xathrid Necromancer Zombie -id=-370619 -rarity=T -[/card] -[card] primitive=Young Pyromancer id=370600 rarity=U diff --git a/projects/mtg/bin/Res/sets/M15/_cards.dat b/projects/mtg/bin/Res/sets/M15/_cards.dat index 36e2f0008..7b9294382 100644 --- a/projects/mtg/bin/Res/sets/M15/_cards.dat +++ b/projects/mtg/bin/Res/sets/M15/_cards.dat @@ -805,11 +805,6 @@ id=383323 rarity=R [/card] [card] -primitive=Zombie Token -id=-383323 -rarity=T -[/card] -[card] primitive=Negate id=383324 rarity=C diff --git a/projects/mtg/bin/Res/sets/OGW/_cards.dat b/projects/mtg/bin/Res/sets/OGW/_cards.dat index aa6c94fe7..3290965bf 100644 --- a/projects/mtg/bin/Res/sets/OGW/_cards.dat +++ b/projects/mtg/bin/Res/sets/OGW/_cards.dat @@ -31,11 +31,6 @@ id=407560 rarity=C [/card] [card] -primitive=Angel -id=-407535 -rarity=T -[/card] -[card] primitive=Ayli, Eternal Pilgrim id=407661 rarity=R @@ -226,46 +221,6 @@ id=407606 rarity=R [/card] [card] -primitive=Eldrazi Scion -id=-407522 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407587 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407635 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407550 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407633 -rarity=T -[/card] -[card] -primitive=Eldrazi Scion -id=-407631 -rarity=T -[/card] -[card] -primitive=Elemental -id=-407614 -rarity=T -[/card] -[card] -primitive=Elemental -id=-407653 -rarity=T -[/card] -[card] primitive=Elemental Uprising id=407640 rarity=C @@ -436,21 +391,6 @@ id=407622 rarity=U [/card] [card] -primitive=Knight Ally -id=-407525 -rarity=T -[/card] -[card] -primitive=Kor Ally -id=-407540 -rarity=T -[/card] -[card] -primitive=Kor Ally -id=-407672 -rarity=T -[/card] -[card] primitive=Kor Scythemaster id=407533 rarity=C @@ -616,11 +556,6 @@ id=407585 rarity=C [/card] [card] -primitive=Octopus -id=-407563 -rarity=T -[/card] -[card] primitive=Ondu War Cleric id=407541 rarity=C @@ -631,11 +566,6 @@ id=407571 rarity=R [/card] [card] -primitive=Plant -id=-407648 -rarity=T -[/card] -[card] primitive=Press into Service id=407624 rarity=U @@ -1001,21 +931,6 @@ id=407657 rarity=R [/card] [card] -primitive=Zombie -id=-407594 -rarity=T -[/card] -[card] -primitive=Zombie -id=-407596 -rarity=T -[/card] -[card] -primitive=Zombie -id=-407598 -rarity=T -[/card] -[card] primitive=Zulaport Chainmage id=407603 rarity=C diff --git a/projects/mtg/bin/Res/sets/ROE/_cards.dat b/projects/mtg/bin/Res/sets/ROE/_cards.dat index 5d5438e0d..8d3b1d096 100644 --- a/projects/mtg/bin/Res/sets/ROE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ROE/_cards.dat @@ -56,11 +56,6 @@ id=193507 rarity=R [/card] [card] -primitive=Eldrazi Spawn -rarity=T -id=-193507 -[/card] -[card] primitive=Bala Ged Scorpion id=194944 rarity=C diff --git a/projects/mtg/bin/Res/sets/SOI/_cards.dat b/projects/mtg/bin/Res/sets/SOI/_cards.dat index ccbca8b56..0a12fa8f1 100644 --- a/projects/mtg/bin/Res/sets/SOI/_cards.dat +++ b/projects/mtg/bin/Res/sets/SOI/_cards.dat @@ -41,16 +41,6 @@ id=409952 rarity=T [/card] [card] -primitive=Angel -id=-409751 -rarity=T -[/card] -[card] -primitive=Angel -id=-410011 -rarity=T -[/card] -[card] primitive=Angel of Deliverance id=409738 rarity=R @@ -221,131 +211,6 @@ id=409955 rarity=C [/card] [card] -primitive=Clue -rarity=T -id=-409746 -[/card] -[card] -primitive=Clue -rarity=T -id=-409750 -[/card] -[card] -primitive=Clue -rarity=T -id=-409757 -[/card] -[card] -primitive=Clue -rarity=T -id=-409762 -[/card] -[card] -primitive=Clue -rarity=T -id=-409781 -[/card] -[card] -primitive=Clue -rarity=T -id=-409784 -[/card] -[card] -primitive=Clue -rarity=T -id=-409795 -[/card] -[card] -primitive=Clue -rarity=T -id=-409797 -[/card] -[card] -primitive=Clue -rarity=T -id=-409799 -[/card] -[card] -primitive=Clue -rarity=T -id=-409805 -[/card] -[card] -primitive=Clue -rarity=T -id=-409810 -[/card] -[card] -primitive=Clue -rarity=T -id=-409813 -[/card] -[card] -primitive=Clue -rarity=T -id=-409820 -[/card] -[card] -primitive=Clue -rarity=T -id=-409823 -[/card] -[card] -primitive=Clue -rarity=T -id=-409838 -[/card] -[card] -primitive=Clue -rarity=T -id=-409953 -[/card] -[card] -primitive=Clue -rarity=T -id=-409954 -[/card] -[card] -primitive=Clue -rarity=T -id=-409956 -[/card] -[card] -primitive=Clue -rarity=T -id=-409986 -[/card] -[card] -primitive=Clue -rarity=T -id=-409997 -[/card] -[card] -primitive=Clue -rarity=T -id=-410000 -[/card] -[card] -primitive=Clue -rarity=T -id=-410004 -[/card] -[card] -primitive=Clue -rarity=T -id=-410007 -[/card] -[card] -primitive=Clue -rarity=T -id=-410024 -[/card] -[card] -primitive=Clue -rarity=T -id=-410032 -[/card] -[card] primitive=Compelling Deterrence id=409794 rarity=U @@ -441,21 +306,6 @@ id=409751 rarity=M [/card] [card] -primitive=Devil -rarity=T -id=-410068 -[/card] -[card] -primitive=Devil -rarity=T -id=-409902 -[/card] -[card] -primitive=Devil -rarity=T -id=-409903 -[/card] -[card] primitive=Devils' Playground id=409903 rarity=R @@ -826,26 +676,6 @@ id=409919 rarity=C [/card] [card] -primitive=Human Cleric -id=-409760 -rarity=T -[/card] -[card] -primitive=Human Cleric -id=-410049 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=-409780 -rarity=T -[/card] -[card] -primitive=Human Soldier -id=-410015 -rarity=T -[/card] -[card] primitive=Humble the Brute id=409762 rarity=U @@ -886,11 +716,6 @@ id=409763 rarity=C [/card] [card] -primitive=Insect -id=-409957 -rarity=T -[/card] -[card] primitive=Insidious Mist id=409856 rarity=T @@ -1191,11 +1016,6 @@ id=409820 rarity=U [/card] [card] -primitive=Ooze -id=-409973 -rarity=T -[/card] -[card] primitive=Open the Armory id=409771 rarity=U @@ -1496,41 +1316,6 @@ id=409778 rarity=U [/card] [card] -primitive=Spirit -id=-409749 -rarity=T -[/card] -[card] -primitive=Spirit -id=-410031 -rarity=T -[/card] -[card] -primitive=Spirit -rarity=T -id=-409753 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409768 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409769 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409789 -[/card] -[card] -primitive=Spirit -rarity=T -id=-409755 -[/card] -[card] primitive=Spiteful Motives id=409939 rarity=U @@ -1761,16 +1546,6 @@ id=409788 rarity=C [/card] [card] -primitive=Vampire Knight -id=-409850 -rarity=T -[/card] -[card] -primitive=Vampire Knight -id=-410016 -rarity=T -[/card] -[card] primitive=Vampire Noble id=409893 rarity=C @@ -1871,21 +1646,6 @@ id=410037 rarity=U [/card] [card] -primitive=Wolf -id=-409959 -rarity=T -[/card] -[card] -primitive=Wolf -id=-409983 -rarity=T -[/card] -[card] -primitive=Wolf -id=-409991 -rarity=T -[/card] -[card] primitive=Wolf of Devil's Breach id=409949 rarity=M @@ -1895,38 +1655,3 @@ primitive=Woodland Stream id=410051 rarity=U [/card] -[card] -primitive=Zombie -id=-409800 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409826 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409854 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409859 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409860 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409862 -rarity=T -[/card] -[card] -primitive=Zombie -id=-409884 -rarity=T -[/card] diff --git a/projects/mtg/bin/Res/sets/ZVE/_cards.dat b/projects/mtg/bin/Res/sets/ZVE/_cards.dat index d3b802a93..fd7e9f8d4 100644 --- a/projects/mtg/bin/Res/sets/ZVE/_cards.dat +++ b/projects/mtg/bin/Res/sets/ZVE/_cards.dat @@ -76,21 +76,6 @@ id=401693 rarity=C [/card] [card] -primitive=Eldrazi Spawn -id=401718 -rarity=C -[/card] -[card] -primitive=Eldrazi Spawn -id=401719 -rarity=C -[/card] -[card] -primitive=Eldrazi Spawn -id=401720 -rarity=C -[/card] -[card] primitive=Eldrazi Temple id=401710 rarity=U diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 2a3f3bd26..5b46b1771 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -234,7 +234,7 @@ name=Abstruse Interference abilities=devoid target=*|stack auto=transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- Counter target spell unless its controller pays {1}. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{U} type=Instant @@ -866,7 +866,7 @@ name=Adverse Conditions target=creature|battlefield auto=tap auto=frozen -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -5477,7 +5477,7 @@ type=Instant [/card] [card] name=Army of the Damned -auto=token(-229968)*13 +auto=token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*13 flashback={7}{B}{B}{B} text=Put thirteen 2/2 black Zombie creature tokens onto the battlefield tapped. -- Flashback {7}{B}{B}{B} mana={5}{B}{B}{B} @@ -7219,7 +7219,7 @@ toughness=1 [/card] [card] name=Awakening Zone -auto=@each my upkeep:Token(-193507) +auto=@each my upkeep:token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=At the beginning of your upkeep, put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} type=Enchantment @@ -9145,7 +9145,7 @@ toughness=2 [card] name=Bearer of Overwhelming Truths auto=@movedto(*[-creature|mystack):1/1 ueot -auto=@combatdamaged(player) from(this):token(Clue) controller +auto=@combatdamaged(player) from(this):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever Bearer of Overwhelming Truths deals combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") type=Creature subtype=Human Wizard @@ -9957,7 +9957,7 @@ toughness=1 [card] name=Birthing Hulk auto={1}{C}:regenerate -auto=token(Eldrazi scion)*2 +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=Devoid (This card has no color.) -- When Birthing Hulk enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) -- {1}{C}: Regenerate Birthing Hulk. mana={6}{G} abilities=devoid @@ -10584,7 +10584,7 @@ type=Sorcery [card] name=Blight Herder kicker={discard(*|opponentexile)}{discard(*|opponentexile)} -auto=kicker token(Eldrazi scion)*3 +auto=kicker token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." mana={5} type=Creature @@ -10980,7 +10980,7 @@ toughness=1 [/card] [card] name=Blisterpod -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- When Blisterpod dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={G} abilities=devoid @@ -14073,14 +14073,14 @@ toughness=2 [/card] [card] name=Brood Birthing -auto=aslongas(eldrazi spawn|myBattlefield) Token(-193507)*3 +auto=aslongas(eldrazi spawn|myBattlefield) token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=If you control at least one 0/1 Eldrazi Spawn creature token, put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={1}{R} type=Sorcery [/card] [card] name=Brood Butcher -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller auto={B}{G}{S(creature|mybattlefield):target(creature) -2/-2 ueot text=Devoid (This card has no color.) -- When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn. mana={3}{B}{G} @@ -14113,7 +14113,7 @@ toughness=3 [/card] [card] name=Brood Monitor -auto=choice token(Eldrazi Scion)*3 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 controller text=Devoid (This card has no color.) -- When Brood Monitor enters the battlefield, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{G}{G} abilities=devoid @@ -14812,7 +14812,7 @@ type=Instant [card] name=Bygone Bishop abilities=flying -auto=@movedto(creature[manacost<=3]|mystack):token(Clue) controller +auto=@movedto(creature[manacost<=3]|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Flying -- Whenever you cast a creature spell with converted mana cost 3 or less, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Creature @@ -14822,7 +14822,7 @@ toughness=3 [/card] [card] name=Byway Courier -auto=@movedTo(this|graveyard) from(battlefield):token(Clue) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Byway Courier dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Creature @@ -15196,7 +15196,7 @@ type=Sorcery [/card] [card] name=Call the Scions -auto=token(Eldrazi Scion)*2 controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 controller text=Devoid (This card has no color.) -- Put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} abilities=devoid @@ -15918,7 +15918,7 @@ toughness=1 [/card] [card] name=Carrier Thrall -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion) controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={1}{B} type=Creature @@ -16147,7 +16147,7 @@ toughness=4 [card] name=Catacomb Sifter abilities=devoid -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller auto=@movedTo(other creature|graveyard) from(myBattlefield):name(Scry) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Devoid (This card has no color.) -- When Catacomb Sifter enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." -- Whenever another creature you control dies, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={1}{B}{G} @@ -19517,13 +19517,6 @@ mana={5}{U}{R} type=Enchantment [/card] [card] -name=Clue -auto={2}{s}: draw:1 -text={2}, sacrifice this token, draw a card -type=Artifact -subtype=Clue -[/card] -[card] name=Clutch of Currents target=creature|battlefield auto=moveto(ownerhand) @@ -20255,7 +20248,7 @@ toughness=1 name=Confirm Suspicions target=*|mystack auto=fizzle -auto=token(Clue)*3 controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )!*3 controller text=Counter target spell. -- Investigate three times. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U}{U} type=Instant @@ -20272,7 +20265,7 @@ subtype=Aura [card] name=Confront the Unknown target=creature -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=foreach(clue|mybattlefield) 1/1 text=Investigate, then target creature gets +1/+1 until end of turn for each Clue you control. (To investigate, put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={G} @@ -20423,15 +20416,6 @@ mana={U} type=Instant [/card] [card] -name=Construct -type=Artifact Creature -subtype=Construct -abilities=trample -auto=@next endofturn:moveTo(exile) -power=6 -toughness=12 -[/card] -[card] name=Consul's Lieutenant abilities=first strike auto=this(cantargetcard(*[-renown]) transforms((,newability[@combatdamaged(player) from(this):counter(1/1) && becomes(renown) forever])) @@ -21065,7 +21049,7 @@ toughness=3 name=Corpsehatch target=creature[-black] auto=destroy -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=Destroy target nonblack creature. -- Put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have sacrifice this creature: Add {1} to your mana pool. mana={3}{B}{B} type=Sorcery @@ -23579,7 +23563,7 @@ type=Instant [/card] [card] name=Dance with Devils -auto=token(-410068)*2 +auto=token(Devil,Creature Devil,1/1,red) and!( transforms((,newability[@movedto(this|mygraveyard): damage:1 target(*[creature;player])])) forever )!*2 text=Put two 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player." mana={3}{R} type=Instant @@ -25409,7 +25393,7 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue) controller])) +auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller])) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} type=Sorcery @@ -26788,15 +26772,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Devil -type=Creature -subtype=Devil -auto=@movedto(this|mygraveyard): damage:1 target(creature,player) -text=when this creature dies it deals 1 damage to target creature or player -power=1 -toughness=1 -[/card] -[card] name=Devil's Play target=creature,player auto=damage:X @@ -26807,7 +26782,7 @@ type=Sorcery [/card] [card] name=Devils' Playground -auto=token(-410068)*4 +auto=token(Devil,Creature Devil,1/1,red) and!( transforms((,newability[@movedto(this|mygraveyard): damage:1 target(*[creature;player])])) forever )!*4 text=Put four 1/1 red Devil creature tokens onto the battlefield. They have "When this creature dies, it deals 1 damage to target creature or player." mana={4}{R}{R} type=Sorcery @@ -27328,7 +27303,7 @@ toughness=2 [card] name=Diregraf Colossus auto=foreach(zombie|mygraveyard)counter(1/1,1) -auto=@movedto(zombie|mystack):token(-370619) +auto=@movedto(zombie|mystack):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text=Diregraf Colossus enters the battlefield with a +1/+1 counter on it for each Zombie card in your graveyard. -- Whenever you cast a Zombie spell, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={2}{B} type=Creature @@ -28816,7 +28791,7 @@ toughness=7 [card] name=Dragonlord Kolaghan abilities=flying,haste -auto=emblem transforms((,newability[aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot +auto=lord(creature|mybattlefield) haste auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. mana={4}{B}{R} @@ -29109,7 +29084,7 @@ toughness=3 [/card] [card] name=Drana's Chosen -auto={T(ally|myBattlefield)}{t}:token(-370619) +auto={T(ally|myBattlefield)}{t}:token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text=Cohort ? {T}, Tap an untapped Ally you control: Put a 2/2 black Zombie creature token onto the battlefield tapped. mana={3}{B} type=Creature @@ -29168,7 +29143,7 @@ toughness=8 [/card] [card] name=Dread Drone -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=When Dread Drone enters the battlefield, put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{B} type=Creature @@ -30004,7 +29979,7 @@ toughness=1 [/card] [card] name=Drowner of Hope -auto=choice token(Eldrazi Scion) *2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! *2 controller auto={S(Eldrazi Scion|mybattlefield)}:tap target(creature) text=Devoid (This card has no color.) -- When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." -- Sacrifice an Eldrazi Scion: Tap target creature. mana={5}{U} @@ -30026,7 +30001,7 @@ toughness=3 [/card] [card] name=Drownyard Explorers -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Drownyard Explorers enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3}{U} type=Creature @@ -31706,18 +31681,9 @@ power=3 toughness=1 [/card] [card] -name=Eldrazi Scion -auto={S}:Add{1} -text=Sacrifice this creature: Add {1} to your mana pool. -type=Creature -subtype=Eldrazi Scion -power=1 -toughness=1 -[/card] -[card] name=Eldrazi Skyspawner abilities=flying -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- Flying -- When Eldrazi Skyspawner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{U} abilities=devoid @@ -31727,14 +31693,6 @@ power=2 toughness=1 [/card] [card] -name=Eldrazi Spawn -type=Creature -subtype=Eldrazi Spawn -auto={S}:Add{1} -power=0 -toughness=1 -[/card] -[card] name=Electric Eel auto=damage:1 controller auto={R}{R}:2/0 && damage:1 controller @@ -32961,7 +32919,7 @@ toughness=15 [/card] [card] name=Emrakul's Hatcher -auto=Token(-193507)*3 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=When Emrakul's Hatcher enters the battlefield, put three 0/1 colorless Eldrazi Spawn creatures onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{R} type=Creature @@ -33840,7 +33798,7 @@ type=Legendary Enchantment [card] name=Erdwal Illuminator abilities=flying -auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(Clue) +auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! text=Flying -- Whenever you investigate for the first time each turn, investigate an additional time. mana={1}{U} type=Creature @@ -34172,7 +34130,7 @@ name=Essence Feed target=player auto=life:-3 auto=life:3 controller -auto=Token(-193507)*3 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text=Target player loses 3 life. You gain 3 life and put three 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={5}{B} type=Sorcery @@ -35068,7 +35026,7 @@ type=Sorcery name=Expose Evil target=creature auto=tap -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Tap up to two target creatures. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{W} type=Instant @@ -35295,7 +35253,7 @@ subtype=Elf [/card] [card] name=Eyeless Watcher -auto=choice token(Eldrazi Scion)*2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 controller text=Devoid (This card has no color.) -- When Eyeless Watcher enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={3}{G} abilities=devoid @@ -38419,7 +38377,7 @@ toughness=1 [/card] [card] name=Fleeting Memories -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=@movedto(clue|mygraveyard):deplete:3 opponent text=When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. mana={2}{U} @@ -40162,7 +40120,7 @@ toughness=1 [/card] [card] name=From Beyond -auto=@each my upkeep:token(Eldrazi Scion) controller +auto=@each my upkeep:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller auto={1}{G}{S}:moveto(myhand) notatarget(*[eldrazi]|mylibrary) text=Devoid (This card has no color.) -- At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library. mana={3}{G} @@ -40171,8 +40129,10 @@ type=Enchantment [/card] [card] name=From Under the Floorboards -auto=ifnot madnessplayed then token(-229968)*3 && life:3 -auto=if madnessplayed then token(-229968)*x && life:x +auto=ifnot madnessplayed then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*3 +auto=ifnot madnessplayed then life:3 +auto=if madnessplayed then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )!*x +auto=if madnessplayed then life:x abilities=madness autoexile=restriction{discarded} pay({b}{b}{x}) name(pay XBB to cast) activate name(pay XBB to cast) castcard(normal madness)?name(put in graveyard) moveto(ownergraveyard) text=Madness {X}{B}{B} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) -- Put three 2/2 black Zombie creature tokens onto the battlefield tapped and you gain 3 life. If From Under the Floorboards's madness cost was paid, instead put X of those tokens onto the battlefield tapped and you gain X life. @@ -45181,7 +45141,7 @@ toughness=6 name=Gone Missing target=* auto=moveto(ownerlibrary) -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Put target permanent on top of its owner's library. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{U} type=Sorcery @@ -45585,7 +45545,7 @@ type=Land name=Grave Birthing target=opponent auto=ability$!moveto(exile) notatarget(*|mygraveyard)!$ targetedplayer -auto=token(Eldrazi Scion) controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller auto=draw:1 controller text=Devoid (This card has no color.) -- Target opponent exiles a card from his or her graveyard. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- Draw a card. mana={2}{B} @@ -46941,7 +46901,7 @@ type=Enchantment [card] name=Growth Spasm auto=moveTo(myBattlefield) and!(tap(noevent))! notatarget(land[basic]|myLibrary) -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. -- Put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} type=Sorcery @@ -51691,7 +51651,7 @@ toughness=1 name=Humble the Brute target=creature[power>3] auto=destroy -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Destroy target creature with power 4 or greater. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={4}{W} type=Instant @@ -53224,7 +53184,7 @@ type=Sorcery [/card] [card] name=Incubator Drone -auto=choice token(Eldrazi Scion) controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- When Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -55008,7 +54968,7 @@ toughness=1 name=Jace's Scrutiny target=creature auto=-4/-0 -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Target creature gets -4/-0 until end of turn. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Instant @@ -59464,7 +59424,7 @@ toughness=5 [/card] [card] name=Kozilek's Predator -auto=Token(-193507)*2 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 text=When Kozilek's Predator enters the battlefield, put two 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={3}{G} type=Creature @@ -62305,18 +62265,9 @@ mana={1}{B} type=Enchantment [/card] [card] -name=Liliana's Reaver Zombie -type=Creature -subtype=Zombie -auto=tap -power=2 -toughness=2 -color=black -[/card] -[card] name=Liliana's Reaver abilities=deathtouch -auto=@combatdamaged(player) from(this):token(-370740) +auto=@combatdamaged(player) from(this):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! auto=@combatdamagefoeof(player) from(this):ability$!name(discard) notatarget(*|myhand) reject!$ opponent auto=@combatdamageof(player) from(this):ability$!name(discard) notatarget(*|myhand) reject!$ controller text=Deathtouch. -- Whenever Liliana's Reaver deals combat damage to a player, that player discards a card and you put a 2/2 black Zombie creature token onto the battlefield tapped. @@ -62767,7 +62718,7 @@ toughness=2 [/card] [card] name=Llanowar Mentor -auto={G}{T}{discard(*|myhand)}:token(461) +auto={G}{T}{discard(*|myhand)}:token(Llanowar Elves) text={G}, {T}, Discard a card: Put a 1/1 green Elf Druid creature token named Llanowar Elves onto the battlefield. It has "{T}: Add {G} to your mana pool." mana={G} type=Creature @@ -64564,7 +64515,7 @@ type=Instant [card] name=Magnifying Glass auto={T}:Add{1} -auto={4}{T}:token(Clue) controller +auto={4}{T}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text={T}: Add {1} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3} type=Artifact @@ -65664,7 +65615,7 @@ toughness=4 [card] name=Mardu Charm auto=choice name(4 Damage) damage:4 target(creature) -auto=choice name(2 Warrior tokens) token(-386593)*2 +auto=choice name(2 Warrior tokens) token(Warrior,Creature Warrior,1/1,white) and!( transforms((,newability[first strike])) ueot )!*2 auto=choice name(discard opponent) target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Choose one: -- Mardu Charm deals 4 damage to target creature. -- Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn. -- Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={R}{W}{B} @@ -65767,16 +65718,6 @@ power=3 toughness=2 [/card] [card] -name=Mardu Warrior token -auto=first strike ueot -text= -type=Creature -color=white -subtype=Warrior -power=1 -toughness=1 -[/card] -[card] name=Mardu Warshrieker auto=if raid then Add{R}{W}{B} text=Raid - When Mardu Warshrieker enters the battlefield, if you attacked with a creature this turn, add {R}{W}{B} to your mana pool. @@ -67909,7 +67850,7 @@ type=Instant [card] name=Midnight Ritual target=creature|mygraveyard -auto=transforms((,newability[moveTo(exile)],newability[token(-19707)])) +auto=transforms((,newability[moveTo(exile)],newability[token(Zombie)])) text=Exile X target creature cards from your graveyard. For each creature card exiled this way, put a 2/2 black Zombie creature token onto the battlefield. mana={X}{2}{B} type=Sorcery @@ -69013,7 +68954,7 @@ type=Land [card] name=Mirror-Sigil Sergeant abilities=trample -auto=@each my upkeep restriction{type(*[blue]|myBattlefield)~morethan~0}:may token(158598) +auto=@each my upkeep restriction{type(*[blue]|myBattlefield)~morethan~0}:may token(Mirror-Sigil Sergeant) text=Trample -- At the beginning of your upkeep, if you control a blue permanent, you may put a token that's a copy of Mirror-Sigil Sergeant onto the battlefield. mana={5}{W} type=Creature @@ -70159,7 +70100,7 @@ toughness=2 [card] name=Monastery Mentor auto=@movedTo(*[-creature]|mystack):1/1 ueot -auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(-391883) controller +auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(Monk,Creature Monk,1/1,white) and!( transforms((,newability[@movedTo(*[-creature]|mystack):1/1])) forever )! controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, put a 1/1 white Monk creature token with prowess onto the battlefield. mana={2}{W} type=Creature @@ -70223,16 +70164,6 @@ power=1 toughness=1 [/card] [card] -name=Monk Token -auto=@movedTo(*[-creature]|mystack):1/1 ueot -text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -color=white -type=Creature -subtype=Monk -power=1 -toughness=1 -[/card] -[card] name=Monkey Cage auto=@movedTo(creature[manacost=0]|battlefield) once:sacrifice all(this) && loseabilities all(this) auto=@movedTo(creature[manacost=1]|battlefield) once:sacrifice all(this) && loseabilities all(this) && token(Ape,Creature Ape,2/2,green) @@ -71793,7 +71724,7 @@ toughness=1 [/card] [card] name=Myr Propagator -auto={3}{T}:token(215069) +auto={3}{T}:token(Myr Propagator) text={3}, {T}: Put a token that's a copy of Myr Propagator onto the battlefield. mana={3} type=Artifact Creature @@ -72822,7 +72753,7 @@ subtype=Aura [/card] [card] name=Necromancer's Stockpile -auto=aslongas(creature|myhand) {1}{B}:notatarget(creature|myhand) and!( if cantargetcard(zombie|*) then token(-383323) )! reject && draw:1 +auto=aslongas(creature|myhand) {1}{B}:notatarget(creature|myhand) and!( if cantargetcard(zombie|*) then token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! )! reject && draw:1 text={1}{B},Discard a creature card: Draw a card. If the discarded card was a Zombie card, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={1}{B} type=Enchantment @@ -73184,7 +73115,7 @@ toughness=3 [/card] [card] name=Nest Invader -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=When Nest Invader enters the battlefield, put a 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={1}{G} type=Creature @@ -74848,7 +74779,7 @@ type=Artifact [/card] [card] name=Null Caller -auto={3}{b}{e(creature|mygraveyard)}:token(-370619) +auto={3}{b}{e(creature|mygraveyard)}:token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text={3}{B}, Exile a creature card from your graveyard: Put a 2/2 black Zombie creature token onto the battlefield tapped. mana={3}{B} type=Creature @@ -76109,8 +76040,8 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@combatdamaged(player):token(Clue) controller -auto={1}{G}{e(creature|mygraveyard)}:token(Clue) controller && life:2 +auto=@combatdamaged(player):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto={1}{G}{e(creature|mygraveyard)}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} type=Enchantment @@ -77549,7 +77480,7 @@ type=Sorcery [card] name=Pack Rat anyzone=type:rat:mybattlefield/type:rat:mybattlefield cdaactive -auto={2}{B}{discard(*|myhand)}:token(253624) +auto={2}{B}{discard(*|myhand)}:token(Pack Rat) text=Pack Rat's power and toughness are each equal to the number of Rats you control. -- {2}{B}, Discard a card: Put a token onto the battlefield that's a copy of Pack Rat. mana={1}{B} type=Creature @@ -78491,8 +78422,8 @@ toughness=3 [/card] [card] name=Pawn of Ulamog -auto=@movedTo(this|graveyard) from(myBattlefield):may token(-193507) -auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):may token(-193507) +auto=@movedTo(this|graveyard) from(myBattlefield):may token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! +auto=@movedTo(other creature[-token]|graveyard) from(myBattlefield):may token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Whenever Pawn of Ulamog or another nontoken creature you control dies, you may put a 0/1 colorless Eldrazi Spawn creature token onto the battlefield. It has "Sacrifice this creature: Add 1 to your mana pool." mana={1}{B}{B} type=Creature @@ -81680,7 +81611,7 @@ type=Sorcery name=Press for Answers target=creature auto=frozen -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Tap target creature. It doesn't untap during its controller's next untap step. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} type=Sorcery @@ -85055,7 +84986,7 @@ type=Sorcery [card] name=Rapacious One abilities=trample -auto=@combatdamaged(player) from(this):token(-193507)*thatmuch +auto=@combatdamaged(player) from(this):token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*thatmuch text=Trample -- Whenever Rapacious One deals combat damage to a player, put that many colorless 0/1 Eldrazi Spawn tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={5}{R} type=Creature @@ -88525,8 +88456,8 @@ type=Sorcery [/card] [card] name=Rise from the Tides -auto=foreach(sorcery|mygraveyard):token(-370619) -auto=foreach(instant|mygraveyard):token(-370619) +auto=foreach(sorcery|mygraveyard):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! +auto=foreach(instant|mygraveyard):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! text=Put a 2/2 black Zombie creature token onto the battlefield tapped for each instant and sorcery card in your graveyard. mana={5}{U} type=Sorcery @@ -89384,7 +89315,7 @@ type=Enchantment name=Root Out target=artifact,enchantment auto=destroy -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Destroy target artifact or enchantment. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{G} type=Sorcery @@ -92749,7 +92680,7 @@ toughness=4 [/card] [card] name=Scion Summoner -auto=token(Eldrazi scion) +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Devoid (This card has no color.) -- When Scion Summoner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{G} abilities=devoid @@ -97401,7 +97332,7 @@ subtype=Arcane [/card] [card] name=Sifter of Skulls -auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi scion) controller +auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller text=Devoid (This card has no color.) -- Whenever another nontoken creature you control dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={3}{B} abilities=devoid @@ -98852,7 +98783,7 @@ toughness=1 [/card] [card] name=Skirk Ridge Exhumer -auto={B}{discard(*|myhand)}{T}:token(39905) +auto={B}{discard(*|myhand)}{T}:token(Festering Goblin) text={B}, {T}, Discard a card: Put a 1/1 black Zombie Goblin creature token named Festering Goblin onto the battlefield. It has "When Festering Goblin dies, target creature gets -1/-1 until end of turn." mana={1}{B} type=Creature @@ -98936,7 +98867,7 @@ toughness=3 [/card] [card] name=Skittering Invasion -auto=Token(-193507)*5 +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*5 text=Put five 0/1 colorless Eldrazi Spawn creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={7} type=Tribal Sorcery @@ -102283,7 +102214,7 @@ toughness=1 [/card] [card] name=Sparkspitter -auto={R}{T}{discard(*|myhand)}:token(73579) +auto={R}{T}{discard(*|myhand)}:token(Spark Elemental) text={R}, {T}, Discard a card: Put a 3/1 red Elemental creature token named Spark Elemental onto the battlefield. It has trample, haste, and "At the beginning of the end step, sacrifice Spark Elemental." mana={2}{R} type=Creature @@ -102354,7 +102285,7 @@ toughness=4 [card] name=Spawning Bed auto={T}:add{1} -auto={6}{T}{S}:token(Eldrazi Scion)*3 +auto={6}{T}{S}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 text={T}: Add {1} to your mana pool. -- {6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." type=Land [/card] @@ -102362,7 +102293,7 @@ type=Land name=Spawning Breath target=creature,player auto=damage:1 -auto=Token(-193507) +auto=token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Spawning Breath deals 1 damage to target creature or player. -- Put a 0/1 colorless Eldrazi Spawn creature token with "Sacrifice this creature: Add {1} to your mana pool" onto the battlefield. mana={1}{R} type=Instant @@ -102387,7 +102318,7 @@ type=Land name=Spawnsire of Ulamog mana={10} auto=@combat(attacking) source(this):name(Annihilate) ability$!name(sacrifice a permanent) notatarget(<1>*|mybattlefield) sacrifice!$ opponent -auto={4}:token(-193507)*2 +auto={4}:token(Eldrazi Spawn,Creature Eldrazi Spawn,0/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 auto={20}:name(Cast Eldrazi's) ability$!castcard(named!:Emrakul, the Aeons Torn:!) _ castcard(named!:It That Betrays:!) _ castcard(named!:Ulamog, the Infinite Gyre:!) _ castcard(named!:Kozilek, Butcher of Truth:!) _ castcard(named!:Spawnsire of Ulamog:!) _ castcard(named!:Artisan of Kozilek:!) _ castcard(named!:Hand of Emrakul:!) _ castcard(named!:Ulamog's Crusher:!)!$ controller type=Creature subtype=Eldrazi @@ -102398,7 +102329,7 @@ text=Annihilator 1 (Whenever this creature attacks, defending player sacrifices [card] name=Spawnwrithe abilities=trample -auto=@combatdamaged(player) from(this):token(158687) +auto=@combatdamaged(player) from(this):token(Spawnwrithe) text=Trample -- Whenever Spawnwrithe deals combat damage to a player, put a token that's a copy of Spawnwrithe onto the battlefield. mana={2}{G} type=Creature @@ -103812,17 +103743,6 @@ power=2 toughness=2 [/card] [card] -name=Splinter Token -type=Creature -subtype=Splinter -abilities=flying -auto=cumulativeupcost[{G}] sacrifice -text=Flying -- Cumulative upkeep {G} -power=1 -toughness=1 -color=green -[/card] -[card] name=Splinter Twin target=creature auto=teach(creature) {T}:clone with(unearth,haste) @@ -103856,7 +103776,7 @@ type=Sorcery [/card] [card] name=Splintering Wind -auto={2}{G}:damage:1 target(creature) && token(-3148) +auto={2}{G}:damage:1 target(creature) && token(Splinter Token,Creature Splinter,1/1,green,flying) and!( transforms((,newability[cumulativeupcost[{G}] sacrifice])) forever )! auto=@movedTo(splinter token|nonbattlezone) from(mybattlefield):damage:1 all(creature) && damage:1 controller text={2}{G}: Splintering Wind deals 1 damage to target creature. Put a 1/1 green Splinter creature token onto the battlefield. It has flying and "Cumulative upkeep {G}." (At the beginning of its controller's upkeep, that player puts an age counter on it, then sacrifices it unless he or she pays its upkeep cost for each age counter on it.) -- Whenever a Splinter token leaves the battlefield, it deals 1 damage to you and each creature you control. mana={2}{G}{G} @@ -104119,7 +104039,7 @@ type=Instant [card] name=Sprouting Phytohydra abilities=defender -auto=@damaged(this):may token(111220) +auto=@damaged(this):may token(Sprouting Phytohydra) text=Defender (This creature can't attack.) -- Whenever Sprouting Phytohydra is dealt damage, you may put a token that's a copy of Sprouting Phytohydra onto the battlefield. mana={4}{G} type=Creature @@ -105587,7 +105507,7 @@ toughness=2 [card] name=Stone Idol Trap autohand=affinity(creature[attacking]|battlefield) reduce({1}) -auto=token(-191552) +auto=token(Construct,Artifact Creature Construct,6/12,trample) and!( transforms((,newability[@next endofturn:moveTo(exile)])) forever )! text=Stone Idol Trap costs {1} less to cast for each attacking creature. -- Put a 6/12 colorless Construct artifact creature token with trample onto the battlefield. Exile it at the beginning of your next end step. mana={5}{R} type=Instant @@ -107912,7 +107832,7 @@ name=Survive the Night target=creature auto=1/0 auto=indestructible -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Target creature gets +1/+0 and gains indestructible until end of turn. (Damage and effects that say "destroy" don't destroy it.) -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{W} type=Instant @@ -109319,7 +109239,7 @@ subtype=Tamiyo [/card] [card] name=Tamiyo's Journal -auto=@upkeep:token(Clue) +auto=@upkeep:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! auto={T}{S(clue|mybattlefield)}{S(clue|mybattlefield)}{S(clue|mybattlefield)}: moveto(myhand) target(*|mylibrary) text=at the beginning of your upkeep, investigate -- {T}, sacrifice three clues: search your library for a card and put that card into your hand, then shuffle your library mana={5} @@ -111970,7 +111890,7 @@ toughness=2 [/card] [card] name=Thraben Inspector -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=When Thraben Inspector enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={W} type=Creature @@ -113197,7 +113117,7 @@ toughness=3 [/card] [card] name=Tireless Tracker -auto=@movedto(land|mybattlefield):token(Clue) controller +auto=@movedto(land|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=@sacrificed(clue|mybattlefield):counter(1/1,1) text=Whenever a land enters the battlefield under your control, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a +1/+1 counter on Tireless Tracker. mana={2}{G} @@ -114299,7 +114219,7 @@ type=Instant [/card] [card] name=Trail of Evidence -auto=@movedto(instant,sorcery|mystack):token(Clue) controller +auto=@movedto(instant,sorcery|mystack):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Whenever you cast an instant or sorcery spell, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={2}{U} type=Enchantment @@ -116432,7 +116352,7 @@ toughness=* [/card] [card] name=Ulvenwald Mysteries -auto=@movedto(creature[-token]|mygraveyard):token(Clue) controller +auto=@movedto(creature[-token]|mygraveyard):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=@sacrificed(clue|mybattlefield):token(Human Soldier,creature Human Soldier,1/1,white) text=Whenever a nontoken creature you control dies, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, put a 1/1 white Human Soldier creature token onto the battlefield. mana={2}{G} @@ -117429,7 +117349,7 @@ type=Enchantment [/card] [card] name=Urabrask the Hidden -auto=emblem transforms((,newability[aslongas(Urabrask the Hidden|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot +auto=lord(creature|mybattlefield) haste auto=lord(creature|opponentbattlefield) transforms((,newability[tap(noevent)])) text=Creatures you control have Haste. -- Creatures your opponents control enter the battlefield tapped. mana={3}{R}{R} @@ -119846,7 +119766,7 @@ type=Instant [card] name=Vile Redeemer abilities=flash -auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi scion) +auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Devoid (This card has no color.) -- Flash -- When you cast Vile Redeemer, you may pay {C}. If you do, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield for each nontoken creature that died under your control this turn. Those tokens have "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} abilities=devoid @@ -120790,7 +120710,7 @@ type=Sorcery [card] name=Void Attendant abilities=devoid -auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion) +auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! text=Devoid (This card has no color.) -- {1}{G}, Put a card an opponent owns from exile into that player's graveyard: Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} type=Creature @@ -123487,7 +123407,7 @@ toughness=1 [/card] [card] name=Weirding Wood -auto=token(Clue) controller +auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto=teach(land) {T}:add{G}{G} auto=teach(land) {T}:add{W}{W} auto=teach(land) {T}:add{U}{U} @@ -126456,18 +126376,9 @@ power=3 toughness=6 [/card] [card] -name=Xathrid Necromancer Zombie -type=Creature -subtype=Zombie -auto=tap(noevent) -power=2 -toughness=2 -color=black -[/card] -[card] name=Xathrid Necromancer -autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller -auto=@movedTo(other human|graveyard) from(mybattlefield):token(Xathrid Necromancer Zombie) controller +autograveyard=@movedTo(this|graveyard) from(mybattlefield):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! controller +auto=@movedTo(other human|graveyard) from(mybattlefield):token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! controller text=Whenever Xathrid Necromancer or another Human creature you control dies, put a 2/2 black Zombie creature token onto the battlefield tapped. mana={2}{B} type=Creature @@ -127618,15 +127529,6 @@ power=2 toughness=2 [/card] [card] -name=Zombie Token -type=Creature -subtype=Zombie -auto=tap(noevent) -power=2 -toughness=2 -color=black -[/card] -[card] name=Zombie Trailblazer auto={T(zombie|mybattlefield)}:ueot name(land becomes a swamp) loseabilities && losesubtypesof(land) && transforms((swamp)) target(land) auto={T(zombie|mybattlefield)}:swampwalk target(creature) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 867439b56..142bfda5d 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3524,6 +3524,7 @@ public: bool battleReady; MTGCardInstance * myToken; vector currentAbilities; + MTGAbility * andAbility; Player * tokenReciever; //by id ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, @@ -3534,6 +3535,7 @@ public: MTGCard * card = MTGCollection()->getCardById(tokenId); if (card) name = card->data->getName(); battleReady = false; + andAbility = NULL; } //by name, card still require valid card.dat info, this just makes the primitive code far more readable. token(Eldrazi scion) instead of token(-1234234)... ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string cardName, string starfound, WParsedInt * multiplier = NULL, @@ -3545,6 +3547,7 @@ public: tokenId = card->getId(); if (card) name = card->data->getName(); battleReady = false; + andAbility = NULL; } //by construction ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, @@ -3557,6 +3560,7 @@ public: tokenId = 0; aType = MTGAbility::STANDARD_TOKENCREATOR; battleReady = false; + andAbility = NULL; if (!multiplier) this->multiplier = NEW WParsedInt(1); //TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class; @@ -3685,6 +3689,21 @@ public: { battleReadyToken(spell->source); } + //andability + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = spell->source; + if(andAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } delete spell; } return 1; @@ -4500,8 +4519,9 @@ class AAFlip: public InstantAbility public: vector currentAbilities; string flipStats; + bool forcedcopy; bool isflipcard; - AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false); + AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false, bool forcedcopy = false); int resolve(); int testDestroy(); const string getMenuText(); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 20f475a4c..fb180fac0 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1462,16 +1462,31 @@ int AACopier::resolve() if (_target) { MTGCard* clone ; - if(_target->isToken || (_target->isACopier && _target->hasCopiedToken)) + if((_target->isToken || _target->isACopier) && _target->hasCopiedToken) { clone = _target; tokencopied = true; } else clone = MTGCollection()->getCardById(_target->copiedID); - MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); - source->copy(myClone); - SAFE_DELETE(myClone); + + if(tokencopied) + { + MTGCardInstance * myClone = NEW MTGCardInstance(clone, source->controller()->game); + source->copy(myClone); + SAFE_DELETE(myClone); + } + else + {/********************************************* + * instead of using source->copy(myClone) use * + * AAFlip with forcedcopy to true * + *********************************************/ + AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true); + af->oneShot; + af->canBeInterrupted = false; + af->resolve(); + SAFE_DELETE(af); + } source->isACopier = true; source->hasCopiedToken = tokencopied; source->copiedID = _target->copiedID; @@ -3155,8 +3170,8 @@ AAMeld * AAMeld::clone() const } // flip a card -AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard) : -InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard) +AAFlip::AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard, bool forcedcopy) : +InstantAbility(observer, id, card, _target),flipStats(flipStats),isflipcard(isflipcard),forcedcopy(forcedcopy) { target = _target; } @@ -3179,7 +3194,7 @@ int AAFlip::resolve() MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) { - if((_target->isACopier||_target->isToken) && !isflipcard) + if((_target->isACopier||_target->isToken) && !isflipcard && !forcedcopy) { game->removeObserver(this); return 0; @@ -3208,9 +3223,20 @@ int AAFlip::resolve() _target->types = myFlip->types; _target->text = myFlip->text; _target->formattedText = myFlip->formattedText; - _target->basicAbilities = myFlip->basicAbilities; + //_target->basicAbilities = myFlip->basicAbilities; + for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) + { + if(myFlip->model->data->basicAbilities[k]) + _target->basicAbilities[k] = myFlip->model->data->basicAbilities[k]; + } + _target->modbasicAbilities = myFlip->modbasicAbilities; cdaDamage = _target->damageCount; _target->copiedID = myFlip->getMTGId();//for copier + if(forcedcopy && _target->owner->playMode != Player::MODE_TEST_SUITE) + { + _target->setMTGId(myFlip->getMTGId()); + _target->setId = myFlip->setId; + } for(unsigned int i = 0;i < _target->cardsAbilities.size();i++) { MTGAbility * a = dynamic_cast(_target->cardsAbilities[i]); diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 99fa8f123..66b0bb004 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2381,6 +2381,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator(observer, id, card,target, NULL, tokenId, starfound, multiplier, who); tok->oneShot = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } @@ -2395,6 +2402,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { ATokenCreator * tok = NEW ATokenCreator(observer, id, card, target, NULL, cardName, starfound, multiplier, who); tok->oneShot = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } } @@ -2431,6 +2445,13 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG tok->oneShot = 1; if(aLivingWeapon) tok->forceDestroy = 1; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((ATokenCreator*)tok)->andAbility = parseMagicLine(stored, id, spell, card); + } return tok; } diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index b0dd57f9e..1c0e85162 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -104,7 +104,7 @@ void MTGCardInstance::copy(MTGCardInstance * card) if(card->model->data->basicAbilities[k]) basicAbilities[k] = card->model->data->basicAbilities[k]; } - + modbasicAbilities = card->modbasicAbilities; for (size_t i = 0; i < data->types.size(); i++) { types.push_back(data->types[i]); @@ -141,9 +141,9 @@ void MTGCardInstance::copy(MTGCardInstance * card) mtgid = backupid; // there must be a way to get the token id... else { - mtgid = card->getMTGId(); /////////////////////////////////////////////////// - setId = card->setId; // Copier/Cloner cards produces the same token...// - rarity = card->getRarity(); /////////////////////////////////////////////////// + mtgid = card->getMTGId(); /////////////////////////////////////////////////// + setId = card->setId; // Copier/Cloner cards produces the same token...// + //rarity = card->getRarity(); /////////////////////////////////////////////////// } castMethod = castMethodBackUP; backupTargets = this->backupTargets; @@ -611,7 +611,7 @@ int MTGCardInstance::hasSummoningSickness() { if (!summoningSickness) return 0; - if (basicAbilities[(int)Constants::HASTE]) + if (has(Constants::HASTE)) return 0; if (!isCreature()) return 0; From 1c63c1937a8a3b9546e39217978e192cfb93f9de Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 16:28:49 +0800 Subject: [PATCH 09/54] Update some cards --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 5b46b1771..36af13330 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -25226,7 +25226,7 @@ toughness=2 [card] name=Deathpact Angel abilities=flying -auto=@movedTo(this|graveyard) from(battlefield):token(Cleric,Creature Cleric,1/1,white,black) && all(Cleric[token]|mybattlefield) transforms((,newability[{3}{W}{B}{B}{T}{S}:moveto(ownerbattlefield) notatarget(Deathpact Angel|mygraveyard)])) forever +auto=@movedTo(this|graveyard) from(battlefield):token(Cleric,Creature Cleric,1/1,white,black) and!( transforms((,newability[{3}{W}{B}{B}{T}{S}:moveto(ownerbattlefield) notatarget(Deathpact Angel|mygraveyard)])) forever )! text=Flying -- When Deathpact Angel dies, put a 1/1 white and black Cleric creature token onto the battlefield. It has "{3}{W}{B}{B}, {T}, Sacrifice this creature: Return a card named Deathpact Angel from your graveyard to the battlefield." mana={3}{W}{B}{B} type=Creature @@ -41426,7 +41426,7 @@ toughness=2 [card] name=Geist of Saint Traft abilities=opponentshroud -auto=@combat(attacking) source(this):token(Angel Token,Creature Angel,4/4,white,flying,battleready) && all(Angel Token[attacking]|mybattlefield) phaseaction[combatends once] moveto(exile) +auto=@combat(attacking) source(this):token(Angel Token,Creature Angel,4/4,white,flying,battleready) and!( transforms((,newability[phaseaction[combatends once] moveto(exile)])) forever )! text=Hexproof -- Whenever Geist of Saint Traft attacks, put a 4/4 white Angel creature token with flying onto the battlefield tapped and attacking. Exile that token at the end of combat. mana={1}{W}{U} type=Legendary Creature @@ -41536,7 +41536,7 @@ toughness=1 [/card] [card] name=Gemini Engine -auto=@combat(attacking) source(this):token(Twin,Gemini Creature,p/t,battleready) && all(Twin[gemini]|mybattlefield) phaseaction[combatends,sourceinplay] sacrifice +auto=@combat(attacking) source(this):token(Twin,Gemini Creature,p/t,battleready) and!( transforms((,newability[phaseaction[combatends,sourceinplay] sacrifice])) forever )! text=Whenever Gemini Engine attacks, put a colorless Construct artifact creature token named Twin onto the battlefield attacking. Its power is equal to Gemini Engine's power and its toughness is equal to Gemini Engine's toughness. Sacrifice the token at end of combat. mana={6} type=Artifact Creature @@ -54280,7 +54280,7 @@ toughness=1 [card] name=Invocation of Saint Traft target=creature -auto=@combat(attacking) source(mytgt):token(Saint Traft Angel,Creature Angel,4/4,white,flying,battleready) && all(Saint Traft Angel[attacking]|mybattlefield) phaseaction[combatends once] moveto(exile) +auto=@combat(attacking) source(mytgt):token(Angel,Creature Angel,4/4,white,flying,battleready) and!( transforms((,newability[phaseaction[combatends once] moveto(exile)])) forever )! text=Enchant creature -- Enchanted creature has "Whenever this creature attacks, put a 4/4 white Angel creature token with flying onto the battlefield tapped and attacking. Exile that token at end of combat." mana={1}{W}{U} type=Enchantment @@ -94611,7 +94611,7 @@ toughness=2 [card] name=Sengir Nosferatu abilities=flying -auto={1}{B}{E}:token(Bat Token,Creature Bat,1/2,flying,black) && all(Bat Token) transforms((,newability[{1}{B}{S}:moverandom(Sengir Nosferatu) from(exile) to(mybattlefield)])) forever +auto={1}{B}{E}:token(Bat,Creature Bat,1/2,flying,black) and!( transforms((,newability[{1}{B}{S}:notatarget(Sengir Nosferatu|exile) moveto(mybattlefield)])) forever )! text=Flying -- {1}{B}, Exile Sengir Nosferatu: Put a 1/2 black Bat creature token with flying onto the battlefield. It has "{1}{B}, Sacrifice this creature: Return an exiled card named Sengir Nosferatu to the battlefield under its owner's control." mana={3}{B}{B} type=Creature From adccae7937a15aef1983f4358e6cc16b3ce833b7 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 18:11:29 +0800 Subject: [PATCH 10/54] switched places --- projects/mtg/include/AllAbilities.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 142bfda5d..ca760653f 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -4519,8 +4519,8 @@ class AAFlip: public InstantAbility public: vector currentAbilities; string flipStats; - bool forcedcopy; bool isflipcard; + bool forcedcopy; AAFlip(GameObserver* observer, int id, MTGCardInstance * card, MTGCardInstance * _target,string flipStats, bool isflipcard = false, bool forcedcopy = false); int resolve(); int testDestroy(); From 56a8011b788bc34dfb80c7e8dce25583499afbf5 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 18:44:41 +0800 Subject: [PATCH 11/54] revert --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 36af13330..14f56cb0b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -28791,7 +28791,7 @@ toughness=7 [card] name=Dragonlord Kolaghan abilities=flying,haste -auto=lord(creature|mybattlefield) haste +auto=emblem transforms((,newability[aslongas(Dragonlord Kolaghan|mybattlefield) lord(creature|mybattlefield) haste >0])) ueot auto=@movedto(*[creature;planeswalker]|opponentstack):all(trigger[to]) transforms((,newability[if type(*[share!name!]|mygraveyard)~morethan~0 then life:-10 controller])) oneshot text=Flying, haste -- Other creatures you control have haste. -- Whenever an opponent casts a creature or planeswalker spell with the same name as a card in his or her graveyard, that player loses 10 life. mana={4}{B}{R} From 1aac2b8e75f3b568bbc8f3efc5b993e7d683fbd0 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 21:23:38 +0800 Subject: [PATCH 12/54] Update AllAbilities.cpp Try to fix IOS/MAC compilation --- projects/mtg/src/AllAbilities.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index fb180fac0..0fe9bc33f 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1482,7 +1482,7 @@ int AACopier::resolve() * AAFlip with forcedcopy to true * *********************************************/ AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true); - af->oneShot; + //af->oneShot; af->canBeInterrupted = false; af->resolve(); SAFE_DELETE(af); From be899159f3ddb623c14bcaa0ce05f421c7e2c1c3 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 3 Aug 2016 23:03:32 +0800 Subject: [PATCH 13/54] correction --- CHANGELOG.md | 31 +++++++++++++++ projects/mtg/bin/Res/sets/primitives/mtg.txt | 42 ++++++++++---------- projects/mtg/src/AllAbilities.cpp | 2 +- 3 files changed, 53 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a6ea3b59..0a3e6a070 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,37 @@ # Changelog ## [latest-master] (https://github.com/WagicProject/wagic/tree/latest-master) +#### 8/3/16 +- *Merged pull-request:* andAbility on ATokenCreator, Extend AAFlip [#\824] (https://github.com/WagicProject/wagic/pull/824) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/31/16 +- *Merged pull-request:* Fix Chandra, Flamecaller & Cryptolith Rite [#\818] (https://github.com/WagicProject/wagic/pull/818) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/28/16 +- *Merged pull-request:* changing some of the logic to the previous fixes, we want to avoid using code that looks for specific card names. [#\800] (https://github.com/WagicProject/wagic/pull/800) ([zethfoxster](https://github.com/zethfoxster)) + +#### 7/26/16 +- *Merged pull-request:* granted flashback [#\791] (https://github.com/WagicProject/wagic/pull/791) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/23/16 +- *Merged pull-request:* Fix Flying vs Moat (multiples of them). Fixes issue #526 [#\783] (https://github.com/WagicProject/wagic/pull/783) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/19/16 +- *Merged pull-request:* pushing to master [#\770] (https://github.com/WagicProject/wagic/pull/770) ([zethfoxster](https://github.com/zethfoxster)) + +#### 7/18/16 +- *Merged pull-request:* Fix Deck Menu layer, Change Main Menu Layout, Fix Crash cdaactive on tokens [#\765] (https://github.com/WagicProject/wagic/pull/765) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/12/16 +- *Merged pull-request:* Pushing fixes [#\750] (https://github.com/WagicProject/wagic/pull/750) ([zethfoxster](https://github.com/zethfoxster)) + +- *Merged pull-request:* try to fix failed logic here [#\747] (https://github.com/WagicProject/wagic/pull/747) ([kevlahnota](https://github.com/kevlahnota)) + +#### 7/9/16 +- *Merged pull-request:* pushing to master [#\738] (https://github.com/WagicProject/wagic/pull/738) ([zethfoxster](https://github.com/zethfoxster)) + +- *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\736] (https://github.com/WagicProject/wagic/pull/736) ([kevlahnota](https://github.com/kevlahnota)) + #### 7/7/16 - *Merged pull-request:* Sorted Primitives and Cleanup Tabs [#\727] (https://github.com/WagicProject/wagic/pull/719) ([kevlahnota](https://github.com/kevlahnota)) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 14f56cb0b..4d1031ed0 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -234,7 +234,7 @@ name=Abstruse Interference abilities=devoid target=*|stack auto=transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Counter target spell unless its controller pays {1}. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{U} type=Instant @@ -866,7 +866,7 @@ name=Adverse Conditions target=creature|battlefield auto=tap auto=frozen -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Tap up to two target creatures. Those creatures don't untap during their controller's next untap step. Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -9957,7 +9957,7 @@ toughness=1 [card] name=Birthing Hulk auto={1}{C}:regenerate -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 text=Devoid (This card has no color.) -- When Birthing Hulk enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) -- {1}{C}: Regenerate Birthing Hulk. mana={6}{G} abilities=devoid @@ -10584,7 +10584,7 @@ type=Sorcery [card] name=Blight Herder kicker={discard(*|opponentexile)}{discard(*|opponentexile)} -auto=kicker token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 +auto=kicker token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 text=When you cast Blight Herder, you may put two cards your opponents own from exile into their owners' graveyards. If you do, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {C} to your mana pool." mana={5} type=Creature @@ -10980,7 +10980,7 @@ toughness=1 [/card] [card] name=Blisterpod -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- When Blisterpod dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={G} abilities=devoid @@ -14080,7 +14080,7 @@ type=Sorcery [/card] [card] name=Brood Butcher -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto={B}{G}{S(creature|mybattlefield):target(creature) -2/-2 ueot text=Devoid (This card has no color.) -- When Brood Butcher enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {B}{G}, Sacrifice a creature: Target creature gets -2/-2 until end of turn. mana={3}{B}{G} @@ -14113,7 +14113,7 @@ toughness=3 [/card] [card] name=Brood Monitor -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 controller text=Devoid (This card has no color.) -- When Brood Monitor enters the battlefield, put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={4}{G}{G} abilities=devoid @@ -15196,7 +15196,7 @@ type=Sorcery [/card] [card] name=Call the Scions -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 controller text=Devoid (This card has no color.) -- Put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={2}{G} abilities=devoid @@ -15918,7 +15918,7 @@ toughness=1 [/card] [card] name=Carrier Thrall -auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=@movedTo(this|graveyard) from(battlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=When Carrier Thrall dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={1}{B} type=Creature @@ -16147,7 +16147,7 @@ toughness=4 [card] name=Catacomb Sifter abilities=devoid -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto=@movedTo(other creature|graveyard) from(myBattlefield):name(Scry) reveal:1 optionone name(Put On Top) target(*|reveal) moveto(mylibrary) optiononeend optiontwo name(put on bottom) target(<1>*|reveal) bottomoflibrary optiontwoend revealend text=Devoid (This card has no color.) -- When Catacomb Sifter enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." -- Whenever another creature you control dies, scry 1. (Look at the top card of your library. You may put that card on the bottom of your library.) mana={1}{B}{G} @@ -29979,7 +29979,7 @@ toughness=1 [/card] [card] name=Drowner of Hope -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! *2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! *2 controller auto={S(Eldrazi Scion|mybattlefield)}:tap target(creature) text=Devoid (This card has no color.) -- When Drowner of Hope enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." -- Sacrifice an Eldrazi Scion: Tap target creature. mana={5}{U} @@ -31683,7 +31683,7 @@ toughness=1 [card] name=Eldrazi Skyspawner abilities=flying -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Flying -- When Eldrazi Skyspawner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={2}{U} abilities=devoid @@ -35253,7 +35253,7 @@ subtype=Elf [/card] [card] name=Eyeless Watcher -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*2 controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*2 controller text=Devoid (This card has no color.) -- When Eyeless Watcher enters the battlefield, put two 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." mana={3}{G} abilities=devoid @@ -40120,7 +40120,7 @@ toughness=1 [/card] [card] name=From Beyond -auto=@each my upkeep:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=@each my upkeep:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto={1}{G}{S}:moveto(myhand) notatarget(*[eldrazi]|mylibrary) text=Devoid (This card has no color.) -- At the beginning of your upkeep, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- {1}{G}, Sacrifice From Beyond: Search your library for an Eldrazi card, reveal it, put it into your hand, then shuffle your library. mana={3}{G} @@ -45545,7 +45545,7 @@ type=Land name=Grave Birthing target=opponent auto=ability$!moveto(exile) notatarget(*|mygraveyard)!$ targetedplayer -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller auto=draw:1 controller text=Devoid (This card has no color.) -- Target opponent exiles a card from his or her graveyard. You put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." -- Draw a card. mana={2}{B} @@ -53184,7 +53184,7 @@ type=Sorcery [/card] [card] name=Incubator Drone -auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=choice token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- When Incubator Drone enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {1} to your mana pool." mana={3}{U} abilities=devoid @@ -92680,7 +92680,7 @@ toughness=4 [/card] [card] name=Scion Summoner -auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! +auto=token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- When Scion Summoner enters the battlefield, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={2}{G} abilities=devoid @@ -97332,7 +97332,7 @@ subtype=Arcane [/card] [card] name=Sifter of Skulls -auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! controller +auto=@movedto(other creature[-token]|graveyard) from(mybattlefield):token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! controller text=Devoid (This card has no color.) -- Whenever another nontoken creature you control dies, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." ({C} represents colorless mana.) mana={3}{B} abilities=devoid @@ -102285,7 +102285,7 @@ toughness=4 [card] name=Spawning Bed auto={T}:add{1} -auto={6}{T}{S}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )!*3 +auto={6}{T}{S}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )!*3 text={T}: Add {1} to your mana pool. -- {6}, {T}, Sacrifice Spawning Bed: Put three 1/1 colorless Eldrazi Scion creature tokens onto the battlefield. They have "Sacrifice this creature: Add {1} to your mana pool." type=Land [/card] @@ -119766,7 +119766,7 @@ type=Instant [card] name=Vile Redeemer abilities=flash -auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! +auto=pay({c}) foreach(creature[fresh]|mygraveyard) token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- Flash -- When you cast Vile Redeemer, you may pay {C}. If you do, put a 1/1 colorless Eldrazi Scion creature token onto the battlefield for each nontoken creature that died under your control this turn. Those tokens have "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} abilities=devoid @@ -120710,7 +120710,7 @@ type=Sorcery [card] name=Void Attendant abilities=devoid -auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{1}])) forever )! +auto={1}{G}{s2g(*|opponentexile)}:token(Eldrazi Scion,Creature Eldrazi Scion,1/1) and!( transforms((,newability[{S}:Add{C}])) forever )! text=Devoid (This card has no color.) -- {1}{G}, Put a card an opponent owns from exile into that player's graveyard: Put a 1/1 colorless Eldrazi Scion creature token onto the battlefield. It has "Sacrifice this creature: Add {C} to your mana pool." mana={2}{G} type=Creature diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 0fe9bc33f..915c24bf5 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1482,7 +1482,7 @@ int AACopier::resolve() * AAFlip with forcedcopy to true * *********************************************/ AAFlip * af = NEW AAFlip(game, game->mLayers->actionLayer()->getMaxId(), source, source, clone->data->name, false, true); - //af->oneShot; + af->oneShot = 1; af->canBeInterrupted = false; af->resolve(); SAFE_DELETE(af); From fc350be3a16a87caaba2b249f796de6bbfcef9f6 Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Wed, 3 Aug 2016 12:36:25 -0400 Subject: [PATCH 14/54] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 83459c59f..d1d346d32 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ It is highly customizable and allows the player to tweak the rules / create thei Info, downloads, discussions and more at http://wololo.net/forum/index.php --![alt text](http://wololo.net/wagic/wp-content/uploads/2009/10/shop.jpg "Screenshot") +![alt text](http://wololo.net/wagic/wp-content/uploads/2009/10/shop.jpg "Screenshot") From 0a0f6cdce9957917dfde44627cf4f9414b2cb7a3 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 00:36:49 +0800 Subject: [PATCH 15/54] fix crash wrong parenthesis --- projects/mtg/src/AllAbilities.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 915c24bf5..a18f28b0f 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1462,8 +1462,8 @@ int AACopier::resolve() if (_target) { MTGCard* clone ; - if((_target->isToken || _target->isACopier) && _target->hasCopiedToken) - { + if(_target->isToken || (_target->isACopier && _target->hasCopiedToken)) + {//fix crash when copying token clone = _target; tokencopied = true; } From 52fb40d543c1d0884b011c6f64d2699ba8b31661 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 02:12:59 +0800 Subject: [PATCH 16/54] AACloner & AACopier TokenAndAbility if the token has andAbility, the cloner/copier also has that andAbility also... --- projects/mtg/include/AllAbilities.h | 2 ++ projects/mtg/include/MTGCardInstance.h | 1 + projects/mtg/src/AllAbilities.cpp | 28 ++++++++++++++++++++++++++ projects/mtg/src/MTGCardInstance.cpp | 1 + 4 files changed, 32 insertions(+) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index ca760653f..1e60a6932 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3692,6 +3692,8 @@ public: //andability if(andAbility) { + //backup andAbility for copier and cloner + spell->source->TokenAndAbility = andAbility->clone(); MTGAbility * andAbilityClone = andAbility->clone(); andAbilityClone->target = spell->source; if(andAbility->oneShot) diff --git a/projects/mtg/include/MTGCardInstance.h b/projects/mtg/include/MTGCardInstance.h index aad75beaa..cd18151a5 100644 --- a/projects/mtg/include/MTGCardInstance.h +++ b/projects/mtg/include/MTGCardInstance.h @@ -121,6 +121,7 @@ public: MTGGameZone * previousZone; MTGCardInstance * previous; MTGCardInstance * next; + MTGAbility * TokenAndAbility; int doDamageTest; bool skipDamageTestOnce; int summoningSickness; diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index a18f28b0f..667396db5 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1503,6 +1503,20 @@ int AACopier::resolve() source->basicAbilities.reset(); source->getManaCost()->resetCosts(); } + if(_target->TokenAndAbility) + {//the source copied a token with andAbility + MTGAbility * andAbilityClone = _target->TokenAndAbility->clone(); + andAbilityClone->target = source; + if(_target->TokenAndAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } return 1; } return 0; @@ -3971,6 +3985,20 @@ int AACloner::resolve() if(_target->model->data->basicAbilities[k]) spell->source->basicAbilities[k] = _target->model->data->basicAbilities[k]; } + if(_target->TokenAndAbility) + {//the source copied a token with andAbility + MTGAbility * andAbilityClone = _target->TokenAndAbility->clone(); + andAbilityClone->target = spell->source; + if(_target->TokenAndAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } delete spell; } return 1; diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 1c0e85162..fdb37698d 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -265,6 +265,7 @@ void MTGCardInstance::initMTGCI() previousZone = NULL; previous = NULL; next = NULL; + TokenAndAbility = NULL; lastController = NULL; regenerateTokens = 0; blocked = false; From 161802cf9d9ad243aa1ed915639e534ed820512b Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Wed, 3 Aug 2016 16:01:43 -0400 Subject: [PATCH 17/54] minor Android tweaks - removed ads reference no longer used in manifest - removed redundant android:debuggable attribute - cleared EGL debug warning log spamming issue #581 --- projects/mtg/Android/AndroidManifest.xml | 4 +--- projects/mtg/Android/src/org/libsdl/app/SDLActivity.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/mtg/Android/AndroidManifest.xml b/projects/mtg/Android/AndroidManifest.xml index 3a4255c1c..534f3b8bb 100644 --- a/projects/mtg/Android/AndroidManifest.xml +++ b/projects/mtg/Android/AndroidManifest.xml @@ -4,15 +4,13 @@ - + - - diff --git a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java index 4c4d166ba..0b8f093d8 100644 --- a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java +++ b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java @@ -1207,7 +1207,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK { EGL10 egl = (EGL10) EGLContext.getEGL(); - egl.eglWaitNative(EGL10.EGL_NATIVE_RENDERABLE, null); + egl.eglWaitNative(EGL10.EGL_CORE_NATIVE_ENGINE, null); // drawing here From c45b5751af98fd2b935b88a5648b4b190f8c4871 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 05:41:22 +0800 Subject: [PATCH 18/54] cantattack change some cards since -cantattack overrides cantattack. If there is an effect that makes creatures can't attack, you can just activate the ability to remove -cantattack... --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 135 ++++++------------- projects/mtg/include/AllAbilities.h | 12 ++ projects/mtg/src/MTGRules.cpp | 2 + 3 files changed, 58 insertions(+), 91 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 4d1031ed0..13c6002fe 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -3395,7 +3395,7 @@ type=Artifact [card] name=Angelic Arbiter abilities=flying -auto=@movedTo(*|opponentstack):all(creature|opponentBattlefield) cantattack +auto=@movedTo(*|opponentstack):lord(creature|opponentBattlefield) cantattack auto=@combat(attacking) source(creature|opponentBattlefield):maxCast(*)0 opponent ueot text=Flying -- Each opponent who cast a spell this turn can't attack with creatures. -- Each opponent who attacked with creatures this turn can't cast spells. mana={5}{W}{W} @@ -5337,8 +5337,7 @@ toughness=5 [/card] [card] name=Armored Galleon -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Armored Galleon can't attack unless defending player controls an Island. mana={4}{U} type=Creature @@ -10863,9 +10862,8 @@ type=Instant [/card] [card] name=Blind-Spot Giant -abilities=cantattack,cantblock -auto=aslongas(other giant|myBattlefield) -cantattack -auto=aslongas(other giant|myBattlefield) -cantblock +auto=aslongas(other giant|myBattlefield) cantattack <1 +auto=aslongas(other giant|myBattlefield) cantblock <1 text=Blind-Spot Giant can't attack or block unless you control another Giant. mana={2}{R} type=Creature @@ -11384,10 +11382,9 @@ toughness=2 [/card] [card] name=Bloodcrazed Goblin -auto=this(opponentdamagecount >0) -cantattack +auto=this(opponentdamagecount <1) cantattack text=Bloodcrazed Goblin can't attack unless an opponent was dealt noncombat damage this turn. mana={R} -abilities=cantattack type=Creature subtype=Goblin Berserker power=2 @@ -25593,8 +25590,7 @@ toughness=6 [/card] [card] name=Deep-Sea Serpent -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Deep-Sea Serpent can't attack unless defending player controls an Island. mana={4}{U}{U} type=Creature @@ -29450,8 +29446,7 @@ type=Artifact [/card] [card] name=Dreamwinder -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto={U}{S(island|myBattlefield)}:ueot name(land becomes an island) loseabilities && losesubtypesof(land) && transforms((island)) target(land) text=Dreamwinder can't attack unless defending player controls an Island. -- {U}, Sacrifice an Island: Target land becomes an Island until end of turn. mana={3}{U} @@ -34396,8 +34391,8 @@ toughness=3 [/card] [card] name=Ethereal Whiskergill -abilities=cantattack,flying -auto=aslongas(island|opponentBattlefield) -cantattack +abilities=flying +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Flying -- Ethereal Whiskergill can't attack unless defending player controls an Island. mana={3}{U} type=Creature @@ -34705,7 +34700,7 @@ toughness=5 [card] name=Exalted Dragon abilities=flying,cantattack -auto={S(land|myBattlefield)}:-cantattack +auto={S(land|myBattlefield)}:-cantattack restriction{myattackersonly} text=Flying -- Exalted Dragon can't attack unless you sacrifice a land. mana={4}{W}{W} type=Creature @@ -36443,8 +36438,7 @@ type=Artifact [/card] [card] name=Felhide Brawler -abilities=cantblock -auto=aslongas(other minotaur|myBattlefield) -cantblock +auto=aslongas(other minotaur|myBattlefield) cantblock <1 text=Felhide Brawler can't block unless you control another Minotaur. mana={1}{B} type=Creature @@ -38640,9 +38634,8 @@ toughness=2 [/card] [card] name=Floodchaser -abilities=cantattack auto=counter(1/1,6) -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto={U}{C(1/1,-1)}:ueot name(land becomes an island) loseabilities && losesubtypesof(land) && transforms((island)) target(land) text=Floodchaser enters the battlefield with six +1/+1 counters on it. -- Floodchaser can't attack unless defending player controls an Island. -- {U}, Remove a +1/+1 counter from Floodchaser: Target land becomes an Island until end of turn. mana={5}{U} @@ -42875,8 +42868,8 @@ type=Land [/card] [card] name=Glacial Crasher -abilities=trample, cantattack -auto=aslongas(mountain|Battlefield) -cantattack +abilities=trample +auto=aslongas(mountain|Battlefield) cantattack <1 text=Trample (If this creature would assign enough damage to its blockers to destroy them, you may have it assign the rest of its damage to defending player or planeswalker.) -- Glacial Crasher can't attack unless there is a mountain on the battlefield. mana={4}{U}{U} type=Creature @@ -43820,8 +43813,7 @@ toughness=3 [/card] [card] name=Goblin Cohort -abilities=cantattack -auto=@movedTo(creature|mystack):-cantattack ueot +auto=this(variable{countmycrespell}<1) cantattack text=Goblin Cohort can't attack unless you've cast a creature spell this turn. mana={R} type=Creature @@ -44353,9 +44345,9 @@ toughness=2 [/card] [card] name=Goblin Rock Sled -abilities=trample,cantattack +abilities=trample auto=@combat(attacking) source(this):frozen -auto=aslongas(mountain|opponentbattlefield) -cantattack +auto=aslongas(mountain|opponentbattlefield) cantattack <1 text=Trample -- Goblin Rock Sled doesn't untap during your untap step if it attacked during your last turn. -- Goblin Rock Sled can't attack unless defending player controls a Mountain. mana={1}{R} type=Creature @@ -44728,9 +44720,7 @@ toughness=4 [/card] [card] name=Godhunter Octopus -abilities=cantattack -auto=aslongas(enchantment|opponentBattlefield) -cantattack -auto=aslongas(*[enchanted]|opponentBattlefield) -cantattack +auto=aslongas(*[enchantment;enchanted]|opponentBattlefield) cantattack <1 text=Godhunter Octopus can't attack unless defending player controls an enchantment or an enchanted permanent. mana={5}{U} type=Creature @@ -47962,8 +47952,7 @@ subtype=Aura [/card] [card] name=Hammerhead Shark -abilities=cantattack -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 text=Hammerhead Shark can't attack unless defending player controls an Island. mana={1}{U} type=Creature @@ -51535,9 +51524,7 @@ type=Enchantment [/card] [card] name=Howlpack Wolf -abilities=cantblock -auto=aslongas(wolf|mybattlefield) -cantblock -auto=aslongas(werewolf|mybattlefield) -cantblock +auto=aslongas(other *[wolf;werewolf]|mybattlefield) cantblock <1 text=Howlpack Wolf can't block unless you control another Wolf or Werewolf. mana={2}{R} type=Creature @@ -60413,8 +60400,7 @@ toughness=2 [/card] [card] name=Lambholt Pacifist -abilities=cantattack -auto=aslongas(creature[power>=4]|mybattlefield) transforms((,newability[-cantattack])) +auto=aslongas(creature[power>=4]|mybattlefield) cantattack <1 auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Lambholt Butcher) text=Lambholt Pacifist can't attack unless you control a creature with power 4 or greater. -- At the beginning of each upkeep, if no spells were cast last turn, transform Lambholt Pacifist. mana={1}{G} @@ -68408,8 +68394,7 @@ toughness=0 [/card] [card] name=Mindless Null -abilities=cantblock -auto=aslongas(vampire|myBattlefield) -cantblock +auto=aslongas(vampire|myBattlefield) cantblock <1 text=Mindless Null can't block unless you control a Vampire. mana={2}{B} type=Creature @@ -69596,8 +69581,7 @@ type=Artifact [/card] [card] name=Mogg Conscripts -abilities=cantattack -auto=@movedTo(creature|mystack):-cantattack ueot +auto=this(variable{countmycrespell}<1) cantattack text=Mogg Conscripts can't attack unless you've cast a creature spell this turn. mana={R} type=Creature @@ -79799,23 +79783,9 @@ type=Artifact [/card] [card] name=Phyrexian Marauder -abilities=cantblock,cantattack +abilities=cantblock auto=counter(1/1,X) -auto=this(counter{1/1.1}=) {1}:-cantattack myAttackersOnly -auto=this(counter{1/1.2}=) {2}:-cantattack myAttackersOnly -auto=this(counter{1/1.3}=) {3}:-cantattack myAttackersOnly -auto=this(counter{1/1.4}=) {4}:-cantattack myAttackersOnly -auto=this(counter{1/1.5}=) {5}:-cantattack myAttackersOnly -auto=this(counter{1/1.6}=) {6}:-cantattack myAttackersOnly -auto=this(counter{1/1.7}=) {7}:-cantattack myAttackersOnly -auto=this(counter{1/1.8}=) {8}:-cantattack myAttackersOnly -auto=this(counter{1/1.9}=) {9}:-cantattack myAttackersOnly -auto=this(counter{1/1.10}=) {10}:-cantattack myAttackersOnly -auto=this(counter{1/1.11}=) {11}:-cantattack myAttackersOnly -auto=this(counter{1/1.12}=) {12}:-cantattack myAttackersOnly -auto=this(counter{1/1.13}=) {13}:-cantattack myAttackersOnly -auto=this(counter{1/1.14}=) {14}:-cantattack myAttackersOnly -auto=this(counter{1/1.15}=) {15}:-cantattack myAttackersOnly +auto=attackcost:counter{1%1} text=Phyrexian Marauder enters the battlefield with X +1/+1 counters on it. -- Phyrexian Marauder can't block. -- Phyrexian Marauder can't attack unless you pay {1} for each +1/+1 counter on it. mana={X} type=Artifact Creature @@ -86230,8 +86200,7 @@ type=Enchantment [/card] [card] name=Red Cliffs Armada -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Red Cliffs Armada can't attack unless defending player controls an Island. mana={4}{U} type=Creature @@ -89241,8 +89210,7 @@ toughness=6 [/card] [card] name=Ronom Serpent -abilities=cantattack -auto=aslongas(land[snow]|opponentBattlefield) -cantattack +auto=aslongas(land[snow]|opponentBattlefield) cantattack <1 auto=aslongas(land[snow]|myBattlefield) all(this) sacrifice while <1 text=Ronom Serpent can't attack unless defending player controls a snow land. -- When you control no snow lands, sacrifice Ronom Serpent. mana={5}{U} @@ -92379,9 +92347,7 @@ toughness=4 [/card] [card] name=Scarred Puma -abilities=cantattack -auto=aslongas(creature[green;attacking]|myBattlefield) -cantattack -auto=aslongas(creature[black;attacking]|myBattlefield) -cantattack +auto=aslongas(other creature[black;green;attacking]|myBattlefield) cantattack <1 text=Scarred Puma can't attack unless a black or green creature also attacks. mana={R} type=Creature @@ -93512,8 +93478,7 @@ type=Instant [/card] [card] name=Sea Monster -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Sea Monster can't attack unless defending player controls an Island. mana={4}{U}{U} type=Creature @@ -93686,8 +93651,7 @@ type=Sorcery [/card] [card] name=Sealock Monster -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 auto=this(cantargetcard(*[-monstrous]) {5}{U}{U}:becomes(monstrous) forever && counter(1/1,3) && transforms((,newAbility[target(land|opponentbattlefield) becomes(island) forever])) forever text=Sealock Monster can't attack unless defending player controls an Island. -- {5}{U}{U}: Monstrosity 3. (If this creature isn't monstrous, put three +1/+1 counters on it and it becomes monstrous.) -- When Sealock Monster becomes monstrous, target land becomes an Island in addition to its other types. mana={3}{U}{U} @@ -94916,8 +94880,7 @@ type=Artifact [/card] [card] name=Serpent of the Endless Sea -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 anyzone=type:island:myBattlefield/type:island:myBattlefield cdaactive text=Serpent of the Endless Sea's power and toughness are each equal to the number of Islands you control. -- Serpent of the Endless Sea can't attack unless defending player controls an Island. mana={4}{U} @@ -97538,8 +97501,7 @@ toughness=1 [/card] [card] name=Silburlind Snapper -abilities=cantattack -auto=@movedto(*[-creature]|mystack):-cantattack ueot +auto=this(variable{countmynoncrespell}<1) cantattack text=Silburlind Snapper can't attack unless you've cast a noncreature spell this turn. mana={5}{U} type=Creature @@ -100064,8 +100026,7 @@ type=Land [/card] [card] name=Slipstream Eel -abilities=cantattack -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 autohand=__CYCLING__({1}{U}) text=Slipstream Eel can't attack unless defending player controls an Island. -- Cycling {1}{U} ({1}{U}, Discard this card: Draw a card.) mana={5}{U}{U} @@ -100076,10 +100037,10 @@ toughness=6 [/card] [card] name=Slipstream Serpent -abilities=islandhome,cantattack +abilities=islandhome facedown={3} autofacedown={5}{U}:morph -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 text=Slipstream Serpent can't attack unless defending player controls an Island. -- When you control no Islands, sacrifice Slipstream Serpent. -- Morph {5}{U} (You may cast this face down as a 2/2 creature for {3}. Turn it face up any time for its morph cost.) mana={7}{U} type=Creature @@ -104887,8 +104848,7 @@ toughness=3 [/card] [card] name=Steam Frigate -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Steam Frigate can't attack unless defending player controls an Island. mana={2}{U} type=Creature @@ -105007,8 +104967,7 @@ toughness=4 [/card] [card] name=Steelclad Serpent -abilities=cantattack -auto=aslongas(artifact|myBattlefield) -cantattack >1 +auto=aslongas(other artifact|myBattlefield) cantattack <1 text=Steelclad Serpent can't attack unless you control another artifact. mana={5}{U} type=Artifact Creature @@ -114308,9 +114267,8 @@ toughness=1 [/card] [card] name=Training Drone -abilities=cantattack,cantblock -auto=this(gear > 0) -cantattack -auto=this(gear > 0) -cantblock +auto=this(gear < 1) cantattack +auto=this(gear < 1) cantblock text=Training Drone can't attack or block unless it's equipped. mana={3} type=Artifact Creature @@ -118569,9 +118527,8 @@ type=Enchantment [/card] [card] name=Veiled Serpent -abilities=cantattack autohand=__CYCLING__({2}) -auto=aslongas(island|opponentbattlefield) -cantattack +auto=aslongas(island|opponentbattlefield) cantattack <1 auto=@movedto(*|opponentstack) once:transforms((removetypes)) forever && transforms((Serpent Creature,setpower=4,settoughness=4)) forever text=When an opponent casts a spell, if Veiled Serpent is an enchantment, Veiled Serpent becomes a 4/4 Serpent creature that can't attack unless defending player controls an Island. -- Cycling {2} ({2}, Discard this card: Draw a card.) mana={2}{U} @@ -120563,10 +120520,9 @@ toughness=1 [/card] [card] name=Vodalian Serpent -abilities=cantattack kicker={2} auto=kicker counter(1/1,4) -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Kicker {2} (You may pay an additional {2} as you cast this spell.) -- Vodalian Serpent can't attack unless defending player controls an Island. -- If Vodalian Serpent was kicked, it enters the battlefield with four +1/+1 counters on it. mana={3}{U} type=Creature @@ -123650,8 +123606,7 @@ type=Artifact [/card] [card] name=Whimwader -abilities=cantattack -auto=aslongas(*[blue]|opponentBattlefield) -cantattack +auto=aslongas(*[blue]|opponentBattlefield) cantattack <1 text=Whimwader can't attack unless defending player controls a blue permanent. mana={4}{U} type=Creature @@ -126232,8 +126187,7 @@ toughness=1 [/card] [card] name=Wu Warship -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Wu Warship can't attack unless defending player controls an Island. mana={2}{U} type=Creature @@ -127211,8 +127165,7 @@ toughness=3 [/card] [card] name=Zhou Yu, Chief Commander -abilities=cantattack -auto=aslongas(island|opponentBattlefield) -cantattack +auto=aslongas(island|opponentBattlefield) cantattack <1 text=Zhou Yu, Chief Commander can't attack unless defending player controls an Island. mana={5}{U}{U} type=Legendary Creature diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 1e60a6932..817267250 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -551,6 +551,18 @@ private: intValue +=1; } } + else if (s == "countallspell") + { + intValue = card->controller()->game->stack->seenThisTurn("*", Constants::CAST_ALL) + card->controller()->opponent()->game->stack->seenThisTurn("*", Constants::CAST_ALL); + } + else if (s == "countmycrespell") + { + intValue = card->controller()->game->stack->seenThisTurn("creature", Constants::CAST_ALL); + } + else if (s == "countmynoncrespell") + { + intValue = card->controller()->game->stack->seenThisTurn("*[-creature]", Constants::CAST_ALL); + } else if (s == "evictg") { intValue = card->imprintG; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 04cc78dbf..3ae11aa9e 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -1836,6 +1836,8 @@ int MTGAttackRule::receiveEvent(WEvent *e) card->setAttacker(0); if (card->isAttacker() && !card->has(Constants::VIGILANCE)) card->tap(); + if (card->isAttacker() && card->has(Constants::CANTATTACK)) + card->toggleAttacker();//if a card has cantattack, then you cant } return 1; } From 5f276f6b2266973b4a16a2c90e080c4257c75d07 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 05:46:23 +0800 Subject: [PATCH 19/54] blockcost and attackcost counter{1%1} -> value --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 13c6002fe..65430c348 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -71719,21 +71719,8 @@ toughness=1 [card] name=Myr Prototype auto=@each my upkeep:counter(1/1,1) -auto=this(counter{1/1.1}=) {1}:-cantattack myAttackersOnly -auto=this(counter{1/1.2}=) {2}:-cantattack myAttackersOnly -auto=this(counter{1/1.3}=) {3}:-cantattack myAttackersOnly -auto=this(counter{1/1.4}=) {4}:-cantattack myAttackersOnly -auto=this(counter{1/1.5}=) {5}:-cantattack myAttackersOnly -auto=this(counter{1/1.6}=) {6}:-cantattack myAttackersOnly -auto=this(counter{1/1.7}=) {7}:-cantattack myAttackersOnly -auto=this(counter{1/1.8}=) {8}:-cantattack myAttackersOnly -auto=this(counter{1/1.9}=) {9}:-cantattack myAttackersOnly -auto=this(counter{1/1.10}=) {10}:-cantattack myAttackersOnly -auto=this(counter{1/1.11}=) {11}:-cantattack myAttackersOnly -auto=this(counter{1/1.12}=) {12}:-cantattack myAttackersOnly -auto=this(counter{1/1.13}=) {13}:-cantattack myAttackersOnly -auto=this(counter{1/1.14}=) {14}:-cantattack myAttackersOnly -auto=this(counter{1/1.15}=) {15}:-cantattack myAttackersOnly +auto=attackcost:counter{1%1} +auto=blockcost:counter{1%1} text=At the beginning of your upkeep, put a +1/+1 counter on Myr Prototype. -- Myr Prototype can't attack or block unless you pay {1} for each +1/+1 counter on it. mana={5} type=Artifact Creature From 066dd866b1163730b94240059b75a9b629d51b91 Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Wed, 3 Aug 2016 20:36:34 -0400 Subject: [PATCH 20/54] - reverting debuggable attribute removal --- projects/mtg/Android/AndroidManifest.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/Android/AndroidManifest.xml b/projects/mtg/Android/AndroidManifest.xml index 534f3b8bb..543d9f775 100644 --- a/projects/mtg/Android/AndroidManifest.xml +++ b/projects/mtg/Android/AndroidManifest.xml @@ -5,7 +5,7 @@ - + From 8ba97b8a74c3fda26b8ec119114f0c72aafd2b26 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 09:50:09 +0800 Subject: [PATCH 21/54] Fix attackcost & blockcost thanks zeth --- projects/mtg/src/MTGRules.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index 3ae11aa9e..dba96f87f 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -1661,8 +1661,7 @@ int MTGAttackCostRule::reactToClick(MTGCardInstance * card) Player * player = game->currentlyActing(); ManaCost * attackcost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); attackcost->add(0,card->attackCostBackup); - ManaCost * playerMana = player->getManaPool(); - playerMana->pay(attackcost);//I think you can't pay partial cost to attack cost so you pay full (508.1i) + player->getManaPool()->pay(attackcost);//I think you can't pay partial cost to attack cost so you pay full (508.1i) card->attackCost = 0; card->attackPlaneswalkerCost = 0; SAFE_DELETE(attackcost); @@ -1737,8 +1736,7 @@ int MTGBlockCostRule::reactToClick(MTGCardInstance * card) Player * player = game->currentlyActing(); ManaCost * blockcost = NEW ManaCost(ManaCost::parseManaCost("{0}",NULL,NULL)); blockcost->add(0,card->blockCostBackup); - ManaCost * playerMana = player->getManaPool(); - playerMana->pay(blockcost);//I think you can't pay partial cost to block cost so you pay full (509.1f) + player->getManaPool()->pay(blockcost);//I think you can't pay partial cost to block cost so you pay full (509.1f) card->blockCost = 0; SAFE_DELETE(blockcost); return 1; From 1ab88940f9c6f08b8ce323f4ba8237fb7d3f1fea Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 09:56:53 +0800 Subject: [PATCH 22/54] add nonCombatDamage count --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 2 +- projects/mtg/include/AllAbilities.h | 8 ++++++++ projects/mtg/include/Damage.h | 1 + projects/mtg/src/Damage.cpp | 6 ++++++ projects/mtg/src/GameObserver.cpp | 2 ++ projects/mtg/src/Player.cpp | 1 + 6 files changed, 19 insertions(+), 1 deletion(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 65430c348..79b062bfd 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -11382,7 +11382,7 @@ toughness=2 [/card] [card] name=Bloodcrazed Goblin -auto=this(opponentdamagecount <1) cantattack +auto=this(variable{odnoncount}<1) cantattack text=Bloodcrazed Goblin can't attack unless an opponent was dealt noncombat damage this turn. mana={R} type=Creature diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 817267250..fde01edc7 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -690,6 +690,14 @@ private: { intValue = target->controller()->opponent()->damageCount; } + else if (s == "pdnoncount") + { + intValue = target->controller()->nonCombatDamage; + } + else if (s == "odnoncount") + { + intValue = target->controller()->opponent()->nonCombatDamage; + } else if (s == "playerpoisoncount") { intValue = target->controller()->poisonCount; diff --git a/projects/mtg/include/Damage.h b/projects/mtg/include/Damage.h index 5443f1b95..0cb6369d2 100644 --- a/projects/mtg/include/Damage.h +++ b/projects/mtg/include/Damage.h @@ -24,6 +24,7 @@ public: int handsize; int poisonCount; int damageCount; + int nonCombatDamage; int preventable; int thatmuch; int lifeLostThisTurn; diff --git a/projects/mtg/src/Damage.cpp b/projects/mtg/src/Damage.cpp index 17bd6b9bd..5536711bd 100644 --- a/projects/mtg/src/Damage.cpp +++ b/projects/mtg/src/Damage.cpp @@ -184,6 +184,8 @@ int Damage::resolve() if(!_target->inPlay()->hasAbility(Constants::POISONSHROUD)) _target->poisonCount += damage;//this will be changed to poison counters. _target->damageCount += damage; + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { vector values = MTGAllCards::getCreatureValuesById(); @@ -202,6 +204,8 @@ int Damage::resolve() if(!_target->inPlay()->hasAbility(Constants::CANTCHANGELIFE)) a = target->dealDamage(damage); target->damageCount += damage; + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if ( typeOfDamage == 1 && target == source->controller()->opponent() )//add vector prowledtypes. { vector values = MTGAllCards::getCreatureValuesById(); @@ -237,6 +241,8 @@ int Damage::resolve() else a = target->dealDamage(damage); target->damageCount += damage;//the amount must be the actual damage so i changed this from 1 to damage, this fixes pdcount and odcount + if(typeOfDamage == 2) + target->nonCombatDamage += damage; if (target->type_as_damageable == Damageable::DAMAGEABLE_MTGCARDINSTANCE){ ((MTGCardInstance*)target)->wasDealtDamage = true; ((MTGCardInstance*)source)->damageToCreature = true; diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index bc212c5b8..3dae21c23 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -211,11 +211,13 @@ void GameObserver::nextGamePhase() { cleanupPhase(); currentPlayer->damageCount = 0; + currentPlayer->nonCombatDamage = 0; currentPlayer->drawCounter = 0; currentPlayer->raidcount = 0; currentPlayer->opponent()->raidcount = 0; currentPlayer->prowledTypes.clear(); currentPlayer->opponent()->damageCount = 0; //added to clear odcount + currentPlayer->opponent()->nonCombatDamage = 0; currentPlayer->preventable = 0; mLayers->actionLayer()->cleanGarbage(); //clean abilities history for this turn; mLayers->stackLayer()->garbageCollect(); //clean stack history for this turn; diff --git a/projects/mtg/src/Player.cpp b/projects/mtg/src/Player.cpp index 7623e32e0..6fcb9b0fd 100644 --- a/projects/mtg/src/Player.cpp +++ b/projects/mtg/src/Player.cpp @@ -26,6 +26,7 @@ Player::Player(GameObserver *observer, string file, string fileSmall, MTGDeck * nomaxhandsize = false; poisonCount = 0; damageCount = 0; + nonCombatDamage = 0; preventable = 0; mAvatarTex = NULL; type_as_damageable = DAMAGEABLE_PLAYER; From 62a6ddf3cab72a0802a482f4809c948511173bb0 Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Thu, 4 Aug 2016 08:02:32 -0400 Subject: [PATCH 23/54] - update android gitignore - update android launcher icons --- projects/mtg/Android/.gitignore | 1 + .../mtg/Android/res/drawable-hdpi/icon.png | Bin 8722 -> 7270 bytes .../mtg/Android/res/drawable-ldpi/icon.png | Bin 2862 -> 2227 bytes .../mtg/Android/res/drawable-mdpi/icon.png | Bin 4511 -> 3574 bytes 4 files changed, 1 insertion(+) diff --git a/projects/mtg/Android/.gitignore b/projects/mtg/Android/.gitignore index 5a9b113aa..fb2d02061 100644 --- a/projects/mtg/Android/.gitignore +++ b/projects/mtg/Android/.gitignore @@ -1,3 +1,4 @@ /gen /bin +/libs diff --git a/projects/mtg/Android/res/drawable-hdpi/icon.png b/projects/mtg/Android/res/drawable-hdpi/icon.png index 5332e9cf43b71f5fe209eb2193be8af07fd4ffb3..f38502e79b18412158be8d897945b907c8feec56 100644 GIT binary patch literal 7270 zcmV-s9GT;ZP)4q#?=#%#4c$+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}4S;E`|VdWBG wdRcLPR&i!d-|-_PUV88We$v|Vp1ckD|G*w25yb7!mH+?%07*qoM6N<$g21kL82|tP diff --git a/projects/mtg/Android/res/drawable-ldpi/icon.png b/projects/mtg/Android/res/drawable-ldpi/icon.png index 16ebfc68ed3a671013652f8decdb64da79593f59..0d8fd16acc9f36bba952ac99a5e6982b26bce93d 100644 GIT binary patch delta 2200 zcmV;J2xs@M7PAqMGk*wbNklaTWnm_6^6gH_c=43v7Ok7otvEy$GJNsBq1tI zNP=i+X%Vy%Z68XJT2UdjB2xQ6E48R9QmJ^M6p05Ag{q=z)s`1ppjEk5qD>Hqh!T^8 zgd}!uPGZN&B)-keIeV`@>|;}bZ5+dvMjFkWz1M&KwbsA>bARBoT>_X-d%(w51cjSL z?ynPRj3F-|0Tv)zLFsMK*rT z+Q&=YpLo&xpAJCJ1hGH9){1=f-W@9*pLI*CI6#b$FIsFQh!G^V{yW>||N3*k*j(HD_d{Dxym0uxyHuZd2Z#FM6;T+ZTs3V>I|nn1E@_*fCNb%rc~FZ98YuN(8kw%ga1H3X4)of=Hj<* zd|>;AHD4)UObKfYJ_UhAz&zmWlmUrA91E)8y&@urDAs_8!FxrO?04uop3wh%iPv`> zO(T%!1`ZSX)6=NS%k&AyCHz#Xkuk9Rp*nU`zdPU0 zRyf_2a`m}xp6%`9=D7`Q{pAL%86dL4)u9?BZ;2woxezx^HGEGzNl4ka41JQS?pr5P zvw!N2j_YR6E29d|DVIxC`k(LTsgq~8)d)8{w1qe>p$g~Dm(g7pv5|~%P)$5h6c}<| znF!2O0Liw8S z5VYc{PM4v@B3rKCwtVB9`4uD+K$j{*uYa89g=)3BJu<^oPPHwFwcY$IxcvyDfJuG|r`vDe;-Z2_GCgM^3eC#g_JBV{;`OWQ5D7m97&P zI0IeAKrS{^Ga;=e9`)cW)2ty2`4!Fecebu6WQ7@YX?Xu2yN8F98{y)DFSm-|#((r` z@cm)-4-Glv{cBi*H9{1bY^*4WQ`GzEF|<%*)8d;JHd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4Zsbo02r81VWwj;Zc9j7 zU(C1986#FT^oCJ(rvoJT+UKtwzekRk#$uQm7Cks_BQ}NQHC34xQmj+VtuW|DSAXTr zJC=1r|C;)c#v@-$TIIbc1~PM{wzD)fj#r2SWHE3ldyCr5SgosGe;8KCm>e7xY@1RQ z=Rvs?;LrXjc`vV(H~!4ZO!&g17V3@!GJ$f9(S?5fvF&Z`A9+LolNJyPtYjMXW&KV| o=C$;0-ifcadC%{>?^XW~>hj-X84m-?bpQYW07*qoM6N<$f{^!-ZU6uP From dd5635d9cddd18bd0a2678bdff98424316cc38ff Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Thu, 4 Aug 2016 08:32:17 -0400 Subject: [PATCH 24/54] - only minor whitespace formatting Android --- .../src/net/wagic/utils/DeckImporter.java | 175 +++++++++--------- .../src/net/wagic/utils/StorageOptions.java | 157 ++++++++-------- .../src/org/libsdl/app/SDLActivity.java | 8 +- 3 files changed, 169 insertions(+), 171 deletions(-) diff --git a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java index 55bfe3dd6..74aeaafe0 100644 --- a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java +++ b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java @@ -11,14 +11,13 @@ import android.util.Log; public class DeckImporter { - public static String importDeck( File f, String mypath, String activePath ) { String message = ""; String deck = ""; String deckname = ""; - String prefix = "#SB:"; - int cardcount = 0; + String prefix = "#SB:"; + int cardcount = 0; if(f.exists() && !f.isDirectory()) { deckname = f.getName(); @@ -36,91 +35,86 @@ public class DeckImporter while (scanner.hasNext()) { String line = scanner.nextLine(); - line = line.trim(); - if (!line.equals("") && cardcount < 61) // don't write out blank lines - { - String[] slines = line.split("\\s+"); - String arranged = ""; - for(int idx = 1; idx < slines.length; idx++) - { - arranged += slines[idx] + " "; - } - if ((isNumeric(slines[0])) && arranged != null) - { - if (slines[1] != null && slines[1].startsWith("[")) - { - arranged = arranged.substring(5); - slines[1] = slines[1].replaceAll("\\[", "").replaceAll("\\]",""); - deck += arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n"; - } - else - { - deck += arranged + "(*) * " + slines[0] + "\n"; - } - cardcount += Integer.parseInt(slines[0]); - } - } - } - File profile = new File(activePath+"/Res/settings/options.txt"); - if(profile.exists() && !profile.isDirectory()) - { - String profileName = getActiveProfile(profile); - if(profileName != "Missing!") - { - File rootProfiles = new File(activePath+"/Res/profiles/"+profileName); - if(rootProfiles.exists() && rootProfiles.isDirectory()) - { - //save deck - int countdeck = 1; - File[] files = rootProfiles.listFiles(); - for (int i = 0; i < files.length; i++) - {//check if there is available deck... - if(files[i].getName().startsWith("deck")) - countdeck++; - } - File toSave = new File(rootProfiles+"/deck"+countdeck+".txt"); - try - { - FileOutputStream fop = new FileOutputStream(toSave); - - // if file doesn't exists, then create it - if (!toSave.exists()) { - toSave.createNewFile(); - } - // get the content in bytes - byte[] contentInBytes = deck.getBytes(); - fop.write(contentInBytes); - fop.flush(); - fop.close(); - message = "Import Deck Success!\n"+cardcount+" total cards in this deck\n\n"+deck; - } - catch (IOException e) - { - message = e.getMessage(); - } - } - else - { - message = "Missing Folder!"; - } - } - } - else - { - message = "Invalid Profile!"; - } - } - else - { - message = "No errors, and file EMPTY"; - } - } - catch(IOException e) - { - message = e.getMessage(); - } - } - return message; + line = line.trim(); + if (!line.equals("") && cardcount < 61) // don't write out blank lines + { + String[] slines = line.split("\\s+"); + String arranged = ""; + for (int idx = 1; idx < slines.length; idx++) + { + arranged += slines[idx] + " "; + } + if ((isNumeric(slines[0])) && arranged != null) + { + if (slines[1] != null && slines[1].startsWith("[")) + { + arranged = arranged.substring(5); + slines[1] = slines[1].replaceAll("\\[", "").replaceAll("\\]", ""); + deck += arranged + " (" + renameSet(slines[1]) + ") * " + slines[0] + "\n"; + } else + { + deck += arranged + "(*) * " + slines[0] + "\n"; + } + cardcount += Integer.parseInt(slines[0]); + } + } + } + File profile = new File(activePath + "/Res/settings/options.txt"); + if (profile.exists() && !profile.isDirectory()) + { + String profileName = getActiveProfile(profile); + if (profileName != "Missing!") + { + File rootProfiles = new File(activePath + "/Res/profiles/" + profileName); + if (rootProfiles.exists() && rootProfiles.isDirectory()) + { + //save deck + int countdeck = 1; + File[] files = rootProfiles.listFiles(); + for (int i = 0; i < files.length; i++) + {//check if there is available deck... + if (files[i].getName().startsWith("deck")) + countdeck++; + } + File toSave = new File(rootProfiles + "/deck" + countdeck + ".txt"); + try + { + FileOutputStream fop = new FileOutputStream(toSave); + + // if file doesn't exists, then create it + if (!toSave.exists()) + { + toSave.createNewFile(); + } + // get the content in bytes + byte[] contentInBytes = deck.getBytes(); + fop.write(contentInBytes); + fop.flush(); + fop.close(); + message = "Import Deck Success!\n" + cardcount + " total cards in this deck\n\n" + deck; + } catch (IOException e) + { + message = e.getMessage(); + } + } else + { + message = "Missing Folder!"; + } + } + } else + { + message = "Invalid Profile!"; + } + } else + { + message = "No errors, and file EMPTY"; + } + } catch (IOException e) + { + message = e.getMessage(); + } + } + return message; } private static boolean isNumeric(String input) @@ -135,7 +129,7 @@ public class DeckImporter } return true; } - + private static String getActiveProfile(File mypath) { String name = ""; @@ -158,7 +152,7 @@ public class DeckImporter } return name; } - + private static String renameSet(String set) { if (set == "") @@ -278,5 +272,4 @@ public class DeckImporter else return set; } - } diff --git a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java index 622e89bad..ce2c37c7c 100644 --- a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java +++ b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java @@ -310,84 +310,95 @@ public class StorageOptions * * @return true if the device is rooted, false otherwise. */ - public static boolean isRooted() { - - // get from build info - String buildTags = android.os.Build.TAGS; - if (buildTags != null && buildTags.contains("test-keys")) { - return true; - } - - // check if /system/app/Superuser.apk is present - try { - File file = new File("/system/app/Superuser.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - try { - File file = new File("/system/app/Superuser/Superuser.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - //SuperSU - try { - File file = new File("/system/app/SuperSU.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - try { - File file = new File("/system/app/SuperSU/SuperSU.apk"); - if (file.exists()) { - return true; - } - } - catch (Exception e1) { - // ignore - } - // try executing commands - return canExecuteCommand("/system/xbin/which su") - || canExecuteCommand("/system/bin/which su") || canExecuteCommand("which su"); - } - - // executes a command on the system - private static boolean canExecuteCommand(String command) { - boolean executedSuccesfully; - try { - Runtime.getRuntime().exec(command); - executedSuccesfully = true; - } - catch (Exception e) { - executedSuccesfully = false; - } - - return executedSuccesfully; - } - - private static boolean findForcemount(){ - try + public static boolean isRooted() { - File file = new File(System.getenv("EXTERNAL_STORAGE")+"/forcemount"); - if (file.exists()) + // get from build info + String buildTags = android.os.Build.TAGS; + if (buildTags != null && buildTags.contains("test-keys")) { return true; } - } - catch (Exception e1) + + // check if /system/app/Superuser.apk is present + try + { + File file = new File("/system/app/Superuser.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + try + { + File file = new File("/system/app/Superuser/Superuser.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + //SuperSU + try + { + File file = new File("/system/app/SuperSU.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + try + { + File file = new File("/system/app/SuperSU/SuperSU.apk"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + // ignore + } + // try executing commands + return canExecuteCommand("/system/xbin/which su") + || canExecuteCommand("/system/bin/which su") || canExecuteCommand("which su"); + } + + // executes a command on the system + private static boolean canExecuteCommand(String command) { + boolean executedSuccesfully; + try + { + Runtime.getRuntime().exec(command); + executedSuccesfully = true; + } catch (Exception e) + { + executedSuccesfully = false; + } + + return executedSuccesfully; + } + + private static boolean findForcemount() + { + try + { + File file = new File(System.getenv("EXTERNAL_STORAGE") + "/forcemount"); + if (file.exists()) + { + return true; + } + } catch (Exception e1) + { + return false; + } return false; } - return false; - } } diff --git a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java index 0b8f093d8..64b2a95b4 100644 --- a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java +++ b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java @@ -14,8 +14,6 @@ import java.net.URLConnection; import java.util.ArrayList; import java.util.Scanner; - - import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.egl.EGLContext; @@ -1096,7 +1094,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK try { - EGL10 egl = (EGL10) EGLContext.getEGL(); EGLDisplay dpy = egl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); @@ -1162,7 +1159,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK EGL10 egl = (EGL10) EGLContext.getEGL(); if (mEGLSurface != null) { - /* * Unbind and destroy the old EGL surface, if there is one. */ @@ -1197,7 +1193,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // EGL buffer flip public void flipEGL() { - if (!mSurfaceValid) { createSurface(this.getHolder()); @@ -1223,7 +1218,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK Log.e("SDL", s.toString()); } } - } // Key events @@ -1234,6 +1228,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK if (keyCode == KeyEvent.KEYCODE_VOLUME_UP || keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) return false; + if (event.getAction() == KeyEvent.ACTION_DOWN) { // Log.d("SDL", "key down: " + keyCode); @@ -1252,7 +1247,6 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Touch events public boolean onTouch(View v, MotionEvent event) { - for (int index = 0; index < event.getPointerCount(); ++index) { int action = event.getActionMasked(); From 8afeef568f4dcc1d9d6e0fae3f6bc56ad98c3097 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Thu, 4 Aug 2016 20:55:36 +0800 Subject: [PATCH 25/54] update ability prowess +1/+1 is ueot --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 79b062bfd..028ff879d 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -65601,7 +65601,7 @@ toughness=4 [card] name=Mardu Charm auto=choice name(4 Damage) damage:4 target(creature) -auto=choice name(2 Warrior tokens) token(Warrior,Creature Warrior,1/1,white) and!( transforms((,newability[first strike])) ueot )!*2 +auto=choice name(2 Warrior tokens) token(Warrior,Creature Warrior,1/1,white) and!( transforms((,newability[first strike ueot])) )!*2 auto=choice name(discard opponent) target(opponent) reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose discards) target(*[-creature;-land]|reveal) moveto(ownerhand) and!( reject )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend text=Choose one: -- Mardu Charm deals 4 damage to target creature. -- Put two 1/1 white Warrior creature tokens onto the battlefield. They gain first strike until end of turn. -- Target opponent reveals his or her hand. You choose a noncreature, nonland card from it. That player discards that card. mana={R}{W}{B} @@ -70084,7 +70084,7 @@ toughness=2 [card] name=Monastery Mentor auto=@movedTo(*[-creature]|mystack):1/1 ueot -auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(Monk,Creature Monk,1/1,white) and!( transforms((,newability[@movedTo(*[-creature]|mystack):1/1])) forever )! controller +auto=@movedTo(*[-creature]|mystack):choice name(Create Monk) token(Monk,Creature Monk,1/1,white) and!( transforms((,newability[@movedTo(*[-creature]|mystack):1/1 ueot])) )! controller text=Prowess (Whenever you cast a noncreature spell, this creature gets +1/+1 until end of turn.) -- Whenever you cast a noncreature spell, put a 1/1 white Monk creature token with prowess onto the battlefield. mana={2}{W} type=Creature From b601a549d07c71f3980397baadee322c7c269aed Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Thu, 4 Aug 2016 11:26:41 -0400 Subject: [PATCH 26/54] - added option for Android x86 build types --- JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c | 7 +++++++ projects/mtg/Android/jni/Application.mk | 1 + 2 files changed, 8 insertions(+) diff --git a/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c b/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c index f74de81c7..07c26308a 100644 --- a/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c +++ b/JGE/Dependencies/SDL/src/atomic/SDL_spinlock.c @@ -77,6 +77,13 @@ SDL_AtomicTryLock(SDL_SpinLock *lock) : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory"); return (result == 0); +#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)) + int result; + __asm__ __volatile__( + "lock ; xchgl %0, (%1)\n" + : "=r" (result) : "r" (lock), "0" (1) : "cc", "memory"); + return (result == 0); + #else /* Need CPU instructions for spinlock here! */ __need_spinlock_implementation__ diff --git a/projects/mtg/Android/jni/Application.mk b/projects/mtg/Android/jni/Application.mk index 01804bb30..53a2e0f9d 100644 --- a/projects/mtg/Android/jni/Application.mk +++ b/projects/mtg/Android/jni/Application.mk @@ -1,6 +1,7 @@ APP_PROJECT_PATH := $(call my-dir)/.. APP_CPPFLAGS += -frtti -fexceptions APP_ABI := armeabi armeabi-v7a +#APP_ABI := x86 # mainly for emulators APP_STL := gnustl_static APP_MODULES := libpng libjpeg main SDL From 77dfd51b28e2ee0d94f6be718c2886a0704f99d0 Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Thu, 4 Aug 2016 13:15:49 -0400 Subject: [PATCH 27/54] - Android debug logging organization --- .../src/net/wagic/utils/StorageOptions.java | 13 +-- .../src/org/libsdl/app/SDLActivity.java | 100 +++++++++--------- 2 files changed, 56 insertions(+), 57 deletions(-) diff --git a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java index ce2c37c7c..acac6faea 100644 --- a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java +++ b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java @@ -14,6 +14,7 @@ import android.util.Log; public class StorageOptions { + private static final String TAG = StorageOptions.class.getCanonicalName(); private static ArrayList mMounts = new ArrayList(); private static ArrayList mVold = new ArrayList(); @@ -77,11 +78,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if proc/mount doesn't exist we just use - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); mMounts.add(defaultMountPoint); } } @@ -111,11 +112,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if proc/mount doesn't exist we just use - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); mMounts.add(defaultMountPoint); } } @@ -144,11 +145,11 @@ public class StorageOptions } catch (FileNotFoundException fnfex) { // if vold.fstab doesn't exist we use the value gathered from the Environment - Log.i(StorageOptions.class.getCanonicalName(), fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); + Log.i(TAG, fnfex.getMessage() + ": assuming " + defaultMountPoint + " is the only mount point"); mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(StorageOptions.class.getCanonicalName(), e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); mMounts.add(defaultMountPoint); } } diff --git a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java index 64b2a95b4..7c07936f0 100644 --- a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java +++ b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java @@ -66,12 +66,11 @@ import android.widget.FrameLayout.LayoutParams; */ public class SDLActivity extends Activity implements OnKeyListener { + private static final String TAG = SDLActivity.class.getCanonicalName(); + //import deck globals - public ArrayList myresult = new ArrayList(); - public String myclickedItem = ""; - - // TAG used for debugging in DDMS - public static String TAG = Activity.class.getCanonicalName(); + public ArrayList myresult = new ArrayList(); + public String myclickedItem = ""; // Main components private static SDLActivity mSingleton; @@ -350,7 +349,7 @@ public class SDLActivity extends Activity implements OnKeyListener updateStorageLocations(); } catch (Exception ioex) { - Log.e("SDL", "An error occurred in setting up the storage locations."); + Log.e(TAG, "An error occurred in setting up the storage locations."); } } @@ -495,7 +494,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onCreate(Bundle savedInstanceState) { - // Log.v("SDL", "onCreate()"); + //Log.d(TAG, "onCreate()"); super.onCreate(savedInstanceState); // So we can call stuff from static callbacks @@ -530,7 +529,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onPause() { - // Log.v("SDL", "onPause()"); + // Log.d(TAG, "onPause()"); super.onPause(); SDLActivity.nativePause(); } @@ -538,7 +537,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override protected void onResume() { - // Log.v("SDL", "onResume()"); + // Log.d(TAG, "onResume()"); super.onResume(); SDLActivity.nativeResume(); } @@ -546,8 +545,7 @@ public class SDLActivity extends Activity implements OnKeyListener @Override public void onDestroy() { - // Log.v("SDL", "onDestroy()"); - + // Log.d(TAG, "onDestroy()"); super.onDestroy(); mSurface.onDestroy(); } @@ -658,7 +656,7 @@ public class SDLActivity extends Activity implements OnKeyListener int audioFormat = is16Bit ? AudioFormat.ENCODING_PCM_16BIT : AudioFormat.ENCODING_PCM_8BIT; int frameSize = (isStereo ? 2 : 1) * (is16Bit ? 2 : 1); - // Log.v("SDL", "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + ((float)sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); + // Log.d(TAG, "SDL audio: wanted " + (isStereo ? "stereo" : "mono") + " " + (is16Bit ? "16-bit" : "8-bit") + " " + ((float)sampleRate / 1000f) + "kHz, " + desiredFrames + " frames buffer"); // Let the user pick a larger buffer if they really want -- but ye // gods they probably shouldn't, the minimums are horrifyingly high @@ -669,7 +667,7 @@ public class SDLActivity extends Activity implements OnKeyListener audioStartThread(); - // Log.v("SDL", "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + ((float)mAudioTrack.getSampleRate() / 1000f) + + // Log.d(TAG, "SDL audio: got " + ((mAudioTrack.getChannelCount() >= 2) ? "stereo" : "mono") + " " + ((mAudioTrack.getAudioFormat() == AudioFormat.ENCODING_PCM_16BIT) ? "16-bit" : "8-bit") + " " + ((float)mAudioTrack.getSampleRate() / 1000f) + // "kHz, " + desiredFrames + " frames buffer"); if (is16Bit) @@ -717,7 +715,7 @@ public class SDLActivity extends Activity implements OnKeyListener } } else { - Log.w("SDL", "SDL audio: error return from write(short)"); + Log.w(TAG, "SDL audio: error return from write(short)"); return; } } @@ -742,7 +740,7 @@ public class SDLActivity extends Activity implements OnKeyListener } } else { - Log.w("SDL", "SDL audio: error return from write(short)"); + Log.w(TAG, "SDL audio: error return from write(short)"); return; } } @@ -757,11 +755,11 @@ public class SDLActivity extends Activity implements OnKeyListener mAudioThread.join(); } catch (Exception e) { - Log.v("SDL", "Problem stopping audio thread: " + e); + Log.e(TAG, "Problem stopping audio thread: " + e); } mAudioThread = null; - // Log.v("SDL", "Finished waiting for audio thread"); + // Log.d(TAG, "Finished waiting for audio thread"); } if (mAudioTrack != null) @@ -773,7 +771,7 @@ public class SDLActivity extends Activity implements OnKeyListener class DownloadFileAsync extends AsyncTask { - final String TAG1 = DownloadFileAsync.class.getCanonicalName(); + private final String TAG = DownloadFileAsync.class.getCanonicalName(); @Override protected void onPreExecute() @@ -792,7 +790,6 @@ public class SDLActivity extends Activity implements OnKeyListener try { - // // Prepare the sdcard folders in order to download the resource file // @@ -813,7 +810,7 @@ public class SDLActivity extends Activity implements OnKeyListener conexion.connect(); int lengthOfFile = conexion.getContentLength(); - // Log.d("Wagic - " + TAG1, " Length of file: " + lengthOfFile); + // Log.d(TAG, " Length of file: " + lengthOfFile); input = new BufferedInputStream(url.openStream()); // create a File object for the output file @@ -836,8 +833,8 @@ public class SDLActivity extends Activity implements OnKeyListener { String errorMessage = "An error happened while downloading the resources. It could be that our server is temporarily down, that your device is not connected to a network, or that we cannot write to " + mSingleton.getSystemStorageLocation() + ". Please check your phone settings and try again. For more help please go to http://wagic.net"; mSingleton.downloadError(errorMessage); - Log.e(TAG1, errorMessage); - Log.e(TAG1, e.getMessage()); + Log.e(TAG, errorMessage); + Log.e(TAG, e.getMessage()); } return Long.valueOf(totalBytes); @@ -847,7 +844,7 @@ public class SDLActivity extends Activity implements OnKeyListener { if (progress[0] != mProgressDialog.getProgress()) { - // Log.d("Wagic - " + TAG1, "current progress : " + progress[0]); + // Log.d(TAG, "current progress : " + progress[0]); mProgressDialog.setProgress(progress[0]); } } @@ -920,6 +917,7 @@ public class SDLActivity extends Activity implements OnKeyListener */ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnKeyListener, View.OnTouchListener, SensorEventListener { + private static final String TAG = SDLSurface.class.getCanonicalName(); // This is what SDL runs in. It invokes SDL_main(), eventually private Thread mSDLThread; @@ -959,7 +957,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK SDLActivity.nativeQuit(); - Log.v("SDL", "SDL thread terminated"); + Log.d(TAG, "SDL thread terminated"); // On exit, tear everything down for a fresh restart next time. System.exit(0); @@ -986,7 +984,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Called when we have a valid drawing surface public void surfaceCreated(SurfaceHolder holder) { - Log.v("SDL", "surfaceCreated()"); + //Log.d(TAG, "surfaceCreated()"); enableSensor(Sensor.TYPE_ACCELEROMETER, true); } @@ -1006,18 +1004,18 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK mSDLThread.join(); } catch (Exception e) { - Log.v("SDL", "Problem stopping thread: " + e); + Log.e(TAG, "Problem stopping thread: " + e); } mSDLThread = null; - // Log.v("SDL", "Finished waiting for SDL thread"); + // Log.d(TAG, "Finished waiting for SDL thread"); } } // Called when we lose the surface public void surfaceDestroyed(SurfaceHolder holder) { - Log.v("SDL", "surfaceDestroyed()"); + Log.d(TAG, "surfaceDestroyed()"); synchronized (mSemSurface) { mSurfaceValid = false; @@ -1029,51 +1027,51 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // Called when the surface is resized public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { - Log.d("SDL", "surfaceChanged()"); + Log.d(TAG, "surfaceChanged()"); int sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 by default switch (format) { case PixelFormat.A_8: - Log.d("SDL", "pixel format A_8"); + Log.d("TAG", "pixel format A_8"); break; case PixelFormat.LA_88: - Log.d("SDL", "pixel format LA_88"); + Log.d("TAG", "pixel format LA_88"); break; case PixelFormat.L_8: - Log.d("SDL", "pixel format L_8"); + Log.d("TAG", "pixel format L_8"); break; case PixelFormat.RGBA_4444: - Log.d("SDL", "pixel format RGBA_4444"); + Log.d("TAG", "pixel format RGBA_4444"); sdlFormat = 0x85421002; // SDL_PIXELFORMAT_RGBA4444 break; case PixelFormat.RGBA_5551: - Log.d("SDL", "pixel format RGBA_5551"); + Log.d(TAG, "pixel format RGBA_5551"); sdlFormat = 0x85441002; // SDL_PIXELFORMAT_RGBA5551 break; case PixelFormat.RGBA_8888: - Log.d("SDL", "pixel format RGBA_8888"); + Log.d(TAG, "pixel format RGBA_8888"); sdlFormat = 0x86462004; // SDL_PIXELFORMAT_RGBA8888 break; case PixelFormat.RGBX_8888: - Log.d("SDL", "pixel format RGBX_8888"); + Log.d(TAG, "pixel format RGBX_8888"); sdlFormat = 0x86262004; // SDL_PIXELFORMAT_RGBX8888 break; case PixelFormat.RGB_332: - Log.d("SDL", "pixel format RGB_332"); + Log.d(TAG, "pixel format RGB_332"); sdlFormat = 0x84110801; // SDL_PIXELFORMAT_RGB332 break; case PixelFormat.RGB_565: - Log.d("SDL", "pixel format RGB_565"); + Log.d(TAG, "pixel format RGB_565"); sdlFormat = 0x85151002; // SDL_PIXELFORMAT_RGB565 break; case PixelFormat.RGB_888: - Log.d("SDL", "pixel format RGB_888"); + Log.d(TAG, "pixel format RGB_888"); // Not sure this is right, maybe SDL_PIXELFORMAT_RGB24 instead? sdlFormat = 0x86161804; // SDL_PIXELFORMAT_RGB888 break; default: - Log.d("SDL", "pixel format unknown " + format); + Log.d(TAG, "pixel format unknown " + format); break; } SDLActivity.onNativeResize(width, height, sdlFormat); @@ -1090,7 +1088,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK // EGL functions public boolean initEGL(int majorVersion, int minorVersion) { - Log.d("SDL", "Starting up OpenGL ES " + majorVersion + "." + minorVersion); + Log.d(TAG, "Starting up OpenGL ES " + majorVersion + "." + minorVersion); try { @@ -1119,7 +1117,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK int[] num_config = new int[1]; if (!egl.eglChooseConfig(dpy, configSpec, configs, 1, num_config) || num_config[0] == 0) { - Log.e("SDL", "No EGL config available"); + Log.e(TAG, "No EGL config available"); return false; } mEGLConfig = configs[0]; @@ -1127,7 +1125,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK EGLContext ctx = egl.eglCreateContext(dpy, mEGLConfig, EGL10.EGL_NO_CONTEXT, null); if (ctx == EGL10.EGL_NO_CONTEXT) { - Log.e("SDL", "Couldn't create context"); + Log.e(TAG, "Couldn't create context"); return false; } @@ -1141,10 +1139,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK } catch (Exception e) { - Log.e("SDL", e + ""); + Log.e(TAG, e + ""); for (StackTraceElement s : e.getStackTrace()) { - Log.e("SDL", s.toString()); + Log.e(TAG, s.toString()); } } @@ -1172,7 +1170,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK mEGLSurface = egl.eglCreateWindowSurface(mEGLDisplay, mEGLConfig, holder, null); if (mEGLSurface == EGL10.EGL_NO_SURFACE) { - Log.e("SDL", "Couldn't create surface"); + Log.e(TAG, "Couldn't create surface"); return false; } @@ -1181,7 +1179,7 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK */ if (!egl.eglMakeCurrent(mEGLDisplay, mEGLSurface, mEGLSurface, mEGLContext)) { - Log.e("SDL", "Couldn't make context current"); + Log.e(TAG, "Couldn't make context current"); return false; } @@ -1212,10 +1210,10 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK } catch (Exception e) { - Log.e("SDL", "flipEGL(): " + e); + Log.e(TAG, "flipEGL(): " + e); for (StackTraceElement s : e.getStackTrace()) { - Log.e("SDL", s.toString()); + Log.e(TAG, s.toString()); } } } @@ -1231,12 +1229,12 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback, View.OnK if (event.getAction() == KeyEvent.ACTION_DOWN) { - // Log.d("SDL", "key down: " + keyCode); + // Log.d(TAG, "key down: " + keyCode); SDLActivity.onNativeKeyDown(keyCode); return true; } else if (event.getAction() == KeyEvent.ACTION_UP) { - // Log.d("SDL", "key up: " + keyCode); + // Log.d(TAG, "key up: " + keyCode); SDLActivity.onNativeKeyUp(keyCode); return true; } From 0c4e72ece201c3518f42c4b7ab0553b85f58ee5b Mon Sep 17 00:00:00 2001 From: Rolzad73 Date: Thu, 4 Aug 2016 14:53:52 -0400 Subject: [PATCH 28/54] - attempt to fix storage location list issue on Android 4.3+ --- .../src/net/wagic/utils/StorageOptions.java | 30 ++++++++++++------- .../src/org/libsdl/app/SDLActivity.java | 2 -- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java index acac6faea..8ab6d2090 100644 --- a/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java +++ b/projects/mtg/Android/src/net/wagic/utils/StorageOptions.java @@ -149,7 +149,7 @@ public class StorageOptions mMounts.add(defaultMountPoint); } catch (Exception e) { - Log.e(TAG, e.getMessage() + ": unknown exception while reading mounts file"); + Log.e(TAG, e.getMessage() + ": unknown exception while reading vold.fstab file"); mMounts.add(defaultMountPoint); } } @@ -175,15 +175,18 @@ public class StorageOptions { /* * Sometimes the two lists of mount points will be different. We only want those mount points that are in both list. - * + * * Compare the two lists together and remove items that are not in both lists. */ - for (int i = 0; i < mMounts.size(); i++) + if (mVold.size() > 0) { - String mount = mMounts.get(i); - if (!mVold.contains(mount)) - mMounts.remove(i--); + for (int i = 0; i < mMounts.size(); i++) + { + String mount = mMounts.get(i); + if (!mVold.contains(mount)) + mMounts.remove(i--); + } } // don't need this anymore, clear the vold list to reduce memory @@ -205,9 +208,10 @@ public class StorageOptions if (!root.exists() || !root.isDirectory() || !root.canWrite()) mMounts.remove(i--); } - + if (t == 0 && Build.VERSION.SDK_INT >= 16 && findForcemount()) - {//if none is found lets force it for Jellybean and above... + { + //if none is found lets force it for Jellybean and above... if (System.getenv("EXTERNAL_STORAGE") != null) { File root = new File(System.getenv("EXTERNAL_STORAGE")); @@ -225,7 +229,7 @@ public class StorageOptions } } } - + if (System.getenv("SECONDARY_STORAGE") != null) { File root = new File(System.getenv("SECONDARY_STORAGE")); @@ -248,6 +252,7 @@ public class StorageOptions private static void setProperties() { + Log.d(TAG, "setProperties()"); /* * At this point all the paths in the list should be valid. Build the public properties. */ @@ -269,7 +274,8 @@ public class StorageOptions else { for (String path : mMounts) - { // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this + { + // TODO: /mnt/sdcard is assumed to always mean internal storage. Use this comparison until there is a better way to do this if ("/mnt/sdcard".equalsIgnoreCase(path)) mLabels.add("Built-in Storage"); else @@ -389,6 +395,7 @@ public class StorageOptions private static boolean findForcemount() { + Log.d(TAG, "findForcemount()"); try { File file = new File(System.getenv("EXTERNAL_STORAGE") + "/forcemount"); @@ -396,8 +403,9 @@ public class StorageOptions { return true; } - } catch (Exception e1) + } catch (Exception e) { + Log.w(TAG, e.getMessage()); return false; } return false; diff --git a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java index 7c07936f0..56b644caa 100644 --- a/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java +++ b/projects/mtg/Android/src/org/libsdl/app/SDLActivity.java @@ -500,8 +500,6 @@ public class SDLActivity extends Activity implements OnKeyListener // So we can call stuff from static callbacks mSingleton = this; mContext = this.getApplicationContext(); - // get the current version of the app to set the core filename - String versionCodeString = getApplicationCode(); RES_FILENAME = getResourceName(); StorageOptions.determineStorageOptions(); From dae1b10de187abd65b97e4b5acce9ab9a225fd25 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Fri, 5 Aug 2016 21:52:46 +0800 Subject: [PATCH 29/54] Copied Token Image If the image is not found, try finding the token counterpart by Id --- projects/mtg/include/WResourceManager.h | 1 + projects/mtg/include/WResourceManagerImpl.h | 1 + projects/mtg/src/CardGui.cpp | 11 ++++++ projects/mtg/src/MTGCardInstance.cpp | 14 ++++++++ projects/mtg/src/WResourceManager.cpp | 40 +++++++++++++++++++++ 5 files changed, 67 insertions(+) diff --git a/projects/mtg/include/WResourceManager.h b/projects/mtg/include/WResourceManager.h index 4abe05ed9..d7f44c2a0 100644 --- a/projects/mtg/include/WResourceManager.h +++ b/projects/mtg/include/WResourceManager.h @@ -80,6 +80,7 @@ public: } }; virtual JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL) = 0; + virtual JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0) = 0; virtual JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL) = 0; virtual JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL, int id = 0) = 0; diff --git a/projects/mtg/include/WResourceManagerImpl.h b/projects/mtg/include/WResourceManagerImpl.h index d759f943f..05b18617c 100644 --- a/projects/mtg/include/WResourceManagerImpl.h +++ b/projects/mtg/include/WResourceManagerImpl.h @@ -141,6 +141,7 @@ public: bool IsThreaded(); JQuadPtr RetrieveCard(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL); + JQuadPtr RetrieveCardToken(MTGCard * card, int style = RETRIEVE_NORMAL,int submode = CACHE_NORMAL, int tId = 0); JSample * RetrieveSample(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JTexture * RetrieveTexture(const string& filename, int style = RETRIEVE_NORMAL, int submode = CACHE_NORMAL); JQuadPtr RetrieveQuad(const string& filename, float offX=0.0f, float offY=0.0f, float width=0.0f, float height=0.0f, string resname="", int style = RETRIEVE_LOCK, int submode = CACHE_NORMAL, int id = 0); diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 145884c06..dd4db8ff7 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -148,6 +148,11 @@ void CardGui::Render() MTGCard * fcard = MTGCollection()->getCardByName(card->name); quad = game->getResourceManager()->RetrieveCard(fcard, CACHE_THUMB); } + if (card->hasCopiedToken && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(card->copiedID)); + quad = game->getResourceManager()->RetrieveCardToken(tcard, CACHE_THUMB, 1, abs(card->copiedID)); + } if (quad.get()) alternate = false; else @@ -1148,6 +1153,12 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); } + if (kcard->hasCopiedToken && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); + quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) + : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); + } if (quad.get()) { if (quad->mHeight < quad->mWidth) diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index fdb37698d..62bc67ea7 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -149,6 +149,20 @@ void MTGCardInstance::copy(MTGCardInstance * card) backupTargets = this->backupTargets; storedCard = oldStored; miracle = false; + if (card->TokenAndAbility) + { + MTGAbility * andAbilityClone = card->TokenAndAbility->clone(); + andAbilityClone->target = this; + if(card->TokenAndAbility->oneShot) + { + andAbilityClone->resolve(); + SAFE_DELETE(andAbilityClone); + } + else + { + andAbilityClone->addToGame(); + } + } } MTGCardInstance::~MTGCardInstance() diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index 46c51df68..3557e0dec 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -263,6 +263,46 @@ JQuadPtr ResourceManagerImpl::RetrieveCard(MTGCard * card, int style, int submod return JQuadPtr(); } +JQuadPtr ResourceManagerImpl::RetrieveCardToken(MTGCard * card, int style, int submode, int tId) +{ + //Cards are never, ever resource managed, so just check cache. + if (!card || options[Options::DISABLECARDS].number) return JQuadPtr(); + + submode = submode | TEXTURE_SUB_CARD; + + //static std::ostringstream filename; + //filename.str(""); + string filename; + filename.reserve(4096); + //filename << setlist[card->setId] << "/" << card->getImageName(); + filename.append(setlist[card->setId]); + filename.append("/"); + int id = -card->getMTGId(); + if(tId) + id = -tId; + ostringstream imagename; + imagename << "-" << id << "t.jpg"; + filename.append(imagename.str()); + + //Aliases. + if (style == RETRIEVE_THUMB) + { + submode = submode | TEXTURE_SUB_THUMB; + style = RETRIEVE_NORMAL; + } + + JQuadPtr jq = RetrieveQuad(filename, 0, 0, 0, 0, "", style, submode | TEXTURE_SUB_5551, id); + + lastError = textureWCache.mError; + if (jq) + { + jq->SetHotSpot(static_cast (jq->mTex->mWidth / 2), static_cast (jq->mTex->mHeight / 2)); + return jq; + } + + return JQuadPtr(); +} + int ResourceManagerImpl::AddQuadToManaged(const WManagedQuad& inQuad) { int id = mIDLookupMap.size(); From be98e0b543de3e2b04db9c3f6e3c3065c7bd4fdc Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 6 Aug 2016 01:40:21 -0500 Subject: [PATCH 30/54] Update CardGui.cpp Disabled temporary... --- projects/mtg/src/CardGui.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index dd4db8ff7..de3779fae 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1152,13 +1152,13 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder { MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); - } + }/* if (kcard->hasCopiedToken && !quad.get()) { MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); - } + }*///temporary disabled this so it will not crash, this must be called when ingame -kevlahnota if (quad.get()) { if (quad->mHeight < quad->mWidth) From d43693fef08f6bfe24ae66041a28e835f6a8e632 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 6 Aug 2016 19:41:34 +0800 Subject: [PATCH 31/54] when ingame, try finding the quad for copier/cloner when copying token generated cards... --- projects/mtg/include/CardGui.h | 6 +++--- projects/mtg/src/ActionStack.cpp | 3 ++- projects/mtg/src/CardDisplay.cpp | 4 ++-- projects/mtg/src/CardGui.cpp | 25 ++++++++++++++----------- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 5a660c1ed..80aaf118c 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -33,7 +33,7 @@ protected: /* ** Tries to render the Big version of a card picture, backups to text version in case of failure */ - static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false); + static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false, bool ingame = false); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); static void AlternateRender(MTGCard * card, const Pos& pos); @@ -55,8 +55,8 @@ public: virtual void Render(); virtual void Update(float dt); bool isBlackBorder(string set); - void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); - static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false); + void DrawCard(const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); + static void DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode = DrawMode::kNormal, bool thumb = false, bool noborder = false, bool smallscale = false, bool ingame = false); static void DrawBorder(string setname, const Pos& inPosition, float x, bool noborder = false, bool smallscale = false); static JQuadPtr AlternateThumbQuad(MTGCard * card); virtual ostream& toString(ostream&) const; diff --git a/projects/mtg/src/ActionStack.cpp b/projects/mtg/src/ActionStack.cpp index 6bb329cd9..a702295a6 100644 --- a/projects/mtg/src/ActionStack.cpp +++ b/projects/mtg/src/ActionStack.cpp @@ -132,7 +132,8 @@ void Interruptible::Render(MTGCardInstance * source, JQuad * targetQuad, string { Pos pos = Pos(CardGui::BigWidth / 2, CardGui::BigHeight / 2 - 10, 0.80f, 0.0, 220); pos.actY = 142;//adjust y a little bit - CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode()); + bool ingame = observer?true:false; + CardGui::DrawCard(source, pos, observer->getCardSelector()->GetDrawMode(),false,false,false,ingame); } if (targetQuad) diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index 6e6fff9f4..d3bff0dcc 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -271,8 +271,8 @@ void CardDisplay::Render() if (x < (CardGui::BigWidth / 2)) pos.actX = SCREEN_WIDTH - 10 - CardGui::BigWidth / 2; drawMode = observer->getCardSelector()->GetDrawMode(); } - - cardg->DrawCard(pos, drawMode); + bool ingame = observer?true:false; + cardg->DrawCard(pos, drawMode, 0, false, false,ingame); } } diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index de3779fae..729994f49 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -111,17 +111,17 @@ void CardGui::Update(float dt) PlayGuiObject::Update(dt); } -void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale) +void CardGui::DrawCard(const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) { - DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale); + DrawCard(card, inPosition, inMode, thumb, noborder, smallerscale, ingame); } -void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale) +void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool thumb, bool noborder, bool smallerscale, bool ingame) { switch (inMode) { case DrawMode::kNormal: - RenderBig(inCard, inPosition, thumb, noborder, smallerscale); + RenderBig(inCard, inPosition, thumb, noborder, smallerscale, ingame); break; case DrawMode::kText: AlternateRender(inCard, inPosition); @@ -1135,7 +1135,7 @@ void CardGui::TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad) } //Renders a big card on screen. Defaults to the "alternate" rendering if no image is found -void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale) +void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder, bool smallerscale, bool ingame) { JRenderer * renderer = JRenderer::GetInstance(); //GameObserver * game = GameObserver::GetInstance(); @@ -1152,13 +1152,16 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder { MTGCard * fcard = MTGCollection()->getCardByName(kcard->name); quad = WResourceManager::Instance()->RetrieveCard(fcard); - }/* - if (kcard->hasCopiedToken && !quad.get()) + } + if(ingame) { - MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); - quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) - : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); - }*///temporary disabled this so it will not crash, this must be called when ingame -kevlahnota + if (kcard->hasCopiedToken && kcard->getObserver() && !quad.get()) + { + MTGCard * tcard = MTGCollection()->getCardById(abs(kcard->copiedID)); + quad = thumb ? WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_THUMB, 1, abs(kcard->copiedID)) + : WResourceManager::Instance()->RetrieveCardToken(tcard, RETRIEVE_NORMAL, 1, abs(kcard->copiedID)); + } + } if (quad.get()) { if (quad->mHeight < quad->mWidth) From 4f27c8051a2ea8768273922e805e3b61cb0c94bb Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 6 Aug 2016 19:55:18 +0800 Subject: [PATCH 32/54] forgot these --- projects/mtg/src/CardDisplay.cpp | 2 +- projects/mtg/src/CardSelector.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/CardDisplay.cpp b/projects/mtg/src/CardDisplay.cpp index d3bff0dcc..eef02f78b 100644 --- a/projects/mtg/src/CardDisplay.cpp +++ b/projects/mtg/src/CardDisplay.cpp @@ -272,7 +272,7 @@ void CardDisplay::Render() drawMode = observer->getCardSelector()->GetDrawMode(); } bool ingame = observer?true:false; - cardg->DrawCard(pos, drawMode, 0, false, false,ingame); + cardg->DrawCard(pos, drawMode, false, false, false,ingame); } } diff --git a/projects/mtg/src/CardSelector.cpp b/projects/mtg/src/CardSelector.cpp index 84c847c7d..0065f3e77 100644 --- a/projects/mtg/src/CardSelector.cpp +++ b/projects/mtg/src/CardSelector.cpp @@ -344,7 +344,8 @@ void CardSelector::Render() float modx = 14.f; Pos npos = Pos(bigpos.x+modx,bigpos.y-4.f,bigpos.zoom-(bigpos.zoom/5),bigpos.t,bigpos.alpha); //render card - card->DrawCard(npos, mDrawMode); + bool ingame = observer?true:false; + card->DrawCard(npos, mDrawMode, false, false, false,ingame); } } } From dfd07615060a78af9db6b0e65ad6e6d5786c075f Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 09:59:59 +0800 Subject: [PATCH 33/54] Corrected cards reported from forums --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 028ff879d..cfbf2f357 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -6145,7 +6145,7 @@ name=Atarka, World Render abilities=flying,trample auto=lord(dragon|mybattlefield) transforms((,newability[@combat(attacking) source(this):double strike ueot])) text=Flying,trample. -- Whenever a Dragon you control attacks, it gains double strike until end of turn. -mana={5}{R}}{G} +mana={5}{R}{G} type=Legendary Creature subtype=Dragon power=6 @@ -28155,7 +28155,7 @@ name=Domri Rade auto=counter(0/0,3,loyalty) auto={C(0/0,1,Loyalty)}:name(+1: Reveal) reveal:1 optionone target(creature|reveal)moveto(myhand) optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend auto={C(0/0,-2,Loyalty)}:name(-2: Fight) target(creature|mybattlefield) transforms((,newability[target(creature) dynamicability])) ueot -auto={C(0/0,-7,Loyalty)}:name(-7: emblem) emblem transforms((,newability[lord(creature|mybattlefield)doublestrike],newability[lord(creature|mybattlefield)trample],newability[lord(creature|mybattlefield)hexproof],newability[lord(creature|mybattlefield)haste])) forever dontremove +auto={C(0/0,-7,Loyalty)}:name(-7: emblem) emblem transforms((,newability[lord(creature|mybattlefield)double strike],newability[lord(creature|mybattlefield)trample],newability[lord(creature|mybattlefield)hexproof],newability[lord(creature|mybattlefield)haste])) forever dontremove text=+1: Look at the top card of your library. If it's a creature card, you may reveal it and put it into your hand. -- -2: Target creature you control fights another target creature. -- -7: You get an emblem with "Creatures you control have double strike, trample, hexproof, and haste." mana={1}{R}{G} type=Planeswalker @@ -29668,7 +29668,7 @@ toughness=4 name=Drogskol Reaver abilities=flying,double strike,lifelink auto=@lifeof(player):draw:1 controller -text=Flying, doublestrike, lifelink -- Whenever you gain life, draw a card. +text=Flying, double strike, lifelink -- Whenever you gain life, draw a card. mana={5}{W}{U} type=Creature subtype=Spirit @@ -33405,7 +33405,7 @@ text=First strike -- When Enlistment Officer enters the battlefield, reveal the mana={3}{W} type=Creature subtype=Human Soldier -abilities=firststrike +abilities=first strike power=2 toughness=3 [/card] @@ -59005,7 +59005,7 @@ auto=@combat(attacking) source(dragon|mybattlefield):all(creature|mybattlefield) other={3}{R}{B} name(Dash) auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever text=Flying. -- Whenever a Dragon you control attacks, creatures you control get +1/+0 until end of turn. -- Dash {3}{B}{R} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.) -mana={3}{B}}{R} +mana={3}{B}{R} type=Legendary Creature subtype=Dragon power=4 @@ -72894,9 +72894,9 @@ toughness=1 name=Needle Spires auto={t}:add{w} auto={t}:add{r} -auto={1}{B}{G}:all(this) transforms((Elemental Creature,setpower=2,settoughness=1,red,white,doublestrike)) ueot +auto={1}{B}{G}:all(this) transforms((Elemental Creature,setpower=2,settoughness=1,red,white,double strike)) ueot auto=tap(noevent) -text=Needle Spires enters the battlefield tapped. -- {T}: Add {R} or {W} to your mana pool. -- {2}{R}{W}: Needle Spires becomes a 2/1 red and white Elemental creature with doublestrike until end of turn. It's still a land. +text=Needle Spires enters the battlefield tapped. -- {T}: Add {R} or {W} to your mana pool. -- {2}{R}{W}: Needle Spires becomes a 2/1 red and white Elemental creature with double strike until end of turn. It's still a land. type=Land [/card] [card] @@ -75757,7 +75757,7 @@ name=Ojutai, Soul of Winter abilities=flying,vigilance auto=@combat(attacking) source(dragon|mybattlefield):name(tap & Freeze) target(*[-land]|opponentbattlefield) transforms((,newability[tap],newability[frozen])) uynt text=Flying, vigilance. -- Whenever a Dragon you control attacks, Tap target nonland permament your opponents control. It doesn't untap during its controller's next untap step. -mana={5}{W}}{U} +mana={5}{W}{U} type=Legendary Creature subtype=Dragon power=5 @@ -87107,9 +87107,9 @@ toughness=4 [/card] [card] name=Resolute Blademaster -auto=choice all(creature|mybattlefield) doublestrike ueot -auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) doublestrike ueot -text=Rally ? Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain doublestrike until end of turn. +auto=choice all(creature|mybattlefield) double strike ueot +auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) double strike ueot +text=Rally ? Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn. mana={3}{R}{W} type=Creature subtype=Human Soldier Ally @@ -92002,7 +92002,7 @@ type=Sorcery [/card] [card] name=Savageborn Hydra -abilities=doublestrike +abilities=double strike auto=counter(1/1,X) auto={1}{RG}:counter(1/1,1) asSorcery text=Double strike. -- Savageborn Hydra enters the battlefield with X +1/+1 counters on it. -- {1}{R/G}: Put a +1/+1 counter on Savageborn Hydra. Activate this ability only any time you could play a sorcery. From 213d11c8e9ca46ed2c8e91cff139fd2fdd58ba44 Mon Sep 17 00:00:00 2001 From: punkeduard Date: Sat, 6 Aug 2016 21:03:23 -0500 Subject: [PATCH 34/54] Changes to primitives name=Ojutai, Soul of Winter name=Atarka, World Render name=Kolaghan, the Storm's Fury name=Savageborn Hydra --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 028ff879d..e7919642a 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -6145,7 +6145,7 @@ name=Atarka, World Render abilities=flying,trample auto=lord(dragon|mybattlefield) transforms((,newability[@combat(attacking) source(this):double strike ueot])) text=Flying,trample. -- Whenever a Dragon you control attacks, it gains double strike until end of turn. -mana={5}{R}}{G} +mana={5}{R}{G} type=Legendary Creature subtype=Dragon power=6 @@ -59005,7 +59005,7 @@ auto=@combat(attacking) source(dragon|mybattlefield):all(creature|mybattlefield) other={3}{R}{B} name(Dash) auto=if paid(alternative) then transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveto(ownerhand) all(this)])) forever text=Flying. -- Whenever a Dragon you control attacks, creatures you control get +1/+0 until end of turn. -- Dash {3}{B}{R} (You may cast this spell for its dash cost. If you do, it gains haste, and it's returned from the battlefield to its owner's hand at the beginning of the next end step.) -mana={3}{B}}{R} +mana={3}{B}{R} type=Legendary Creature subtype=Dragon power=4 @@ -75757,7 +75757,7 @@ name=Ojutai, Soul of Winter abilities=flying,vigilance auto=@combat(attacking) source(dragon|mybattlefield):name(tap & Freeze) target(*[-land]|opponentbattlefield) transforms((,newability[tap],newability[frozen])) uynt text=Flying, vigilance. -- Whenever a Dragon you control attacks, Tap target nonland permament your opponents control. It doesn't untap during its controller's next untap step. -mana={5}{W}}{U} +mana={5}{W}{U} type=Legendary Creature subtype=Dragon power=5 @@ -92002,15 +92002,15 @@ type=Sorcery [/card] [card] name=Savageborn Hydra -abilities=doublestrike +abilities=double strike auto=counter(1/1,X) auto={1}{RG}:counter(1/1,1) asSorcery text=Double strike. -- Savageborn Hydra enters the battlefield with X +1/+1 counters on it. -- {1}{R/G}: Put a +1/+1 counter on Savageborn Hydra. Activate this ability only any time you could play a sorcery. mana={X}{R}{G} type=Creature subtype=Hydra -power=2 -toughness=2 +power=0 +toughness=0 [/card] [card] name=Savannah Lions From 807874ce5dffc9ed7ae81c41d764a93d2dba063e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 10:15:11 +0800 Subject: [PATCH 35/54] add andAbility support for AACopier the granted ability must exists only if you copy a card, if you don't copy any card, the source doesn't have any granted abillities. --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 13 ++++------- projects/mtg/include/AllAbilities.h | 1 + projects/mtg/src/AllAbilities.cpp | 23 ++++++++++++++++---- projects/mtg/src/CardGui.cpp | 2 +- projects/mtg/src/MTGAbility.cpp | 8 +++++++ 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index cfbf2f357..f4407f707 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2601,8 +2601,7 @@ type=Instant [card] name=Altered Ego abilities=nofizzle -auto=copy target(creature) -auto=counter(1/1,X) +auto=may copy target(creature) and!( counter(1/1,X) )! text=Altered Ego can't be countered. -- You may have Altered Ego enter the battlefield as a copy of any creature on the battlefield, except it enters with X additional +1/+1 counters on it. mana={X}{2}{G}{U} type=Creature @@ -67273,8 +67272,7 @@ toughness=2 [/card] [card] name=Mercurial Pretender -auto=may copy NotATarget(creature) -auto=transforms((,newability[{2}{U}{U}:moveto(ownerhand)])) forever +auto=may copy NotATarget(creature) and!( transforms((,newability[{2}{U}{U}:moveto(ownerhand)])) forever )! text=You may have Mercurial Pretender enter the battlefield as a copy of any creature you control except it gains ?{2}{U}{U}: Return this creature to its owner?s hand.? mana={4}{U} type=Creature @@ -79169,9 +79167,7 @@ toughness=1 [/card] [card] name=Phantasmal Image -auto=transforms((Illusion)) -auto=transforms((,newability[@targeted(this):sacrifice])) forever -auto=may copy NotATarget(creature) +auto=may copy NotATarget(creature) and!( transforms((Illusion,newability[@targeted(this):sacrifice])) forever )! text=You may have Phantasmal Image enter the battlefield as a copy of any creature on the battlefield, except it's an Illusion in addition to its other types and it gains "When this creature becomes the target of a spell or ability, sacrifice it." mana={1}{U} type=Creature @@ -82297,8 +82293,7 @@ type=Sorcery [/card] [card] name=Progenitor Mimic -auto=transforms((,newability[@each my upkeep:all(this) ifnot cantargetcard(*[token]) then clone])) forever -auto=may copy NotATarget(creature) +auto=may copy NotATarget(creature) and!( transforms((,newability[@each my upkeep:all(this) ifnot cantargetcard(*[token]) then clone])) forever )! text=You may have Progenitor Mimic enter the battlefield as a copy of any creature on the battlefield except it gains "At the beginning of your upkeep, if this creature isn't a token, put a token onto the battlefield that's a copy of this creature." mana={4}{G}{U} type=Creature diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index fde01edc7..b7ebae78f 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -1911,6 +1911,7 @@ public: class AACopier: public ActivatedAbility { public: + MTGAbility * andAbility; AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, MTGCardInstance * _target = NULL, ManaCost * _cost = NULL); int resolve(); const string getMenuText(); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index 667396db5..afddfa39f 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1453,6 +1453,7 @@ AACopier::AACopier(GameObserver* observer, int _id, MTGCardInstance * _source, M ActivatedAbility(observer, _id, _source, _cost, 0) { target = _target; + andAbility = NULL; } int AACopier::resolve() @@ -1505,9 +1506,23 @@ int AACopier::resolve() } if(_target->TokenAndAbility) {//the source copied a token with andAbility - MTGAbility * andAbilityClone = _target->TokenAndAbility->clone(); - andAbilityClone->target = source; + MTGAbility * TokenandAbilityClone = _target->TokenAndAbility->clone(); + TokenandAbilityClone->target = source; if(_target->TokenAndAbility->oneShot) + { + TokenandAbilityClone->resolve(); + SAFE_DELETE(TokenandAbilityClone); + } + else + { + TokenandAbilityClone->addToGame(); + } + } + if(andAbility) + { + MTGAbility * andAbilityClone = andAbility->clone(); + andAbilityClone->target = source; + if(andAbility->oneShot) { andAbilityClone->resolve(); SAFE_DELETE(andAbilityClone); @@ -3968,10 +3983,10 @@ int AACloner::resolve() } } list::iterator it; - for (it = awith.begin(); it != awith.end(); it++) + /*for (it = awith.begin(); it != awith.end(); it++) {//there must be a layer of temporary abilities and original abilities spell->source->basicAbilities[*it] = 1; - } + }*/ for (it = colors.begin(); it != colors.end(); it++) { spell->source->setColor(*it); diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 729994f49..55c27478a 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1224,7 +1224,7 @@ void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool nobor alphabeta->SetHotSpot(static_cast (alphabeta->mWidth / 2), static_cast (alphabeta->mHeight / 2)); float myscale = pos.actZ * 254 / alphabeta->mHeight; alphabeta->SetColor(ARGB((int)pos.actA,255,255,255)); - renderer->RenderQuad(alphabeta.get(), x, pos.actY, pos.actT, myscale, myscale); + renderer->RenderQuad(alphabeta.get(), x, pos.actY+0.2f, pos.actT, myscale, myscale); } } } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 66b0bb004..54771954b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2518,6 +2518,14 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG { MTGAbility * a = NEW AACopier(observer, id, card, target); a->oneShot = 1; + a->canBeInterrupted = false; + //andability + if(storedAndAbility.size()) + { + string stored = storedAndAbility; + storedAndAbility.clear(); + ((AACopier*)a)->andAbility = parseMagicLine(stored, id, spell, card); + } return a; } From 9bbf28e44b63ab86f53dd57ec14e291dddb71832 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 11:21:07 +0800 Subject: [PATCH 36/54] correction --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 267c575bc..bf5645ae3 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -14284,7 +14284,7 @@ toughness=2 [card] name=Brutal Deceiver auto={1}:name(Look) reveal:1 optionone name(Look) target(*|reveal) doNothing optiononeend optiontwo all(*|reveal) moveto(mylibrary) optiontwoend revealend -auto={2}:reveal:1 optionone if type(land|reveal)~morethan~0 then all(this) +1/0 ueot && all(this) firststrike ueot optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend limit:1 +auto={2}:reveal:1 optionone if type(land|reveal)~morethan~0 then all(this) +1/0 ueot && all(this) first strike ueot optiononeend optiontwo name(Put Back On Top) target(<1>*|reveal) moveto(mylibrary) optiontwoend revealend limit:1 text={1}: Look at the top card of your library. -- {2}: Reveal the top card of your library. If it's a land card, Brutal Deceiver gets +1/+0 and gains first strike until end of turn. Activate this ability only once each turn. mana={2}{R} type=Creature @@ -42583,7 +42583,7 @@ subtype=Giant [card] name=Gibbering Fiend auto=damage:1 opponent -auto==@each opponent upkeep restriction{delirium}:deplete:1 opponent +auto=@each opponent upkeep restriction{delirium}:deplete:1 opponent text=When Gibbering Fiend enters the battlefield, it deals 1 damage to each opponent. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, Gibbering Fiend deals 1 damage to that player. mana={1}{R} type=Creature @@ -65272,7 +65272,7 @@ subtype=Aura [card] name=Manic Scribe auto=deplete:3 opponent -auto==@each opponent upkeep restriction{delirium}:deplete:3 opponent +auto=@each opponent upkeep restriction{delirium}:deplete:3 opponent text=When Manic Scribe enters the battlefield, each opponent puts the top three cards of his or her library into his or her graveyard. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, that player puts the top three cards of his or her library into his or her graveyard. mana={1}{U} type=Creature @@ -75338,7 +75338,7 @@ type=Instant [card] name=Obsessive Skinner auto=counter(1/1,1) target(creature) -auto==@each opponent upkeep restriction{delirium}:counter(1/1,1) target(creature) +auto=@each opponent upkeep restriction{delirium}:counter(1/1,1) target(creature) text=When Obsessive Skinner enters the battlefield, put a +1/+1 counter on target creature. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, put a +1/+1 counter on target creature. mana={1}{G} type=Creature @@ -113420,7 +113420,7 @@ type=Sorcery [card] name=Tooth Collector auto=target(creature|opponentbattlefield) -1/-1 ueot -auto==@each opponent upkeep restriction{delirium}:target(creature|opponentbattlefield) -1/-1 ueot +auto=@each opponent upkeep restriction{delirium}:target(creature|opponentbattlefield) -1/-1 ueot text=When Tooth Collector enters the battlefield, target creature an opponent controls gets -1/-1 until end of turn. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, target creature that player controls gets -1/-1 until end of turn. mana={2}{B} type=Creature From 4d1dfb58ffa94946a3bb9459bda9631f5721fdfe Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 11:49:57 +0800 Subject: [PATCH 37/54] Fix Enstack Attackers If you have 40+ tokens as attackers in play, stack them on the attackers tightly... --- projects/mtg/src/GuiPlay.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 4c1e01ed6..0433eb9eb 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -125,12 +125,12 @@ void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); card->x = x + baseX; - if (total < 8) + if (attackers+1 < 8) x += CARD_WIDTH; - else if (total < 16) - x += (SCREEN_WIDTH - 200 - baseX) / total; + else if (attackers+1 < 16) + x += (SCREEN_WIDTH - 200 - baseX) / attackers+1; else - x += (SCREEN_WIDTH - 50 - baseX) / total; + x += (HORZWIDTH - 50 - baseX) / attackers+1; card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker; From 01145c458153ef6fd0f72f0f7d0cafd6499fcdc1 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 13:24:14 +0800 Subject: [PATCH 38/54] new adjustments --- projects/mtg/src/GuiHand.cpp | 4 ++-- projects/mtg/src/GuiPlay.cpp | 25 +++++++++++++++++-------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/projects/mtg/src/GuiHand.cpp b/projects/mtg/src/GuiHand.cpp index 950585dd9..22daf0612 100644 --- a/projects/mtg/src/GuiHand.cpp +++ b/projects/mtg/src/GuiHand.cpp @@ -122,9 +122,9 @@ void GuiHandSelf::Repos() { float dist = 180.0f / cards.size(); if (dist > 20) - dist = 20.0; + dist = 18.0;//20.0 else - y = 40.0; + y = 35.0;//40.0 for (vector::iterator it = cards.begin(); it != cards.end(); ++it) { (*it)->x = ClosedRowX; diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 0433eb9eb..718516537 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -62,12 +62,20 @@ void GuiPlay::HorzStack::Enstack(CardView* card) { card->x = x + baseX; card->y = y + baseY; - if (total < 8) + /*if (total < 8) x += CARD_WIDTH; else if (total < 16) x += (SCREEN_WIDTH - 200 - baseX) / total; else - x += (SCREEN_WIDTH - 50 - baseX) / total; + x += (SCREEN_WIDTH - 50 - baseX) / total;*/ + + // new adjustment + if (total < 8) + x += CARD_WIDTH; + else if (total < 24) + x += (SCREEN_WIDTH - 200 - baseX) / total; + else + x += (SCREEN_WIDTH - 70 - baseX) / total; } void GuiPlay::VertStack::Enstack(CardView* card) @@ -83,9 +91,10 @@ void GuiPlay::VertStack::Enstack(CardView* card) card->x = x + baseX; card->y = y + baseY; - y += 12; - if (++count == total - 1 && y == 12) - y += 12; + y += 8; + if (++count == total - 1 && y == 8) + y += 8; + //last value += 12... } void GuiPlay::VertStack::Render(CardView* card, iterator begin, iterator end) @@ -124,13 +133,13 @@ void GuiPlay::BattleField::reset(float x, float y) void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); - card->x = x + baseX; + card->x = x-12 + baseX; if (attackers+1 < 8) x += CARD_WIDTH; - else if (attackers+1 < 16) + else if (attackers+1 < 24) x += (SCREEN_WIDTH - 200 - baseX) / attackers+1; else - x += (HORZWIDTH - 50 - baseX) / attackers+1; + x += (HORZWIDTH - baseX) / attackers+1; card->y = baseY + (card->card->getObserver()->getView()->getRenderedPlayer() == card->card->controller() ? 20 + y : -20 - y); ++currentAttacker; From 69820300133a70bce9dcd40bffbbb2259af3f595 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 14:08:09 +0800 Subject: [PATCH 39/54] Minor adjustment --- projects/mtg/src/GuiPlay.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index 718516537..e723976df 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -91,9 +91,9 @@ void GuiPlay::VertStack::Enstack(CardView* card) card->x = x + baseX; card->y = y + baseY; - y += 8; - if (++count == total - 1 && y == 8) - y += 8; + y += 10; + if (++count == total - 1 && y == 10) + y += 10; //last value += 12... } @@ -133,7 +133,7 @@ void GuiPlay::BattleField::reset(float x, float y) void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); - card->x = x-12 + baseX; + card->x = x-6 + baseX; if (attackers+1 < 8) x += CARD_WIDTH; else if (attackers+1 < 24) From 05e81ad923876358ad7d46b5491d20e1f8c1aeab Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 19:42:56 +0800 Subject: [PATCH 40/54] Fix Westvale Abbey and Master Transmuter --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index bf5645ae3..09495192a 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -66466,7 +66466,7 @@ type=Sorcery [/card] [card] name=Master Transmuter -auto={H(artifact|mybattlefield)}{U}{T}:may name(put artifact in play) ability$!moveTo(mybattlefield) notatarget(artifact|myhand)!$ controller +auto={H(artifact|mybattlefield)}{U}{T}:name(put artifact in play) transforms((,newability[ability$! moveTo(mybattlefield) notatarget(artifact|myhand) !$ controller])) oneshot text={U}, {T}, Return an artifact you control to its owner's hand: You may put an artifact card from your hand onto the battlefield. mana={3}{U} type=Artifact Creature @@ -123487,7 +123487,7 @@ toughness=3 [card] name=Westvale Abbey auto={T}:Add{1} -auto={5}{T}{L}:token(Human Cleric,creature Human Cleric,1/1,white,black +auto={5}{T}{L}:token(Human Cleric,creature Human Cleric,1/1,white,black) auto={5}{T}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}{S(creature|mybattlefield)}:flip(Ormendahl, Profane Prince) text={T}: Add {1} to your mana pool. -- {5}, {T}, Pay 1 life: Put a 1/1 white and black Human Cleric creature token onto the battlefield. -- {5}, {T}, Sacrifice five creatures: Transform Westvale Abbey, then untap it. type=Land From b756c8b9ec577e0be60ce7206e2eb84e86429977 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sun, 7 Aug 2016 22:33:40 +0800 Subject: [PATCH 41/54] resize avatar --- projects/mtg/include/GuiStatic.h | 4 ++-- projects/mtg/src/GuiAvatars.cpp | 16 ++++++++-------- projects/mtg/src/GuiPlay.cpp | 8 ++++---- projects/mtg/src/GuiStatic.cpp | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/projects/mtg/include/GuiStatic.h b/projects/mtg/include/GuiStatic.h index 513d7848b..db7c0505e 100644 --- a/projects/mtg/include/GuiStatic.h +++ b/projects/mtg/include/GuiStatic.h @@ -25,8 +25,8 @@ struct GuiAvatar: public GuiStatic BOTTOM_RIGHT } Corner; - static const unsigned Width = 35; - static const unsigned Height = 50; + static const unsigned Width = 32;//35 + static const unsigned Height = 45;//50 protected: int avatarRed; diff --git a/projects/mtg/src/GuiAvatars.cpp b/projects/mtg/src/GuiAvatars.cpp index b12d2a8fd..4d2af134b 100644 --- a/projects/mtg/src/GuiAvatars.cpp +++ b/projects/mtg/src/GuiAvatars.cpp @@ -20,16 +20,16 @@ GuiAvatars::GuiAvatars(DuelLayers* duelLayers) : Add(opponent = NEW GuiAvatar(0, 0, false, mpDuelLayers->getRenderedPlayerOpponent(), GuiAvatar::TOP_LEFT, this)); opponent->zoom = 0.9f; //opponentExile - Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, + Add(opponentExile = NEW GuiExile(-30 + GuiAvatar::Width * 1.2f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentGraveyard - Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5, false, + Add(opponentGraveyard = NEW GuiGraveyard(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentHand - Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, + Add(opponentHand = NEW GuiOpponentHand(-15 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 35 + GuiGameZone::Height - 10, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); //opponentLibrary - Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4 - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, + Add(opponentLibrary = NEW GuiLibrary(5 + GuiAvatar::Width * 1.4f - GuiGameZone::Width / 2, 5 + GuiGameZone::Height + 5, false, mpDuelLayers->getRenderedPlayerOpponent(), this)); observer->getCardSelector()->Add(self); @@ -145,12 +145,12 @@ void GuiAvatars::Update(float dt) void GuiAvatars::Render() { JRenderer * r = JRenderer::GetInstance(); - float w = 54; - float h = 54; + float w = 52; + float h = 52; if (opponent == active) { - r->FillRect(opponent->actX, opponent->actY, 40 * opponent->actZ, h+20 * opponent->actZ, ARGB(200,0,0,0)); - r->FillRect(opponent->actX, opponent->actY, w * opponent->actZ, h * opponent->actZ, ARGB(200,0,0,0)); + r->FillRect(opponent->actX, opponent->actY, 34 * opponent->actZ, h+22 * opponent->actZ, ARGB(200,0,0,0)); + r->FillRect(opponent->actX, opponent->actY, (w * opponent->actZ)-1, (h * opponent->actZ)+2, ARGB(200,0,0,0)); } else if (self == active) { diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index e723976df..6e0ed09ff 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -91,9 +91,9 @@ void GuiPlay::VertStack::Enstack(CardView* card) card->x = x + baseX; card->y = y + baseY; - y += 10; - if (++count == total - 1 && y == 10) - y += 10; + y += 9; + if (++count == total - 1 && y == 9) + y += 9; //last value += 12... } @@ -133,7 +133,7 @@ void GuiPlay::BattleField::reset(float x, float y) void GuiPlay::BattleField::EnstackAttacker(CardView* card) { //card->x = CARD_WIDTH + 20 + (currentAttacker * (HORZWIDTH) / (attackers+1)); - card->x = x-6 + baseX; + card->x = x-4 + baseX; if (attackers+1 < 8) x += CARD_WIDTH; else if (attackers+1 < 24) diff --git a/projects/mtg/src/GuiStatic.cpp b/projects/mtg/src/GuiStatic.cpp index baa30379a..d41002585 100644 --- a/projects/mtg/src/GuiStatic.cpp +++ b/projects/mtg/src/GuiStatic.cpp @@ -88,11 +88,11 @@ void GuiAvatar::Render() } if (player->getObserver()->currentPlayer == player) - r->DrawRect(x0 - 1, y0 - 1, 36 * actZ, 51 * actZ, ARGB((int)actA, 0, 255, 0)); + r->DrawRect(x0 - 1, y0 - 1, (Width+1) * actZ, (Height+1) * actZ, ARGB((int)actA, 0, 255, 0)); else if (player->getObserver()->currentActionPlayer == player) - r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 0, 0, 255)); + r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 0, 0, 255)); if (player->getObserver()->isInterrupting == player) - r->DrawRect(x0, y0, 34 * actZ, 49 * actZ, ARGB((int)actA, 255, 0, 0)); + r->DrawRect(x0, y0, (Width-1) * actZ, (Height-1) * actZ, ARGB((int)actA, 255, 0, 0)); //Life char buffer[10]; From 65ef1f384c797726225bd4e08707ca714cff403d Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 10:15:50 +0800 Subject: [PATCH 42/54] fix token names with "," --- projects/mtg/src/MTGAbility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 54771954b..04edb226b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2394,7 +2394,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string tokenDesc = splitToken[1]; vector tokenParameters = split(tokenDesc, ','); //lets try finding a token by card name. - if (splitToken[1].size() && tokenParameters.size() ==1) + if (splitToken[1].size() && tokenParameters.size() <3)//names with "," should work like token(Akuta, Born of Ash) { string cardName = splitToken[1]; MTGCard * safetycard = MTGCollection()->getCardByName(cardName); From 8c9d2d6f1d703640e44c31290f673bc9f8999015 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 10:37:27 +0800 Subject: [PATCH 43/54] multi tokens images on same source you can specifiy tnum:number on token parameters and it will concatenate the default token id and the specified number. example: token(Saproling, Creature Saproling, 1/1, green, tnum:15) if the source id is 12345, the default token id will be -12345, concat tnum, id will be -1234515 and the game will try to find the image 1234515t.jpg --- projects/mtg/include/AllAbilities.h | 16 +++++++++++++++- projects/mtg/src/MTGAbility.cpp | 14 ++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index b7ebae78f..b6b0adc8e 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3547,6 +3547,7 @@ public: vector currentAbilities; MTGAbility * andAbility; Player * tokenReciever; + string cID; //by id ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, int who = 0,bool aLivingWeapon = false) : @@ -3557,6 +3558,7 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; + cID = ""; } //by name, card still require valid card.dat info, this just makes the primitive code far more readable. token(Eldrazi scion) instead of token(-1234234)... ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string cardName, string starfound, WParsedInt * multiplier = NULL, @@ -3569,10 +3571,11 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; + cID = ""; } //by construction ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, - string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "") : + string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "", string tnum = "") : ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(_who),aLivingWeapon(aLivingWeapon),spt(spt) { power = _power; @@ -3582,6 +3585,7 @@ public: aType = MTGAbility::STANDARD_TOKENCREATOR; battleReady = false; andAbility = NULL; + cID = tnum; if (!multiplier) this->multiplier = NEW WParsedInt(1); //TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class; @@ -3683,6 +3687,16 @@ public: } } string tokenText = ""; + if(!cID.empty()) + { + string customId = ""; + ostringstream tokID; + tokID << abs(myToken->getId()); + customId.append(""+tokID.str()+cID); + customId = cReplaceString(customId," ",""); + WParsedInt newID(customId, NULL, source); + myToken->setMTGId(-newID.getValue()); + } if(sabilities.find("token(") == string::npos) { tokenText = "("; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 04edb226b..104b36ab3 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2420,15 +2420,21 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string sname = tokenParameters[0]; string stypes = tokenParameters[1]; string spt = tokenParameters[2]; - + string cID = ""; //reconstructing string abilities from the split version, // then we re-split it again in the token constructor, // this needs to be improved string sabilities = (tokenParameters.size() > 3)? tokenParameters[3] : ""; for (size_t i = 4; i < tokenParameters.size(); ++i) { - sabilities.append(","); - sabilities.append(tokenParameters[i]); + string tnum = tokenParameters[i]; + if(tnum.find("tnum:")) + cID = cReplaceString(tnum,"tnum:",""); + else + { + sabilities.append(","); + sabilities.append(tokenParameters[i]); + } } int value = 0; if (spt.find("xx/xx") != string::npos) @@ -2441,7 +2447,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator( observer, id, card,target, NULL, sname, stypes, power + value, toughness + value, - sabilities, starfound, multiplier, who, aLivingWeapon, spt); + sabilities, starfound, multiplier, who, aLivingWeapon, spt, cID); tok->oneShot = 1; if(aLivingWeapon) tok->forceDestroy = 1; From 9807ca99f9f1f55a3093e81e4104f7f01977fb58 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 11:20:25 +0800 Subject: [PATCH 44/54] Revert "multi tokens images on same source" This reverts commit 8c9d2d6f1d703640e44c31290f673bc9f8999015. --- projects/mtg/include/AllAbilities.h | 16 +--------------- projects/mtg/src/MTGAbility.cpp | 14 ++++---------- 2 files changed, 5 insertions(+), 25 deletions(-) diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index b6b0adc8e..b7ebae78f 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3547,7 +3547,6 @@ public: vector currentAbilities; MTGAbility * andAbility; Player * tokenReciever; - string cID; //by id ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, int who = 0,bool aLivingWeapon = false) : @@ -3558,7 +3557,6 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; - cID = ""; } //by name, card still require valid card.dat info, this just makes the primitive code far more readable. token(Eldrazi scion) instead of token(-1234234)... ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string cardName, string starfound, WParsedInt * multiplier = NULL, @@ -3571,11 +3569,10 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; - cID = ""; } //by construction ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, - string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "", string tnum = "") : + string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "") : ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(_who),aLivingWeapon(aLivingWeapon),spt(spt) { power = _power; @@ -3585,7 +3582,6 @@ public: aType = MTGAbility::STANDARD_TOKENCREATOR; battleReady = false; andAbility = NULL; - cID = tnum; if (!multiplier) this->multiplier = NEW WParsedInt(1); //TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class; @@ -3687,16 +3683,6 @@ public: } } string tokenText = ""; - if(!cID.empty()) - { - string customId = ""; - ostringstream tokID; - tokID << abs(myToken->getId()); - customId.append(""+tokID.str()+cID); - customId = cReplaceString(customId," ",""); - WParsedInt newID(customId, NULL, source); - myToken->setMTGId(-newID.getValue()); - } if(sabilities.find("token(") == string::npos) { tokenText = "("; diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 104b36ab3..04edb226b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2420,21 +2420,15 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string sname = tokenParameters[0]; string stypes = tokenParameters[1]; string spt = tokenParameters[2]; - string cID = ""; + //reconstructing string abilities from the split version, // then we re-split it again in the token constructor, // this needs to be improved string sabilities = (tokenParameters.size() > 3)? tokenParameters[3] : ""; for (size_t i = 4; i < tokenParameters.size(); ++i) { - string tnum = tokenParameters[i]; - if(tnum.find("tnum:")) - cID = cReplaceString(tnum,"tnum:",""); - else - { - sabilities.append(","); - sabilities.append(tokenParameters[i]); - } + sabilities.append(","); + sabilities.append(tokenParameters[i]); } int value = 0; if (spt.find("xx/xx") != string::npos) @@ -2447,7 +2441,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator( observer, id, card,target, NULL, sname, stypes, power + value, toughness + value, - sabilities, starfound, multiplier, who, aLivingWeapon, spt, cID); + sabilities, starfound, multiplier, who, aLivingWeapon, spt); tok->oneShot = 1; if(aLivingWeapon) tok->forceDestroy = 1; From de44abd529fdb2ea286d17947cbfd51a4e11694a Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 11:29:04 +0800 Subject: [PATCH 45/54] Revert "fix token names with ","" This reverts commit 65ef1f384c797726225bd4e08707ca714cff403d. --- projects/mtg/src/MTGAbility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 04edb226b..54771954b 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2394,7 +2394,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string tokenDesc = splitToken[1]; vector tokenParameters = split(tokenDesc, ','); //lets try finding a token by card name. - if (splitToken[1].size() && tokenParameters.size() <3)//names with "," should work like token(Akuta, Born of Ash) + if (splitToken[1].size() && tokenParameters.size() ==1) { string cardName = splitToken[1]; MTGCard * safetycard = MTGCollection()->getCardByName(cardName); From eb0ecedecf5fca67fc2c1479da7f8c41541be412 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 13:49:24 +0800 Subject: [PATCH 46/54] revised token id (tnum:num parameter) this should not conflict like earlier version. ex: [card] name=Fable of Wolf and Owl auto=@movedTo(*[green]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) auto=@movedTo(*[blue]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) text=Whenever you cast a green spell, you may put a 2/2 green Wolf creature token onto the battlefield. -- Whenever you cast a blue spell, you may put a 1/1 blue Bird creature token with flying onto the battlefield. mana={3}{GU}{GU}{GU} type=Enchantment [/card] tnum uses -source id & tnum (concatenated) --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 4 ++-- projects/mtg/include/AllAbilities.h | 16 +++++++++++++++- projects/mtg/src/MTGAbility.cpp | 12 +++++++++--- projects/mtg/src/MTGCardInstance.cpp | 14 -------------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index 09495192a..e3d19c04f 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -35313,8 +35313,8 @@ toughness=4 [/card] [card] name=Fable of Wolf and Owl -auto=@movedTo(*[green]|mystack):may token(-15208711) -auto=@movedTo(*[blue]|mystack):may token(-15208712) +auto=@movedTo(*[green]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) +auto=@movedTo(*[blue]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) text=Whenever you cast a green spell, you may put a 2/2 green Wolf creature token onto the battlefield. -- Whenever you cast a blue spell, you may put a 1/1 blue Bird creature token with flying onto the battlefield. mana={3}{GU}{GU}{GU} type=Enchantment diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index b7ebae78f..83c52bd2e 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -3547,6 +3547,7 @@ public: vector currentAbilities; MTGAbility * andAbility; Player * tokenReciever; + string cID; //by id ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, int tokenId,string starfound, WParsedInt * multiplier = NULL, int who = 0,bool aLivingWeapon = false) : @@ -3557,6 +3558,7 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; + cID = ""; } //by name, card still require valid card.dat info, this just makes the primitive code far more readable. token(Eldrazi scion) instead of token(-1234234)... ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string cardName, string starfound, WParsedInt * multiplier = NULL, @@ -3569,10 +3571,11 @@ public: if (card) name = card->data->getName(); battleReady = false; andAbility = NULL; + cID = ""; } //by construction ATokenCreator(GameObserver* observer, int _id, MTGCardInstance * _source, Targetable *, ManaCost * _cost, string sname, string stypes, int _power, int _toughness, - string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "") : + string sabilities, string starfound,WParsedInt * multiplier = NULL, int _who = 0,bool aLivingWeapon = false,string spt = "", string tnum = "") : ActivatedAbility(observer, _id, _source, _cost, 0),sabilities(sabilities),starfound(starfound), multiplier(multiplier), who(_who),aLivingWeapon(aLivingWeapon),spt(spt) { power = _power; @@ -3582,6 +3585,7 @@ public: aType = MTGAbility::STANDARD_TOKENCREATOR; battleReady = false; andAbility = NULL; + cID = tnum; if (!multiplier) this->multiplier = NEW WParsedInt(1); //TODO this is a copy/past of other code that's all around the place, everything should be in a dedicated parser class; @@ -3668,6 +3672,16 @@ public: else { myToken = NEW Token(name, source, power, toughness); + if(!cID.empty()) + { + string customId = ""; + ostringstream tokID; + tokID << abs(myToken->getId()); + customId.append(""+tokID.str()+cID); + customId = cReplaceString(customId," ",""); + WParsedInt newID(customId, NULL, source); + myToken->setMTGId(-newID.getValue()); + } list::iterator it; for (it = types.begin(); it != types.end(); it++) { diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 54771954b..e44aa86c9 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -2394,7 +2394,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string tokenDesc = splitToken[1]; vector tokenParameters = split(tokenDesc, ','); //lets try finding a token by card name. - if (splitToken[1].size() && tokenParameters.size() ==1) + if (splitToken[1].size() && tokenParameters.size() <3) { string cardName = splitToken[1]; MTGCard * safetycard = MTGCollection()->getCardByName(cardName); @@ -2420,7 +2420,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG string sname = tokenParameters[0]; string stypes = tokenParameters[1]; string spt = tokenParameters[2]; - + string cID = ""; //reconstructing string abilities from the split version, // then we re-split it again in the token constructor, // this needs to be improved @@ -2430,6 +2430,12 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG sabilities.append(","); sabilities.append(tokenParameters[i]); } + if(sabilities.find(",tnum:") != string::npos) + { + size_t begins = sabilities.find(",tnum:"); + cID = sabilities.substr(begins+6); + sabilities = cReplaceString(sabilities,",tnum:"+cID,""); + } int value = 0; if (spt.find("xx/xx") != string::npos) value = card->X / 2; @@ -2441,7 +2447,7 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG ATokenCreator * tok = NEW ATokenCreator( observer, id, card,target, NULL, sname, stypes, power + value, toughness + value, - sabilities, starfound, multiplier, who, aLivingWeapon, spt); + sabilities, starfound, multiplier, who, aLivingWeapon, spt, cID); tok->oneShot = 1; if(aLivingWeapon) tok->forceDestroy = 1; diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index 62bc67ea7..fdb37698d 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -149,20 +149,6 @@ void MTGCardInstance::copy(MTGCardInstance * card) backupTargets = this->backupTargets; storedCard = oldStored; miracle = false; - if (card->TokenAndAbility) - { - MTGAbility * andAbilityClone = card->TokenAndAbility->clone(); - andAbilityClone->target = this; - if(card->TokenAndAbility->oneShot) - { - andAbilityClone->resolve(); - SAFE_DELETE(andAbilityClone); - } - else - { - andAbilityClone->addToGame(); - } - } } MTGCardInstance::~MTGCardInstance() From c4ce2aa977350ec73243499b40967b043a3dde56 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 15:42:35 +0800 Subject: [PATCH 47/54] fix Forgotten Creation and Fable of Wolf And Owl Forgotten Creation typo and Fable of Wolf and Owl ability clashing --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index e3d19c04f..aee0fceaa 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -35313,8 +35313,11 @@ toughness=4 [/card] [card] name=Fable of Wolf and Owl -auto=@movedTo(*[green]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) -auto=@movedTo(*[blue]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) +auto=@movedTo(*[green;-blue]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) +auto=@movedTo(*[blue;-green]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) +auto=@movedTo(*[blue&green]|mystack):may token(Bird,Creature Bird,1/1,flying,blue,tnum:12) +auto=@movedTo(*[blue&green]|mystack):may token(Wolf,Creature Wolf,2/2,green,tnum:11) +auto=@movedTo(*[blue&green]|mystack):may name(create bird & wolf) token(Bird,Creature Bird,1/1,flying,blue,tnum:12) && token(Wolf,Creature Wolf,2/2,green,tnum:11) text=Whenever you cast a green spell, you may put a 2/2 green Wolf creature token onto the battlefield. -- Whenever you cast a blue spell, you may put a 1/1 blue Bird creature token with flying onto the battlefield. mana={3}{GU}{GU}{GU} type=Enchantment @@ -39508,8 +39511,8 @@ type=Land [/card] [card] name=Forgotten Creation -auto=cantbeblockedby(creature[power>3]) -auto=@each my upkeep:may name(draw discard) discard all(myhand) and draw:type:*[fresh]:mygraveyard) +abilities=skulk +auto=@each my upkeep:may name(discard hand) count(type:*:myhand) && reject all(*|myhand) && draw:countedamount controller text=Skulk (This creature can't be blocked by creatures with greater power.) -- At the beginning of your upkeep, you may discard all the cards in your hand. If you do, draw that many cards. mana={3}{U} type=Creature From b20fb61e1c65f21681af8e4caae56d8b1a2bea5d Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Mon, 8 Aug 2016 18:13:00 +0800 Subject: [PATCH 48/54] border & mask add border to alternate render, fix mask shadow --- projects/mtg/include/CardGui.h | 2 +- projects/mtg/src/CardGui.cpp | 48 +++++++++++++++------------------- 2 files changed, 22 insertions(+), 28 deletions(-) diff --git a/projects/mtg/include/CardGui.h b/projects/mtg/include/CardGui.h index 80aaf118c..ab73fb6c4 100644 --- a/projects/mtg/include/CardGui.h +++ b/projects/mtg/include/CardGui.h @@ -36,7 +36,7 @@ protected: static void RenderBig(MTGCard * card, const Pos& pos, bool thumb = false, bool noborder = false, bool smallerscale = false, bool ingame = false); static void RenderCountersBig(MTGCard * card, const Pos& pos, int drawMode = DrawMode::kNormal); - static void AlternateRender(MTGCard * card, const Pos& pos); + static void AlternateRender(MTGCard * card, const Pos& pos, bool noborder = false, bool smallerscale = false); static void TinyCropRender(MTGCard * card, const Pos& pos, JQuad * quad); static string FormattedData (string data, string replace, string value); static bool FilterCard (MTGCard * card,string filter); diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 55c27478a..38df08154 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -124,7 +124,7 @@ void CardGui::DrawCard(MTGCard* inCard, const Pos& inPosition, int inMode, bool RenderBig(inCard, inPosition, thumb, noborder, smallerscale, ingame); break; case DrawMode::kText: - AlternateRender(inCard, inPosition); + AlternateRender(inCard, inPosition, noborder, smallerscale); break; default: break; @@ -137,6 +137,10 @@ void CardGui::Render() WFont * mFont = game?game->getResourceManager()->GetWFont(Fonts::MAIN_FONT):WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT); JRenderer * renderer = JRenderer::GetInstance(); TargetChooser * tc = NULL; + //fake border and mask... + JQuadPtr fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); + JQuadPtr highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); + JQuadPtr fakemask = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); if (game) tc = game->getCurrentTargetChooser(); @@ -252,11 +256,6 @@ void CardGui::Render() if (quad) { quad->SetColor(ARGB(static_cast(actA),255,255,255)); - //fake border... - JQuadPtr fakeborder; - JQuadPtr highlightborder; - fakeborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); - highlightborder = game? game->getResourceManager()->GetQuad("white"):WResourceManager::Instance()->GetQuad("white"); if(fakeborder) { int rgb = isBlackBorder(setlist[card->setId].c_str())?15:240; @@ -265,7 +264,7 @@ void CardGui::Render() else fakeborder->SetColor(ARGB((int)(actA),rgb,rgb,rgb)); renderer->RenderQuad(fakeborder.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); - renderer->DrawRect(actX, (actY-yy),((28 * (actZ*zz) + 1) / 16),(40 * (actZ*zz) / 16),ARGB((int)(actA),240,240,240)); + //renderer->DrawRect(actX, (actY-yy),((28 * (actZ*zz) + 1) / 16),(40 * (actZ*zz) / 16),ARGB((int)(actA),240,240,240)); } //draw border for highlighting if (game) @@ -484,7 +483,7 @@ void CardGui::Render() if (shadow) { shadow->SetColor(ARGB(200,255,255,255)); - renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (25 * (actZ*zz) + 1) / 16, 37 * (actZ*zz) / 16); + renderer->RenderQuad(shadow.get(), actX, (actY-yy), actT, (28 * (actZ*zz) + 1) / 16, 40 * (actZ*zz) / 16); } } @@ -494,28 +493,18 @@ void CardGui::Render() if ((tc && tc->alreadyHasTarget(card)) || (game && card == game->mLayers->actionLayer()->currentActionCard))//paint targets red. { - float xy = yy>0.0f?2.0f:1.0f; - float modx = mHasFocus?xy:0.0f; - if (card->isTapped()) + if(fakemask) { - renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,255,0,0)); - } - else - { - renderer->FillRect(actX - (scale * quad->mWidth / 2),(actY-yy) - (scale * quad->mHeight / 2), scale * quad->mWidth, scale* quad->mHeight, ARGB(128,255,0,0)); + fakemask->SetColor(ARGB(150,255,0,0)); + renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); } } if(tc && tc->source && tc->source->view && tc->source->view->actY >= 1.3 && card == tc->source)//paint the source green while infocus. { - float xy = yy>0.0f?2.0f:1.0f; - float modx = mHasFocus?xy:0.0f; - if (tc->source->isTapped()) + if(fakemask) { - renderer->FillRect(actX - (scale * quad->mWidth / 2)-(7+modx),(actY-yy) - (scale * quad->mHeight / 2)+(7+modx),scale* quad->mHeight,scale * quad->mWidth, ARGB(128,0,255,0)); - } - else - { - renderer->FillRect(tc->source->view->actX - (scale * quad->mWidth / 2),(tc->source->view->actY-yy) - (scale * quad->mHeight / 2), scale*quad->mWidth, scale*quad->mHeight, ARGB(128,0,255,0)); + fakemask->SetColor(ARGB(150,0,255,0)); + renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); } } @@ -545,12 +534,13 @@ JQuadPtr CardGui::AlternateThumbQuad(MTGCard * card) return q; } -void CardGui::AlternateRender(MTGCard * card, const Pos& pos) +void CardGui::AlternateRender(MTGCard * card, const Pos& pos, bool noborder, bool smallerscale) { // Draw the "unknown" card model JRenderer * renderer = JRenderer::GetInstance(); JQuadPtr q; - + //set id + string cardsetname = setlist[card->setId].c_str(); float x = pos.actX; vectoritems = gModRules.cardgui.background; @@ -574,6 +564,10 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos) float scale = pos.actZ * 250 / q->mHeight; q->SetColor(ARGB((int)pos.actA,255,255,255)); + + //Draw border + DrawBorder(cardsetname, pos, x, noborder, smallerscale); + //render alternate renderer->RenderQuad(q.get(), x, pos.actY, pos.actT, scale, scale); } @@ -1186,7 +1180,7 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder //DebugTrace("Unable to fetch image: " << card->getImageName()); // If we come here, we do not have the picture. - AlternateRender(card, pos); + AlternateRender(card, pos, noborder, smallerscale); } void CardGui::DrawBorder(string cardsetname, const Pos& pos, float x, bool noborder, bool smallerscale) From eafb2558c27c9ce3aeacbe10c84e3580cc950a25 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 9 Aug 2016 00:38:33 +0800 Subject: [PATCH 49/54] adjust rendered card --- projects/mtg/src/CardGui.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 38df08154..76039122b 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -1168,11 +1168,19 @@ void CardGui::RenderBig(MTGCard* card, const Pos& pos, bool thumb, bool noborder DrawBorder(cardsetname, pos, x, noborder, smallerscale); //force smaller scale on alpha beta smallerscale = cardsetname=="LEA"||cardsetname=="LEB"?true:smallerscale; + float modxscale = (cardsetname =="UNH")?0.02f:0.008f; + float modyscale = (cardsetname =="UNH")?0.015f:0.0075f; + bool unh = (cardsetname =="UNH")?true:false; //Draw card - if(smallerscale) + if(smallerscale && !unh) renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale-0.001f, scale-0.001f); else - renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale, scale); + { + if(ingame) + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+modxscale, scale+modyscale); + else + renderer->RenderQuad(quad.get(), x, pos.actY, pos.actT, scale+0.002f, scale+0.0015f); + } RenderCountersBig(card, pos); return; } From de5414ec194d35a18129fd6ed3694787aaf7efc9 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Tue, 9 Aug 2016 02:58:48 +0800 Subject: [PATCH 50/54] Fix Etched Affinity Combo Fix Glimmervoid Combo Hint --- projects/mtg/bin/Res/ai/baka/deck110.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/bin/Res/ai/baka/deck110.txt b/projects/mtg/bin/Res/ai/baka/deck110.txt index 2d36404dd..fee23320a 100644 --- a/projects/mtg/bin/Res/ai/baka/deck110.txt +++ b/projects/mtg/bin/Res/ai/baka/deck110.txt @@ -1,7 +1,7 @@ #NAME:Etched Affinity #DESC:Modern URB Aggro #HINT:dontattackwith(creature[power<=0]) -#HINT:combo hold(Glimmervoid|myhand)^until(artifact|mybattlefield)^cast(Glimmervoid|myhand)^totalmananeeded({0}) +#HINT:combo hold(Glimmervoid|myhand)^cast(Glimmervoid|myhand)^restriction{type(land[fresh]|mybattlefield)~lessthan~1,type(artifact|mybattlefield)~morethan~0}^totalmananeeded({0}) #HINT:combo hold(Galvanic Blast|myhand)^cast(Galvanic Blast|myhand)^restriction{type(artifact|mybattlefield)~morethan~2,turn:3}^totalmananeeded({R}) #25 creatures From 151905c5f37de26019629471f2905ee960c99420 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 10 Aug 2016 01:54:24 +0800 Subject: [PATCH 51/54] Transform Trigger, Turnlimit for TrCardAddedtoZone Cleaned primitives, and fix SOI cards (remove workarounds) todo(recheck BFZ and OGW) --- .../bin/Res/sets/primitives/borderline.txt | 25 + projects/mtg/bin/Res/sets/primitives/mtg.txt | 612 +++++++++--------- projects/mtg/include/AllAbilities.h | 65 +- projects/mtg/include/MTGDefinitions.h | 3 +- projects/mtg/include/ManaCost.h | 1 + projects/mtg/src/AllAbilities.cpp | 22 +- projects/mtg/src/CardGui.cpp | 2 +- projects/mtg/src/GameObserver.cpp | 28 +- projects/mtg/src/MTGAbility.cpp | 24 +- projects/mtg/src/MTGCardInstance.cpp | 8 +- projects/mtg/src/MTGDefinitions.cpp | 3 +- projects/mtg/src/ManaCost.cpp | 24 + 12 files changed, 481 insertions(+), 336 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/borderline.txt b/projects/mtg/bin/Res/sets/primitives/borderline.txt index ca0beaf07..a6adce1f8 100644 --- a/projects/mtg/bin/Res/sets/primitives/borderline.txt +++ b/projects/mtg/bin/Res/sets/primitives/borderline.txt @@ -96,6 +96,19 @@ auto=counter(1/1,X) auto={3}:counter(1/1) #Not all player can use ability [/card] +#need doubler damage ability... +[card] +name=Goldnight Castigator +abilities=flying,haste +auto=@damaged(controller):damage:thatmuch controller +auto=@damaged(this):damage:thatmuch all(this) +text=Flying, haste -- If a source would deal damage to you, it deals double that damage to you instead. -- If a source would deal damage to Goldnight Castigator, it deals double that damage to Goldnight Castigator instead. +mana={2}{R}{R} +type=Creature +subtype=Angel +power=4 +toughness=9 +[/card] [card] name=Govern the Guildless target=creature[-multicolor] @@ -235,6 +248,18 @@ type=Sorcery text=Draw cards equal to the number of cards in target opponent's hand. Rebound (If you cast this spell from your hand, exile it as it resolves. At the beginning of your next upkeep, you may cast this card from exile without paying its mana cost.) [/card] [card] +name=Relentless Dead +auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot +auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot +text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. +mana={B}{B} +abilities=menace +type=Creature +subtype=Zombie +power=2 +toughness=2 +[/card] +[card] name=Sacellum Godspeaker auto={T}:foreach(creaure[power>4]|myhand) add{G} text={T}: Reveal any number of creature cards with power 5 or greater from your hand. Add {G} to your mana pool for each card revealed this way. diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index aee0fceaa..f57f8b4a6 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -566,17 +566,6 @@ power=3 toughness=2 [/card] [card] -name=Accursed Witch -auto=@targeted(this) from(opponentstack):add{1} opponent -auto=@movedTo(this|graveyard) from(battlefield):flip(Infectious Curse) && moveto(mybattlefield) -text=Spells your opponents cast that target Accursed Witch cost {1} less to cast. -- When Accursed Witch dies, return it to the battlefield transformed under your control attached to target opponent. -mana={3}{B} -type=Creature -subtype=Human Shaman -power=4 -toughness=2 -[/card] -[card] name=Acid Rain auto=destroy all(forest) text=Destroy all Forests. @@ -1325,7 +1314,7 @@ toughness=4 name=Agent of Erebos auto=choice target(player) moveTo(exile) all(*|targetedpersonsgraveyard) auto=@movedto(enchantment|mybattlefield):choice target(player) moveTo(exile) all(*|targetedpersonsgraveyard) -text=Constellation ? Whenever Agent of Erebos or another enchantment enters the battlefield under your control, exile all cards from target player's graveyard. +text=Constellation — Whenever Agent of Erebos or another enchantment enters the battlefield under your control, exile all cards from target player's graveyard. mana={3}{B} type=Enchantment Creature subtype=Zombie @@ -1784,7 +1773,7 @@ toughness=5 [card] name=Akoum Firebird abilities=flying,haste,mustattack -text=Flying, haste -- Akoum Firebird attacks each turn if able. -- Landfall ? Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield. +text=Flying, haste -- Akoum Firebird attacks each turn if able. -- Landfall — Whenever a land enters the battlefield under your control, you may pay {4}{R}{R}. If you do, return Akoum Firebird from your graveyard to the battlefield. autograveyard=@movedto(land|mybattlefield):Pay({4}{R}{R}) name(recover Firebird) moveto(mybattlefield) mana={2}{R}{R} type=Creature @@ -1795,7 +1784,7 @@ toughness=3 [card] name=Akoum Flameseeker auto={T(ally|myBattlefield)}{t}:may name(discard and draw) reject notatarget(*|myhand) && transforms((,newability[draw:1 controller])) forever -text=Cohort ? {T}, Tap an untapped Ally you control: Discard a card. If you do, draw a card. +text=Cohort — {T}, Tap an untapped Ally you control: Discard a card. If you do, draw a card. mana={2}{R} type=Creature subtype=Human Shaman Ally @@ -1807,7 +1796,7 @@ name=Akoum Hellkite abilities=flying auto=@movedTo(land[-mountain]|myBattlefield):damage:1 target(creature,player) auto=@movedTo(land[mountain]|myBattlefield):damage:2 target(creature,player) -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, Akoum Hellkite deals 1 damage to target creature or player. If that land is a Mountain, Akoum Hellkite deals 2 damage to that creature or player instead. mana={4}{R}{R} type=Creature subtype=Dragon @@ -1826,7 +1815,7 @@ type=Land [card] name=Akoum Stonewaker auto=@movedTo(land|myBattlefield):pay({2}{R}) token(Elemental,Creature Elemental,3/1,trample,haste,unearth,red) controller -text=Landfall ? Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step. +text=Landfall — Whenever a land enters the battlefield under your control, you may pay {2}{R}. If you do, put a 3/1 red Elemental creature token with trample and haste onto the battlefield. Exile that token at the beginning of the next end step. mana={1}{R} type=Creature subtype=Human Shaman @@ -1846,7 +1835,7 @@ toughness=1 [card] name=Akroan Conscriptor auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):name(gain control of target creature until end of turn) target(other creature|battlefield) moveTo(mybattlefield) and!( transforms((,newability[phaseaction[endofturn sourceinplay] moveTo(ownerbattlefield)],newability[untap],haste)) ueot )! -text=Heroic ? Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn. +text=Heroic — Whenever you cast a spell that targets Akroan Conscriptor, gain control of another target creature until end of turn. Untap that creature. It gains haste until end of turn. mana={4}{R} type=Creature subtype=Human Shaman @@ -1856,7 +1845,7 @@ toughness=2 [card] name=Akroan Crusader auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):token(Soldier,Creature Soldier,1/1,red,haste) controller -text=Heroic ? Whenever you cast a spell that targets Akroan Crusader, put a 1/1 red Soldier creature token with haste onto the battlefield. +text=Heroic — Whenever you cast a spell that targets Akroan Crusader, put a 1/1 red Soldier creature token with haste onto the battlefield. mana={R} type=Creature subtype=Human Soldier @@ -1899,7 +1888,7 @@ toughness=1 name=Akroan Line Breaker auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):2/0 ueot auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):intimidate ueot -text=Heroic ? Whenever you cast a spell that targets Akroan Line Breaker, Akroan Line Breaker gets +2/+0 and gains intimidate until end of turn. +text=Heroic — Whenever you cast a spell that targets Akroan Line Breaker, Akroan Line Breaker gets +2/+0 and gains intimidate until end of turn. mana={2}{R} type=Creature subtype=Human Warrior @@ -2523,7 +2512,6 @@ toughness=5 [/card] [card] name=Alpine Grizzly -text= mana={2}{G} type=Creature subtype=Bear @@ -5164,19 +5152,20 @@ type=Artifact [card] name=Arlinn Kord auto=counter(0/0,3,loyalty) -auto={C(0/0,1,Loyalty)}:target(creature) 2/2 ueot -auto={C(0/0,0,Loyalty)}:token(Wolf,creature Wolf,2/2,green) && flip(Arlinn, Embraced by the Moon) -text=+1: target creature gets +2/+2 vigilance and haste until end of turn -- 0: put a 2/2 green wolf token onto the battlefield, transform Arlinn Kord +auto={C(0/0,1,Loyalty)}:name(+1: add 1 loyalty) donothing restriction{compare(cantargetcre)~lessthan~1} +auto={C(0/0,1,Loyalty)}:name(+1: 2/2 creature) target(creature) 2/2 ueot +auto={C(0/0,0,Loyalty)}:name(0: wolf token) token(Wolf,creature Wolf,2/2,green) && flip(Arlinn, Embraced by the Moon) +text=+1: Until end of turn, up to one target creature gets +2/+2 and gains vigilance and haste. -- 0: Put a 2/2 green Wolf creature token onto the battlefield. Transform Arlinn Kord. mana={2}{R}{G} type=Planeswalker subtype=Arlinn [/card] [card] name=Arlinn, Embraced by the Moon -auto={C(0/0,1,Loyalty)}:all(creature|mybattlefield) 1/1 ueot && all(creature|mybattlefield) trample ueot -auto={C(0/0,-1,Loyalty)}:damage:3 target(creature,player) && all(this) flip(Arlinn, Embraced by the Moon) -auto={C(0/0,-6,Loyalty)}:name(emblem) emblem transforms((,newability[lord(creature|mybattlefield) {T}:target(creature,player) dynamicability],newability[lord(creature|mybattlefield) haste])) forever dontremove -text=+1: creatures you control get +1/+1 and trample until end of turn -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player, flip -- -6: you get an emblem with 'creatures you control have haste and '{T}: this creature deals damage equal to its power to target creature or player' +auto={C(0/0,1,Loyalty)}:name(+1: 1/1 & trample) all(creature|mybattlefield) 1/1 ueot && all(creature|mybattlefield) trample ueot +auto={C(0/0,-1,Loyalty)}:name(-1: damage & transform) damage:3 target(creature,player) && all(this) flip(Arlinn Kord) +auto={C(0/0,-6,Loyalty)}:name(-6: emblem) emblem transforms((,newability[lord(creature|mybattlefield) {T}:target(creature,player) dynamicability],newability[lord(creature|mybattlefield) haste])) forever dontremove +text=+1: Creatures you control get +1/+1 and gain trample until end of turn. -- -1: Arlinn, Embraced by the Moon deals 3 damage to target creature or player. Transform Arlinn, Embraced by the Moon. -- -6: You get an emblem with "Creatures you control have haste and ‘{T}: This creature deals damage equal to its power to target creature or player.'" type=Planeswalker subtype=Arlinn color=red,green @@ -5409,7 +5398,6 @@ toughness=3 [/card] [card] name=Armored Wolf-Rider -text= mana={3}{G}{W} type=Creature subtype=Elf Knight @@ -5642,7 +5630,6 @@ toughness=3 [card] name=Ascended Lawmage abilities=flying,opponentshroud -text= mana={2}{W}{U} type=Creature subtype=Vedalkan Wizard @@ -5833,6 +5820,15 @@ power=4 toughness=4 [/card] [card] +name=Ashmouth Blade +auto={3}:equip +auto=teach(creature) 3/3 +auto=teach(creature) first strike +text=Equipped creature gets +3/+3 and has first strike. -- Equip {3} +type=Artifact +subtype=Equipment +[/card] +[card] name=Ashmouth Hound auto=@combat(blocking,blocked) source(this) from(creature):all(trigger[from]) damage:1 text=Whenever Ashmouth Hound blocks or becomes blocked by a creature, Ashmouth Hound deals 1 damage to that creature. @@ -6132,7 +6128,7 @@ type=Artifact [card] name=Atarka Pummeler auto={3}{r}{r}:all(creature|mybattlefield) menace usot restriction{compare(powertotalinplay)~morethan~7} -text=Formidable ? {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creatures you control have total power 8 or greater. (They can't be blocked except by two or more creatures.) +text=Formidable — {3}{R}{R}: Creatures you control gain menace until end of turn. Activate this ability only if creatures you control have total power 8 or greater. (They can't be blocked except by two or more creatures.) mana={4}{R} type=Creature subtype=Ogre Warrior @@ -7973,7 +7969,6 @@ type=Instant [/card] [card] name=Bane Alley Blackguard -text= mana={1}{B} type=Creature subtype=Human Rogue @@ -9376,7 +9371,7 @@ type=Enchantment [card] name=Behold the Beyond auto=reject all(*|myhand) -auto=moveto(myhand) target(*|mylibrary) +auto=moveto(myhand) target(<3>*|mylibrary) text=Discard your hand. Search your library for three cards and put those cards into your hand. Then shuffle your library. mana={5}{B}{B} type=Sorcery @@ -9431,7 +9426,7 @@ toughness=2 [card] name=Belligerent Whiptail auto=@movedTo(land|myBattlefield):first strike ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Belligerent Whiptail gains first strike until end of turn. mana={3}{R} type=Creature subtype=Wurm @@ -9453,7 +9448,7 @@ toughness=3 [card] name=Bellowing Saddlebrute auto=ifnot raid then life:-4 controller -text=Raid ? When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn. +text=Raid — When Bellowing Saddlebrute enters the battlefield, you lose 4 life unless you attacked with a creature this turn. mana={3}{B} type=Creature subtype=Orc Warrior @@ -11393,7 +11388,7 @@ toughness=2 name=Bloodcrazed Hoplite auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):counter(1/1,1) auto=@counteradded(1/1) from(this):counter(1/1,-1) target(creature|opponentbattlefield) -text=Heroic ? Whenever you cast a spell that targets Bloodcrazed Hoplite, put a +1/+1 counter on it. -- Whenever a +1/+1 counter is placed on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls. +text=Heroic — Whenever you cast a spell that targets Bloodcrazed Hoplite, put a +1/+1 counter on it. -- Whenever a +1/+1 counter is placed on Bloodcrazed Hoplite, remove a +1/+1 counter from target creature an opponent controls. mana={1}{B} type=Creature subtype=Human Soldier @@ -11766,7 +11761,7 @@ toughness=3 name=Bloodsoaked Champion abilities=cantblock autograveyard={1}{B}:moveTo(mybattlefield) restriction{raid} -text=Bloodsoaked Champion can't block. -- Raid ? {1}{B}: Return Bloodsoaked Champion from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn. +text=Bloodsoaked Champion can't block. -- Raid — {1}{B}: Return Bloodsoaked Champion from your graveyard to the battlefield. Activate this ability only if you attacked with a creature this turn. mana={B} type=Creature subtype=Human Warrior @@ -13084,7 +13079,8 @@ name=Bound by Moonsilver target=creature auto=cantattack auto=cantblock -auto={S(other *|mybattlefield)}:rehook target(creature) assorcery +auto=canttransform +auto={S(other *|mybattlefield)}:rehook target(creature) assorcery limit:1 text=Enchant creature -- Enchanted creature can't attack, block, or transform. -- Sacrifice another permanent: Attach Bound by Moonsilver to target creature. Activate this ability only any time you could cast a sorcery and only once each turn. mana={2}{W} type=Enchantment @@ -13166,7 +13162,7 @@ auto={1}{G}{T}:name(+1/+1 counter) counter(1/1,1) target(creature) auto={1}{G}{T}:name(2 damage to flyer) damage:2 target(creature[flying]) auto={1}{G}{T}:name(gain 3 life) life:3 controller auto={1}{G}{T}:name(put up to 4 on bottom) bottomoflibrary target(*|mygraveyard) -text=Attacking creatures you control have deathtouch. -- {1}{G},{T}: Choose one ? Put a +1/+1 counter on target creature; or Bow of Nylea deals 2 damage to target creature with flying; or you gain 3 life; or put up to four target cards from your graveyard on the bottom of your library in any order. +text=Attacking creatures you control have deathtouch. -- {1}{G},{T}: Choose one — Put a +1/+1 counter on target creature; or Bow of Nylea deals 2 damage to target creature with flying; or you gain 3 life; or put up to four target cards from your graveyard on the bottom of your library in any order. mana={1}{G}{G} type=Legendary Enchantment Artifact [/card] @@ -13832,7 +13828,7 @@ type=Sorcery name=Brilliant Spectrum auto=draw:converge auto=reject notatarget(<2>*|myhand) -text=Converge ? Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards. +text=Converge — Draw X cards, where X is the number of colors of mana spent to cast Brilliant Spectrum. Then discard two cards. mana={3}{U} type=Sorcery [/card] @@ -13925,7 +13921,7 @@ type=Instant [card] name=Bring to Light auto=notatarget(*[creature;instant;sorcery;manacost<=converge]|mylibrary) moveto(exile) and!( transforms((,newability[may name(cast for free) activate name(cast for free) castcard(normal)])) oneshot)! -text=Converge ? Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost. +text=Converge — Search your library for a creature, instant, or sorcery card with converted mana cost less than or equal to the number of colors of mana spent to cast Bring to Light, exile that card, then shuffle your library. You may cast that card without paying its mana cost. mana={3}{G}{U} type=Sorcery [/card] @@ -17730,7 +17726,7 @@ toughness=3 name=Chasm Guide auto=choice all(creature|mybattlefield) haste ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) haste ueot -text=Rally ? Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn. +text=Rally — Whenever Chasm Guide or another Ally enters the battlefield under your control, creatures you control gain haste until end of turn. mana={3}{R} type=Creature subtype=Goblin Scout Ally @@ -18051,7 +18047,7 @@ toughness=2 [/card] [card] name=Choked Estuary -auto=aslongas(island,swamp|myhand)~lessthan~1 tap(noevent) +auto=aslongas(island,swamp|myhand) tap(noevent) <1 auto={T}:add{U} auto={T}:add{B} text=As Choked Estuary enters the battlefield, you may reveal an Island or Swamp card from your hand. If you don't, Choked Estuary enters the battlefield tapped. -- {T}: Add {U} or {B} to your mana pool. @@ -18560,7 +18556,7 @@ type=Enchantment name=Citadel Siege auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my combatbegins:counter(1/1.2) target(creature|mybattlefield)])) forever auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each opponent combatbegins:tap target(creature|opponentbattlefield)])) forever -text=As Citadel Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of combat on your turn, put two +1/+1 counters on target creature you control. -- ? Dragons ? At the beginning of combat on each opponent's turn, tap target creature that player controls. +text=As Citadel Siege enters the battlefield, choose Khans or Dragons. -- — Khans — At the beginning of combat on your turn, put two +1/+1 counters on target creature you control. -- — Dragons — At the beginning of combat on each opponent's turn, tap target creature that player controls. mana={2}{W}{W} type=Enchantment [/card] @@ -18958,7 +18954,6 @@ type=Instant [/card] [card] name=Clip Wings -auto=sacrifice notatarget(creature[flying]|mybattlefield) auto=ability$! sacrifice notatarget(creature[flying]|mybattlefield) !$ opponent text=Each opponent sacrifices a creature with flying. mana={1}{G} @@ -19864,7 +19859,7 @@ auto=aslongas(island|mybattlefield) lord(creature|opponentbattlefield) transform auto=aslongas(mountain|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) auto=aslongas(swamp|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) auto=aslongas(plains|mybattlefield) lord(creature|opponentbattlefield) transforms((,newability[attackcost:1])) -text=Domain ? Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types among lands you control. +text=Domain — Creatures can't attack you unless their controller pays {X} for each creature he or she controls that's attacking you, where X is the number of basic land types among lands you control. mana={3}{U} type=Enchantment [/card] @@ -20046,6 +20041,15 @@ mana={3}{U} type=Instant [/card] [card] +name=Compelling Deterrence +target=*[-land] +auto=moveto(ownerhand) +auto=if type(zombie|mybattlefield)~morethan~0 then ability$!name(discard) target(*|myhand) reject!$ targetcontroller +text=Return target nonland permanent to its owner's hand. Then that player discards a card if you control a Zombie. +mana={1}{U} +type=Instant +[/card] +[card] name=Complete Disregard target=creature[power<=3]|battlefield auto=moveto(exile) @@ -20481,7 +20485,7 @@ subtype=Aura name=Consuming Sinkhole auto=choice target(creature[land]) moveto(exile) auto=choice damage:4 target(player) -text=Devoid (This card has no color.) -- Choose one ? -- ? Exile target land creature. -- ? Consuming Sinkhole deals 4 damage to target player. +text=Devoid (This card has no color.) -- Choose one — -- — Exile target land creature. -- — Consuming Sinkhole deals 4 damage to target player. mana={3}{R} abilities=devoid type=Instant @@ -21658,7 +21662,7 @@ name=Crater's Claws target=creature,player auto=if type(creature[power=>4]|mybattlefield) then damage:2 auto=damage:X -text=Crater's Claws deals X damage to target creature or player. -- Ferocious ? Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. +text=Crater's Claws deals X damage to target creature or player. -- Ferocious — Crater's Claws deals X plus 2 damage to that creature or player instead if you control a creature with power 4 or greater. mana={R}{X} type=Sorcery [/card] @@ -21715,7 +21719,7 @@ toughness=2 [card] name=Crawling Sensation auto=@each my upkeep:may deplete:2 controller -auto=@movedto(land|mygraveyard) restriction{thisturn(land|mygraveyard)~lessthan~1}:token(Insect,creature Insect,1/1,green) +auto=@movedto(land|mygraveyard) turnlimited:token(Insect,creature Insect,1/1,green) text=At the beginning of your upkeep, you may put the top two cards of your library into your graveyard. -- Whenever one or more land cards are put into your graveyard from anywhere for the first time each turn, put a 1/1 green Insect creature token onto the battlefield. mana={2}{G} type=Enchantment @@ -22161,7 +22165,7 @@ toughness=4 name=Crow of Dark Tidings abilities=flying auto=deplete:2 controller -auto=@movedto(mygraveyard):deplete:2 controller +auto=@movedTo(this|graveyard) from(battlefield):deplete:2 controller text=Flying -- When Crow of Dark Tidings enters the battlefield or dies, put the top two cards of your library into your graveyard. mana={2}{B} type=Creature @@ -23295,7 +23299,6 @@ toughness=3 [/card] [card] name=Cyclops of One-Eyed Pass -text= mana={2}{R}{R} type=Creature subtype=Cyclops @@ -23695,6 +23698,16 @@ power=3 toughness=1 [/card] [card] +name=Daring Sleuth +auto=@sacrificed(clue|mybattlefield):flip(Bearer of Overwhelming Truths) +text=When you sacrifice a Clue, transform Daring Sleuth. +mana={1}{U} +type=Creature +subtype=Human Rogue +power=2 +toughness=1 +[/card] +[card] name=Dark Banishing target=creature[-black] auto=bury @@ -23726,7 +23739,7 @@ target=creature auto=regenerate auto=draw:1 controller auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then regenerate all(other creature|mybattlefield) -text=Regenerate target creature. Draw a card. (The next time the creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. +text=Regenerate target creature. Draw a card. (The next time the creature would be destroyed this turn, it isn't. Instead tap it, remove all damage from it, and remove it from combat.) -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, also regenerate each other creature you control. mana={2}{B} type=Instant [/card] @@ -23803,7 +23816,7 @@ type=Sorcery name=Dark Petition auto=moveto(myhand) notatarget(*|mylibrary) auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then add{B}{B}{B} -text=Search your library for a card and put that card into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. +text=Search your library for a card and put that card into your hand. Then shuffle your library. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, add {B}{B}{B} to your mana pool. mana={3}{B}{B} type=Sorcery [/card] @@ -24258,7 +24271,6 @@ toughness=3 [/card] [card] name=Dauntless Cathar -abilities=flying autograveyard={1}{W}{e}:token(Spirit,creature Spirit,1/1,white,flying) assorcery text={1}{W}, Exile Dauntless Cathar from your graveyard: Put a 1/1 white Spirit creature token with flying onto the battlefield. Activate this ability only any time you could cast a sorcery. mana={2}{W} @@ -25389,7 +25401,8 @@ type=Artifact [card] name=Declaration in Stone target=creature -auto=transforms((,newability[all(*[share!name!]) moveto(exile)],newability[moveto(exile)],newability[token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller])) +auto=all(*[-token;share!name!]|targetcontrollerbattlefield) moveto(exile) and!( token(Clue,Artifact Clue,0/0) targetcontroller and!( transforms((,newability[{S}{2}:draw:1])) forever )! )! +auto=all(*[token;share!name!]|targetcontrollerbattlefield) moveto(exile) text=Exile target creature and all other creatures its controller controls with the same name as that creature. That player investigates for each nontoken creature exiled this way. mana={1}{W} type=Sorcery @@ -26301,7 +26314,7 @@ type=Enchantment [card] name=Deny Existence target=creature|stack -auto=fizzle and exiledeath +auto=fizzleto(exile) text=Counter target creature spell. If that spell is countered this way, exile it instead of putting it into its owner's graveyard. mana={2}{U} type=Instant @@ -26387,7 +26400,7 @@ toughness=4 [card] name=Descend upon the Sinful auto=moveto(exile) all(creature) -auto=token(Angel,creature angel,4/4,white,flying) controller restriction{delirium} +auto=if delirium then token(Angel,creature angel,4/4,white,flying) controller text=Exile all creatures. -- Delirium Put a 4/4 white Angel creature token with flying onto the battlefield if there are four or more card types among cards in your graveyard. mana={4}{W}{W} type=Sorcery @@ -27480,7 +27493,7 @@ auto={1}{E(*[instant;sorcery]|mygraveyard)}:name(counter noncreature unless pay auto={1}{E(*[instant;sorcery]|mygraveyard)}:1/1 ueot auto={1}{E(*[instant;sorcery]|mygraveyard)}:tap target(creature) auto={1}{E(*[instant;sorcery]|mygraveyard)}:untap target(creature) -text={1}, Exile an instant or sorcery card from your graveyard: Choose one ? -- ? Counter target noncreature spell unless its controller pays {2}. -- ? Disciple of the Ring gets +1/+1 until end of turn. -- ? Tap target creature. -- ? Untap target creature. +text={1}, Exile an instant or sorcery card from your graveyard: Choose one — -- — Counter target noncreature spell unless its controller pays {2}. -- — Disciple of the Ring gets +1/+1 until end of turn. -- — Tap target creature. -- — Untap target creature. mana={3}{U}{U} type=Creature subtype=Human Wizard @@ -28241,7 +28254,7 @@ toughness=3 name=Doomwake Giant auto=all(creature|opponentbattlefield) -1/-1 auto=@movedTo(enchantment|myBattlefield):all(creature|opponentbattlefield) -1/-1 -text=Constellation ? Whenever Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn. +text=Constellation — Whenever Doomwake Giant or another enchantment enters the battlefield under your control, creatures your opponents control get -1/-1 until end of turn. mana={4}{B} type=Enchantment Creature subtype=Giant @@ -29080,7 +29093,7 @@ toughness=3 [card] name=Drana's Chosen auto={T(ally|myBattlefield)}{t}:token(Zombie,Creature Zombie,2/2,black) and!( tap(noevent) )! -text=Cohort ? {T}, Tap an untapped Ally you control: Put a 2/2 black Zombie creature token onto the battlefield tapped. +text=Cohort — {T}, Tap an untapped Ally you control: Put a 2/2 black Zombie creature token onto the battlefield tapped. mana={3}{B} type=Creature subtype=Vampire Shaman Ally @@ -29246,7 +29259,7 @@ type=Sorcery name=Dreadbringer Lampads auto=name(intimidate) target(creature) transforms((,newability[intimidate])) ueot auto=@movedTo(enchantment|myBattlefield):name(intimidate) target(creature) transforms((,newability[intimidate])) ueot -text=Constellation ? Whenever Dreadbringer Lampads or another enchantment enters the battlefield under your control, target creature gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.) +text=Constellation — Whenever Dreadbringer Lampads or another enchantment enters the battlefield under your control, target creature gains intimidate until end of turn. (It can't be blocked except by artifact creatures and/or creatures that share a color with it.) mana={4}{B} type=Enchantment Creature subtype=Nymph @@ -30005,9 +30018,9 @@ toughness=4 [/card] [card] name=Drownyard Temple -auto={T}:Add{1} +auto={T}:Add{C} autograveyard={3}:moveto(mybattlefield) and!(tap(noevent))! -text={T}: Add {1} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. +text={T}: Add {C} to your mana pool. -- {3}: Return Drownyard Temple from your graveyard to the battlefield tapped. type=Land [/card] [card] @@ -30468,7 +30481,7 @@ toughness=1 [/card] [card] name=Duskwatch Recruiter -auto={2}{G}:reveal:4 optionone name(Get Creature) target(creature|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<4>*|reveal) bottomoflibrary optiontwoend revealend +auto={2}{G}:reveal:3 optionone name(Get Creature) target(creature|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<3>*|reveal) bottomoflibrary optiontwoend revealend auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Krallenhorde Howler) text={2}{G}: Look at the top three cards of your library. You may reveal a creature card from among them and put it into your hand. Put the rest on the bottom of your library in any order. -- At the beginning of each upkeep, if no spells were cast last turn, transform Duskwatch Recruiter. mana={1}{G} @@ -31180,7 +31193,7 @@ toughness=1 [/card] [card] name=Ebony Charm -auto=choice life:-1 opponent && life:1 controller +auto=choice target(opponent) life:-1 && life:1 controller auto=choice target(*|graveyard) moveTo(exile) auto=aslongas(creature|battlefield) choice fear target(creature) text=Choose one - Target opponent loses 1 life and you gain 1 life; or exile up to three target cards from a single graveyard; or target creature gains fear until end of turn. (It can't be blocked except by artifact creatures and/or black creatures.) @@ -31341,7 +31354,7 @@ toughness=2 [card] name=Eerie Interlude target=creature|mybattlefield -auto=blink ueot +auto=(blink) text=Exile any number of target creatures you control. Return those cards to the battlefield under their owner's control at the beginning of the next end step. mana={2}{W} type=Instant @@ -31382,7 +31395,7 @@ subtype=Shapeshifter name=Eidolon of Blossoms auto=draw:1 auto=@movedTo(enchantment|myBattlefield):draw:1 -text=Constellation ? Whenever Eidolon of Blossoms or another enchantment enters the battlefield under your control, draw a card. +text=Constellation — Whenever Eidolon of Blossoms or another enchantment enters the battlefield under your control, draw a card. mana={2}{G}{G} type=Enchantment Creature subtype=Spirit @@ -32670,7 +32683,7 @@ name=Embodiment of Fury abilities=trample auto=lord(creature[land]|mybattlefield) trample auto=@movedTo(land|mybattlefield):target(land|mybattlefield) transforms((Elemental Land Creature,3/3,newability[haste])) ueot -text=Trample -- Land creatures you control have trample. -- Landfall ? Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. +text=Trample -- Land creatures you control have trample. -- Landfall — Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. mana={3}{R} type=Creature subtype=Elemental @@ -32682,7 +32695,7 @@ name=Embodiment of Insight abilities=vigilance auto=lord(creature[land]|mybattlefield) vigilance auto=@movedTo(land|mybattlefield):target(land|mybattlefield) transforms((Elemental Land Creature,3/3,newability[haste])) ueot -text=Vigilance -- Land creatures you control have vigilance. -- Landfall ? Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. +text=Vigilance -- Land creatures you control have vigilance. -- Landfall — Whenever a land enters the battlefield under your control, you may have target land you control become a 3/3 Elemental creature with haste until end of turn. It's still a land. mana={4}{G} type=Creature subtype=Elemental @@ -32752,7 +32765,7 @@ name=Emeria Shepherd abilities=flying auto=@movedTo(land[-plains]|myBattlefield):moveto(myhand) target(*[-land;-instant;-sorcery]|mygraveyard) auto=@movedTo(land[plains]|myBattlefield):moveto(mybattlefield) target(*[-land;-instant;-sorcery]|mygraveyard) -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, you may return target nonland permanent card from your graveyard to your hand. If that land is a Plains, you may return that nonland permanent card to the battlefield instead. mana={5}{W}{W} type=Creature subtype=Angel @@ -33792,7 +33805,7 @@ type=Legendary Enchantment [card] name=Erdwal Illuminator abilities=flying -auto=@movedto(clue|mybattlefield) restriction{type(clue[fresh]|mybattlefield)~equalto~1}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! +auto=@movedto(clue|mybattlefield) turnlimited:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! text=Flying -- Whenever you investigate for the first time each turn, investigate an additional time. mana={1}{U} type=Creature @@ -34150,8 +34163,8 @@ subtype=Aura [card] name=Essence Flux target=creature|mybattlefield -auto=blink ueot -auto=if type(mytgt[spirit]) then counter(1/1,1) +auto=if cantargetcard(*[spirit]) then moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield)],newability[counter(1/1.1)])) oneshot )! +auto=if cantargetcard(*[-spirit]) then moveto(exile) and!(moveto(ownerbattlefield))! text=Exile target creature you control, then return that card to the battlefield under its owner's control. If it's a Spirit, put a +1/+1 counter on it. mana={U} type=Instant @@ -34782,7 +34795,7 @@ type=Instant name=Exert Influence target=creature[power<=converge]|battlefield auto=moveto(mybattlefield) -text=Converge ? Gain control of target creature if its power is less than or equal to the number of colors of mana spent to cast Exert Influence. +text=Converge — Gain control of target creature if its power is less than or equal to the number of colors of mana spent to cast Exert Influence. mana={4}{U} type=Sorcery [/card] @@ -35046,7 +35059,7 @@ name=Exquisite Firecraft target=creature,player auto=damage:4 auto=aslongas(*[instant;sorcery]|mygraveyard) nofizzle >1 -text=Exquisite Firecraft deals 4 damage to target creature or player. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Exquisite Firecraft can't be countered by spells or abilities. +text=Exquisite Firecraft deals 4 damage to target creature or player. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Exquisite Firecraft can't be countered by spells or abilities. mana={1}{R}{R} type=Sorcery [/card] @@ -36658,7 +36671,6 @@ subtype=Aura [/card] [card] name=Feral Krushok -text= mana={4}{G} type=Creature subtype=Beast @@ -37097,7 +37109,7 @@ toughness=2 name=Fiery Impulse target=creature auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then damage:3 else damage:2 -text=Fiery Impulse deals 2 damage to target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Fiery Impulse deals 3 damage to that creature instead. +text=Fiery Impulse deals 2 damage to target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Fiery Impulse deals 3 damage to that creature instead. mana={R} type=Instant [/card] @@ -37564,7 +37576,7 @@ toughness=3 name=Firemantle Mage auto=all(ally|mybattlefield) menace ueot auto=@movedTo(other ally|myBattlefield):may lord(ally|myBattlefield) all(ally|mybattlefield) menace ueot -text=Rally ? Whenever Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) +text=Rally — Whenever Firemantle Mage or another Ally enters the battlefield under your control, creatures you control gain menace until end of turn. (A creature with menace can't be blocked except by two or more creatures.) mana={2}{R} type=Creature subtype=Human Shaman Ally @@ -37864,8 +37876,8 @@ type=Sorcery [card] name=Flameblade Angel abilities=flying -auto=@damaged(controller):may damage:1 opponent -auto=@damaged(creature|mybattlefield):may damage:1 opponent +auto=@damaged(controller) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile,opponenthand):may damage:1 opponent +auto=@damaged(*|mybattlefield) from(*|opponentbattlefield,opponentstack,opponentgraveyard,opponentlibrary,opponentexile,opponenthand):may damage:1 opponent text=Flying -- Whenever a source an opponent controls deals damage to you or a permanent you control, you may have Flameblade Angel deal 1 damage to that source's controller. mana={4}{R}{R} type=Creature @@ -38374,7 +38386,7 @@ toughness=1 [card] name=Fleeting Memories auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -auto=@movedto(clue|mygraveyard):deplete:3 opponent +auto=@sacrificed(clue|mybattlefield):target(player) deplete:3 text=When Fleeting Memories enters the battlefield, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- Whenever you sacrifice a Clue, target player puts the top three cards of his or her library into his or her graveyard. mana={2}{U} type=Enchantment @@ -39464,7 +39476,7 @@ toughness=1 name=Forgeborn Oreads auto=damage:1 target(creature,player) auto=@movedTo(enchantment|myBattlefield):damage:1 target(creature,player) -text=Constellation ? Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. +text=Constellation — Whenever Forgeborn Oreads or another enchantment enters the battlefield under your control, Forgeborn Oreads deals 1 damage to target creature or player. mana={2}{R}{R} type=Enchantment Creature subtype=Nymph @@ -40603,7 +40615,7 @@ subtype=Aura [/card] [card] name=Furtive Homunculus -auto=cantbeblockedby(creature[power>2]) +abilities=skulk text=Skulk (This creature can't be blocked by creatures with greater power.) mana={1}{U} type=Creature @@ -41460,6 +41472,15 @@ power=3 toughness=5 [/card] [card] +name=Geistblast +target=creature,player +auto=damage:2 +autograveyard={2}{U}{e}:name(copy spell) target(instant,sorcery|mystack) castcard(copied noevent) +text=Geistblast deals 2 damage to target creature or player. -- {2}{U}, Exile Geistblast from your graveyard: Copy target instant or sorcery spell you control. You may choose new targets for the copy. +mana={2}{R} +type=Instant +[/card] +[card] name=Geistcatcher's Rig auto=may damage:4 target(creature[flying]) oneshot text=When Geistcatcher's Rig enters the battlefield, you may have it deal 4 damage to target creature with flying. @@ -41745,7 +41766,7 @@ type=Land [card] name=Geralf's Masterpiece abilities=flying -auto=foreach(*|myhand):-1/-1 +auto=foreach(*|myhand) -1/-1 autograveyard={3}{U}{discard(*|myhand)}{discard(*|myhand)}{discard(*|myhand)}:moveto(myhand) and!(tap(noevent))! text=Flying -- Geralf's Masterpiece gets -1/-1 for each card in your hand. -- {3}{U}, Discard three cards: Return Geralf's Masterpiece from your graveyard to the battlefield tapped. mana={3}{U}{U} @@ -41873,7 +41894,7 @@ toughness=4 name=Geyserfield Stalker abilities=menace auto=@movedto(land|myBattlefield):2/2 ueot -text=Menace (This creature can't be blocked except by two or more creatures.) -- Landfall ? Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. +text=Menace (This creature can't be blocked except by two or more creatures.) -- Landfall — Whenever a land enters the battlefield under your control, Geyserfield Stalker gets +2/+2 until end of turn. mana={4}{B} type=Creature subtype=Elemental @@ -42050,7 +42071,7 @@ toughness=3 [/card] [card] name=Ghost Council of Orzhova -auto=ability$!choice life:-1 target(opponent) && life:1 controller!$ controller +auto=choice target(opponent) life:-1 && life:1 controller auto={1}{S(creature|mybattlefield)}:(blink)ueot text=When Ghost Council of Orzhova enters the battlefield, target opponent loses 1 life and you gain 1 life. -- {1}, Sacrifice a creature: Exile Ghost Council of Orzhova. Return it to the battlefield under its owner's control at the beginning of the next end step. mana={W}{W}{B}{B} @@ -42586,7 +42607,7 @@ subtype=Giant [card] name=Gibbering Fiend auto=damage:1 opponent -auto=@each opponent upkeep restriction{delirium}:deplete:1 opponent +auto=@each opponent upkeep restriction{delirium}:damage:1 opponent text=When Gibbering Fiend enters the battlefield, it deals 1 damage to each opponent. -- Delirium At the beginning of each opponent's upkeep, if there are four or more card types among cards in your graveyard, Gibbering Fiend deals 1 damage to that player. mana={1}{R} type=Creature @@ -42660,7 +42681,7 @@ toughness=1 [card] name=Gideon's Phalanx auto=if type(*[instant;sorcery]|mygraveyard)~lessthan~1 then token(Knight,Creature Knight,2/2,white,vigilance)*4 controller else token(Knight,Creature Knight,2/2,white,vigilance)*4 && all(creature|mybattlefield) indestructible ueot -text=Put four 2/2 white Knight creature tokens with vigilance onto the battlefield. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn. +text=Put four 2/2 white Knight creature tokens with vigilance onto the battlefield. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, creatures you control gain indestructible until end of turn. mana={5}{W}{W} type=Instant [/card] @@ -44898,18 +44919,6 @@ power=2 toughness=2 [/card] [card] -name=Goldnight Castigator -abilities=flying,haste -auto=@damaged(controller):damage:thatmuch controller -auto=@damaged(this):damage:thatmuch this -text=Flying, haste -- If a source would deal damage to you, it deals double that damage to you instead. -- If a source would deal damage to Goldnight Castigator, it deals double that damage to Goldnight Castigator instead. -mana={2}{R}{R} -type=Creature -subtype=Angel -power=4 -toughness=9 -[/card] -[card] name=Goldnight Commander auto=@movedTo(other creature|myBattlefield):all(creature|mybattlefield) 1/1 ueot text=Whenever another creature enters the battlefield under your control, creatures you control get +1/+1 until end of turn. @@ -45916,7 +45925,6 @@ type=Artifact Land [/card] [card] name=Great Hart -text= mana={3}{W} type=Creature subtype=Elk @@ -46344,7 +46352,7 @@ type=Sorcery name=Grim Guardian auto=life:-1 opponent auto=@movedTo(enchantment|myBattlefield):life:-1 opponent -text=Constellation ? Whenever Grim Guardian or another enchantment enters the battlefield under your control, each opponent loses 1 life. +text=Constellation — Whenever Grim Guardian or another enchantment enters the battlefield under your control, each opponent loses 1 life. mana={2}{B} type=Enchantment Creature subtype=Zombie @@ -46865,7 +46873,7 @@ type=Land name=Grove Rumbler abilities=trample auto=@movedTo(land|myBattlefield):2/2 ueot -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, Grove Rumbler gets +2/+2 until end of turn. mana={2}{R}{G} type=Creature subtype=Elemental @@ -46876,7 +46884,7 @@ toughness=3 name=Grovetender Druids auto=pay({1}) token(Plant,Creature Plant,1/1,green) auto=@movedTo(ally|myBattlefield):pay({1}) token(Plant,Creature Plant,1/1,green) -text=Rally ? Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield. +text=Rally — Whenever Grovetender Druids or another Ally enters the battlefield under your control, you may pay {1}. If you do, put a 1/1 green Plant creature token onto the battlefield. mana={2}{G}{W} type=Creature subtype=Elf Druid Ally @@ -47068,8 +47076,8 @@ toughness=2 [card] name=Gryff's Boon target=creature -auto=1/0 -auto=flying +auto=teach(creature) 1/0 +auto=teach(creature) flying autograveyard={3}{W}:rehook target(creature) assorcery text=Enchant creature -- Enchanted creature gets +1/+0 and has flying. -- {3}{W}: Return Gryff's Boon from your graveyard to the battlefield attached to target creature. Activate this ability only any time you could cast a sorcery. mana={W} @@ -47169,7 +47177,7 @@ name=Guardian of Tazeem abilities=flying auto=@movedTo(land[-island]|myBattlefield):tap target(creature) auto=@movedTo(land[island]|myBattlefield):target(creature) tap && frozen -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, tap target creature an opponent controls. If that land is an Island, that creature doesn't untap during its controller's next untap step. mana={3}{U}{U} type=Creature subtype=Sphinx @@ -47553,7 +47561,7 @@ name=Guul Draz Overseer abilities=flying auto=@movedTo(land[-swamp]|myBattlefield):all(other creature|mybattlefield) 1/0 ueot auto=@movedTo(land[swamp]|myBattlefield):all(other creature|mybattlefield) 2/0 ueot -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, other creatures you control get +1/+0 until end of turn. If that land is a Swamp, those creatures get +2/+0 until end of turn instead. mana={4}{B}{B} type=Creature subtype=Vampire @@ -48035,7 +48043,7 @@ toughness=2 [/card] [card] name=Hand of Justice -auto={T}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}:destroy target(creture) +auto={T}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}{T(other creature[white]|myBattlefield)}:destroy target(creature) text={T}, Tap three untapped white creatures you control: Destroy target creature. mana={5}{W} type=Creature @@ -48423,7 +48431,7 @@ toughness=3 name=Harvestguard Alseids auto=name(prevent all damage) target(creature) transforms((,newability[preventalldamage to(this)])) ueot auto=@movedto(enchantment|mybattlefield):name(prevent all damage) target(creature) transforms((,newability[preventalldamage to(this)])) ueot -text=Constellation ? Whenever Harvestguard Alseids or another enchantment enters the battlefield under your control, prevent all damage that would be dealt to target creature this turn. +text=Constellation — Whenever Harvestguard Alseids or another enchantment enters the battlefield under your control, prevent all damage that would be dealt to target creature this turn. mana={2}{W} type=Enchantment Creature subtype=Nymph @@ -48505,9 +48513,9 @@ toughness=2 [card] name=Haunted Cloak auto={1}:equip -auto=vigilance -auto=trample -auto=haste +auto=teach(creature) vigilance +auto=teach(creature) trample +auto=teach(creature) haste text=Equipped creature has vigilance, trample, and haste. -- Equip {1} mana={3} type=Artifact @@ -49325,7 +49333,7 @@ type=Enchantment [/card] [card] name=Heir of Falkenrath -auto={discard(*|myhand)}:flip(Heir to the Night) +auto={discard(*|myhand)}:flip(Heir to the Night) limit:1 text=Discard a card: Transform Heir of Falkenrath. Activate this ability only once each turn. mana={1}{B} type=Creature @@ -49896,7 +49904,7 @@ toughness=4 name=Hero of Goma Fada auto=choice all(creature|mybattlefield) indestructible ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) indestructible ueot -text=Rally ? Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn. +text=Rally — Whenever Hero of Goma Fada or another Ally enters the battlefield under your control, creatures you control gain indestructible until end of turn. mana={4}{W} type=Creature subtype=Human Knight Ally @@ -51658,7 +51666,7 @@ type=Instant name=Humbler of Mortals auto=all(creature|myBattlefield) trample ueot auto=@movedTo(enchantment|myBattlefield):all(creature|myBattlefield) trample ueot -text=Constellation ? Whenever Humbler of Mortals or another enchantment enters the battlefield under your control, creatures you control gain trample until end of turn. +text=Constellation — Whenever Humbler of Mortals or another enchantment enters the battlefield under your control, creatures you control gain trample until end of turn. mana={4}{G}{G} type=Enchantment Creature subtype=Elemental @@ -52482,7 +52490,7 @@ name=Icy Blast target=creature|battlefield auto=tap auto=if type(creature[power>=4]|mybattlefield)~morethan~0 then frozen -text=Tap X target creatures. -- Ferocious ? If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps. +text=Tap X target creatures. -- Ferocious — If you control a creature with power 4 or greater, those creatures don't untap during their controllers' next untap steps. mana={X}{U} type=Instant [/card] @@ -53122,8 +53130,7 @@ type=Instant [/card] [card] name=Incorrigible Youths -abilities=haste -abilities=madness +abilities=haste,madness autoexile=restriction{discarded} pay({2}{r}) name(pay 2r to cast) activate name(pay 2r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) text=Haste -- Madness {2}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) mana={3}{R}{R} @@ -53344,7 +53351,7 @@ subtype=Aura [/card] [card] name=Inexorable Blob -auto=@combat(attacking) source(this) restriction{delirium}: aslongas(*|mygraveyard)~morethan~6 token(Ooze,creature Ooze,3/3,green,battleready) +auto=@combat(attacking) source(this) restriction{delirium}:token(Ooze,creature Ooze,3/3,green,battleready) text=Delirium Whenever Inexorable Blob attacks, if there are four or more card types among cards in your graveyard, put a 3/3 green Ooze creature token onto the battlefield tapped and attacking. mana={2}{G} type=Creature @@ -53392,15 +53399,6 @@ type=Enchantment subtype=Aura [/card] [card] -name=Infectious Curse -auto=@targeted(opponent):add{1} -auto=@upkeep:life:1 -auto=@upkeep:life:-1 opponent -text=Enchant player -- Spells you cast that target enchanted player cost {1} less to cast. -- At the beginning of enchanted player's upkeep, that player loses 1 life and you gain 1 life. -type=Enchantment -subtype=Aura Curse -[/card] -[card] name=Infectious Horror auto=@combat(attacking) source(this):life:-2 opponent text=Whenever Infectious Horror attacks, each opponent loses 2 life. @@ -53590,7 +53588,7 @@ name=Infuse with the Elements target=creature|battlefield auto=trample ueot auto=counter(1/1,converge) -text=Converge ? Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. That creature gains trample until end of turn. +text=Converge — Put X +1/+1 counters on target creature, where X is the number of colors of mana spent to cast Infuse with the Elements. That creature gains trample until end of turn. mana={3}{G} type=Instant [/card] @@ -53911,7 +53909,7 @@ toughness=1 [card] name=Insidious Mist abilities=hexproof,unblockable,indestructible,cantblock -auto=@combat(notblocked) source(this):may flip(Elusive Tormentor) +auto=@combat(notblocked) source(this):transforms((,newability[pay[[{2}{B}]] flip(Elusive Tormentor)])) oneshot text=Hexproof, indestructible -- Insidious Mist can't block and can't be blocked. -- Whenever Insidious Mist attacks and isn't blocked, you may pay {2}{B}. If you do, transform it. type=Creature subtype=Elemental @@ -54187,6 +54185,17 @@ power=3 toughness=3 [/card] [card] +name=Invasive Surgery +target=sorcery|stack +auto=fizzle +auto=if delirium then all(*[share!name!]|targetcontrollerlibrary) moveto(exile) +auto=if delirium then all(*[share!name!]|targetcontrollerhand) moveto(exile) +auto=if delirium then all(*[share!name!]|targetcontrollergraveyard) moveto(exile) +text=Counter target sorcery spell. -- Delirium — If there are four or more card types among cards in your graveyard, search the graveyard, hand, and library of that spell's controller for any number of cards with the same name as that spell, exile those cards, then that player shuffles his or her library. +mana={U} +type=Instant +[/card] +[card] name=Invert the Skies auto=if spent({G}) then all(creature|opponentbattlefield) -flying ueot auto=if spent({U}) then all(creature|mybattlefield) flying ueot @@ -54910,10 +54919,10 @@ subtype=Jace [card] name=Jace, Unraveler of Secrets auto=counter(0/0,5,loyalty) -auto={C(0/0,1,Loyalty)}:deplete:1 && may moveto(mylibrary) target(*[fresh]|mygraveyard) && draw:1 -auto={C(0/0,-2,Loyalty)}:moveto(ownerhand) target(creature) -auto={C(0/0,-8,Loyalty)}:name(emblem) emblem transforms((,newability[@movedto(*|opponentstack) restriction{thisturn(*|opponentstack)~equalto~0}:fizzle all(*|opponentstack)])) forever dontremove -text=+1: put the top card of your library into your graveyard, you may return it to the top of your library, draw 1 -- -2: return a target creature to its owners hand -- -8: you get an emblem with whenever an opponent casts a spell if its the first spell they cast this turn, counter that spell +auto={C(0/0,1,Loyalty)}:name(+1: Scry) scry:1 scrycore delayed draw:1 scrycoreend scryend +auto={C(0/0,-2,Loyalty)}:name(-2: Bounce) moveto(ownerhand) target(creature) +auto={C(0/0,-8,Loyalty)}:name(-8: Emblem) emblem transforms((,newability[@movedto(*|opponentstack) restriction{thisturn(*|opponentstack)~equalto~0}:fizzle all(*|opponentstack)])) forever dontremove +text=+1: Scry 1, then draw a card. -- -2: Return target creature to its owner's hand. -- -8: You get an emblem with "Whenever an opponent casts his or her first spell each turn, counter that spell." mana={3}{U}{U} type=Planeswalker subtype=Jace @@ -55017,7 +55026,7 @@ toughness=8 name=Jaddi Offshoot abilities=defender auto=@movedTo(land|myBattlefield):life:1 controller -text=Defender -- Landfall ? Whenever a land enters the battlefield under your control, you gain 1 life. +text=Defender -- Landfall — Whenever a land enters the battlefield under your control, you gain 1 life. mana={G} type=Creature subtype=Plant @@ -56435,7 +56444,7 @@ toughness=4 name=Kalastria Healer auto=choice life:-1 all(opponent) && life:1 controller auto=@movedTo(ally|myBattlefield):life:-1 all(opponent) && life:1 controller -text=Rally ? Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. +text=Rally — Whenever Kalastria Healer or another Ally enters the battlefield under your control, each opponent loses 1 life and you gain 1 life. mana={1}{B} type=Creature subtype=Vampire Cleric Ally @@ -56505,7 +56514,6 @@ toughness=0 [/card] [card] name=Kalonian Tusker -text= mana={G}{G} type=Creature subtype=Beast @@ -58002,7 +58010,7 @@ toughness=5 [card] name=King Macar, the Gold-Cursed auto=@untapped(this):may moveto(exile) target(creature) && token(-378445) controller -text=Inspired ? Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." +text=Inspired — Whenever King Macar, the Gold-Cursed becomes untapped, you may exile target creature. If you do, put a colorless artifact token named Gold onto the battlefield. It has "Sacrifice this artifact: Add one mana of any color to your mana pool." mana={2}{B}{B} type=Legendary Creature subtype=Human @@ -59102,7 +59110,7 @@ toughness=1 name=Kor Bladewhirl auto=choice all(creature|mybattlefield) first strike ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) first strike ueot -text=Rally ? Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn. +text=Rally — Whenever Kor Bladewhirl or another Ally enters the battlefield under your control, creatures you control gain first strike until end of turn. mana={1}{W} type=Creature subtype=Kor Soldier Ally @@ -59143,7 +59151,7 @@ toughness=1 name=Kor Entanglers auto=tap target(creature|opponentbattlefield) auto=@movedTo(ally|myBattlefield):tap target(creature|opponentbattlefield) -text=Rally ? Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls. +text=Rally — Whenever Kor Entanglers or another Ally enters the battlefield under your control, tap target creature an opponent controls. mana={4}{W} type=Creature subtype=Kor Soldier Ally @@ -59512,7 +59520,7 @@ toughness=0 [/card] [card] name=Krallenhorde Howler -auto=lord(creature|myhand) altercost(colorless, -1) +auto=lord(creature|myhand,mylibrary,mygraveyard,myexile) altercost(colorless, -1) auto=@each upkeep restriction{lastturn(*|stack)~morethan~1}:flip(Duskwatch Recruiter) text=Creature spells you cast cost {1} less to cast. -- At the beginning of each upkeep, if a player cast two or more spells last turn, transform Krallenhorde Howler. type=Creature @@ -60197,7 +60205,7 @@ toughness=3 name=Kytheon's Tactics auto=all(creature|mybattlefield) 2/1 ueot auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then all(creature|mybattlefield) vigilance ueot -text=Creatures you control get +2/+1 until end of turn. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn. (Attacking doesn't cause them to tap.) +text=Creatures you control get +2/+1 until end of turn. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, those creatures also gain vigilance until end of turn. (Attacking doesn't cause them to tap.) mana={1}{W}{W} type=Sorcery [/card] @@ -60413,7 +60421,7 @@ toughness=3 [/card] [card] name=Lamplighter of Selhoff -auto=if type(zombie|mybattlefield)~morethan~0 then may draw:1 && discard(*|myhand) +auto=if type(other zombie|mybattlefield)~morethan~0 then may draw:1 && discard(*|myhand) text=When Lamplighter of Selhoff enters the battlefield, if you control another Zombie, you may draw a card. If you do, discard a card. mana={4}{U} type=Creature @@ -60517,7 +60525,7 @@ toughness=1 name=Lantern Scout auto=choice all(creature|mybattlefield) lifelink ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) lifelink ueot -text=Rally ? Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn. +text=Rally — Whenever Lantern Scout or another Ally enters the battlefield under your control, creatures you control gain lifelink until end of turn. mana={2}{W} type=Creature subtype=Human Scout Ally @@ -61353,7 +61361,7 @@ toughness=1 [card] name=Leonin Iconoclast auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):destroy target(Creature[enchantment]|opponentbattlefield) -text=Heroic ? Whenever you cast a spell that targets Leonin Iconoclast, destroy target enchantment creature an opponent controls. +text=Heroic — Whenever you cast a spell that targets Leonin Iconoclast, destroy target enchantment creature an opponent controls. mana={3}{W} type=Creature subtype=Cat Monk @@ -62764,11 +62772,11 @@ toughness=3 [/card] [card] name=Loam Dryad -auto={T}{t(creature|mybattlefield)}:add{G} -auto={T}{t(creature|mybattlefield)}:add{B} -auto={T}{t(creature|mybattlefield)}:add{W} -auto={T}{t(creature|mybattlefield)}:add{U} -auto={T}{t(creature|mybattlefield)}:add{R} +auto={T}{t(other creature|mybattlefield)}:add{G} +auto={T}{t(other creature|mybattlefield)}:add{B} +auto={T}{t(other creature|mybattlefield)}:add{W} +auto={T}{t(other creature|mybattlefield)}:add{U} +auto={T}{t(other creature|mybattlefield)}:add{R} text={T}, Tap an untapped creature you control: Add one mana of any color to your mana pool. mana={G} type=Creature @@ -64431,7 +64439,7 @@ toughness=0 [/card] [card] name=Magmatic Chasm -auto=all(creature[-flying]|battlefield) cantblock ueot +auto=lord(creature[-flying]|battlefield) cantblock ueot text=Creatures without flying can't block this turn. mana={1}{R} type=Sorcery @@ -64502,9 +64510,9 @@ type=Instant [/card] [card] name=Magnifying Glass -auto={T}:Add{1} +auto={T}:Add{C} auto={4}{T}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller -text={T}: Add {1} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") +text={T}: Add {C} to your mana pool. -- {4}, {T}: Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={3} type=Artifact [/card] @@ -64772,7 +64780,7 @@ toughness=4 name=Makindi Patrol auto=choice all(creature|mybattlefield) vigilance ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) vigilance ueot -text=Rally ? Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn. +text=Rally — Whenever Makindi Patrol or another Ally enters the battlefield under your control, creatures you control gain vigilance until end of turn. mana={2}{W} type=Creature subtype=Human Knight Ally @@ -64795,7 +64803,7 @@ toughness=3 name=Makindi Sliderunner abilities=trample auto=@movedTo(land|myBattlefield):1/1 ueot -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, Makindi Sliderunner gets +1/+1 until end of turn. mana={1}{R} type=Creature subtype=Beast @@ -64866,7 +64874,7 @@ toughness=1 [card] name=Malakir Soothsayer auto={T(ally|myBattlefield)}{t}:draw:1 && life:-1 -text=Cohort ? {T}, Tap an untapped Ally you control: You draw a card and you lose 1 life. +text=Cohort — {T}, Tap an untapped Ally you control: You draw a card and you lose 1 life. mana={4}{B} type=Creature subtype=Vampire Shaman Ally @@ -68539,7 +68547,7 @@ toughness=2 name=Mindwrack Demon abilities=flying, trample auto=deplete:4 controller -auto=@each my upkeep:if delirium then name(Delirium active) else life:-4 controller +auto=@each my upkeep restriction{notdelirum}:life:-4 controller text=Flying, trample -- When Mindwrack Demon enters the battlefield, put the top four cards of your library into your graveyard. -- Delirium At the beginning of your upkeep, you lose 4 life unless there are four or more card types among cards in your graveyard. mana={2}{B}{B} type=Creature @@ -68651,7 +68659,6 @@ toughness=3 [/card] [card] name=Minotaur Abomination -text= mana={4}{B}{B} type=Creature subtype=Zombie Minotaur @@ -71258,7 +71265,7 @@ subtype=Aura [card] name=Munda's Vanguard auto={T(ally|myBattlefield)}{t}:all(creature|mybattlefield) counter(1/1,1) -text=Cohort ? {T}, Tap an untapped Ally you control: Put a +1/+1 counter on each creature you control. +text=Cohort — {T}, Tap an untapped Ally you control: Put a +1/+1 counter on each creature you control. mana={4}{W} type=Creature subtype=Kor Knight Ally @@ -71279,7 +71286,7 @@ toughness=2 [card] name=Murasa Ranger auto=@movedTo(land|myBattlefield):pay({3}{G}) counter(1/1,2) -text=Landfall ? Whenever a land enters the battlefield under your control, you may pay {3}{G}. If you do, put two +1/+1 counters on Murasa Ranger. +text=Landfall — Whenever a land enters the battlefield under your control, you may pay {3}{G}. If you do, put two +1/+1 counters on Murasa Ranger. mana={3}{G} type=Creature subtype=Human Warrior @@ -71310,7 +71317,7 @@ toughness=4 name=Murderer's Axe auto={discard(*|myhand)}:equip auto=2/2 -text=Equipped creature gets +2/+2. -- EquipDiscard a card. +text=Equipped creature gets +2/+2. -- Equip—Discard a card. mana={4} type=Artifact subtype=Equipment @@ -72089,10 +72096,11 @@ type=Sorcery [card] name=Nahiri, the Harbinger auto=counter(0/0,4,loyalty) -auto={C(0/0,1,Loyalty)}:name(Reveal) reveal:1 optionone name(Choose to put in Graveyard) target(*|reveal) moveto(mygraveyard) optiononeend optiontwo name(put Back and draw) target(<1>*|reveal) moveto(mylibrary) optiontwoend afterrevealed choice draw:1 controller afterrevealedend revealend -auto={C(0/0,-2,Loyalty)}:moveto(ownerhand) target(creature) -auto={C(0/0,-8,Loyalty)}:name(-8: emblem) emblem transforms((,newability[@movedto(*|mystack) restriction{thisturn(*|opponentstack)~lessthan~2}:all(trigger[to]) fizzle])) forever dontremove -text=+1: put the top card of your library into your graveyard, you may return it to the top of your library, draw 1 -- -2: return a target creature to its owners hand -- -8: you get an emblem with whenever an opponent casts a spell if its the first spell they cast this turn, counter that spell +auto={C(0/0,1,Loyalty)}:name(+1: Reveal) reveal:1 optionone name(Choose to put in Graveyard) target(*|reveal) moveto(mygraveyard) optiononeend optiontwo name(put Back and draw) target(<1>*|reveal) moveto(mylibrary) optiontwoend afterrevealed choice draw:1 controller afterrevealedend revealend +auto={C(0/0,-2,Loyalty)}:name(-2: Exile tapped Artifact or Creature) target(creature,artifact[tapped]) moveto(exile) +auto={C(0/0,-2,Loyalty)}:name(-2: Exile target Enchantment) target(enchantment) moveto(exile) +auto={C(0/0,-8,Loyalty)}:name(-8: Fetch) moveto(mybattlefield) notatarget(artifact,creature|mylibrary) and!( transforms((,newability[haste],newability[phaseaction[endofturn sourceinplay] moveTo(ownerhand)])) forever )! +text=+2: You may discard a card. If you do, draw a card. -- -2: Exile target enchantment, tapped artifact, or tapped creature. -- -8: Search your library for an artifact or creature card, put it onto the battlefield, then shuffle your library. It gains haste. Return it to your hand at the beginning of the next end step. mana={2}{R}{W} type=Planeswalker subtype=Nahiri @@ -72734,7 +72742,7 @@ type=Enchantment name=Necromantic Summons target=creature|graveyard auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then transforms((,newability[moveto(mybattlefield)],newability[counter(1/1.2)])) forever else moveto(mybattlefield) -text=Put target creature card from a graveyard onto the battlefield under your control. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, that creature enters the battlefield with two additional +1/+1 counters on it. +text=Put target creature card from a graveyard onto the battlefield under your control. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, that creature enters the battlefield with two additional +1/+1 counters on it. mana={4}{B} type=Sorcery [/card] @@ -72968,6 +72976,16 @@ mana={1}{U} type=Instant [/card] [card] +name=Neglected Heirloom +auto=@transformed(mytgt):all(this) flip(Ashmouth Blade) +auto={1}:equip +auto=teach(creature) 1/1 +text=Equipped creature gets +1/+1. -- When equipped creature transforms, transform Neglected Heirloom. -- Equip {1} +mana={1} +type=Artifact +subtype=Equipment +[/card] +[card] name=Nekrataal abilities=first strike auto=bury target(creature[-black;-artifact]) @@ -73846,7 +73864,7 @@ text={T}, Sacrifice Nihil Spellbomb: Exile all cards from target player's gravey [/card] [card] name=Nihilistic Glee -auto={2}{B}{discard(*|myhand)}:life:-1 opponent && life:1 controller +auto={2}{B}{discard(*|myhand)}:target(opponent) life:-1 && life:1 controller auto=aslongas(*|myhand) {L:2}{1}:draw:1 <1 text={2}{B}, Discard a card: Target opponent loses 1 life and you gain 1 life. -- Hellbent - {1}, Pay 2 life: Draw a card. Activate this ability only if you have no cards in hand. mana={2}{B}{B} @@ -74159,7 +74177,7 @@ type=Sorcery [card] name=Nissa's Pilgrimage auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot else name(fetch to play) notatarget(forest[basic]|mylibrary) transforms((,newability[name(move to hand) notatarget(forest[basic]|mylibrary) moveTo(myhand)],newability[moveTo(myBattlefield) and!(tap(noevent))!])) oneshot -text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. +text=Search your library for up to two basic Forest cards, reveal those cards, and put one onto the battlefield tapped and the rest into your hand. Then shuffle your library. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, search your library for up to three basic Forest cards instead of two. mana={2}{G} type=Sorcery [/card] @@ -74567,8 +74585,8 @@ toughness=2 [card] name=Not Forgotten target=*|graveyard -auto=moveto(ownerlibrary) -auto=token(Spirit,creature Spirit,1/1,white,flying) +auto=choice name(put on top) moveto(ownerlibrary) && token(Spirit,creature Spirit,1/1,white,flying) +auto=choice bottomoflibrary && token(Spirit,creature Spirit,1/1,white,flying) text=Put target card from a graveyard on the top or bottom of its owner's library. Put a 1/1 white Spirit creature token with flying onto the battlefield. mana={1}{W} type=Sorcery @@ -75062,7 +75080,7 @@ toughness=7 name=Oakheart Dryads auto=1/1 target(creature) ueot auto=@movedTo(enchantment|myBattlefield):1/1 target(creature) ueot -text=Constellation ? Whenever Oakheart Dryads or another enchantment enters the battlefield under your control, target creature gets +1/+1 until end of turn. +text=Constellation — Whenever Oakheart Dryads or another enchantment enters the battlefield under your control, target creature gets +1/+1 until end of turn. mana={2}{G} type=Enchantment Creature subtype=Nymph Dryad @@ -75724,7 +75742,7 @@ name=Ojutai Exemplars auto=@movedto(*[-creature]|mystack):choice name(Tap target creature) tap target(creature|battlefield) auto=@movedto(*[-creature]|mystack):choice name(First Strike and Lifelink) transforms((,newability[first strike ueot],newability[lifelink ueot])) ueot auto=@movedto(*[-creature]|mystack):choice name(Exile and returned tapped) moveto(exile) and!( transforms((,newability[moveto(ownerbattlefield) and!(tap(noevent))!])) forever)! -text=Whenever you cast a noncreature spell, choose one ? -- ? Tap target creature. -- ? Ojutai Exemplars gains first strike and lifelink until end of turn. -- ? Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. +text=Whenever you cast a noncreature spell, choose one — -- — Tap target creature. -- — Ojutai Exemplars gains first strike and lifelink until end of turn. -- — Exile Ojutai Exemplars, then return it to the battlefield tapped under its owner's control. mana={2}{W}{W} type=Creature subtype=Human Monk @@ -75818,8 +75836,8 @@ toughness=3 [card] name=Olivia, Mobilized for War abilities=flying -auto=@movedto(creature|mybattlefield):pay({d(*|myhand)}) all(trigger[to]) counter(1/1,1) && all(trigger[to]) transforms((vampire,newability[haste])) forever -text=flying -- whenever another creature enters the battlefield under your control, you may discard a card, if you do, put a +1/+1 counter on that creature and it becomes a vampire and gains haste +auto=@movedto(other creature|mybattlefield):all(trigger) transforms((,newability[may reject notatarget(*|myhand) and!( all(this) counter(1/1.1) && all(this) haste && all(this) becomes(vampire) forever )!])) forever )! +text=Flying -- Whenever another creature enters the battlefield under your control, you may discard a card. If you do, put a +1/+1 counter on that creature, it gains haste until end of turn, and it becomes a Vampire in addition to its other types. mana={1}{B}{R} type=Legendary Creature subtype=Vampire Knight @@ -75856,7 +75874,7 @@ type=Sorcery name=Omnath, Locus of Rage auto=@movedTo(land|myBattlefield):token(Elemental,Creature Elemental,5/5,red,green) controller auto=@movedto(Elemental|graveyard) from(mybattlefield):damage:3 target(creature,player) -text=Landfall ? Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. -- Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. +text=Landfall — Whenever a land enters the battlefield under your control, put a 5/5 red and green Elemental creature token onto the battlefield. -- Whenever Omnath, Locus of Rage or another Elemental you control dies, Omnath deals 3 damage to target creature or player. mana={3}{R}{R}{G}{G} type=Legendary Creature subtype=Elemental @@ -75894,7 +75912,7 @@ subtype=Equipment name=Ondu Champion auto=choice all(creature|mybattlefield) trample ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) trample ueot -text=Rally ? Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn. +text=Rally — Whenever Ondu Champion or another Ally enters the battlefield under your control, creatures you control gain trample until end of turn. mana={2}{R}{R} type=Creature subtype=Minotaur Warrior Ally @@ -75926,7 +75944,7 @@ toughness=4 name=Ondu Greathorn abilities=first strike auto=@movedTo(land|myBattlefield):2/2 ueot -text=First strike -- Landfall ? Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn. +text=First strike -- Landfall — Whenever a land enters the battlefield under your control, Ondu Greathorn gets +2/+2 until end of turn. mana={3}{W} type=Creature subtype=Beast @@ -75945,7 +75963,7 @@ type=Sorcery [card] name=Ondu War Cleric auto={T(ally|myBattlefield)}{t}:life:2 controller -text=Cohort ? {T}, Tap an untapped Ally you control: You gain 2 life. +text=Cohort — {T}, Tap an untapped Ally you control: You gain 2 life. mana={1}{W} type=Creature subtype=Human Cleric Ally @@ -76012,7 +76030,7 @@ toughness=3 [/card] [card] name=Ongoing Investigation -auto=@combatdamaged(player):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller +auto=@combatdamaged(player) from(creature|mybattlefield):token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller auto={1}{G}{e(creature|mygraveyard)}:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller && life:2 text=Whenever one or more creatures you control deal combat damage to a player, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {1}{G}, Exile a creature card from your graveyard: Investigate. You gain 2 life. mana={1}{U} @@ -76368,7 +76386,7 @@ name=Oran-Rief Hydra abilities=trample auto=@movedTo(land[-forest]|myBattlefield):counter(1/1,1) auto=@movedTo(land[forest]|myBattlefield):counter(1/1,2) -text=Trample -- Landfall ? Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead. +text=Trample -- Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Oran-Rief Hydra. If that land is a Forest, put two +1/+1 counters on Oran-Rief Hydra instead. mana={4}{G}{G} type=Creature subtype=Hydra @@ -77548,7 +77566,7 @@ type=Enchantment name=Painful Truths auto=draw:converge controller auto=life:-converge controller -text=Converge ? You draw X cards and you lose X life, where X is the number of colors of mana spent to cast Painful Truths. +text=Converge — You draw X cards and you lose X life, where X is the number of colors of mana spent to cast Painful Truths. mana={2}{B} type=Sorcery [/card] @@ -77588,7 +77606,7 @@ toughness=1 name=Palace Siege auto=choice name(Khans) transforms((,newability[counter(0/0.1.Khans)],newability[@each my upkeep:moveto(myhand) target(creature|mygraveyard)])) forever auto=choice name(Dragons) transforms((,newability[counter(0/0.1.Dragons)],newability[@each my upkeep:life:-2 opponent && life:2 controller])) forever -text=As Palace Siege enters the battlefield, choose Khans or Dragons. -- ? Khans ? At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- ? Dragons ? At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life. +text=As Palace Siege enters the battlefield, choose Khans or Dragons. -- — Khans — At the beginning of your upkeep, return target creature card from your graveyard to your hand. -- — Dragons — At the beginning of your upkeep, each opponent loses 2 life and you gain 2 life. mana={3}{B}{B} type=Enchantment [/card] @@ -80050,6 +80068,14 @@ power=2 toughness=2 [/card] [card] +name=Pick the Brain +target=opponent +auto=reveal:type:*:targetedpersonshand revealzone(targetedpersonshand) optionone name(choose card) target(*[-land]|reveal) moveto(exile) and!( if delirium then transforms((,newability[all(*[share!name!]|mygraveyard) moveto(exile)],newability[all(*[share!name!]|myhand) moveto(exile)],newability[all(*[share!name!]|mylibrary) moveto(exile) and!(shuffle)!]))) oneshot )! optiononeend optiontwo name(put back) target(<1>*|reveal) moveto(ownerhand) and!( all(*|reveal) moveto(ownerhand) )! optiontwoend revealend +text=Target opponent reveals his or her hand. You choose a nonland card from it and exile that card. -- Delirium — If there are four or more card types among cards in your graveyard, search that player's graveyard, hand, and library for any number of cards with the same name as the exiled card, exile those cards, then that player shuffles his or her library. +mana={2}{B} +type=Sorcery +[/card] +[card] name=Pieces of the Puzzle auto=reveal:5 optionone name(Get Cards) target(*[instant;sorcery]|reveal) moveto(myhand) optiononeend optiontwo name(put in graveyard) target(<1>*|reveal) moveto(ownergraveyard) and!( all(*|reveal) moveto(ownergraveyard) )! optiontwoend revealend text=Reveal the top five cards of your library. Put up to two instant and/or sorcery cards from among them into your hand and the rest into your graveyard. @@ -80272,7 +80298,7 @@ type=Sorcery name=Pious Evangel auto=life:1 auto=@movedto(creature|mybattlefield):life:1 -auto={2}{T}{S(creature|mybattlefield)}: flip(Wayward Disciple) +auto={2}{T}{S(other *|mybattlefield)}: flip(Wayward Disciple) text=Whenever Pious Evangel or another creature enters the battlefield under your control, you gain 1 life. -- {2}, {T}, Sacrifice another permanent: Transform Pious Evangel. mana={2}{W} type=Creature @@ -81121,10 +81147,9 @@ toughness=1 [/card] [card] name=Pore Over the Pages -target=land|mybattlefield -auto=untap auto=draw:3 controller -auto=reject target(*|myhand) +auto=untap target(land|mybattlefield) +auto=ability$!reject target(*|myhand)!$ controller text=Draw three cards, untap up to two lands, then discard a card. mana={3}{U}{U} type=Sorcery @@ -81566,7 +81591,7 @@ type=Sorcery [card] name=Press for Answers target=creature -auto=frozen +auto=freeze auto=token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! controller text=Tap target creature. It doesn't untap during its controller's next untap step. -- Investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") mana={1}{U} @@ -82201,8 +82226,8 @@ type=Enchantment [/card] [card] name=Prized Amalgam -autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap -autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap +autograveyard=@movedto(other creature|mybattlefield) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap(noevent) +autograveyard=@movedto(other creature|mystack) from(mygraveyard) once:phaseactionmulti[endofturn once] moveto(mybattlefield) && tap(noevent) text=Whenever a creature enters the battlefield, if it entered from your graveyard or you cast it from your graveyard, return Prized Amalgam from your graveyard to the battlefield tapped at the beginning of the next end step. mana={1}{U}{B} type=Creature @@ -83532,8 +83557,7 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(sliver|myhand) flash -auto=lord(sliver|opponenthand) flash +auto=lord(sliver|hand,library,graveyard,exile) spellmastery text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature @@ -83841,8 +83865,8 @@ toughness=1 [/card] [card] name=Rabid Bite -target=creature -auto=transforms((,newability[dynamicability target(creature)])) +target=creature|mybattlefield +auto=transforms((,newability[dynamicability target(creature|opponentbattlefield)])) text=Target creature you control deals damage equal to its power to target creature you don't control. mana={1}{G} type=Sorcery @@ -83950,7 +83974,7 @@ toughness=3 [card] name=Radiant Flames auto=damage:converge all(creature|battlefield) -text=Converge ? Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames. +text=Converge — Radiant Flames deals X damage to each creature, where X is the number of colors of mana spent to cast Radiant Flames. mana={2}{R} type=Sorcery [/card] @@ -84863,8 +84887,7 @@ type=Sorcery [/card] [card] name=Rancid Rats -abilities=deathtouch -auto=cantbeblockedby(creature[power>1]) +abilities=deathtouch,skulk text=Skulk (This creature can't be blocked by creatures with greater power.) -- Deathtouch (Any amount of damage this deals to a creature is enough to destroy it.) mana={1}{B} type=Creature @@ -85145,7 +85168,7 @@ toughness=3 name=Rattlechains abilities=flash, flying auto=target(spirit) hexproof ueot -auto=lord(spirit|myhand) flash +auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) spellmastery text=Flash -- Flying -- When Rattlechains enters the battlefield, target Spirit gains hexproof until end of turn. -- You may cast Spirit spells as though they had flash. mana={1}{U} type=Creature @@ -85205,7 +85228,7 @@ name=Ravaging Blaze target=creature auto=damage:X auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then damage:x targetcontroller -text=Ravaging Blaze deals X damage to target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller. +text=Ravaging Blaze deals X damage to target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, Ravaging Blaze also deals X damage to that creature's controller. mana={X}{R}{R} type=Instant [/card] @@ -85766,7 +85789,7 @@ toughness=6 [card] name=Reaper of Flight Moonsilver abilities=flying -auto=while(restriction{delirium}) {s(creature|mybattlefield)} +2/+1 ueot +auto=while(restriction{delirium}) {s(other creature|mybattlefield)}:2/1 ueot text=Flying -- Delirium Sacrifice another creature: Reaper of Flight Moonsilver gets +2/+1 until end of turn. Activate this ability only if there are four or more card types among cards in your graveyard. mana={3}{W}{W} type=Creature @@ -86401,7 +86424,6 @@ toughness=3 [/card] [card] name=Regathan Firecat -text= mana={2}{R} type=Creature subtype=Elemental Cat @@ -86562,18 +86584,6 @@ mana={2}{R}{R} type=Sorcery [/card] [card] -name=Relentless Dead -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{B}:moveto(myhand)])) ueot -auto=@movedTo(this|graveyard) from(battlefield):transforms((,newability[{X}:moveto(myhand) target(zombie[manacost=X]|mygraveyard)])) ueot -text=Menace (This creature can't be blocked except by two or more creatures.) -- When Relentless Dead dies, you may pay {B}. If you do, return it to its owner's hand. -- When Relentless Dead dies, you may pay {X}. If you do, return another target Zombie creature card with converted mana cost X from your graveyard to the battlefield. -mana={B}{B} -abilities=menace -type=Creature -subtype=Zombie -power=2 -toughness=2 -[/card] -[card] name=Relentless Hunter abilities=trample auto={1}{r}{g}:+1/+1 ueot && trample ueot @@ -87107,7 +87117,7 @@ toughness=4 name=Resolute Blademaster auto=choice all(creature|mybattlefield) double strike ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) double strike ueot -text=Rally ? Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn. +text=Rally — Whenever Resolute Blademaster or another Ally enters the battlefield under your control, creatures you control gain double strike until end of turn. mana={3}{R}{W} type=Creature subtype=Human Soldier Ally @@ -87344,14 +87354,14 @@ type=Enchantment [card] name=Retreat to Emeria auto=@movedTo(land|myBattlefield):name(choose one) transforms((,newability[choice name(Kor Token) token(-402007) controller],newability[choice name(1/1 ueot) all(creature|mybattlefield) 1/1 ueot])) -text=Landfall ? Whenever a land enters the battlefield under your control, choose one ? -- ? Put a 1/1 white Kor Ally creature token onto the battlefield. -- ? Creatures you control get +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, choose one — -- — Put a 1/1 white Kor Ally creature token onto the battlefield. -- — Creatures you control get +1/+1 until end of turn. mana={3}{W} type=Enchantment [/card] [card] name=Retreat to Kazandu auto=@movedTo(land|myBattlefield):transforms((,newability[if type(creature|battlefield)~morethan~0 then choice target(creature) counter(1/1)],newability[choice name(gain 2 life) life:2 controller])) -text=Landfall ? Whenever a land enters the battlefield under your control, choose one ? -- ? Put a +1/+1 counter on target creature. -- ? You gain 2 life. +text=Landfall — Whenever a land enters the battlefield under your control, choose one — -- — Put a +1/+1 counter on target creature. -- — You gain 2 life. mana={2}{G} type=Enchantment [/card] @@ -89085,7 +89095,7 @@ type=Sorcery name=Roilmage's Trick auto=all(creature|opponentbattlefield) -converge/0 ueot auto=draw:1 controller -text=Converge ? Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. +text=Converge — Creatures your opponents control get -X/-0 until end of turn, where X is the number of colors of mana spent to cast Roilmage's Trick. mana={3}{U} type=Sorcery [/card] @@ -89591,7 +89601,6 @@ toughness=5 [/card] [card] name=Rotting Mastodon -text= mana={4}{B} type=Creature subtype=Zombie Elephant @@ -89909,7 +89918,6 @@ type=Enchantment [/card] [card] name=Rumbling Baloth -text= mana={2}{G}{G} type=Creature subtype=Beast @@ -89968,8 +89976,7 @@ type=Instant [card] name=Runaway Carriage abilities=trample -auto=@combat(attacking) source(this):treason ueot -auto=@combat(blocking) source(this):treason ueot +auto=@combat(attacking,blocking) source(this):phaseaction[combatends,sourceinplay] sacrifice text=Trample -- When Runaway Carriage attacks or blocks, sacrifice it at end of combat. mana={4} type=Artifact Creature @@ -93376,7 +93383,7 @@ toughness=1 [card] name=Scythe Leopard auto=@movedTo(land|myBattlefield):1/1 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Scythe Leopard gets +1/+1 until end of turn. mana={G} type=Creature subtype=Cat @@ -94531,7 +94538,7 @@ name=Send to Sleep target=creature|battlefield auto=tap auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then frozen -text=Tap up to two target creatures. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, those creatures don't untap during their controllers' next untap steps. +text=Tap up to two target creatures. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, those creatures don't untap during their controllers' next untap steps. mana={1}{U} type=Instant [/card] @@ -95572,7 +95579,7 @@ name=Shaman of the Great Hunt abilities=haste auto=lord(creature|mybattlefield) transforms((,newability[@combatdamaged(player) from(this):counter(1/1.1) all(this)])) auto={2}{GU}{GU}:foreach(creature[power>=4]|mybattlefield) draw:1 -text=Haste -- Whenever a creature you control deals combat damage to a player, put a +1/+1 counter on it. -- Ferocious ? {2}{G/U}{G/U}: Draw a card for each creature you control with power 4 or greater. +text=Haste -- Whenever a creature you control deals combat damage to a player, put a +1/+1 counter on it. -- Ferocious — {2}{G/U}{G/U}: Draw a card for each creature you control with power 4 or greater. mana={3}{R} type=Creature subtype=Orc Shaman @@ -95593,7 +95600,7 @@ toughness=2 name=Shamanic Revelation auto=draw:type:creature:mybattlefield auto=foreach(creature[power>=4]|mybattlefield) life:4 -text=Draw a card for each creature you control. -- Ferocious ? You gain 4 life for each creature you control with power 4 or greater. +text=Draw a card for each creature you control. -- Ferocious — You gain 4 life for each creature you control with power 4 or greater. mana={3}{G}{G} type=Sorcery [/card] @@ -96251,7 +96258,7 @@ toughness=2 [card] name=Shimmer Myr abilities=flash -auto=lord(artifact|myhand) flash +auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) spellmastery text=Flash -- You may cast artifact cards as though they had flash. mana={3} type=Artifact Creature @@ -97301,8 +97308,8 @@ type=Sorcery name=Sigarda, Heron's Grace abilities=flying, playershroud auto=lord(human|mybattlefield) hexproof -auto={2},{e(*|mygraveyard)}: token(Human Soldier,creature Human Soldier,1/1,white) -text=flying -- you and humans you control have hexproof -- {2}, exile a card from your graveyard: put a 1/1 white human soldier onto the battlefield +auto={2}{E(*|mygraveyard)}:token(Human Soldier,Creature Human Soldier,1/1,white) +text=Flying -- You and Humans you control have hexproof. -- {2}, Exile a card from your graveyard: Put a 1/1 white Human Soldier creature token onto the battlefield. mana={3}{G}{W} type=Legendary Creature subtype=Angel @@ -97503,7 +97510,6 @@ type=Instant [/card] [card] name=Silent Artisan -text= mana={3}{W}{W} type=Creature subtype=Giant @@ -98601,13 +98607,20 @@ type=Instant name=Skin Invasion target=creature auto=mustattack -auto=@movedto(mytgt|ownergraveyard) from(ownerbattlefield):token(Skin Shedder,creature Insect Horror,3/4,red) controller +auto=@movedto(mytgt|graveyard) from(battlefield):all(this) transforms((,newability[moveto(mybattlefield)],newability[flip(Skin Shedder)])) forever text=Enchant creature -- Enchanted creature attacks each combat if able. -- When enchanted creature dies, return Skin Invasion to the battlefield transformed under your control. mana={R} type=Enchantment subtype=Aura [/card] [card] +name=Skin Shedder +type=Creature +subtype=Insect Horror +power=3 +toughness=4 +[/card] +[card] name=Skinbrand Goblin autohand={R}{discard}:name(bloodrush) target(creature[attacking]) 2/1 ueot text=Bloodrush — {R}, Discard Skinbrand Goblin: Target attacking creature gets +2/+1 until end of turn. @@ -99127,7 +99140,7 @@ toughness=1 name=Skybind auto=(blink) target(*[-enchantment]) ueot auto=@movedTo(enchantment|myBattlefield):(blink) target(*[-enchantment]) ueot -text=Constellation ? Whenever Skybind or another enchantment enters the battlefield under your control, exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. +text=Constellation — Whenever Skybind or another enchantment enters the battlefield under your control, exile target nonenchantment permanent. Return that card to the battlefield under its owner's control at the beginning of the next end step. mana={3}{W}{W} type=Enchantment [/card] @@ -99329,7 +99342,7 @@ type=Sorcery name=Skyrider Elf abilities=flying auto=counter(1/1,converge) -text=Flying -- Converge ? Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Flying -- Converge — Skyrider Elf enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={X}{G}{U} type=Creature subtype=Elf Warrior Ally @@ -100133,7 +100146,6 @@ toughness=1 [/card] [card] name=Sliver Construct -text= mana={3} type=Artifact Creature subtype=Sliver Construct @@ -100568,7 +100580,7 @@ toughness=2 [card] name=Snapping Gnarlid auto=@movedTo(land|myBattlefield):1/1 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Snapping Gnarlid gets +1/+1 until end of turn. mana={1}{G} type=Creature subtype=Beast @@ -101444,8 +101456,8 @@ auto={C(0/0,-8,Loyalty)}:damage:8 target(creature,planeswalker) && life:8 contro auto={C(0/0,-9,Loyalty)}:damage:9 target(creature,planeswalker) && life:9 controller auto={C(0/0,-10,Loyalty)}:damage:10 target(creature,planeswalker) && life:10 controller auto={C(0/0,-15,Loyalty)}:damage:15 target(creature,planeswalker) && life:15 controller -auto={C(0/0,-9,Loyalty)}:token(Vampire Knight,creture Vampire Knight,1/1,black,lifelink)*highestlifetotal -text=+1: draw a card, your opponent loses life equal to its converted mana cost -- -X: Sorin, Grim Nemesis deals x damage to target creature or planeswalker and you gain x life -- -9: put a number of 1/1 black vampire knigt creature tokens with lifelink onto the battlefield equal to the highest life total among all players +auto={C(0/0,-9,Loyalty)}:token(Vampire Knight,Creature Vampire Knight,1/1,black,lifelink)*highestlifetotal +text=+1: Reveal the top card of your library and put that card into your hand. Each opponent loses life equal to its converted mana cost. -- -X: Sorin, Grim Nemesis deals X damage to target creature or planeswalker and you gain X life. -- -9: Put a number of 1/1 black Vampire Knight creature tokens with lifelink onto the battlefield equal to the highest life total among all players. mana={4}{W}{B} type=Planeswalker subtype=Sorin @@ -102221,7 +102233,7 @@ toughness=5 [card] name=Spawnbinder Mage auto={T(ally|myBattlefield)}{t}:target(creature) tap -text=Cohort ? {T}, Tap an untapped Ally you control: Tap target creature. +text=Cohort — {T}, Tap an untapped Ally you control: Tap target creature. mana={3}{W} type=Creature subtype=Human Wizard Ally @@ -102978,7 +102990,6 @@ toughness=2 [card] name=Spiked Jester abilities=haste -text= mana={B}{R} type=Creature subtype=Goblin Warrior @@ -105005,7 +105016,6 @@ type=Enchantment [card] name=Steeple Roc abilities=flying,first strike -text= mana={4}{W} type=Creature subtype=Bird @@ -105039,8 +105049,8 @@ type=Land [/card] [card] name=Stensia Masquerade -auto=lord(creature|mybattlefield) first strike -auto=@combatdamaged(player) from(vampire|mybattlefield): counter(1/1,1) all(trigger[to]) +auto=lord(creature[attacking]|mybattlefield) first strike +auto=@combatdamaged(player) from(vampire|mybattlefield): counter(1/1,1) all(trigger[from]) abilities=madness autoexile=restriction{discarded} pay({2}{r}) name(pay 2r to cast) activate name(pay 2r to cast) castcard(normal)?name(put in graveyard) moveto(ownergraveyard) text=Attacking creatures you control have first strike. -- Whenever a Vampire you control deals combat damage to a player, put a +1/+1 counter on it. -- Madness {2}{R} (If you discard this card, discard it into exile. When you do, cast it for its madness cost or put it into your graveyard.) @@ -105289,7 +105299,7 @@ toughness=4 [/card] [card] name=Stitched Mangler -auto=target(creature) tap && frozen +auto=target(creature) freeze auto=tap(noevent) text=Stitched Mangler enters the battlefield tapped. -- When Stitched Mangler enters the battlefield, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. mana={2}{U} @@ -105529,7 +105539,7 @@ toughness=2 [card] name=Stoneforge Acolyte auto={t}{T(ally|myBattlefield)}:reveal:5 optionone name(Get Equipment) target(equipment|reveal) moveto(myhand) optiononeend optiontwo name(put on bottom) target(<5>*|reveal) bottomoflibrary optiontwoend revealend -text=Cohort ? {T}, Tap an untapped Ally you control: Look at the top four cards of your library. You may reveal an Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in any order. +text=Cohort — {T}, Tap an untapped Ally you control: Look at the top four cards of your library. You may reveal an Equipment card from among them and put it into your hand. Put the rest on the bottom of your library in any order. mana={W} type=Creature subtype=Kor Artificer Ally @@ -106255,7 +106265,7 @@ toughness=4 name=Strength from the Fallen auto=target(creature) type:creature:mygraveyard/type:creature:mygraveyard ueot auto=@movedTo(enchantment|myBattlefield):target(creature) type:creature:mygraveyard/type:creature:mygraveyard ueot -text=Constellation ? Whenever Strength from the Fallen or another enchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. +text=Constellation — Whenever Strength from the Fallen or another enchantment enters the battlefield under your control, target creature gets +X/+X until end of turn, where X is the number of creature cards in your graveyard. mana={1}{G} type=Enchantment [/card] @@ -106555,7 +106565,7 @@ type=Sorcery name=Stubborn Denial target=*[-creature]|stack auto=if type(creature[power>=4]|mybattlefield) then fizzle else transforms((,newability[pay[[{1}]] name(pay 1 mana) donothing?fizzle])) forever -text=Counter target noncreature spell unless its controller pays {1}. -- Ferocious ? If you control a creature with power 4 or greater, counter that spell instead. +text=Counter target noncreature spell unless its controller pays {1}. -- Ferocious — If you control a creature with power 4 or greater, counter that spell instead. mana={U} type=Instant [/card] @@ -106993,7 +107003,6 @@ toughness=2 [/card] [card] name=Summit Prowler -text= mana={2}{R}{R} type=Creature subtype=Yeti @@ -108069,7 +108078,7 @@ other={1}{W} name(Spell Mastery) otherrestriction=type(*[instant;sorcery]|mygraveyard)~morethan~1 target=creature[tapped]|battlefield auto=destroy -text=Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, you may cast Swift Reckoning as though it had flash. (You may cast it any time you could cast an instant.) Destroy target tapped creature. +text=Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, you may cast Swift Reckoning as though it had flash. (You may cast it any time you could cast an instant.) Destroy target tapped creature. mana={1}{W} type=Sorcery [/card] @@ -108305,7 +108314,6 @@ type=Instant [/card] [card] name=Swordwise Centaur -text= mana={G}{G} type=Creature subtype=Centaur Warrior @@ -108833,7 +108841,7 @@ toughness=2 name=Tajuru Beastmaster auto=choice all(creature|mybattlefield) 1/1 ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 1/1 ueot -text=Rally ? Whenever Tajuru Beastmaster or another Ally enters the battlefield under your control, creatures you control get +1/+1 until end of turn. +text=Rally — Whenever Tajuru Beastmaster or another Ally enters the battlefield under your control, creatures you control get +1/+1 until end of turn. mana={5}{G} type=Creature subtype=Elf Warrior Ally @@ -108853,7 +108861,7 @@ toughness=4 [card] name=Tajuru Stalwart auto=counter(1/1,converge) -text=Converge ? Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Converge — Tajuru Stalwart enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={2}{G} type=Creature subtype=Elf Scout Ally @@ -108864,7 +108872,7 @@ toughness=1 name=Tajuru Warcaller auto=choice all(creature|mybattlefield) 2/2 ueot auto=@movedTo(ally|myBattlefield):all(creature|mybattlefield) 2/2 ueot -text=Rally ? Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn. +text=Rally — Whenever Tajuru Warcaller or another Ally enters the battlefield under your control, creatures you control get +2/+2 until end of turn. mana={3}{G}{G} type=Creature subtype=Elf Warrior Ally @@ -109185,7 +109193,7 @@ subtype=Tamiyo name=Tamiyo's Journal auto=@upkeep:token(Clue,Artifact Clue,0/0) and!( transforms((,newability[{S}{2}:draw:1])) forever )! auto={T}{S(clue|mybattlefield)}{S(clue|mybattlefield)}{S(clue|mybattlefield)}: moveto(myhand) target(*|mylibrary) -text=at the beginning of your upkeep, investigate -- {T}, sacrifice three clues: search your library for a card and put that card into your hand, then shuffle your library +text=At the beginning of your upkeep, investigate. (Put a colorless Clue artifact token onto the battlefield with "{2}, Sacrifice this artifact: Draw a card.") -- {T}, Sacrifice three Clues: Search your library for a card and put that card into your hand. Then shuffle your library. mana={5} type=Legendary Artifact [/card] @@ -110624,7 +110632,7 @@ toughness=2 [card] name=Tethmos High Priest auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):moveTo(mybattlefield) target(creature[manacost<=2]|mygraveyard) -text=Heroic ? Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. +text=Heroic — Whenever you cast a spell that targets Tethmos High Priest, return target creature card with converted mana cost 2 or less from your graveyard to the battlefield. mana={2}{W} type=Creature subtype=Cat Cleric @@ -110919,7 +110927,7 @@ type=Sorcery name=Thassa's Devourer auto=deplete:2 target(player) auto=@movedTo(enchantment|myBattlefield):deplete:2 target(player) -text=Constellation ? Whenever Thassa's Devourer or another enchantment enters the battlefield under your control, target player puts the top two cards of his or her library into his or her graveyard. +text=Constellation — Whenever Thassa's Devourer or another enchantment enters the battlefield under your control, target player puts the top two cards of his or her library into his or her graveyard. mana={4}{U} type=Enchantment Creature subtype=Elemental @@ -111024,7 +111032,7 @@ abilities=deathtouch auto=upcost[{S(land|mybattlefield)}] sacrifice auto=maxPlay(land)+1 auto=@movedto(land|mygraveyard): draw:1 -text=deathtouch -- at the beggining of your upkeep, sacrifice The Gitrog Monster unless you sacrifice a land -- you may play an additional land on each of your turns -- whenever a land is put into a graveyard, draw a card +text=Deathtouch -- At the beginning of your upkeep, sacrifice The Gitrog Monster unless you sacrifice a land. -- You may play an additional land on each of your turns. -- Whenever one or more land cards are put into your graveyard from anywhere, draw a card. mana={3}{B}{G} type=Legendary Creature subtype=Frog Horror @@ -111746,7 +111754,7 @@ toughness=1 name=Thoughtrender Lamia auto=ability$!name(discard) target(*|myhand) reject!$ opponent auto=@movedTo(enchantment|myBattlefield):ability$!name(discard) target(*|myhand) reject!$ opponent -text=Constellation ? Whenever Thoughtrender Lamia or another enchantment enters the battlefield under your control, each opponent discards a card. +text=Constellation — Whenever Thoughtrender Lamia or another enchantment enters the battlefield under your control, each opponent discards a card. mana={4}{B}{B} type=Enchantment Creature subtype=Lamia @@ -113209,6 +113217,16 @@ mana={1}{W} type=Instant [/card] [card] +name=To the Slaughter +target=player +auto=ifnot delirium then ability$!name(sacrifice) notatarget(creature,planeswalker|myBattlefield) sacrifice!$ targetedplayer +auto=if delirium then ability$!name(sacrifice) notatarget(creature|myBattlefield) sacrifice!$ targetedplayer +auto=if delirium then ability$!name(sacrifice) notatarget(planeswalker|myBattlefield) sacrifice!$ targetedplayer +text=Target player sacrifices a creature or planeswalker. -- Delirium — If there are four or more card types among cards in your graveyard, instead that player sacrifices a creature and a planeswalker. +mana={2}{B} +type=Instant +[/card] +[card] name=Tobias Andrion mana={3}{W}{U} type=Legendary Creature @@ -114006,7 +114024,7 @@ toughness=4 [/card] [card] name=Town Gossipmonger -auto={T}{t(creature|mybattlefield)}:flip(Incited Rabble) +auto={T}{T(other creature|mybattlefield)}:flip(Incited Rabble) text={T}, Tap an untapped creature you control: Transform Town Gossipmonger. mana={W} type=Creature @@ -114554,7 +114572,6 @@ subtype=Aura [/card] [card] name=Traveling Philosopher -text= mana={1}{W} type=Creature subtype=Human Advisor @@ -115228,7 +115245,7 @@ toughness=1 [card] name=Triton Cavalry auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):may moveTo(ownerhand) target(enchantment|battlefield) -text=Heroic ? Whenever you cast a spell that targets Triton Cavalry, you may return target enchantment to its owner's hand. +text=Heroic — Whenever you cast a spell that targets Triton Cavalry, you may return target enchantment to its owner's hand. mana={3}{U} type=Creature subtype=Merfolk Soldier @@ -115257,7 +115274,6 @@ toughness=1 [/card] [card] name=Triton Shorethief -text= mana={U} type=Creature subtype=Merfolk Rogue @@ -115695,7 +115711,7 @@ type=Instant [card] name=Tunneling Geopede auto=@movedTo(land|myBattlefield):damage:1 all(opponent) -text=Landfall ? Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent. +text=Landfall — Whenever a land enters the battlefield under your control, Tunneling Geopede deals 1 damage to each opponent. mana={2}{R} type=Creature subtype=Insect @@ -115808,7 +115824,6 @@ toughness=4 [/card] [card] name=Tusked Colossodon -text= mana={4}{G}{G} type=Creature subtype=Beast @@ -116629,7 +116644,7 @@ subtype=Island Swamp name=Undergrowth Champion auto=this(counter{1/1.1}>0) phantom auto=@movedTo(land|myBattlefield):counter(1/1,1) -text=If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion. -- Landfall ? Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion. +text=If damage would be dealt to Undergrowth Champion while it has a +1/+1 counter on it, prevent that damage and remove a +1/+1 counter from Undergrowth Champion. -- Landfall — Whenever a land enters the battlefield under your control, put a +1/+1 counter on Undergrowth Champion. mana={1}{G}{G} type=Creature subtype=Elemental @@ -116686,7 +116701,7 @@ name=Underworld Coinsmith auto=life:1 auto=@movedTo(enchantment|myBattlefield):life:1 auto={W}{B}{L}:life:-1 opponent -text=Constellation ? Whenever Underworld Coinsmith or another enchantment enters the battlefield under your control, you gain 1 life. -- {W}{B}, Pay 1 life: Each opponent loses 1 life. +text=Constellation — Whenever Underworld Coinsmith or another enchantment enters the battlefield under your control, you gain 1 life. -- {W}{B}, Pay 1 life: Each opponent loses 1 life. mana={W}{B} type=Enchantment Creature subtype=Human Cleric @@ -116857,7 +116872,7 @@ name=Unholy Hunger target=creature auto=destroy auto=if type(*[instant;sorcery]|mygraveyard)~morethan~1 then life:2 srccontroller -text=Destroy target creature. -- Spell mastery ? If there are two or more instant and/or sorcery cards in your graveyard, you gain 2 life. +text=Destroy target creature. -- Spell mastery — If there are two or more instant and/or sorcery cards in your graveyard, you gain 2 life. mana={3}{B}{B} type=Instant [/card] @@ -116873,7 +116888,7 @@ subtype=Aura [card] name=Unified Front auto=token(Kor Ally,Creature Kor Ally,1/1,white)*converge -text=Converge ? Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. +text=Converge — Put a 1/1 white Kor Ally creature token onto the battlefield for each color of mana spent to cast Unified Front. mana={3}{W} type=Sorcery [/card] @@ -116904,7 +116919,7 @@ toughness=3 [/card] [card] name=Uninvited Geist -auto=cantbeblockedby(creature[power>2]) +abilities=skulk auto=@combatdamaged(player) from(this):flip(Unimpeded Trespasser) text=Skulk (This creature can't be blocked by creatures with greater power.) -- When Uninvited Geist deals combat damage to a player, transform it. mana={2}{U} @@ -117758,7 +117773,7 @@ toughness=3 [card] name=Valakut Predator auto=@movedTo(land|myBattlefield):2/2 ueot -text=Landfall ? Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn. +text=Landfall — Whenever a land enters the battlefield under your control, Valakut Predator gets +2/+2 until end of turn. mana={2}{R} type=Creature subtype=Elemental @@ -117852,7 +117867,7 @@ name=Valorous Stance target=creature auto=choice name(indestructible) indestructible ueot auto=if cantargetcard(creature[power>=4]|battlefield) then choice name(Destroy) destroy -text=Choose one ? Target creature gains indestructible until end of turn. - Destroy target creature with toughness 4 or greater. +text=Choose one — Target creature gains indestructible until end of turn. - Destroy target creature with toughness 4 or greater. mana={1}{W} type=Instant [/card] @@ -118461,7 +118476,7 @@ toughness=2 [/card] [card] name=Vedalken Orrery -auto=lord(*[-land]|myhand) flash +auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) spellmastery text=You may cast nonland cards as though they had flash. mana={4} type=Artifact @@ -118963,10 +118978,7 @@ type=Enchantment [/card] [card] name=Vernal Equinox -auto=lord(creature|myhand) flash -auto=lord(creature|opponenthand) flash -auto=lord(enchantment|myhand) flash -auto=lord(enchantment|opponenthand) flash +auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) spellmastery text=Any player may play creature and enchantment cards as though they had flash. mana={3}{G} type=Enchantment @@ -119026,7 +119038,7 @@ type=Enchantment [/card] [card] name=Vessel of Malignity -auto={1}{B}{s}:target(opponent) ability$! moveto(exile) target(*|myhand)!$ targetedplayer assorcery +auto={1}{B}{s}:name(exile from hand) target(opponent) ability$! moveto(exile) target(*|myhand)!$ targetedplayer assorcery text={1}{B}, Sacrifice Vessel of Malignity: Target opponent exiles two cards from his or her hand. Activate this ability only any time you could cast a sorcery. mana={1}{B} type=Enchantment @@ -119769,6 +119781,17 @@ power=1 toughness=1 [/card] [card] +name=Village Messenger +abilities=haste +auto=@each upkeep restriction{lastturn(*|stack)~lessthan~1}:flip(Moonrise Intruder) +text=Haste -- At the beginning of each upkeep, if no spells were cast last turn, transform Village Messenger. +mana={R} +type=Creature +subtype=Human Werewolf +power=1 +toughness=1 +[/card] +[card] name=Village Survivors abilities=vigilance auto=this(controllerlife < 6) lord(other creature|mybattlefield) vigilance @@ -122586,9 +122609,9 @@ type=Enchantment [/card] [card] name=Warped Landscape -auto={T}:Add{1} -auto={2}{T}{s}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! -text={T}: Add {1} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. +auto={T}:Add{C} +auto={2}{T}{S}:moveto(mybattlefield) target(basic|mylibrary) and!(tap(noevent))! +text={T}: Add {C} to your mana pool. -- {2}, {T}, Sacrifice Warped Landscape: Search your library for a basic land card and put it onto the battlefield tapped. Then shuffle your library. type=Land [/card] [card] @@ -122985,7 +123008,7 @@ type=Sorcery [card] name=Wavecrash Triton auto=@targeted(this) from(*[instant;sorcery;enchantment]|myhand,mygraveyard):target(creature|opponentbattlefield) transforms((,newability[tap],newability[frozen])) oneshot -text=Heroic ? Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. +text=Heroic — Whenever you cast a spell that targets Wavecrash Triton, tap target creature an opponent controls. That creature doesn't untap during its controller's next untap step. mana={2}{U} type=Creature subtype=Merfolk Wizard @@ -123015,7 +123038,7 @@ toughness=4 name=Wave-Wing Elemental abilities=flying auto=@movedTo(land|myBattlefield):2/2 ueot -text=Flying -- Landfall ? Whenever a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn. +text=Flying -- Landfall — Whenever a land enters the battlefield under your control, Wave-Wing Elemental gets +2/+2 until end of turn. mana={5}{U} type=Creature subtype=Elemental @@ -123105,8 +123128,7 @@ toughness=4 [/card] [card] name=Wayward Disciple -auto=@movedto(creature|mygraveyard):life:1 controller -auto=@movedto(creature|mygraveyard):life:-1 opponent +auto=@movedto(creature|mygraveyard):target(opponent) life:-1 && life:1 controller text=Whenever Wayward Disciple or another creature you control dies, target opponent loses 1 life and you gain 1 life. type=Creature subtype=Human Cleric @@ -123508,7 +123530,6 @@ toughness=* [/card] [card] name=Wetland Sambar -text= mana={1}{U} type=Creature subtype=Elk @@ -123933,7 +123954,7 @@ type=Instant name=Whitewater Naiads auto=unblockable target(creature) ueot auto=@movedTo(enchantment|myBattlefield):unblockable target(creature) ueot -text=Constellation ? Whenever Whitewater Naiads or another enchantment enters the battlefield under your control, target creature can't be blocked this turn. +text=Constellation — Whenever Whitewater Naiads or another enchantment enters the battlefield under your control, target creature can't be blocked this turn. mana={3}{U}{U} type=Enchantment Creature subtype=Nymph @@ -124550,7 +124571,7 @@ type=Sorcery [card] name=Winding Canyons auto={T}:Add{1} -auto={2}{T}:all(creature|myhand) transforms((,newability[flash ueot])) +auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) spellmastery])) ueot text={T}: Add {1} to your mana pool. -- {2}, {T}: Until end of turn, you may play creature cards as though they had flash. type=Land [/card] @@ -124611,6 +124632,17 @@ power=2 toughness=2 [/card] [card] +name=Windrider Patrol +abilities=flying +auto=@combatdamaged(player) from(this):name(scry) scry:2 scrycore delayed dontshow donothing scrycoreend scryend +text=Flying -- Whenever Windrider Patrol deals combat damage to a player, scry 2. (Look at the top two cards of your library, then put any number of them on the bottom of your library and the rest on top in any order.) +mana={3}{U}{U} +type=Creature +subtype=Merfolk Wizard +power=4 +toughness=3 +[/card] +[card] name=Winds of Change auto=all(*|myhand) transforms((,newability[draw:1],newability[moveTo(mylibrary) and!(shuffle)!])) auto=all(*|opponenthand) transforms((,newability[draw:1],newability[moveTo(mylibrary) and!(shuffle)!])) @@ -125095,7 +125127,6 @@ toughness=1 [/card] [card] name=Witch's Familiar -text= mana={2}{B} type=Creature subtype=Zombie Minotaur @@ -125317,7 +125348,7 @@ type=Instant [/card] [card] name=Wolf of Devil's Breach -auto=this(attacking) {1}{R}{discard(*|myhand)}:damage:manacost +auto=this(attacking) {1}{R}{discard(*|myhand)}:damage:storedmanacost target(creature,planeswalker) text=Whenever Wolf of Devil's Breach attacks, you may pay {1}{R} and discard a card. If you do, Wolf of Devil's Breach deals damage to target creature or planeswalker equal to the discarded card's converted mana cost. mana={3}{R}{R} type=Creature @@ -125590,7 +125621,7 @@ type=Land name=Woodland Wanderer abilities=vigilance,trample auto=counter(1/1,converge) -text=Vigilance, trample -- Converge ? Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. +text=Vigilance, trample -- Converge — Woodland Wanderer enters the battlefield with a +1/+1 counter on it for each color of mana spent to cast it. mana={3}{G} type=Creature subtype=Elemental @@ -126631,7 +126662,7 @@ toughness=2 [/card] [card] name=Yeva, Nature's Herald -auto=lord(creature[green]|myhand) flash +auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) spellmastery abilities=flash text=Flash (You may cast this spell any time you could cast an instant.) -- You may cast green creature cards as though they had flash. mana={2}{G}{G} @@ -126681,7 +126712,6 @@ subtype=Aura [/card] [card] name=Yoked Ox -text= mana={W} type=Creature subtype=Ox @@ -126825,7 +126855,7 @@ toughness=5 name=Zada's Commando abilities=first strike auto={T(ally|myBattlefield)}{t}:damage:1 target(opponent) -text=First strike -- Cohort ? {T}, Tap an untapped Ally you control: Zada's Commando deals 1 damage to target opponent. +text=First strike -- Cohort — {T}, Tap an untapped Ally you control: Zada's Commando deals 1 damage to target opponent. mana={1}{R} type=Creature subtype=Goblin Archer Ally @@ -127528,7 +127558,7 @@ toughness=3 [card] name=Zulaport Chainmage auto={T(ally|myBattlefield)}{t}:target(opponent) life:-2 -text=Cohort ? {T}, Tap an untapped Ally you control: Target opponent loses 2 life. +text=Cohort — {T}, Tap an untapped Ally you control: Target opponent loses 2 life. mana={3}{B} type=Creature subtype=Human Shaman Ally diff --git a/projects/mtg/include/AllAbilities.h b/projects/mtg/include/AllAbilities.h index 83c52bd2e..37fe8f4e7 100644 --- a/projects/mtg/include/AllAbilities.h +++ b/projects/mtg/include/AllAbilities.h @@ -903,19 +903,29 @@ private: } else if (s == "gravecardtypes")//Tarmogoyf { - for (int i = 0; i < 2; i++) + intValue = 0; + int pc = 0, tc = 0, sc = 0, lc = 0, ic = 0, ec = 0, cc = 0, ac = 0; + for (int j = 0; j < 2; j++) { - MTGGameZone * checkZone = card->getObserver()->players[i]->game->graveyard; - intValue = - cardHasTypeinZone("planeswalker",checkZone) + - cardHasTypeinZone("tribal",checkZone) + - cardHasTypeinZone("sorcery",checkZone) + - cardHasTypeinZone("land",checkZone) + - cardHasTypeinZone("instant",checkZone) + - cardHasTypeinZone("enchantment",checkZone) + - cardHasTypeinZone("creature",checkZone) + - cardHasTypeinZone("artifact",checkZone); + MTGGameZone * checkZone = card->getObserver()->players[j]->game->graveyard; + if(cardHasTypeinZone("planeswalker",checkZone)) + pc = 1; + if(cardHasTypeinZone("tribal",checkZone)) + tc = 1; + if(cardHasTypeinZone("sorcery",checkZone)) + sc = 1; + if(cardHasTypeinZone("land",checkZone)) + lc = 1; + if(cardHasTypeinZone("instant",checkZone)) + ic = 1; + if(cardHasTypeinZone("enchantment",checkZone)) + ec = 1; + if(cardHasTypeinZone("creature",checkZone)) + cc = 1; + if(cardHasTypeinZone("artifact",checkZone)) + ac = 1; } + intValue = pc+tc+sc+lc+ic+ec+cc+ac; } else if (s == "powertotalinplay")//Count Total Power of Creatures you control... Formidable { @@ -1133,10 +1143,13 @@ public: TargetChooser * toTcCard, *fromTcCard; bool sourceUntapped; bool isSuspended; + bool limitOnceATurn; + int triggeredTurn; TrCardAddedToZone(GameObserver* observer, int id, MTGCardInstance * source, TargetZoneChooser * toTcZone, TargetChooser * toTcCard, - TargetZoneChooser * fromTcZone = NULL, TargetChooser * fromTcCard = NULL,bool once = false,bool sourceUntapped = false,bool isSuspended = false) : - Trigger(observer, id, source, once), toTcZone(toTcZone), fromTcZone(fromTcZone), toTcCard(toTcCard), fromTcCard(fromTcCard),sourceUntapped(sourceUntapped),isSuspended(isSuspended) + TargetZoneChooser * fromTcZone = NULL, TargetChooser * fromTcCard = NULL,bool once = false,bool sourceUntapped = false,bool isSuspended = false, bool limitOnceATurn = false) : + Trigger(observer, id, source, once), toTcZone(toTcZone), fromTcZone(fromTcZone), toTcCard(toTcCard), fromTcCard(fromTcCard),sourceUntapped(sourceUntapped),isSuspended(isSuspended),limitOnceATurn(limitOnceATurn) { + triggeredTurn = -1; }; @@ -1146,6 +1159,8 @@ public: if (!e) return 0; if(sourceUntapped && source->isTapped() == 1) return 0; + if (limitOnceATurn && triggeredTurn == game->turn) + return 0; if(isSuspended && !source->suspended) return 0; if (!toTcZone->targetsZone(e->to)) return 0; @@ -1160,7 +1175,7 @@ public: { return 0; } - + triggeredTurn = game->turn; return 1; } @@ -1230,6 +1245,28 @@ public: } }; +class TrCardTransformed: public Trigger +{ +public: + TrCardTransformed(GameObserver* observer, int id, MTGCardInstance * source, TargetChooser * tc, bool once = false) : + Trigger(observer, id, source, once, tc) + { + } + + int triggerOnEventImpl(WEvent * event) + { + WEventCardTransforms * e = dynamic_cast (event); + if (!e) return 0; + if (!tc->canTarget(e->card)) return 0; + return 1; + } + + TrCardTransformed * clone() const + { + return NEW TrCardTransformed(*this); + } +}; + class TrCombatTrigger: public Trigger { public: diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index cd3137f39..0a5ba9a79 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -257,7 +257,8 @@ class Constants FLYERSONLY = 135,//can attack only if it has flying TEMPFLASHBACK = 136, NOLEGENDRULE =137, - NB_BASIC_ABILITIES = 138, + CANTTRANSFORM =138, + NB_BASIC_ABILITIES = 139, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/include/ManaCost.h b/projects/mtg/include/ManaCost.h index 04e7733bb..40addf0aa 100644 --- a/projects/mtg/include/ManaCost.h +++ b/projects/mtg/include/ManaCost.h @@ -101,6 +101,7 @@ public: ManaCost(const ManaCost& manaCost); ManaCost& operator= (const ManaCost& manaCost); void copy(ManaCost * _manaCost); + void changeCostTo(ManaCost * _manaCost); int isNull(); int getConvertedCost(); string toString(); diff --git a/projects/mtg/src/AllAbilities.cpp b/projects/mtg/src/AllAbilities.cpp index afddfa39f..2cf3abab5 100644 --- a/projects/mtg/src/AllAbilities.cpp +++ b/projects/mtg/src/AllAbilities.cpp @@ -1653,6 +1653,11 @@ AACounter::AACounter(GameObserver* observer, int id, MTGCardInstance * source, M if (target) { MTGCardInstance * _target = (MTGCardInstance *) target; + if(_target->isFlipped && _target->hasType(Subtypes::TYPE_PLANESWALKER))//is flipping pw + { + this->forceDestroy = 1; + return 0; + } AbilityFactory af(game); if(counterstring.size()) { @@ -3223,7 +3228,7 @@ int AAFlip::resolve() MTGCardInstance * _target = (MTGCardInstance *) target; if (_target) { - if((_target->isACopier||_target->isToken) && !isflipcard && !forcedcopy) + if((_target->isACopier||_target->isToken||_target->has(Constants::CANTTRANSFORM)) && !isflipcard && !forcedcopy) { game->removeObserver(this); return 0; @@ -3240,6 +3245,9 @@ int AAFlip::resolve() MTGCard * fcard = MTGCollection()->getCardByName(flipStats); if(!fcard) return 0; MTGCardInstance * myFlip = NEW MTGCardInstance(fcard, _target->controller()->game); + MTGCardInstance * myParent = NULL; + if(_target->target) + myParent = _target->target; _target->name = myFlip->name; _target->setName(myFlip->name); if(!isflipcard)//transform card @@ -3252,12 +3260,7 @@ int AAFlip::resolve() _target->types = myFlip->types; _target->text = myFlip->text; _target->formattedText = myFlip->formattedText; - //_target->basicAbilities = myFlip->basicAbilities; - for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) - { - if(myFlip->model->data->basicAbilities[k]) - _target->basicAbilities[k] = myFlip->model->data->basicAbilities[k]; - } + _target->basicAbilities = myFlip->model->data->basicAbilities; _target->modbasicAbilities = myFlip->modbasicAbilities; cdaDamage = _target->damageCount; _target->copiedID = myFlip->getMTGId();//for copier @@ -3333,6 +3336,11 @@ int AAFlip::resolve() {//pbonus & tbonus are already computed except damage taken... _target->life -= cdaDamage; } + if(_target->hasSubtype(Subtypes::TYPE_EQUIPMENT)) + { + if(myParent) + _target->target = myParent; + } SAFE_DELETE(myFlip); _target->mPropertiesChangedSinceLastUpdate = true; if(!isflipcard) diff --git a/projects/mtg/src/CardGui.cpp b/projects/mtg/src/CardGui.cpp index 76039122b..e842988f0 100644 --- a/projects/mtg/src/CardGui.cpp +++ b/projects/mtg/src/CardGui.cpp @@ -499,7 +499,7 @@ void CardGui::Render() renderer->RenderQuad(fakemask.get(), actX, (actY-yy), actT, (26 * (actZ*zz) + 1) / 16, 38 * (actZ*zz) / 16); } } - if(tc && tc->source && tc->source->view && tc->source->view->actY >= 1.3 && card == tc->source)//paint the source green while infocus. + if(tc && tc->source && tc->source->view && tc->source->view->actZ >= 1.3 && card == tc->source)//paint the source green while infocus. { if(fakemask) { diff --git a/projects/mtg/src/GameObserver.cpp b/projects/mtg/src/GameObserver.cpp index 3dae21c23..c37427ea1 100644 --- a/projects/mtg/src/GameObserver.cpp +++ b/projects/mtg/src/GameObserver.cpp @@ -1184,56 +1184,56 @@ void GameObserver::Affinity() //kicker is an addon to normal cost, suspend is not casting. add cost as needed EXACTLY as seen below. card->getManaCost()->resetCosts(); ManaCost *newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost(), card->model->data->getManaCost())); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost(), card->model->data->getManaCost())); - card->getManaCost()->copy(newCost); + card->getManaCost()->changeCostTo(newCost); SAFE_DELETE(newCost); if (card->getManaCost()->getAlternative()) { card->getManaCost()->getAlternative()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getAlternative(), card->model->data->getManaCost()->getAlternative())); - card->getManaCost()->getAlternative()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getAlternative(), card->model->data->getManaCost()->getAlternative())); + card->getManaCost()->getAlternative()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getBestow()) { card->getManaCost()->getBestow()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getBestow(), card->model->data->getManaCost()->getBestow())); - card->getManaCost()->getBestow()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getBestow(), card->model->data->getManaCost()->getBestow())); + card->getManaCost()->getBestow()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getRetrace()) { card->getManaCost()->getRetrace()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getRetrace(), card->model->data->getManaCost()->getRetrace())); - card->getManaCost()->getRetrace()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getRetrace(), card->model->data->getManaCost()->getRetrace())); + card->getManaCost()->getRetrace()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getBuyback()) { card->getManaCost()->getBuyback()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getBuyback(), card->model->data->getManaCost()->getBuyback())); - card->getManaCost()->getBuyback()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getBuyback(), card->model->data->getManaCost()->getBuyback())); + card->getManaCost()->getBuyback()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getFlashback()) { card->getManaCost()->getFlashback()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getFlashback(), card->model->data->getManaCost()->getFlashback())); - card->getManaCost()->getFlashback()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getFlashback(), card->model->data->getManaCost()->getFlashback())); + card->getManaCost()->getFlashback()->changeCostTo(newCost); SAFE_DELETE(newCost); } if (card->getManaCost()->getMorph()) { card->getManaCost()->getMorph()->resetCosts(); ManaCost * newCost = NEW ManaCost(); - newCost->copy(card->computeNewCost(card, card->getManaCost()->getMorph(), card->model->data->getManaCost()->getMorph())); - card->getManaCost()->getMorph()->copy(newCost); + newCost->changeCostTo(card->computeNewCost(card, card->getManaCost()->getMorph(), card->model->data->getManaCost()->getMorph())); + card->getManaCost()->getMorph()->changeCostTo(newCost); SAFE_DELETE(newCost); } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index e44aa86c9..b3055061e 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -371,6 +371,24 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe return 0; } + check = restriction[i].find("notdelirum"); + if (check != string::npos) + { + Player * checkCurrent = card->controller(); + MTGGameZone * grave = checkCurrent->game->graveyard; + + int checkTypesAmount = 0; + if(grave->hasType("creature")) checkTypesAmount++; + if (grave->hasType("enchantment")) checkTypesAmount++; + if (grave->hasType("sorcery")) checkTypesAmount++; + if (grave->hasType("instant")) checkTypesAmount++; + if (grave->hasType("land")) checkTypesAmount++; + if (grave->hasType("artifact")) checkTypesAmount++; + if (grave->hasType("planeswalker")) checkTypesAmount++; + if (checkTypesAmount > 3) + return 0; + } + check = restriction[i].find("miracle"); if(check != string::npos) { @@ -824,7 +842,7 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell fromTc->targetter = NULL; //avoid protection from } TriggeredAbility * mover = NEW TrCardAddedToZone(observer, id, card, (TargetZoneChooser *) toTc, - toTcCard, (TargetZoneChooser *) fromTc, fromTcCard, once, sourceUntapped, isSuspended); + toTcCard, (TargetZoneChooser *) fromTc, fromTcCard, once, sourceUntapped, isSuspended, limitOnceATurn); if(neverRemove) { mover->forcedAlive = 1; @@ -845,6 +863,10 @@ TriggeredAbility * AbilityFactory::parseTrigger(string s, string, int id, Spell if (TargetChooser *tc = parseSimpleTC(s,"tappedformana", card)) return NEW TrCardTappedformana(observer, id, card, tc, true,once); + //Card Transforms + if (TargetChooser *tc = parseSimpleTC(s,"transformed", card)) + return NEW TrCardTransformed(observer, id, card, tc,once); + //CombatTrigger //Card card attacked and is blocked found = s.find("combat("); diff --git a/projects/mtg/src/MTGCardInstance.cpp b/projects/mtg/src/MTGCardInstance.cpp index fdb37698d..cf5d094cc 100644 --- a/projects/mtg/src/MTGCardInstance.cpp +++ b/projects/mtg/src/MTGCardInstance.cpp @@ -98,12 +98,7 @@ void MTGCardInstance::copy(MTGCardInstance * card) { MTGCard * source = card->model; CardPrimitive * data = source->data; - - for(int k = 0; k < Constants::NB_BASIC_ABILITIES; k++) - { - if(card->model->data->basicAbilities[k]) - basicAbilities[k] = card->model->data->basicAbilities[k]; - } + basicAbilities = card->model->data->basicAbilities; modbasicAbilities = card->modbasicAbilities; for (size_t i = 0; i < data->types.size(); i++) { @@ -149,6 +144,7 @@ void MTGCardInstance::copy(MTGCardInstance * card) backupTargets = this->backupTargets; storedCard = oldStored; miracle = false; + mPropertiesChangedSinceLastUpdate = true; } MTGCardInstance::~MTGCardInstance() diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 9a3e29f1d..10c4ffac9 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -168,7 +168,8 @@ const char* Constants::MTGBasicAbilities[] = { "shackler", "flyersonly", "tempflashback", - "legendruleremove" + "legendruleremove", + "canttransform" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/ManaCost.cpp b/projects/mtg/src/ManaCost.cpp index c33f1cf17..77f67eb65 100644 --- a/projects/mtg/src/ManaCost.cpp +++ b/projects/mtg/src/ManaCost.cpp @@ -666,6 +666,30 @@ void ManaCost::copy(ManaCost * _manaCost) xColor = _manaCost->xColor; } +void ManaCost::changeCostTo(ManaCost * _manaCost) +{ + if (!_manaCost) + return; + + cost.erase(cost.begin() ,cost.end()); + + for (int i = 0; i <= Constants::NB_Colors; i++) + { + cost.push_back(_manaCost->getCost(i)); + } + + hybrids = _manaCost->hybrids; + + SAFE_DELETE(extraCosts); + + if (_manaCost->extraCosts) + { + extraCosts = _manaCost->extraCosts->clone(); + } + + xColor = _manaCost->xColor; +} + int ManaCost::getCost(int color) { if (cost.size() <= (size_t)color) From 17c28ca5845738de1fae2a285fd92aed56196cfb Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 10 Aug 2016 06:39:09 +0800 Subject: [PATCH 52/54] revised Quick Sliver & Shimmer Myr --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index f57f8b4a6..fb093777b 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -83557,7 +83557,8 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(sliver|hand,library,graveyard,exile) spellmastery +auto=lord(artifact|hand) flash +auto=lord(artifact|library,graveyard,exile) spellmastery text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature @@ -96258,7 +96259,8 @@ toughness=2 [card] name=Shimmer Myr abilities=flash -auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(artifact|myhand) flash +auto=lord(artifact|mylibrary,mygraveyard,myexile) spellmastery text=Flash -- You may cast artifact cards as though they had flash. mana={3} type=Artifact Creature From d3305cadb65d56134ae151fa44c2e56764d2d8c5 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 10 Aug 2016 07:18:46 +0800 Subject: [PATCH 53/54] quick sliver typo --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index fb093777b..aa175272a 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -83557,8 +83557,9 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(artifact|hand) flash -auto=lord(artifact|library,graveyard,exile) spellmastery +auto=lord(sliver|myhand) flash +auto=lord(sliver|opponenthand) flash +auto=lord(sliver|library,graveyard,exile) spellmastery text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature From 14d8d65de0983b977372dc7c1667c02a5bec695e Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Wed, 10 Aug 2016 07:31:15 +0800 Subject: [PATCH 54/54] asflash spellmastery is for alternate cost, added asflash... so cards that find cards with flash don't find asflash... --- projects/mtg/bin/Res/sets/primitives/mtg.txt | 19 ++++++++----------- projects/mtg/include/MTGDefinitions.h | 3 ++- projects/mtg/src/MTGDefinitions.cpp | 3 ++- projects/mtg/src/MTGRules.cpp | 8 ++++---- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index aa175272a..d874aff17 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -2600,7 +2600,7 @@ toughness=0 [card] name=Aluren auto=lord(creature[manacost<=3]|hand,exile,graveyard) zerocast -auto=lord(creature[manacost<=3]|hand,exile,graveyard) spellmastery +auto=lord(creature[manacost<=3]|hand,exile,graveyard) asflash text=Any player may play creature cards with converted mana cost 3 or less without paying their mana cost and as though they had flash. mana={2}{G}{G} type=Enchantment @@ -83557,9 +83557,7 @@ toughness=4 [card] name=Quick Sliver abilities=flash -auto=lord(sliver|myhand) flash -auto=lord(sliver|opponenthand) flash -auto=lord(sliver|library,graveyard,exile) spellmastery +auto=lord(sliver|hand,library,graveyard,exile) asflash text=Flash -- Any player may play Sliver cards as though they had flash. mana={1}{G} type=Creature @@ -85170,7 +85168,7 @@ toughness=3 name=Rattlechains abilities=flash, flying auto=target(spirit) hexproof ueot -auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(spirit|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- Flying -- When Rattlechains enters the battlefield, target Spirit gains hexproof until end of turn. -- You may cast Spirit spells as though they had flash. mana={1}{U} type=Creature @@ -96260,8 +96258,7 @@ toughness=2 [card] name=Shimmer Myr abilities=flash -auto=lord(artifact|myhand) flash -auto=lord(artifact|mylibrary,mygraveyard,myexile) spellmastery +auto=lord(artifact|myhand,mylibrary,mygraveyard,myexile) asflash text=Flash -- You may cast artifact cards as though they had flash. mana={3} type=Artifact Creature @@ -118479,7 +118476,7 @@ toughness=2 [/card] [card] name=Vedalken Orrery -auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(*[-land]|myhand,mylibrary,mygraveyard,myexile) asflash text=You may cast nonland cards as though they had flash. mana={4} type=Artifact @@ -118981,7 +118978,7 @@ type=Enchantment [/card] [card] name=Vernal Equinox -auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) spellmastery +auto=lord(*[creature;enchantment]|hand,library,graveyard,exile) asflash text=Any player may play creature and enchantment cards as though they had flash. mana={3}{G} type=Enchantment @@ -124574,7 +124571,7 @@ type=Sorcery [card] name=Winding Canyons auto={T}:Add{1} -auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) spellmastery])) ueot +auto={2}{T}:name(flash) emblem transforms((,newability[lord(creature|myhand,mylibrary,mygraveyard,myexile) asflash])) ueot text={T}: Add {1} to your mana pool. -- {2}, {T}: Until end of turn, you may play creature cards as though they had flash. type=Land [/card] @@ -126665,7 +126662,7 @@ toughness=2 [/card] [card] name=Yeva, Nature's Herald -auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) spellmastery +auto=lord(creature[green]|myhand,mylibrary,mygraveyard,myexile) asflash abilities=flash text=Flash (You may cast this spell any time you could cast an instant.) -- You may cast green creature cards as though they had flash. mana={2}{G}{G} diff --git a/projects/mtg/include/MTGDefinitions.h b/projects/mtg/include/MTGDefinitions.h index 0a5ba9a79..f3d8c5451 100644 --- a/projects/mtg/include/MTGDefinitions.h +++ b/projects/mtg/include/MTGDefinitions.h @@ -258,7 +258,8 @@ class Constants TEMPFLASHBACK = 136, NOLEGENDRULE =137, CANTTRANSFORM =138, - NB_BASIC_ABILITIES = 139, + ASFLASH =139, + NB_BASIC_ABILITIES = 140, RARITY_S = 'S', //Special Rarity RARITY_M = 'M', //Mythics diff --git a/projects/mtg/src/MTGDefinitions.cpp b/projects/mtg/src/MTGDefinitions.cpp index 10c4ffac9..7474192c1 100644 --- a/projects/mtg/src/MTGDefinitions.cpp +++ b/projects/mtg/src/MTGDefinitions.cpp @@ -169,7 +169,8 @@ const char* Constants::MTGBasicAbilities[] = { "flyersonly", "tempflashback", "legendruleremove", - "canttransform" + "canttransform", + "asflash" }; map Constants::MTGBasicAbilitiesMap; diff --git a/projects/mtg/src/MTGRules.cpp b/projects/mtg/src/MTGRules.cpp index dba96f87f..d7c8acb38 100644 --- a/projects/mtg/src/MTGRules.cpp +++ b/projects/mtg/src/MTGRules.cpp @@ -334,7 +334,7 @@ int MTGPutInPlayRule::isReactingToClick(MTGCardInstance * card, ManaCost *) else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -559,7 +559,7 @@ int MTGKickerRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(!card->getManaCost()->getKicker()) return 0; - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -748,7 +748,7 @@ int MTGAlternativeCostRule::isReactingToClick(MTGCardInstance * card, ManaCost * else return 0; } - else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) + else if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || card->has(Constants::SPELLMASTERY) || card->has(Constants::OFFERING) || (card->StackIsEmptyandSorcerySpeed())) { if(card->controller()->epic) return 0; @@ -1313,7 +1313,7 @@ int MTGMorphCostRule::isReactingToClick(MTGCardInstance * card, ManaCost *) if(card->controller()->epic)//zoetic cavern... morph is casted for a cost... return 0; //note lands can morph too, this is different from other cost types. - if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || (card->StackIsEmptyandSorcerySpeed())) + if ((card->hasType(Subtypes::TYPE_INSTANT)) || card->has(Constants::FLASH) || card->has(Constants::ASFLASH) || (card->StackIsEmptyandSorcerySpeed())) { if (card->controller()->game->playRestrictions->canPutIntoZone(card, card->controller()->game->stack) == PlayRestriction::CANT_PLAY) return 0;