added 2 new restrictions for use in triggers and abilities

ownerscontrol
opponentscontrol

ownerscontrol returns 1 if the owner has the card in thier battlefield. 0 otherwise. vice versa.
this should make it easier to add cards which should be treated differently depending on who controls them.
This commit is contained in:
omegablast2002@yahoo.com
2013-02-02 18:42:39 +00:00
parent ef4a8c6d84
commit 2b9fdc41dc

View File

@@ -332,6 +332,18 @@ int AbilityFactory::parseCastRestrictions(MTGCardInstance * card, Player * playe
if(!isMorbid)
return 0;
}
check = restriction[i].find("ownerscontrol");
if(check != string::npos)
{
if(card->currentZone != card->owner->game->battlefield)
return 0;
}
check = restriction[i].find("opponentscontrol");
if(check != string::npos)
{
if(card->currentZone == card->owner->game->battlefield)
return 0;
}
check = restriction[i].find("one of a kind");
if(check != string::npos)
{