From bec7428f184c48622ccc7ef944df6b7c61405af8 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Tue, 12 Apr 2011 22:07:37 +0000 Subject: [PATCH] added casting restriction "casted(TC)" required zone marking either opponentstack or mystack..this is to fix lure of the prey, tho i warn you this card is VERY hard to use cause ai will not just sit there and give you a chance to cast it. it usable tho if you turn on interrupt phases. --- projects/mtg/src/MTGAbility.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 0843979d8..b6d80495e 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -148,6 +148,22 @@ int MTGAbility::parseCastRestrictions(MTGCardInstance * card,Player * player,str if(player->game->stack->seenThisTurn("*", Constants::CAST_ALL) < 1) return 0; } + check = restriction[i].find("casted("); + if(check != string::npos) + { + size_t end = restriction[i].find(")",check); + string tc = restriction[i].substr(check + 7,end - check - 7); + if(tc.find("|mystack") != string::npos) + { + if(player->game->stack->seenThisTurn(tc, Constants::CAST_ALL) < 1) + return 0; + } + if(tc.find("|opponentstack") != string::npos) + { + if(player->opponent()->game->stack->seenThisTurn(tc, Constants::CAST_ALL) < 1) + return 0; + } + } check = restriction[i].find("one of a kind"); if(check != string::npos) {