From 77d87902d998077bc0efa7004b109a24a56146c6 Mon Sep 17 00:00:00 2001 From: Anthony Calosa Date: Sat, 5 Aug 2017 18:15:44 +0800 Subject: [PATCH] Add restriction for exert hasexerted and notexerted --- projects/mtg/src/MTGAbility.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 1eb729b85..eb359bbda 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -576,6 +576,20 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe return 0; } + check = restriction[i].find("hasexerted"); + if(check != string::npos) + { + if(!card->exerted) + return 0; + } + + check = restriction[i].find("notexerted"); + if(check != string::npos) + { + if(card->exerted) + return 0; + } + check = restriction[i].find("discardbyopponent"); if(check != string::npos) {