some refactor

change some card from using "all" to "lord"
This commit is contained in:
Anthony Calosa
2017-01-27 22:15:03 +08:00
parent 30a7eef611
commit 19063fd8db
2 changed files with 292 additions and 292 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -384,6 +384,23 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
return 0; return 0;
} }
//Ensnaring Bridge
check = restriction[i].find("powermorethanopponenthand");
if (check != string::npos)//for opponent creatures
{
Player * checkCurrent = card->controller();
if(card->getCurrentPower() <= checkCurrent->opponent()->game->hand->nb_cards)
return 0;
}
check = restriction[i].find("powermorethancontrollerhand");
if (check != string::npos)//for controller creatures
{
Player * checkCurrent = card->controller();
if(card->getCurrentPower() <= checkCurrent->game->hand->nb_cards)
return 0;
}
//end
check = restriction[i].find("morecardsthanopponent"); check = restriction[i].find("morecardsthanopponent");
if (check != string::npos) if (check != string::npos)