additional fixes

This commit is contained in:
Anthony Calosa
2017-01-21 04:29:16 +08:00
parent 0b9468da1b
commit 37b3f28065
2 changed files with 39 additions and 64 deletions

View File

@@ -541,6 +541,14 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0;
}
check = restriction[i].find("outnumbered");//opponent controls atleast 4 or more creatures than you
if(check != string::npos)
{
bool isoutnumbered = (card->controller()->opponent()->inPlay()->countByType("creature") - card->controller()->inPlay()->countByType("creature"))>3;
if(!isoutnumbered)
return 0;
}
check = restriction[i].find("hasdefender");
if(check != string::npos)
{