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;